query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Creates a new JobInfo RecordBuilder by copying an existing JobInfo instance
public static br.unb.cic.bionimbus.avro.gen.JobInfo.Builder newBuilder(br.unb.cic.bionimbus.avro.gen.JobInfo other) { return new br.unb.cic.bionimbus.avro.gen.JobInfo.Builder(other); }
[ "public static br.unb.cic.bionimbus.avro.gen.JobInfo.Builder newBuilder(br.unb.cic.bionimbus.avro.gen.JobInfo.Builder other) {\n return new br.unb.cic.bionimbus.avro.gen.JobInfo.Builder(other);\n }", "public static br.unb.cic.bionimbus.avro.gen.JobInfo.Builder newBuilder() {\n return new br.unb.cic.bionimbus.avro.gen.JobInfo.Builder();\n }", "public static JobBuilder newJob() {\n return new JobBuilder();\n }", "public JobBuilder toBuilder() {\n JobBuilder jobBuilder = new JobBuilder();\n\n jobBuilder.jobId = this.jobId;\n jobBuilder.jobStatus = this.jobStatus;\n jobBuilder.jobTitle = this.jobTitle;\n jobBuilder.location = this.jobLocation;\n jobBuilder.jobDescription = this.jobDescription;\n jobBuilder.jobPay = this.jobPay;\n jobBuilder.requirements = this.requirements;\n jobBuilder.postExpiryTimestamp = this.postExpiryTimestamp;\n jobBuilder.jobDuration = this.jobDuration;\n\n return jobBuilder;\n }", "private Job(com.google.protobuf.GeneratedMessage.ExtendableBuilder<cb.Careerbuilder.Job, ?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public static JobBuilder newJob(Class<? extends Job> jobClass) {\n JobBuilder b = new JobBuilder();\n b.ofType(jobClass);\n return b;\n }", "private Builder(com.epam.eco.commons.avro.data.TestJob other) {\n super(SCHEMA$, MODEL$);\n if (isValidValue(fields()[0], other.company)) {\n this.company = data().deepCopy(fields()[0].schema(), other.company);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.position)) {\n this.position = data().deepCopy(fields()[1].schema(), other.position);\n fieldSetFlags()[1] = true;\n }\n this.positionBuilder = null;\n if (isValidValue(fields()[2], other.previousJob)) {\n this.previousJob = data().deepCopy(fields()[2].schema(), other.previousJob);\n fieldSetFlags()[2] = true;\n }\n this.previousJobBuilder = null;\n }", "private JobMetadata(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public JobDetail build() {\n return null;\n }", "public JobBuilder withIdentity(JobKey jobKey) {\n this.key = jobKey;\n return this;\n }", "public static com.epam.eco.commons.avro.data.TestJob.Builder newBuilder(com.epam.eco.commons.avro.data.TestJob other) {\n if (other == null) {\n return new com.epam.eco.commons.avro.data.TestJob.Builder();\n } else {\n return new com.epam.eco.commons.avro.data.TestJob.Builder(other);\n }\n }", "public BlitlineImageJob.Builder jobBuilder() {\n BlitlineImageJob.Builder builder = BlitlineImageJob.forApplication(applicationId);\n if (postbackUrlProvider != null)\n builder.withPostback(postbackUrlProvider.getPostbackUrl());\n\n if (alwaysExtendedMetadata)\n builder.withExtendedMetadata();\n\n return builder;\n }", "private Builder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.name)) {\n this.name = data().deepCopy(fields()[0].schema(), other.name);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.lastName)) {\n this.lastName = data().deepCopy(fields()[1].schema(), other.lastName);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.country)) {\n this.country = data().deepCopy(fields()[2].schema(), other.country);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.state)) {\n this.state = data().deepCopy(fields()[3].schema(), other.state);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.gender)) {\n this.gender = data().deepCopy(fields()[4].schema(), other.gender);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.date)) {\n this.date = data().deepCopy(fields()[5].schema(), other.date);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.height)) {\n this.height = data().deepCopy(fields()[6].schema(), other.height);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.weight)) {\n this.weight = data().deepCopy(fields()[7].schema(), other.weight);\n fieldSetFlags()[7] = true;\n }\n }", "public void setJobInfo(String jobInfo) {\n this.jobInfo = jobInfo;\n }", "public static com.epam.eco.commons.avro.data.TestJob.Builder newBuilder(com.epam.eco.commons.avro.data.TestJob.Builder other) {\n if (other == null) {\n return new com.epam.eco.commons.avro.data.TestJob.Builder();\n } else {\n return new com.epam.eco.commons.avro.data.TestJob.Builder(other);\n }\n }", "public static com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder newBuilder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo other) {\n if (other == null) {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder();\n } else {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder(other);\n }\n }", "public static com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder newBuilder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder other) {\n if (other == null) {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder();\n } else {\n return new com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder(other);\n }\n }", "@Override\n\t\tpublic Builder profileInfo(final ProfileInfo profileInfo) {\n\t\t\tthis.map.put(PROFILE_INFO, profileInfo);\n\t\t\tthis.previous = PROFILE_INFO;\n\t\t\treturn builder();\n\t\t}", "public static iodine.avro.TapRecord.Builder newBuilder(iodine.avro.TapRecord.Builder other) {\n return new iodine.avro.TapRecord.Builder(other);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds and runs the it12 test project (MOJO1648)
public void testIt12() throws Exception { runTest("src/test/it12"); }
[ "public void testBuildAndRun() {\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n JavaNode sampleClass1Node = new JavaNode(sample1Node, SAMPLE1_FILE_NAME);\n // increase timeout to 60 seconds\n MainWindowOperator.getDefault().getTimeouts().setTimeout(\"Waiter.WaitingTime\", 60000);\n // start to track Main Window status bar\n MainWindowOperator.StatusTextTracer stt = MainWindowOperator.getDefault().getStatusTextTracer();\n stt.start();\n // call Build|Compile main menu item\n new CompileJavaAction().perform(sampleClass1Node);\n // \"SampleProject (compile-single)\"\n String compileSingleTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"compile-single\"}); // NOI18N\n // \"Finished building SampleProject (compile-single)\"\n String finishedCompileSingleLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{compileSingleTarget});\n // wait message \"Finished building SampleProject (compile-single)\"\n stt.waitText(finishedCompileSingleLabel); \n\n // \"Run\"\n // TODO bundle property name should be changed back to Menu/RunProject after updating bundle\n String runItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.Bundle\", \"Menu/BuildProject\");\n // \"Run File\"\n String runFileItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\",\n \"LBL_RunSingleAction_Name\",\n new Object[]{new Integer(1), SAMPLE1_FILE_NAME});\n // call \"Run|Run File|Run \"SampleClass1.java\"\"\n new Action(runItem + \"|\" + runFileItem, null).perform(sampleClass1Node);\n // \"SampleProject (run-single)\"\n String runSingleTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"run-single\"}); // NOI18N\n // \"Finished building SampleProject (run-single)\"\n String finishedRunSingleLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{runSingleTarget});\n // wait message \"Finished building SampleProject (run-single)\"\n stt.waitText(finishedRunSingleLabel); // NOI18N\n // check Hello and Good bye was printed out to the output window\n\n OutputTabOperator outputOper = new OutputTabOperator(\"run-single\"); //NOI18N\n outputOper.waitText(\"Hello\"); //NOI18N\n outputOper.waitText(\"Good bye\"); //NOI18N\n\n // \"Run\"\n String buildItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.Bundle\", \"Menu/BuildProject\");\n // \"Build Main Project\"\n String buildMainProjectItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\", \"LBL_BuildMainProjectAction_Name\");\n // call \"Run|Build Main Project\" main menu item\n new Action(buildItem + \"|\" + buildMainProjectItem, null).perform();\n // \"SampleProject (jar)\"\n String jarTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"jar\"}); // NOI18N\n // \"Finished building SampleProject (jar)\"\n String finishedJarLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{jarTarget});\n // wait message \"Finished building SampleProject (jar)\"\n stt.waitText(finishedJarLabel);\n\n // Run Main Project\n String runMainProjectItem = Bundle.getStringTrimmed(\"org.netbeans.modules.project.ui.actions.Bundle\", \"LBL_RunMainProjectAction_Name\");\n // call \"Run|Run Main Project\" main menu item\n new Action(runItem + \"|\" + runMainProjectItem, null).perform();\n // \"SampleProject (run)\"\n String runTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"run\"}); // NOI18N\n // \"Finished building SampleProject (run)\"\n String finishedRunLabel = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new String[]{runTarget});\n // wait message \"Finished building SampleProject (run)\"\n stt.waitText(finishedRunLabel);\n\n stt.stop();\n }", "public void run() {\n\n TestSuiteUtils.printHeader(this);\n\n //\n // Initial Setup\n //\n SimpleDateFormat date_format = TestSuiteUtils.getDateFormat();\n Date timestamp = new Date(System.currentTimeMillis());\n\n ComponentMetaData cmd = new ComponentMetaData(\"\",1,1.0);\n\n addToLog(\n \" 1. Test ComponentMetaData: setName(), getName() ... \"\n + date_format.format(timestamp));\n\n cmd.setName(\"MEMERelaEditor\");\n if (cmd.getName().equals(\"MEMERelaEditor\"))\n addToLog(\" 1. Test Passed\");\n else {\n addToLog(\" 1. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 2. Test ComponentMetaData: setRelease(), getRelease() ... \"\n + date_format.format(timestamp));\n\n cmd.setRelease(2);\n if (cmd.getRelease() == 2)\n addToLog(\" 2. Test Passed\");\n else {\n addToLog(\" 2. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 3. Test ComponentMetaData: setVersion(), getVersion() ... \"\n + date_format.format(timestamp));\n\n cmd.setVersion(3.0);\n if (cmd.getVersion() == 3.0)\n addToLog(\" 3. Test Passed\");\n else {\n addToLog(\" 3. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 4. Test ComponentMetaData: setServer(), getServer() ... \"\n + date_format.format(timestamp));\n\n cmd.setServer(\"MEME4\");\n if (cmd.getServer().equals(\"MEME4\"))\n addToLog(\" 4. Test Passed\");\n else {\n addToLog(\" 4. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 5. Test ComponentMetaData: setUsername(), getUsername() ... \"\n + date_format.format(timestamp));\n\n cmd.setUsername(\"user1\");\n if (cmd.getUsername().equals(\"user1\"))\n addToLog(\" 5. Test Passed\");\n else {\n addToLog(\" 5. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 6. Test ComponentMetaData: setDirectory(), getDirectory() ... \"\n + date_format.format(timestamp));\n\n cmd.setDirectory(\"$MEME_HOME/Release\");\n if (cmd.getDirectory().equals(\"$MEME_HOME/Release\"))\n addToLog(\" 6. Test Passed\");\n else {\n addToLog(\" 6. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 7. Test ComponentMetaData: setFile(), getFile() ... \"\n + date_format.format(timestamp));\n\n cmd.setFile(\"xml.jar\");\n if (cmd.getFile().equals(\"xml.jar\"))\n addToLog(\" 7. Test Passed\");\n else {\n addToLog(\" 7. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 8. Test ComponentMetaData: setPassword(), getPassword() ... \"\n + date_format.format(timestamp));\n\n char[] password = {'m', 'y', 'p', 'a', 's', 's'};\n cmd.setPassword(password);\n char[] passwd = cmd.getPassword();\n\n if (passwd.equals(password))\n addToLog(\" 8. Test Passed\");\n else {\n addToLog(\" 8. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\n \" 9. Test ComponentMetaData: clearPassword() ... \"\n + date_format.format(timestamp));\n\n cmd.clearPassword();\n if (passwd != null)\n addToLog(\" 9. Test Passed\");\n else {\n addToLog(\" 9. Test Failed\");\n thisTestFailed();\n }\n\n addToLog(\"\");\n\n if (this.isPassed())\n addToLog(\" All tests passed\");\n else\n addToLog(\" At least one test did not complete successfully\");\n\n //\n // Main Footer\n //\n\n addToLog(\"\");\n\n addToLog(\"-------------------------------------------------------\");\n addToLog(\"Finished TestSuiteComponentMetaData at \" +\n date_format.format(new Date(System.currentTimeMillis())));\n addToLog(\"-------------------------------------------------------\");\n\n }", "public void testIt9() throws Exception {\n runTest(\"src/test/it9\");\n }", "@Test\n\tpublic void testBuildProjectWithNoCodeGenFolder() {\n\n TestUtil.selectButtonInDialog(1000, \"Yes\");\n\t\trunGettingStartedAction();\n TestingUtilities.allowJobCompletion();\n\n verifyProjectCreated();\n\n final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectName);\n\n // delete the gen/code_generation/ folder\n IFile codeGenDir = project.getFile(markingFolder + codeGenFolder);\n IPath location = codeGenDir.getLocation();\n java.io.File codeGenDirFile = null;\n if (location != null) { \n \tcodeGenDirFile = location.toFile();\n \tFileUtils.deleteQuietly(codeGenDirFile);\n assertFalse(\"Directory \" + codeGenDir.getName() + \" exists and it should not.\", directoryExists(codeGenDirFile));\n }\n \n // build\n try {\n TestingUtilities.buildProject(project);\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Failed to build the project. \" + e.getMessage()); //$NON-NLS-1$\n\t\t}\n \n // make sure pre-builder output exists\n IFile file = project.getFile(markingFolder + codeGenFolder + ProjectName + \".sql\");\n assertTrue(\"Expected file: \" + file.getName() + \" does not exist.\", file.exists());\n\n\t}", "public void generateTestBed() {\n\t\tnew AutomatedTester().testAll();\n\t}", "default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }", "public static void main(String[] args) {\n inOrbitDestinationControllerTest();\n// inOrbitReplayControllerTest();\n\n }", "@Test\n public void startBraid() throws IOException {\n\n\n File buildFile = testProjectDir.newFile(\"build.gradle\");\n FileOutputStream outputStream = new FileOutputStream(buildFile);\n outputStream.write(script.getBytes());\n outputStream.close();\n\n\n BuildResult braid = GradleRunner.create()\n .withProjectDir(testProjectDir.getRoot())\n .withArguments(\"braid\")\n .withPluginClasspath()\n .build();\n\n assertEquals(braid.task(\":braid\").getOutcome(), TaskOutcome.SUCCESS);\n\n }", "@Test\n\tpublic void testBuildProjectWithNoGenFolder() {\n\n TestUtil.selectButtonInDialog(1000, \"Yes\");\n\t\trunGettingStartedAction();\n TestingUtilities.allowJobCompletion();\n\n verifyProjectCreated();\n\n final IProject project = TestingUtilities.getProject(ProjectName);\n\n // delete the gen/ folder\n IFile genDir = project.getFile(markingFolder);\n IPath location = genDir.getLocation();\n java.io.File genDirFile = null;\n if (location != null) { \n \tgenDirFile = location.toFile();\n \tFileUtils.deleteQuietly(genDirFile);\n assertFalse(\"Directory \" + genDir.getName() + \" exists and it should not.\", directoryExists(genDirFile));\n }\n \n // build\n try {\n TestingUtilities.buildProject(project);\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Failed to build the project. \" + e.getMessage()); //$NON-NLS-1$\n\t\t}\n \n // make sure pre-builder output exists\n IFile file = project.getFile(markingFolder + codeGenFolder + ProjectName + \".sql\");\n assertTrue(\"Expected file: \" + file.getName() + \" does not exist.\", file.exists());\n \n\t}", "public void testIt19() throws Exception {\n runTest(\"src/test/it19\");\n }", "public void test0CreateProject() {\n\t\tlogger.info(\"test0CreateProject\");\n\t\tFlexoLoggingManager.forceInitialize(-1, true, null, Level.INFO, null);\n\t\tcreateProject(TEST_CG);\n\t}", "@Test\n public void assemble() {\n AsakusaProject project = provider.newInstance(\"simple\")\n .with(ContentsConfigurator.copy(data(\"ksv/src\"), \"src\"))\n .with(ContentsConfigurator.copy(data(\"ksv-ext/src\"), \"src\"));\n project.gradle(\"assemble\");\n Bundle contents = project.getContents();\n assertThat(contents.find(\"build/libs/simple.jar\"), is(not(Optional.empty())));\n }", "@Test\r\n public void testPassMaths() {\r\n String testedFile = \"Maths.noz\";\r\n\r\n File passTest = new File(\"src/test/java/pass/\"+testedFile);\r\n File genClassDir = new File(\"src/test/java/pass\");\r\n System.out.print(\"\\n\\n\");\r\n System.out.println(\"================================================\");\r\n System.out.println(\"Starting testPass on \" + passTest.toString() + \" to test and compile.\");\r\n\r\n args = new String[]{\"-v\", \"DEBUG\", \"-d\", genClassDir.getAbsolutePath(), passTest.toString()};\r\n\r\n exit.expectSystemExitWithStatus(0);\r\n Nozc.main(args);\r\n }", "@Test\n public void testbook() {\n AsakusaProject project = provider.newInstance(\"simple\")\n .with(ContentsConfigurator.copy(data(\"ksv/src/main/dmdl\"), \"src/main/dmdl\"));\n project.gradle(\"generateTestbook\");\n Bundle contents = project.getContents();\n assertThat(\n contents.find(\"build/excel/ksv.xls\"),\n is(not(Optional.empty())));\n }", "public void testBasic() {\n \tIProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(\"P1\");\n \tensureExistsInWorkspace(project, true);\n\tSnowBuilder builder= SnowBuilder.getInstance();\n\tbuilder.reset();\n \ttry {\n \t\tsetAutoBuilding(true);\n \t\tIProjectDescription desc = project.getDescription();\n \t\tdesc.setNatureIds(new String[] {NATURE_WATER, NATURE_SNOW});\n \t\tproject.setDescription(desc, IResource.FORCE, getMonitor());\n \t} catch (CoreException e) {\n \t\tfail(\"0.99\", e);\n \t}\n \tbuilder.addExpectedLifecycleEvent(SnowBuilder.SET_INITIALIZATION_DATA);\n \tbuilder.addExpectedLifecycleEvent(SnowBuilder.STARTUP_ON_INITIALIZE);\n \tbuilder.addExpectedLifecycleEvent(SnowBuilder.SNOW_BUILD_EVENT);\n \tbuilder.assertLifecycleEvents(\"1.0\");\n }", "public static void main(String[] args) {\n // do unit test here\n }", "@Test\r\n public void testPassFibo() {\r\n String testedFile = \"Fibo.noz\";\r\n\r\n File passTest = new File(\"src/test/java/pass/\"+testedFile);\r\n File genClassDir = new File(\"src/test/java/pass\");\r\n System.out.print(\"\\n\\n\");\r\n System.out.println(\"================================================\");\r\n System.out.println(\"Starting testPass on \" + passTest.toString() + \" to test and compile.\");\r\n\r\n args = new String[]{\"-v\", \"DEBUG\", \"-d\", genClassDir.getAbsolutePath(), passTest.toString()};\r\n\r\n exit.expectSystemExitWithStatus(0);\r\n Nozc.main(args);\r\n }", "public static void main(String[] args) {\n\t\t\n\n\t\torg.junit.runner.JUnitCore.main(\"org.infy.entities.triggerinputs.DeployArtifactTest\");\n\t}", "private void buildInstrumentationTestCaseApplication(BaseCommand.Builder builder) {\n builder\n .addLibraryFiles(ToolHelper.getAndroidJar(AndroidApiLevel.O))\n .addProgramFiles(\n Paths.get(\"build\", \"test\", \"examplesAndroidApi\",\n \"classes\", \"instrumentationtest\", \"InstrumentationTest.class\"))\n .addProgramFiles(ToolHelper.getFrameworkJunitJarPath(DexVm.ART_7_0_0_HOST));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ REMARK 350 BIOMOLECULE: 1 REMARK 350 APPLY THE FOLLOWING TO CHAINS: 1, 2, 3, 4, 5, 6, REMARK 350 A, B, C REMARK 350 BIOMT1 1 1.000000 0.000000 0.000000 0.00000 REMARK 350 BIOMT2 1 0.000000 1.000000 0.000000 0.00000 REMARK 350 BIOMT3 1 0.000000 0.000000 1.000000 0.00000 REMARK 350 BIOMT1 2 0.309017 0.809017 0.500000 0.00000 REMARK 350 BIOMT2 2 0.809017 0.500000 0.309017 0.00000 REMARK 350 BIOMT3 2 0.500000 0.309017 0.809017 0.00000 or, as fount in REMARK 350 AN OLIGOMER OF TYPE :HEXAMERIC : CAN BE ASSEMBLED BY REMARK 350 APPLYING THE FOLLOWING TO CHAINS: REMARK 350 A, D REMARK 350 BIOMT1 1 1.000000 0.000000 0.000000 0.00000 REMARK 350 BIOMT2 1 0.000000 1.000000 0.000000 0.00000 REMARK 350 BIOMT3 1 0.000000 0.000000 1.000000 0.00000 REMARK 350 IN ADDITION APPLY THE FOLLOWING TO CHAINS: REMARK 350 A, D REMARK 350 BIOMT1 2 0.000000 1.000000 0.000000 0.00000 REMARK 350 BIOMT2 2 1.000000 1.000000 0.000000 0.00000 REMARK 350 BIOMT3 2 0.000000 0.000000 1.000000 0.00000 REMARK 350 IN ADDITION APPLY THE FOLLOWING TO CHAINS: REMARK 350 A, D REMARK 350 BIOMT1 3 1.000000 1.000000 0.000000 0.00000 REMARK 350 BIOMT2 3 1.000000 0.000000 0.000000 0.00000 REMARK 350 BIOMT3 3 0.000000 0.000000 1.000000 0.00000
private void remark350() throws Exception { JmolList<Matrix4f> biomts = null; vBiomolecules = new JmolList<Map<String,Object>>(); chainAtomCounts = new int[255]; String title = ""; String chainlist = ""; int iMolecule = 0; boolean needLine = true; Map<String, Object> info = null; int nBiomt = 0; Matrix4f mIdent = new Matrix4f(); mIdent.setIdentity(); while (true) { if (needLine) readLine(); else needLine = true; if (line == null || !line.startsWith("REMARK 350")) break; try { if (line.startsWith("REMARK 350 BIOMOLECULE:")) { if (nBiomt > 0) Logger.info("biomolecule " + iMolecule + ": number of transforms: " + nBiomt); info = new Hashtable<String, Object>(); biomts = new JmolList<Matrix4f>(); iMolecule = parseIntStr(line.substring(line.indexOf(":") + 1)); title = line.trim(); info.put("molecule", Integer.valueOf(iMolecule)); info.put("title", title); info.put("chains", ""); info.put("biomts", biomts); vBiomolecules.addLast(info); nBiomt = 0; //continue; need to allow for next IF, in case this is a reconstruction } if (line.indexOf("APPLY THE FOLLOWING TO CHAINS:") >= 0) { if (info == null) { // need to initialize biomolecule business first and still flag this section // see http://www.ebi.ac.uk/msd-srv/pqs/pqs-doc/macmol/1k28.mmol needLine = false; line = "REMARK 350 BIOMOLECULE: 1 APPLY THE FOLLOWING TO CHAINS:"; continue; } chainlist = ":" + line.substring(41).trim().replace(' ', ':'); needLine = false; while (readLine() != null && line.indexOf("BIOMT") < 0 && line.indexOf("350") == 7) chainlist += ":" + line.substring(11).trim().replace(' ', ':'); if (checkFilterKey("BIOMOLECULE " + iMolecule + ";")) { setFilter(filter.replace(':', '_') + chainlist); Logger.info("filter set to \"" + filter + "\""); this.vBiomts = biomts; } info.put("chains", chainlist); continue; } /* 0 1 2 3 4 5 6 7 0123456789012345678901234567890123456789012345678901234567890123456789 REMARK 350 BIOMT2 1 0.000000 1.000000 0.000000 0.00000 */ if (line.startsWith("REMARK 350 BIOMT1 ")) { nBiomt++; float[] mat = new float[16]; for (int i = 0; i < 12;) { String[] tokens = getTokens(); mat[i++] = parseFloatStr(tokens[4]); mat[i++] = parseFloatStr(tokens[5]); mat[i++] = parseFloatStr(tokens[6]); mat[i++] = parseFloatStr(tokens[7]); if (i == 4 || i == 8) readLine(); } mat[15] = 1; Matrix4f m4 = new Matrix4f(); m4.setA(mat); if (m4.equals(mIdent)) biomts.add(0, m4); else biomts.addLast(m4); continue; } } catch (Exception e) { // probably just this.vBiomts = null; this.vBiomolecules = null; return; } } if (nBiomt > 0) Logger.info("biomolecule " + iMolecule + ": number of transforms: " + nBiomt); }
[ "private void generateSampleExpressionTable() {\n //A place to store abundance counts for multi-mappers without double counting i.e. if there is an sRNA entry, then it is a multi-mapper.\n HashMap<String, Integer> multiMapperAbundance = new HashMap<>();\n //Map of <miRNA_ID:ReadCountsMappingToMiRNA>\n HashMap<String, Integer> referenceMap = new HashMap<>();\n //Open the patman file.\n try (BufferedReader r = new BufferedReader(new FileReader(this.patmanAlign))) {\n //Read the first alignment.\n String line = r.readLine();\n //While we have alignments to process.\n while(line != null){\n //Split the current alignment into fields by tab.\n String[] toks = line.split(\"\\t\");\n //Get the mir_id ID.\n String mir = toks[0];\n //Get the sRNA and clean off the abundance - (note that patman file does not contain the > from the fasta).\n String sRNA = toks[1].split(\"\\\\(\")[0];\n //Get the abundance for the sRNA mapping to the mir_id for this alignment.\n Integer abundance = Integer.parseInt( toks[1].split(\"\\\\(\")[1].replace(\")\", \"\") );\n //Get the number of mismatches for this alignment.\n Integer missmatches = Integer.parseInt(toks[5]);\n //Query the mapping status for this sRNA - 0 is an exact mapper on a single miR, 1 is a multi-mapper to be checked for best .\n int multimapperStatus = this.checkMultimapperStatus(sRNA);\n //If the sRNA is NOT a multi-mapper\n if(multimapperStatus == 0) {\n if(referenceMap.containsKey(mir)){\n Integer count = referenceMap.get(mir);\n referenceMap.put(mir, count+abundance);\n }else{\n referenceMap.put(mir, abundance);\n //First time we have seen a mapping to this mir_id, so increment the number of expressed mirs..\n this.expressedReference++;\n }\n mappedOnce += abundance;\n }\n //It is a multi-mapper and we need to look to see if we can extract a best alignment or to allow all or to assign one (multi-map to single reference scenario).\n else{\n //Now to decide which alignment to keep.\n //Check to see if the sRNA in the alignment has been previously identified as a multi mapper by checking in the processed sRNA list\n //If already asgined do nothing as the best matches for the sRNA has already been processed.\n if(!this.processedSrnaList.containsKey(sRNA)){\n //Call the function findBestAlignments and add get the 'best matches' for this sRNA.\n ArrayList<String> bestAlignments = this.findBestAlignments(line);\n //If we have some best alignments, then add them to the reference map.\n if(bestAlignments != null){\n \n for(String align : bestAlignments){\n\n //Split the current best alignment into fields by tab.\n String[] toks_b = align.split(\"\\t\");\n //Get the current best mir_id.\n String mir_b = toks_b[0];\n //Get the sRNA for the current best alignment and clean off the abundance - (note that patman file does not contain the > from the fasta).\n String sRNA_b = toks_b[1].split(\"\\\\(\")[0];\n //Get the abundance for the sRNA mapping to the mir_id for this current best alignment.\n Integer abundance_b = Integer.parseInt( toks_b[1].split(\"\\\\(\")[1].replace(\")\", \"\") );\n //Get the number of mismatches for this current best alignment.\n Integer missmatches_b = Integer.parseInt(toks_b[5]);\n \n if(referenceMap.containsKey(mir_b)){\n Integer count_b = referenceMap.get(mir_b);\n referenceMap.put(mir_b, count_b+abundance_b);\n }else{\n referenceMap.put(mir_b, abundance_b);\n //First time we have seen a mapping to this mir_id, so increment the number of expressed mirs.\n this.expressedReference++;\n }\n }\n //We know that we have just added the best matches for this sRNA - so any further encounters with this sRNA should be ignored.\n this.processedSrnaList.put(sRNA, sRNA);\n }//end what to do if sRNA has best alignments.\n else{\n //if nothing was returned, then add this alignmend as it is not in the processed sRNA list and the findBestAlignments returned no best alignment.\n //So do not add the sRNA to the processed list such to allow all occurances of this sRNA.\n if(referenceMap.containsKey(mir)){\n Integer count = referenceMap.get(mir);\n referenceMap.put(mir, count+abundance);\n }else{\n referenceMap.put(mir, abundance);\n //First time we have seen a mapping to this mir_id, so increment the number of expressed mirs.\n this.expressedReference++;\n } \n }//End else what to do when no best alignments for sRNA found.\n //We know that the sRNA in this patman alignment is a multimapper so, add the abundance to know that it is a multimapper.\n multiMapperAbundance.put(sRNA, abundance);\n }//End if sRNA has previously been seen and 'best matches' processed. \n }\n //Read the next alignment (alignment) of the patman file.\n line = r.readLine();\n }\n } catch (IOException ex) {\n System.err.println(\"Error: could not use A provided patman alignment file.\");\n Logger.getLogger(SummaryTable.class.getName()).log(Level.SEVERE, null, ex);\n }//end reading the file, all done so store the reference map we have just made.\n this.referenceExpressionMap = referenceMap;\n //SANITY CHECKING! - sum the abundance for the multi-mapping sRNAs.\n Iterator<String> itr = multiMapperAbundance.keySet().iterator();\n while(itr.hasNext()){\n this.multimapper += multiMapperAbundance.get(itr.next());\n }\n //SANITY CHECK! the number of multi-mappers found in this code should match the number of multi-mappers found in the mapping rate code.\n if(this.multimapper != this.totalStranReadsWichHaveTwoOrMoreMappings){\n System.err.println(\"Error: The total number of multi-mapper counts from two seperate methods do not match (they should!)\");\n System.err.println(this.multimapper +\" vs \"+ this.totalStranReadsWichHaveTwoOrMoreMappings);\n }\n //SANITY CHECK! The number of single matches found in this code should match the number of single matches found in the mapping rate code.\n if(this.mappedOnce != this.totalSrnaReadsWhichHaveExactlyOneMapping){\n System.err.println(\"Error: The total number of sRNA Reads thave have mapped exactly once does not match the mapping rate code. (It should match!)\");\n }\n }", "public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}", "public static void main (String argv[]) throws Exception{\n String str1=\"^XA^MMP^CI14^FO4.8,98.4^GB772,0,1^FS^FO4.8,210.4^GB772,0,1^FS^FO4.8,287.2^GB772,0,1^FS^FO566.4,340^GB211.2,0,1^FS^FO4.8,400.8^GB561.6,0,1^FS^FO4.8,517.6^GB561.6,0,1^FS^FO4.8,692^GB772,0,1^FS^FO4.8,841.6^GB772,0,1^FS^FO4.8,980^GB772,0,1^FS^FO4.8,1080^GB561.6,0,1^FS^FO4.8,1172^GB772,0,1^FS^FO51.2,287.2^GB0,230.4,1^FS^FO566.4,287.2^GB0,404.8,1^FS^FO368,692^GB0,149.6,1^FS^FO601.6,692^GB0,149.6,1^FS^FO51.2,980^GB0,192,1^FS^FO566.4,980^GB0,192,1^FS^FO84.8,539.2^AEN,22,22^BY2.0^BCN,80,Y,N,N^FD78896200020063^FS^FO265.6,857.6^BY3.0^A@N,22,22^BCN,72,Y,N,N^FD78896200020063^FS^FO619.2,700^BQN,2,5.0^FD78896200020063^FS^FO584,986.8^BQN,2,4.0^FD78896200020063^FS^FO19.2,296.8^A@N,28,28,^FB35,2.0,0,L,0^FD收件^FS^FO19.2,411.2^A@N,28,28,^FB35,2.0,0,L,0^FD寄件^FS^FO19.2,985.6^A@N,28,28,^FB35,2.0,0,L,0^FD收件^FS^FO19.2,1088^A@N,28,28,^FB35,2.0,0,L,0^FD寄件^FS^FO17.6,107.2^AVN,81,81,^FD浙江-杭州-滨江^FS^FO16,215.2^AHN,54,54,^FD杭州萧山分拨仓^FS^FO60,287.6^A@N,27,27,^FD我叫补发的收货人 17876545678^FS^FO60,328.8^A@N,27,27,^FB515,2.0,0,L,0^FD北京 北京市 {receiver_district} {receiver_address}^FS^FO60,402^A@N,27,27,^FD{send_name} {send_mobile}^FS^FO60,441.6^A@N,27,27,^FB515,2.0,0,L,0^FD{send_state} {send_city} {send_district} {send_address}^FS^FO60,981^A@N,27,27,^FD{receiverName} {receiverPhone}^FS^FO60,1007.2^A@N,27,27,^FB515,2.0,0,L,0^FD{receiver_state} {receiver_city} {receiver_district} {receiver_address}^FS^FO60,1081^A@N,27,27,^FD{send_name} {send_mobile}^FS^FO60,1109.6^A@N,27,27,^FB515,2.0,0,L,0^FD{send_state} {send_city} {send_district} {send_address}^FS^FO628.8,292^A@N,26,26,^FD服务^FS^FO374.4,697.6^A@N,26,26,^FD签收人:^FS^FO374.4,778.4^A@N,26,26,^FD时间:^FS^FO15.2,696^A@N,16,16,^FB336.8,2,0,L,0^FD快件送达收件人地址,经收件人或收件人(寄件人)允许的代收人签字,视为送达,您的签字代表您已经签收此包裹,并已确认商品信息无误,包装完好,没有划痕,破损等表面质量问题。^FS^XZ\";\n //\"^XA^MMP^CI14^FO30,150^GB790,2,1^FS^FO30,270^GB790,2,1^FS^FO30,350^GB790,2,1^FS^FO30,466^GB790,2,1^FS^FO30,562^GB790,2,1^FS^FO30,735^GB790,2,1^FS^FO30,897^GB790,2,1^FS^FO30,982^GB790,2,1^FS^FO30,1060^GB633,2,1^FS^FO30,1140^GB790,2,1^FS^FO704,33^GB2,117,2^FS^FO187,735^GB2,162,2^FS^FO663,735^GB2,162,2^FS^FO663,982^GB2,158,2^FS^FO40,277^GB70,70,6^FS^FO37,375^GC72,6,B^FS^FO37,985^GC72,6,B^FS^FO675,756^BQN,2,5.0^FD3341954655139^FS^FO675,1000^BQN,2,5.0^FD3341954655139^FS^FO78,585^BY3.0^BCN,120,Y,N,N^FD3341954655139^FS^FO250,908^BY3.0^BCN,50,Y,N,N^FD3341954655139^FS^FO36,174^A@N,65,65,^FD浙-杭州市^FS^FO118,290^A@N,38,38,^FD^FS^FO118,357^A@N,33,33,^FD超级ERP^FS^FO483,357^A@N,33,33,^FD18688888888^FS^FO118,396^A@N,33,33,^FB690,2.0,0,L,0^FD浙江省 杭州市 滨江区 江南大道588号恒鑫大厦10F光云科技^FS^FO118,475^A@N,23,23,^FDghuhg^FS^FO483,475^A@N,23,23,^FD18657709988^FS^FO118,510^A@N,23,23,^FD 义务四海大道^FS^FO46,740^A@N,20,20,^FD2017/11/03^FS^FO46,775^A@N,30,30,^FD12:47:31^FS^FO46,820^A@N,33,33,^FD1/1^FS^FO118,996^A@N,20,20,^FD超级ERP^FS^FO483,996^A@N,20,20,^FD18688888888^FS^FO118,1028^A@N,20,20,^FB550,2.0,0,L,0^FD浙江省 杭州市 滨江区 江南大道588号恒鑫大厦10F光云科技^FS^FO118,1076^A@N,20,20,^FDghuhg^FS^FO483,1076^A@N,20,20,^FD18657709988^FS^FO118,1120^A@N,20,20,^FD 义务四海大道^FS^FO675,1360^A@N,33,33,^FB690,5.0,0,L,0^FD文件^FS^FO710,47^A@N,41,41,^FB90,2,0,L,0^FD标准快递^FS^FO54,290^A@N,41,41,^FD集^FS^FO54,390^A@N,41,41,^FD收^FS^FO54,1000^A@N,41,41,^FD收^FS^FO37,490^A@N,55,55,^FD寄^FS^FO37,1086^A@N,55,55,^FD寄^FS^FO65,860^A@N,20,20,^FD打印时间^FS^FO198,763^A@N,20,20,^FB460,2,0,L,0^FD快件送达收件人地址,经收件人或收件人(寄件人)允许的代收人签字,视为送达,您的签字代表您已经签收此包裹,并已确认商品信息无误,包装完好,没有划痕,破损等表面质量问题。^FS^FO558,860^A@N,20,20,^FD签收栏^FS^FO675,1400^A@N,33,33,^FD已验视^FS^FO4.0,1148.0,0^A@N,36.0,36.0^FB747.0,3^FDERP小二 18657709988 淘宝 ^FS^FO468.0,1366.0,0^A@N,36.0,36.0^FB315.0,2^FDbbgfgfdgf^FS^FO527.0,1280.0,2^GB212.0,42.0^FS^FO4.0,1275.0,0^A@N,36.0,36.0^FB419.0,5^FD桔梗 桔梗 1^FS^FO546.0,1311.0,2^A@N,21.0,21.0^FB254.0,2^FDdsd^FS^FO332.0,1229.0,0^A@N,36.0,36.0^FB466.0,1^FD 2017-08-04 22:08:40^FS^XZ\";\n\n printStr(str1);\n\n System.out.println(str1.replaceAll(\"\\\\^FS\",\"^FS\\n\"));\n }", "public String getWordMarkedData(Map lbInt2Str){\n if (data == null)\n return null;\n \n String result = \"\";\n for (int i = 0; i < data.size(); ++i){\n List seq = (List) data.get(i);\n for (int j = 0; j < seq.size(); j++){\n Observation obsr = (Observation) seq.get(j);\n \n //get the next observation in this sequence if available\n Observation nxtObsr = null;\n if (j < seq.size() -1 ) nxtObsr= (Observation) seq.get(j + 1);\n \n \n //get the label of current obsr\n String curLabelStr = (String)lbInt2Str.get(new Integer(obsr.modelLabel));\n \n //get the label of next obsr if the next observation is available\n String nxtLabelStr = null;\n if (nxtObsr != null){\n nxtLabelStr = (String)lbInt2Str.get(new Integer(nxtObsr.modelLabel));\n }\n \n //if the label of the current observation is b-w\n //insert one [ before it\n if (curLabelStr.equalsIgnoreCase(\"b-w\"))\n result += \"[\";\n \n result += obsr.originalData;\n \n //if the label of the current observation is i-w\n //and the label of the next one is b-w or o \n //or the current observation is the last one in this sequence\n //insert ] after it\n if (curLabelStr.equalsIgnoreCase(\"i-w\") || curLabelStr.equalsIgnoreCase(\"b-w\")){\n if (nxtLabelStr == null)\n result += \"]\";\n else if (nxtLabelStr.equalsIgnoreCase(\"b-w\") || nxtLabelStr.equalsIgnoreCase(\"o\")){\n result += \"]\";\n }\n } \n result += \" \";\n } //end of current sequence \n result += \"\\n\";\n }\n return result.trim();\n }", "private void initialize() {\n//id: MS:1001143 name: search engine specific score for PSMs def: \"Search engine specific peptide scores.\" [PSI:PI] is_a: MS:1001105 ! peptide result details\n cvTerms.add(1001143);\n//id: MS:1001153 name: search engine specific score def: \"Search engine specific scores.\" [PSI:PI] is_a: MS:1001405 ! spectrum identification result details\n cvTerms.add(1001153);\n//id: MS:1001171 name: Mascot:score\n cvTerms.add(1001171);\n//id: MS:1001172 name: Mascot:expectation value\n cvTerms.add(1001172);\n//id: MS:1001215 name: SEQUEST:PeptideSp\n cvTerms.add(1001215);\n//id: MS:1002248 name: SEQUEST:spscore\n cvTerms.add(1002248);\n//id: MS:1001328 name: OMSSA:evalue\n cvTerms.add(1001328);\n//id: MS:1001329 name: OMSSA:pvalue\n cvTerms.add(1001329);\n//id: MS:1001419 name: SpectraST:discriminant score F def: spectrum score\n cvTerms.add(1001419);\n//id: MS:1001330 name: X\\!Tandem:expect\n cvTerms.add(1001330);\n//id: MS:1001390 name: Phenyx:Score\n cvTerms.add(1001390);\n//id: MS:1001396 name: Phenyx:PepPvalue\n cvTerms.add(1001396);\n//id: MS:1001492 name: percolator:score\n cvTerms.add(1001492);\n//id: MS:1001501 name: MSFit:Mowse score\n cvTerms.add(1001501);\n//id: MS:1001502 name: Sonar:Score\n cvTerms.add(1001502);\n//id: MS:1001507 name: ProteinExtractor:Score\n cvTerms.add(1001507);\n//id: MS:1001568 name: Scaffold:Peptide Probability\n cvTerms.add(1001568);\n//id: MS:1001569 name: IdentityE Score\n cvTerms.add(1001569);\n//id: MS:1001572 name: SpectrumMill:Score\n cvTerms.add(1001572);\n//id: MS:1001887 name: SQID:score\n cvTerms.add(1001887);\n//id: MS:1001894 name: Progenesis:confidence score\n cvTerms.add(1001894);\n//id: MS:1001950 name: PEAKS:peptideScore\n cvTerms.add(1001950);\n//id: MS:1001974 name: DeBunker:score\n cvTerms.add(1001974);\n//id: MS:1001978 name: MSQuant:PTM-Score\n cvTerms.add(1001978);\n//id: MS:1001979 name: MaxQuant:PTM Score\n cvTerms.add(1001979);\n//id: MS:1001985 name: Ascore:Ascore\n cvTerms.add(1001985);\n//id: MS:1002044 name: ProteinProspector:score\n cvTerms.add(1002044);\n//id: MS:1002045 name: ProteinProspector:expectation value\n cvTerms.add(1002045);\n//id: MS:1002052 name: MS-GF:SpecEValue\n cvTerms.add(1002052);\n//id: MS:1002053 name: MS-GF:EValue\n cvTerms.add(1002053);\n//id: MS:1002255 name: Comet:spscore\n cvTerms.add(1002255);\n//id: MS:1002257 name: Comet:expectation value\n cvTerms.add(1002257);\n//id: MS:1002262 name: Byonic:Score\n cvTerms.add(1002262);\n//id: MS:1002319 name: Amanda:AmandaScore\n cvTerms.add(1002319);\n//id: MS:1002338 name: Andromeda:score\n cvTerms.add(1002338);\n//id: MS:1002466 name: PeptideShaker PSM score\n cvTerms.add(1002466);\n//id: MS:1002545 name: xi:score\n cvTerms.add(1002545);\n//id: MS:1001874 name: FDRScore\n cvTerms.add(1001874);\n//id: MS:1002355 name: PSM-level FDRScore\n cvTerms.add(1002355);\n//id: MS:1002356 name: PSM-level combined FDRScore\n cvTerms.add(1002356);\n }", "private void parse() {\n Map<TermId, Collection<AnnotationLine>> annotationCollector = new HashMap<>();\n String line;\n try (BufferedReader br = new BufferedReader(new FileReader(this.genePhenoPath))){\n while ((line = br.readLine()) != null) {\n //System.out.println(line);\n String[] A = line.split(\"\\t\");\n /* Expected number of fields of the MGI_GenePheno.rpt file (note -- there\n appears to be a stray tab between the penultimate and last column) */\n int EXPECTED_NUMBER_OF_FIELDS = 8;\n if (A.length < EXPECTED_NUMBER_OF_FIELDS) {\n if (verbose) {\n //throw new PhenolException(\"Unexpected number of fields (\" + A.length + \") in line \" + line);\n System.err.println(\"[Phenol-ERROR] Unexpected number of fields in MGI_GenePheno.rpt (\" + A.length + \") in line \" + line);\n }\n continue;\n }\n try {\n AnnotationLine annot = new AnnotationLine(A);\n TermId modelId = annot.getGenotypeAccessionId();\n annotationCollector.computeIfAbsent(modelId, key -> new HashSet<>()).add(annot);\n } catch (PhenolException e) {\n String err = String.format(\"[PARSE ERROR] %s (%s)\", e.getMessage(), line);\n this.parseErrors.add(err);\n }\n }\n } catch (IOException ioe) {\n throw new PhenolRuntimeException(\"Could not parse MGI_GenePheno.rpt: \" + ioe.getMessage());\n }\n // When we get here, we have parsed all of the MGI_GenePheno.rpt file.\n // Annotation lines are groups according to genotype accession id in the multimap\n // our goal in the following is to parse everything into corresponding MpSimpleModel objects\n Map<TermId, MpSimpleModel> builder = new HashMap<>();\n for (TermId genoId : annotationCollector.keySet()) {\n Collection<AnnotationLine> annotationLines = annotationCollector.get(genoId);\n List<MpAnnotation> annotbuilder = new ArrayList<>();\n Iterator<AnnotationLine> it = annotationLines.iterator();\n MpStrain background = null;\n MpAllelicComposition allelicComp = null;\n TermId alleleId = null;\n String alleleSymbol = null;\n TermId markerId = null;\n // get the sexSpecific-specific annotations for this genotypeId, if any\n Map<TermId, MpAnnotation> sexSpecific = Map.of(); // default, empty set\n if (this.geno2ssannotMap.containsKey(genoId)) {\n Map<TermId, MpAnnotation> imapbuilder = new HashMap<>();\n Map<TermId, MpAnnotation> annots = this.geno2ssannotMap.get(genoId);\n for (MpAnnotation mpann : annots.values()) {\n imapbuilder.put(mpann.getTermId(), mpann);\n }\n try {\n sexSpecific = Map.copyOf(imapbuilder);\n } catch (Exception e) {\n System.err.println(\"Error building map of sexSpecific-specific annotations for \" + genoId.getValue() + \": \" + e.getMessage());\n }\n }\n while (it.hasNext()) {\n AnnotationLine aline = it.next();\n MpAnnotation annot = aline.toMpAnnotation();\n TermId mpoId = aline.getMpId();\n background = aline.geneticBackground;\n allelicComp = aline.getAllelicComp();\n alleleId = aline.getAlleleId();\n alleleSymbol = aline.getAlleleSymbol();\n markerId = aline.getMarkerAccessionId();\n // TODO we could check that these are identical for any given genotype id\n // check if we have a sexSpecific-specific annotation matching the current annotation\n // the following adds mpoId if it is present in sexSpexifix, otherwise it adds the default annot\n annotbuilder.add(sexSpecific.getOrDefault(mpoId, annot));\n\n // Note that we do not check for sexSpecific-specific annotations that are not present in the \"main\" file\n // in practice, these are only sexSpecific-specific normal -- i.e., a phenotype was ruled out in one sexSpecific\n // even though \"somebody\" thought the phenotype might be present.\n // this type of normality (absence of a phenotype) is not useful for downstream analysis at the\n // present time and so we skip it to avoid unnecessarily complicating the implementation.\n }\n MpSimpleModel mod = new MpSimpleModel(genoId, background, allelicComp, alleleId, alleleSymbol, markerId, List.copyOf(annotbuilder));\n builder.put(genoId, mod);\n }\n genotypeAccessionToMpSimpleModelMap = Map.copyOf(builder);\n }", "public static void main(String[] args) throws IOException, FileNotFoundException {\n\t\t\n\t\t\n\t\tString regex = \"[0-9]+\";\n\t\tString data = \"1313\";\n\t\tSystem.out.println(data.matches(regex));\n\t\tString regex1 = \"[0-9]+\";\n\t\tString data1 = \" 112121 sdf \";\n\t\tSystem.out.println(data1.matches(regex1));\n\t\tString []arr = data1.split(\"\\\\s\"); \n\t\tSystem.out.println(arr.length);\n\t\tSystem.out.println(data1.replaceAll(\"\\\\s+\", \" \").trim());\n\t\t\n\t\t\n\t\t/*\n\t\tFile f=new File(\"D:\\\\april.pdf\");\n\t FileInputStream fileIn;\n\t PdfReader reader;\n\t try {\n\t fileIn=new FileInputStream(f);\n\t reader=new PdfReader(fileIn);\n\t HashMap<String, String> merged=reader.getInfo();\n\t // ByteArrayInputStream bIn=new ByteArrayInputStream(merged);\n\t //BufferedReader bR=new BufferedReader(new InputStreamReader(bIn));\n\t //String line;\n\t //while ((line=bR.readLine()) != null) {\n\t //System.out.println(line);\n\t //}\n\t reader.close();\n\t fileIn.close();\n\t }\n\t catch ( IOException e) {\n\t System.err.println(\"Couldn't read file '\" );\n\t System.err.println(e);\n\t }*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\tfloat width = 612;\n\t\tfloat height = 792;\n\t\tfloat hX = 320, tX = 340, cX = 100;\n\t\tfloat hY = 0, tY = 580, cY = 200;\n\t\tfloat hW = width - hX, tW = width - tX, cW = 100;\n\t\tfloat hH = 80, tH = height - tY, cH = 60;\n\t\tRectangle header = new Rectangle( 150, 150);\n\t\t//\t\tRectangle totals = new Rectangle(cH, cH, cH, cH);\n\t\t//totals.setBounds(tX, tY, tW, tH);\n\t\t//Rectangle customer = new Rectangle();\n\t\t//customer.setBounds(cX, cY, cW, cH);\n\t\tPDFTextStripperByArea stripper = new PDFTextStripperByArea();\n\t\t//stripper.\n\t\t//stripper.addRegion(\"totals\", totals);\n\t\t//stripper.addRegion(\"customer\", customer);\n\t\tstripper.setSortByPosition(true);\n\t\tint j = 0;\n\t\tList pages = pd.getDocumentCatalog().getAllPages();\n\t\tfor (PDPage page : pages) {\n\t\t\tstripper.extractRegions(page);\n\t\t\tList regions = stripper.getRegions();\n\t\t\tfor (String region : regions) {\n\t\t\t\tString text = stripper.getTextForRegion(region);\n\t\t\t\tSystem.out.println(\"Region: \" + region + \" on Page \" + j);\n\t\t\t\tSystem.out.println(\"\\tText: \\n\" + text);\n\t\t\t}\n\t\t\tj++;\n\t\t}*/\n\t}", "public static void main(String[] args) throws Exception {\n String[] alternatives = new String[]{\r\n \"IIA1\", \"IIA2\", \"IIA3\", \"IIA4\", \"IIB1\",\r\n \"IIB2\", \"IIB3\", \"IIB4\", \"IIC1\", \"IIC2\",\r\n \"IIC3\", \"IIC4\", \"ZERO\"\r\n };\r\n\r\n // Criteria values (Table 1 in hte paper)\r\n double[][] criteriaValues = new double[][]{\r\n new double[]{4, 1, 985, 30, 166, 705, 25000, 4.5, 4.2, 15.1, 1.75},\r\n new double[]{4, 2.5, 985, 30, 166, 765, 25000, 4.5, 4.1, 15.3, 1.69},\r\n new double[]{4, 1.5, 985, 30, 166, 705, 25000, 4.5, 4.3, 12.7, 1.75},\r\n new double[]{4, 1.5, 985, 30, 166, 705, 25000, 4.5, 4.3, 12.2, 1.65},\r\n new double[]{4, 1.5, 985, 35, 177, 705, 25000, 4.5, 4.4, 15.1, 1.68},\r\n new double[]{4, 2.5, 985, 35, 177, 765, 25000, 4.5, 4.3, 15.3, 1.62},\r\n new double[]{4, 2, 985, 35, 177, 705, 25000, 4.5, 4.5, 12.7, 1.68},\r\n new double[]{4, 2, 985, 35, 177, 705, 25000, 4.5, 4.5, 12.2, 1.58},\r\n new double[]{4, 1, 985, 35, 166, 705, 25000, 4.5, 4.6, 14.8, 1.72},\r\n new double[]{4, 2.5, 985, 35, 166, 765, 25000, 4.5, 4.5, 15.0, 1.66},\r\n new double[]{4, 1.5, 985, 35, 166, 705, 25000, 4.5, 4.7, 12.4, 1.72},\r\n new double[]{4, 2, 985, 35, 166, 705, 25000, 4.5, 4.7, 11.9, 1.62},\r\n new double[]{1, 0, 1300, 50, 266, 4200, 0, 2, 1, 18.8, 1}\r\n };\r\n\r\n // Criteria directions (true - max, false - min)\r\n boolean[] criteriaDirections = new boolean[]{false, false, false, true, true, false, true, true, true, false, true};\r\n\r\n int numberOfAlternatives = alternatives.length;\r\n int numberOfCriteria = criteriaDirections.length;\r\n\r\n // Define weight space\r\n double[][] lhs = new double[][]{\r\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // w1 >=0\r\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // w2 >=0\r\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, // w3 >=0\r\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, // w4 >=0\r\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, // w5 >=0\r\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, // w6 >=0\r\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, // w7 >=0\r\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, // w8 >=0\r\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, // w9 >=0\r\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, // w0 >=0\r\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, // w11 >=0\r\n {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // sum_{i = 1,...,11} w_i = 1\r\n };\r\n String[] dir = new String[]{\">=\", \">=\", \">=\", \">=\", \">=\", \">=\", \">=\", \">=\", \">=\", \">=\", \">=\", \"=\"};\r\n double[] rhs = new double[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};\r\n ConstraintsSystem constraints = new ConstraintsSystem(lhs, dir, rhs);\r\n\r\n // Initialize polytope runner\r\n PolytopeRunner runner = new PolytopeRunner(constraints);\r\n\r\n // Setup Chebyshev center as start point\r\n runner.setAnyStartPoint();\r\n\r\n // Generate 1000 samples\r\n double[][] sampledWeights = runner.chain(\r\n new HitAndRun(new Random(1)), // seed is set for reproducible results\r\n new NCubedThinningFunction(1.0),\r\n 1000);\r\n\r\n // Find the minimum and maximum values per criterion\r\n double[] minimums = new double[numberOfCriteria];\r\n double[] maximums = new double[numberOfCriteria];\r\n System.arraycopy(criteriaValues[0], 0, minimums, 0, numberOfCriteria);\r\n System.arraycopy(criteriaValues[0], 0, maximums, 0, numberOfCriteria);\r\n for (int i = 1; i < numberOfAlternatives; i++) {\r\n for (int j = 0; j < numberOfCriteria; j++) {\r\n if (criteriaValues[i][j] < minimums[j]) {\r\n minimums[j] = criteriaValues[i][j];\r\n }\r\n\r\n if (criteriaValues[i][j] > maximums[j]) {\r\n maximums[j] = criteriaValues[i][j];\r\n }\r\n }\r\n }\r\n\r\n // Sample criteria values\r\n Random random = new Random(1); // seed is set for reproducible results\r\n double[][][] sampledCriteriaValues = new double[1000][numberOfAlternatives][numberOfCriteria];\r\n\r\n for (int i = 0; i < 1000; i++) {\r\n for (int j = 0; j < numberOfAlternatives; j++) {\r\n for (int k = 0; k < numberOfCriteria; k++) {\r\n double interval = (maximums[k] - minimums[k]) / 10.0;\r\n sampledCriteriaValues[i][j][k] = (criteriaValues[j][k] - interval) + random.nextDouble() * 2.0 * interval;\r\n }\r\n }\r\n }\r\n\r\n // Calculate acceptability indices\r\n double[][] rankAcceptabilityIndex = new double[numberOfAlternatives][numberOfAlternatives];\r\n for (int s = 0; s < sampledCriteriaValues.length; s++) {\r\n // find best and worst (for scaling)\r\n double[] worst = new double[numberOfCriteria];\r\n double[] best = new double[numberOfCriteria];\r\n System.arraycopy(sampledCriteriaValues[s][0], 0, worst, 0, numberOfCriteria);\r\n System.arraycopy(sampledCriteriaValues[s][0], 0, best, 0, numberOfCriteria);\r\n for (int i = 1; i < numberOfAlternatives; i++) {\r\n for (int k = 0; k < numberOfCriteria; k++) {\r\n if (criteriaDirections[k]) {\r\n if (sampledCriteriaValues[s][i][k] < worst[k]) {\r\n worst[k] = sampledCriteriaValues[s][i][k];\r\n }\r\n\r\n if (sampledCriteriaValues[s][i][k] > best[k]) {\r\n best[k] = sampledCriteriaValues[s][i][k];\r\n }\r\n } else {\r\n if (sampledCriteriaValues[s][i][k] < best[k]) {\r\n best[k] = sampledCriteriaValues[s][i][k];\r\n }\r\n\r\n if (sampledCriteriaValues[s][i][k] > worst[k]) {\r\n worst[k] = sampledCriteriaValues[s][i][k];\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (int j = 0; j < sampledWeights.length; j++) {\r\n double[] comprehensiveValues = new double[numberOfAlternatives];\r\n for (int i = 0; i < numberOfAlternatives; i++) {\r\n comprehensiveValues[i] = u(sampledCriteriaValues[s][i], sampledWeights[j], worst, best);\r\n }\r\n\r\n for (int i = 0; i < numberOfAlternatives; i++) {\r\n int rank = 1;\r\n\r\n for (int k = 0; k < numberOfAlternatives; k++) {\r\n if (i != k) {\r\n if (comprehensiveValues[i] < comprehensiveValues[k]) {\r\n rank++;\r\n }\r\n }\r\n }\r\n\r\n rankAcceptabilityIndex[i][rank - 1] += 1.0 / (double) (sampledWeights.length * sampledCriteriaValues.length);\r\n }\r\n }\r\n }\r\n\r\n // Print header\r\n System.out.print(\"Table of rank acceptability indices [in %]:\\nrank\\t\");\r\n for (int j = 1; j <= numberOfAlternatives; j++) {\r\n System.out.print(j + \"\\t\");\r\n }\r\n System.out.println();\r\n\r\n // Print rank acceptability indices\r\n for (int i = 0; i < numberOfAlternatives; i++) {\r\n System.out.print(alternatives[i] + \"\\t\");\r\n\r\n for (int j = 0; j < numberOfAlternatives; j++) {\r\n System.out.print((int) (rankAcceptabilityIndex[i][j] * 100.0) + \"\\t\");\r\n }\r\n\r\n System.out.println();\r\n }\r\n }", "public void convertMatureFA2MirparaData() throws IOException {\n if((new File(matureFAFile)).exists() == false){\n throw new IOException(\"input mature.fa file \" + (new File(matureFAFile)).getParentFile() + \" not found\");\n }\n \n if((new File(outputFile)).getParentFile().exists() == false){\n throw new IOException(\"output file folder\" + outputFile + \" not found\");\n }\n\n BufferedReader brFA = new BufferedReader(new FileReader(new File(matureFAFile)));\n BufferedWriter bwOut = new BufferedWriter(new FileWriter(new File(outputFile)));\n \n String headerLine = null;\n while((headerLine = brFA.readLine()) != null){\n if(headerLine.startsWith(\">\")==false){\n throw new IOException(\"bad input fasta format\\n\" + \"header line \" + headerLine + \" does not begin with '>'\" );\n }\n String SequenceLine = brFA.readLine();\n \n String tokens[] = headerLine.substring(1).split(\" \");\n String miRName = headerLine.substring(1).split(\" \")[0];\n String miRID = headerLine.substring(1).split(\" \")[1];\n \n bwOut.write(SequenceLine + \"\\t\" + miRName + \"\\t\" + miRID + \"\\n\");\n }\n \n bwOut.close();\n brFA.close();\n }", "public static HashMap<String, ArrayList<String>> scrapeTxt(File txt_input) {\n\t\t//hashmap holding arrays of different information for this pdf\n\t\tHashMap<String, ArrayList<String>> property_data = new HashMap<String, ArrayList<String>>();\n\t\t// arrays which accumulate data by category\n\t\tArrayList<String> addresses \t = new ArrayList<String>();\n\t\tArrayList<String> geocoded_address = new ArrayList<String>();\n\t\tArrayList<String> latitude \t\t = new ArrayList<String>();\n\t\tArrayList<String> longitude \t = new ArrayList<String>();\n\t\tArrayList<String> address_type \t = new ArrayList<String>();\n\t\tArrayList<String> lev_distance \t = new ArrayList<String>();\n\t\tArrayList<String> terms \t\t = new ArrayList<String>();\n\t\tArrayList<String> emails \t\t = new ArrayList<String>();\n\t\tArrayList<String> square_footages = new ArrayList<String>();\n\t\tArrayList<String> phone_nums \t = new ArrayList<String>();\n\t\tBufferedReader bufferreader = null;\n\t\t// wordstream supplies tokens from each line\n\t\tWordStream ws = new WordStream();\n\t\ttry {\n\t\t\tbufferreader = new BufferedReader(new FileReader(txt_input));\n\t\t\tString line, previous_line;\n\t\t\tline = previous_line = \"\";\n\t\t\twhile ((line = bufferreader.readLine()) != null) {\n\t\t\t\t//replace all horizontal whitespace chars with spaces for regex matching\n\t\t\t\tline = line.replaceAll(\" \",\" \");\n\t\t\t\tString last_token = \"\";\n\t\t\t\tws.addLexItems(line);\n\t\t\t\tif (addresses.isEmpty()) {\n\t\t\t\t\tif (line.matches(\"[a-zA-Z'@ ]*, [a-zA-Z]{2}( .*|[.])?\")) {\n\t\t\t\t\t\t// match ADDRESSES like \"Orlando, FL\" or \"Round Rock, ca 91711\" (with street address on the previous line)\n\t\t\t\t\t\tif (!(previous_line.contains(\"suite\") || previous_line.contains(\"floor\") || line.contains(\"suite\") || line.contains(\"floor\"))) {\n\t\t\t\t\t\t\t//avoid address with \"suite\" or \"floor\", usaully the office address\n\t\t\t\t\t\t\tif (line.length() < 35) {\n\t\t\t\t\t\t\t\t//avoid matching random text by limiting line length\n\t\t\t\t\t\t\t\tif (previous_line.length() < 35) {\n\t\t\t\t\t\t\t\t\taddresses.add((previous_line + \", \" + line));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\taddresses.add(line);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if (line.matches(\".*, [a-zA-Z]{2}( .*|[.])?\")) {\n\t\t\t\t\t\t// match ADDRESSES like \"222 W Avenida Valencia, Orlando, FL\" or \"222 W Avenida Valencia, Round Rock, TX\"\n\t\t\t\t\t\tif (!(line.contains(\"suite\") || line.contains(\"floor\"))) {\n\t\t\t\t\t\t\tif (line.length() < 70) {\n\t\t\t\t\t\t\t\taddresses.add(line);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (ws.hasMoreTokens()) {\n\t\t\t\t\t// surround with try/catch to protect against weird character replacement/parsing issue\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString token = ws.nextToken();\n\t\t\t\t\t\tif (terms.isEmpty() && (token.toLowerCase().equals(\"lease\") || token.toLowerCase().equals(\"leased\"))) {\n\t\t\t\t\t\t\t// match LEASE TERMS of the property\n\t\t\t\t\t\t\tterms.add(\"Lease\");\n\t\t\t\t\t\t} else if (terms.isEmpty() && token.toLowerCase().equals(\"sale\")) {\n\t\t\t\t\t\t\t// match SALE TERMS of the property\n\t\t\t\t\t\t\tterms.add(\"Sale\");\n\t\t\t\t\t\t} else if (token.matches(\"([a-zA-Z0-9]+[.])*[a-zA-Z0-9]+@[a-zA-Z0-9]+.*\") && !emails.contains(token)) {\n\t\t\t\t\t\t\t// match EMAILS\n\t\t\t\t\t\t\temails.add(token);\n\t\t\t\t\t\t} else if (square_footages.isEmpty()) {\n\t\t\t\t\t\t\ttoken = token.toLowerCase();\n\t\t\t\t\t\t\tif(token.matches(\"s[.]?f[.]?\") || token.matches(\"sq[.||ft]?\") || token.equals(\"square\") || token.contains(\"ft.*\") || token.equals(\"±\")){\n\t\t\t\t\t\t\t\t//match SQUARE FOOTAGES like \"4,500 sf\" or \"4,500 square feet\"\n\t\t\t\t\t\t\t\tif (last_token.matches(\"[,±0-9/+//-]{3,}\")) {\n\t\t\t\t\t\t\t\t\tsquare_footages.add(last_token.replace(\"±\", \"\").replace(\"+/-\", \"\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if ((token.matches(\"feet[:]?\") || token.matches(\"(±||(/+//-))\")) && ws.hasMoreTokens()) {\n\t\t\t\t\t\t\t\t//match SQUARE FOOTAGES like \"square feet: 4,500\" or \"± 4,500\"\n\t\t\t\t\t\t\t\tString next = ws.nextToken();\n\t\t\t\t\t\t\t\tif (next.matches(\"[,±0-9/+//-]{3,}\")) {\n\t\t\t\t\t\t\t\t\tsquare_footages.add(next.replace(\"±\", \"\").replace(\"+/-\", \"\"));\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (token.matches(\"[0-9]{3}\") && last_token.matches(\"[0-9]{3}\") && ws.hasMoreTokens()) {\n\t\t\t\t\t\t\t// match PHONE NUMBERS like \"425 241 7707\"\n\t\t\t\t\t\t\tString phone_number = last_token + \"-\" + token + \"-\" + ws.nextToken();\n\t\t\t\t\t\t\tif (!phone_nums.contains(phone_number)) {\n\t\t\t\t\t\t\t\tphone_nums.add(phone_number);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (token.matches(\"([+]1[.])?[0-9]{3}[.][0-9]{3}[.][0-9]{4}.*\")) {\n\t\t\t\t\t\t\t// match PHONE NUMBERS like \"425.241.7707\"\n\t\t\t\t\t\t\tString phone_number = token.replace(\".\", \"-\");\n\t\t\t\t\t\t\tif (!phone_nums.contains(phone_number)) {\n\t\t\t\t\t\t\t\tphone_nums.add(phone_number);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (token.matches(\"[0-9]{3}-[0-9]{3}-[0-9]{4}.*\") && !phone_nums.contains(token)) {\n\t\t\t\t\t\t\t// match PHONE NUMBERS like \"425-241-7707\" or \"425-341-7707,\"\n\t\t\t\t\t\t\tphone_nums.add(token);\n\t\t\t\t\t\t} else if (token.matches(\"[(][0-9]{3}[)]\") && ws.hasMoreTokens()) {\n\t\t\t\t\t\t\t// match PHONE NUMBERS like \"(425) 241-7707\"\n\t\t\t\t\t\t\tString the_rest = ws.nextToken();\n\t\t\t\t\t\t\tString phone_number = token.substring(1, 4) + \"-\" + the_rest;\n\t\t\t\t\t\t\tif (the_rest.matches(\"[0-9]{3}-[0-9]{4}.*\") && !phone_nums.contains(phone_number)) {\n\t\t\t\t\t\t\t\tphone_nums.add(phone_number);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlast_token = token;\n\t\t\t\t\t} catch (java.lang.IndexOutOfBoundsException e) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprevious_line = line;\n\t\t\t}\n\t\t\tif (!addresses.isEmpty()) {\n\t\t\t\t//normalize address strings to for better consistency with geocoder\n\t\t\t\tString clean_entry = addresses.get(0).replace(\" - \", \"-\").replace(\" – \", \"-\").replace(\"–\", \"-\").replace(\"street\", \"st\").toLowerCase();\n\t\t\t //translate addresses like \"919-920 bath st.\" to \"919 bath st.\" for better geocoder matching\n\t\t\t if(clean_entry.matches(\"[0-9]*-[0-9]* .*\")){\n\t\t\t \tclean_entry = clean_entry.substring(0, clean_entry.indexOf(\"-\")) + clean_entry.substring(clean_entry.indexOf(\" \"));\n\t\t\t }\n\t\t\t\tHashMap<String, String> geocoded_info = geocoder.getGeocodedInfo(clean_entry);\n\t\t\t\tif (geocoded_info.get(\"address\") != null) {\n\t\t\t\t\tgeocoded_address.add(geocoded_info.get(\"address\").replace(\"\\\\u0026\", \"&\").replace(\"\\\\u0027\", \"'\").replaceAll(\"\\\"\", \"\"));\n\t\t\t\t\tlatitude.add(geocoded_info.get(\"latitude\"));\n\t\t\t\t\tlongitude.add(geocoded_info.get(\"longitude\"));\n\t\t\t\t\taddress_type.add(geocoded_info.get(\"type\"));\n\t\t\t\t\tlev_distance.add(geocoded_info.get(\"lev_distance\"));\n\t\t\t\t} else {\n\t\t\t\t\taddresses.remove(0);\n\t\t\t\t\taddresses.add(\"**INACCURATE**\");\n\t\t\t\t\tgeocoded_address.add(\"*INACCURATE**\");\n\t\t\t\t\tlatitude.add(\"**INACCURATE**\");\n\t\t\t\t\tlongitude.add(\"**INACCURATE**\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddresses.add(\"**Unknown**\");\n\t\t\t\tgeocoded_address.add(\"**Unknown**\");\n\t\t\t\tlatitude.add(\"**Unknown**\");\n\t\t\t\tlongitude.add(\"**Unknown**\");\n\t\t\t}\n\t\t\tif (terms.isEmpty()) {\n\t\t\t\tterms.add(\"**Unknown**\");\n\t\t\t}\n\t\t\tif (square_footages.isEmpty()) {\n\t\t\t\tsquare_footages.add(\"**Unknown**\");\n\t\t\t}\n\t\t\tif (emails.isEmpty()) {\n\t\t\t\temails.add(\"**Unknown**\");\n\t\t\t}\n\t\t\tif (phone_nums.isEmpty()) {\n\t\t\t\tphone_nums.add(\"**Unknown**\");\n\t\t\t}\n\t\t\tproperty_data.put(\"Address\", addresses);\t\n\t\t\tproperty_data.put(\"Geocoded Address\", geocoded_address);\t\n\t\t\tproperty_data.put(\"Latitude\", latitude);\t\n\t\t\tproperty_data.put(\"Longitude\", longitude);\t\n\t\t\tproperty_data.put(\"Lev_Distance\", lev_distance);\t\n\t\t\tproperty_data.put(\"Type\", address_type);\n\t\t\tproperty_data.put(\"Term\", terms);\t\n\t\t\tproperty_data.put(\"Square Footage\", square_footages);\t\n\t\t\tproperty_data.put(\"Emails\", emails);\t\n\t\t\tproperty_data.put(\"Phone Numbers\", phone_nums);\n\t\t\tArrayList<String> contacts = scrapeContactNames(emails, txt_input);\n\t\t\tproperty_data.put(\"Contact Names\", contacts);\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif(bufferreader != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbufferreader.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn property_data;\n\t}", "public void reduceSuppXml(String suppXml, String output) throws IOException{\n FileReader fr = new FileReader(suppXml);\n BufferedReader br = new BufferedReader(fr);\n FileWriter fw = new FileWriter(output);\n BufferedWriter bw = new BufferedWriter(fw);\n String line= null;\n line = br.readLine();\n bw.write(line+\"\\n\");\n line = br.readLine();\n bw.write(line+\"\\n\");\n line = br.readLine();\n bw.write(line+\"\\n\");\n \n boolean suppRecord = false;\n boolean suppUiRecord = false;\n boolean suppRecordName = false;\n boolean mappedToList = false;\n boolean conceptList = false;\n boolean concept = false;\n boolean termList = false;\n while((line = br.readLine())!= null){\n if(line.isEmpty())\n continue;\n if(line.contains(\"<SupplementalRecord SCRClass\")){\n bw.write(line+\"\\n\");\n suppRecord = true;\n }\n if(line.contains(\"</SupplementalRecord>\")){\n bw.write(line+\"\\n\");\n if(!suppRecord)\n System.out.println(\"suppRecord not opened but closed: \"+line);\n suppRecord = false;\n }\n \n //Check the supplemental record id.\n if(line.contains(\"<SupplementalRecordUI\")){\n suppUiRecord = true;\n if(line.contains(\"</SupplementalRecordUI>\")){\n bw.write(line+\"\\n\");\n if(!suppUiRecord)\n System.out.println(\"suppUiRecord not opened but closed: \"+line);\n suppUiRecord = false;\n }\n else{\n do{\n bw.write(line+\"\\n\");\n line= br.readLine();\n }while(!line.contains(\"</SupplementalRecordUI>\"));\n bw.write(line+\"\\n\");\n if(!suppUiRecord)\n System.out.println(\"suppUiRecord not opended but closed: \"+line);\n suppUiRecord = false;\n }\n }\n \n //Check the supplemental record name\n if(line.contains(\"<SupplementalRecordName\")){\n suppRecordName = true;\n if(line.contains(\"</SupplementalRecordName>\")){\n bw.write(line+\"\\n\");\n if(!suppRecordName)\n System.out.println(\"suppRecordName not opened but closed: \"+line);\n suppRecordName = false;\n }\n else{\n do{\n bw.write(line+\"\\n\");\n line= br.readLine();\n }while(!line.contains(\"</SupplementalRecordName>\"));\n bw.write(line+\"\\n\");\n if(!suppRecordName)\n System.out.println(\"suppRecordName not opened but closed: \"+line);\n suppRecordName = false;\n }\n }\n //Check the Heading Mapped to List\n if(line.contains(\"<HeadingMappedToList\")){\n mappedToList = true;\n if(line.contains(\"</HeadingMappedToList>\")){\n bw.write(line+\"\\n\");\n if(!mappedToList)\n System.out.println(\"headingmappedToList not opened but closed: \"+line);\n mappedToList = false;\n }\n else{\n do{\n bw.write(line+\"\\n\");\n line= br.readLine();\n }while(!line.contains(\"</HeadingMappedToList>\"));\n bw.write(line+\"\\n\");\n if(!mappedToList)\n System.out.println(\"headingMappedToList not opened but closed: \"+line);\n mappedToList = false;\n }\n }\n //Check the Concept List\n if(line.contains(\"<ConceptList\")){\n bw.write(line+\"\\n\");\n conceptList = true;\n }\n if(line.contains(\"</ConceptList>\")){\n conceptList = false;\n bw.write(line+\"\\n\");\n }\n //Check the Concept element.\n if(line.contains(\"<Concept \")|| line.contains(\"<Concept>\")){\n bw.write(line+\"\\n\");\n concept = true;\n }\n if(line.contains(\"</Concept>\")){\n concept = false;\n bw.write(line+\"\\n\");\n }\n \n //Check the term list.\n //Check the TermList to List\n if(line.contains(\"<TermList\")){\n termList = true;\n if(line.contains(\"</TermList>\")){\n bw.write(line+\"\\n\");\n if(!termList)\n System.out.println(\"TermList not opened but closed: \"+line);\n termList = false;\n }\n else{\n do{\n bw.write(line+\"\\n\");\n line= br.readLine();\n }while(!line.contains(\"</TermList>\"));\n bw.write(line+\"\\n\");\n if(!termList)\n System.out.println(\"TermList not opened but closed: \"+line);\n termList = false;\n }\n }\n \n }\n \n if(suppRecord)\n System.out.println(\"suppRecord not closed.\");\n if(suppUiRecord)\n System.out.println(\"suppUiRecord not closed.\");\n if(suppRecordName)\n System.out.println(\"suppRecordName not closed.\");\n if(mappedToList)\n System.out.println(\"mappedList not closed.\");\n if(conceptList)\n System.out.println(\"conceptList not closed.\");\n if(concept)\n System.out.println(\"concept not closed.\");\n if(termList)\n System.out.println(\"termlist not closed.\");\n \n //Flush and output the resutls.\n bw.flush();\n bw.close();\n fw.close();\n br.close();\n fr.close();\n }", "public double[] calcInfoContent(char[] sequence, int order) {\r\n\r\n\t\tdouble[] infoCont = new double[sequence.length];\r\n\t\tint index = 0;\r\n\r\n\t\tHashMap<String, Integer> charCount = new HashMap<String, Integer>();\r\n\t\tString seq, totalSeq;\r\n\t\tint count = 1, totalCount = 1;\r\n\r\n\t\tdouble probability;\r\n\r\n\t\tString s = String.valueOf(sequence);\r\n\r\n\t\t// give probability of 1/charSet to all chars that don't have enough\r\n\t\t// <order> characters before them\r\n\t\tfor (int i = 0; i < order; i++) {\r\n\t\t\t// out.write(s.charAt(i)+ \"\\t\" + (-1*log2(1.0/myCharSet)) + nl);\r\n\t\t\tinfoCont[index] = -1 * log2(1.0 / myCharSet);\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length() - order; i++) {\r\n\t\t\t// 1. Look at current subsequence in s\r\n\t\t\tseq = s.substring(i, i + order + 1);\r\n\t\t\ttotalSeq = seq.substring(0, seq.length() - 1) + \"-\";\r\n\r\n\t\t\t// Get counters to predict probability:\r\n\t\t\t// counter for all the characters\r\n\t\t\tif (charCount.containsKey(totalSeq))\r\n\t\t\t\ttotalCount = ((Integer) charCount.get(totalSeq)).intValue();\r\n\t\t\telse\r\n\t\t\t\t// assume all chars seen once at the start\r\n\t\t\t\ttotalCount = myCharSet;\r\n\r\n\t\t\t// conunter for current character\r\n\t\t\tif (charCount.containsKey(seq))\r\n\t\t\t\tcount = ((Integer) charCount.get(seq)).intValue();\r\n\t\t\telse\r\n\t\t\t\t// assume all chars seen once at start\r\n\t\t\t\tcount = 1;\r\n\r\n\t\t\t// 2. Predict probability of current character according to\r\n\t\t\t// preceeding sequence (InfoContent)\r\n\t\t\tprobability = (double) count / (double) totalCount;\r\n\r\n\t\t\t// output information content of each character in sequence\r\n\t\t\tinfoCont[index] = (-1 * log2(probability));\r\n\t\t\tindex++;\r\n\r\n\t\t\t// 3. Update counters:\r\n\t\t\tcount++;\r\n\t\t\ttotalCount++;\r\n\t\t\tcharCount.put(seq, new Integer(count));\r\n\t\t\tcharCount.put(totalSeq, new Integer(totalCount));\r\n\t\t}\r\n\r\n\t\treturn infoCont;\r\n\t}", "public ArrayList<PriMiRNA> extractHairpin(SimRNA rna){\n \n ArrayList<PriMiRNA> pris=new ArrayList<PriMiRNA>();\n \n String str=rna.getStr(); \n m=pattern.matcher(str);\n\n while(m.find()){\n\n int start1=str.lastIndexOf(\")\", m.start(1))+1;//replace m.start(1)\n String left=str.substring(start1, m.end(1));//the 5' side of the stemloop\n String right=m.group(3);//the 3' side of the stemloop\n int n=b2Num(left)+b2Num(right);//compare the two sides of the stem\n int slStart=0,slEnd=0,l=0,r=0;\n //if str is like (..((...)).. return ..((...))..\n if(n>0){\n l=bIndex(left,\"(\",n)+1; //new start of left\n left=left.substring(l); //new leftht\n slStart=start1+l; //start of stemloop, count from 0\n slEnd=m.end(3);//count from 1\n }\n //if str is like ..((...))..) return ..((...))..\n else if(n<0){\n r=bIndex(right,\")\",n)-1;\n right=right.substring(0,r+1);\n slStart=start1;\n slEnd=m.start(3)+r+1;//count from 1\n }\n //if str is like ..((...)).. return ..((...))..\n else{\n slStart=start1;\n slEnd=m.end(3);//count from 1\n }\n String subId=rna.getName()+\"_mir_\"; //the id of the stemloop\n String subSeq=rna.getSeq().substring(slStart, slEnd); //seq of the stemloop\n String subStr=left+m.group(2)+right; //structure of the stemloop\n\n //filter the SL less than the threshold\n if(subStr.length()<distance)\n continue;\n\n //create a new primiRNA\n PriMiRNA pri=new PriMiRNA(subId,subSeq);\n\n //if the stemloop has two or more loop\n if(hasTwoLoop(pri)) continue;\n if(pattern.matcher(pri.getStr()).matches() ==false) continue;\n \n pri.setName(rna.getName());\n pri.setStart(slStart+rna.getStart());\n pri.setEnd(slEnd-1+rna.getStart());\n pri.setId(pri.getId()+pri.getStart()+\"-\"+pri.getEnd());\n \n pris.add(pri);\n\n// priList.add(pri); \n \n }\n return pris;\n }", "private void remark290() throws Exception {\n while (readLine() != null && line.startsWith(\"REMARK 290\")) {\n if (line.indexOf(\"NNNMMM OPERATOR\") >= 0) {\n while (readLine() != null) {\n String[] tokens = getTokens();\n if (tokens.length < 4)\n break;\n setSymmetryOperator(tokens[3]);\n }\n }\n }\n }", "private String[] decodeC(String[] indexSnowtam) {\n\n for (int i = 0 ; i < indexSnowtam.length ; i++){\n\n if (indexSnowtam[i].equals(\"C)\")){\n\n indexSnowtam[i] = \"\\n\"+ indexSnowtam[i] + \" \";\n\n if (indexSnowtam[i+1].equals(\"88\")){\n indexSnowtam[i+1] = \"ALL RUNWAYS\";\n }\n else if (indexSnowtam[i+1].length() == 2){\n indexSnowtam[i+1] = \"RUNWAY \" + indexSnowtam[i+1] + \" \";\n }\n else {\n if (indexSnowtam[i+1].contains(\"R\")){\n indexSnowtam[i+1] = \"RUNWAY \"+ (Integer.valueOf(indexSnowtam[i+1].substring(0,2))+50) +\" \";\n }\n else {\n indexSnowtam[i+1] = \"RUNWAY \"+ indexSnowtam[i+1].substring(0,2) +\" \";\n }\n }\n i++;\n }\n\n }\n return indexSnowtam;\n }", "public String processSeq (String seq)\n {\n\n\n unknownStatus = 0; // reinitialize this to 0\n\n // take out any spaces and numbers\n StringBuffer tempSeq = new StringBuffer(\"\");;\n for (int i = 0; i < seq.length(); i++)\n {\n if (Character.isLetter(seq.charAt(i)))\n tempSeq.append(seq.charAt(i));\n else\n continue;\n }\n seq = tempSeq.toString();\n\n if (seq.length() > 0)\n {\n\n // the three 5'3' reading frame translations\n\n String fiveThreeFrame1 = match (seq);\n String fiveThreeFrame2 = match (seq.substring(1, seq.length()));\n String fiveThreeFrame3 = match (seq.substring(2, seq.length()));\n\n \n\n // reverse and complement the string seq and rename rev\n\n String rev = \"\";\n for (int i = 0; i < seq.length(); i++)\n {\n // the unambiguous nucleotides\n if (seq.charAt(i) == 'A')\n rev = \"U\" + rev;\n else if ((seq.charAt(i) == 'U') || (seq.charAt(i) == 'T'))\n rev = \"A\" + rev;\n else if (seq.charAt(i) == 'C')\n rev = \"G\" + rev;\n else if (seq.charAt(i) == 'G')\n rev = \"C\" + rev;\n else // any other non-nucleotides\n rev = String.valueOf (seq.charAt(i)) + rev;\n }\n\n\n // the three 3'5' reading frame translations\n\n String threeFiveFrame1 = match (rev); \n String threeFiveFrame2 = match (rev.substring(1, rev.length()));\n String threeFiveFrame3 = match (rev.substring(2, rev.length()));\n\n return (\"5'3' Frame1: \" + \"<BR>\" + fiveThreeFrame1 + \n \"<BR><BR>5'3' Frame2: \" + \"<BR>\" + fiveThreeFrame2 +\n \"<BR><BR>5'3' Frame3: \" + \"<BR>\" + fiveThreeFrame3 +\n \"<BR><BR>3'5' Frame1: \" + \"<BR>\" + threeFiveFrame1 +\n \"<BR><BR>3'5' Frame2: \" + \"<BR>\" + threeFiveFrame2 +\n \"<BR><BR>3'5' Frame3: \" + \"<BR>\" + threeFiveFrame3 + \"<BR>\");\n }\n\n return \"\";\n }", "private ArrayList<String> findBestAlignments(String q_alignment) {\n //Get the alignment into its fields.\n String[] q_toks = q_alignment.split(\"\\t\");\n String q_miRID = q_toks[0];\n String q_sRNA = q_toks[1].split(\"\\\\(\")[0];\n int q_abundance = Integer.parseInt( q_toks[1].split(\"\\\\(\")[1].replace(\")\", \"\") );\n int q_mismatches = Integer.parseInt(q_toks[5]);\n \n //Get a list of all alignments for the sRNA in this alignment file. \n ArrayList<String> alignments = new ArrayList<>();\n //Read the patman alignments file.\n try (BufferedReader r = new BufferedReader(new FileReader(this.patmanAlign))) {\n //Read the first alignment of the patman file.\n String line = r.readLine();\n //While we are not finished reading the patman file.\n while(line != null){\n //Split the current alignment into its files by a tab delimiter.\n String[] p_toks = line.split(\"\\t\");\n //Get the sRNA sequence and clean off the bracketed abundance.\n String p_sRNA = p_toks[1].split(\"\\\\(\")[0];\n if(p_sRNA.equalsIgnoreCase(q_sRNA)){\n alignments.add(line);\n }\n line = r.readLine();\n } \n \n } catch (IOException ex) { \n System.err.println(\"Error: can not use a provided patman alignment file.\");\n Logger.getLogger(SummaryTable.class.getName()).log(Level.SEVERE, null, ex);\n }\n //Sanity check One - there should not be only one entry in the alignments list as it is a pre-requisite for a multi-mapping alignment to be passed to this method.\n if(alignments.size() <= 1){\n System.err.println(\"Error: a single matching alignment was passed to the function - findBestAlignments(String q_alignment)\");\n }\n ArrayList<String> Zero_MM = new ArrayList<>();\n ArrayList<String> One_MM = new ArrayList<>();\n //Look through the list of all alignments for the sRNA to make a list of best matches.\n for(String align : alignments){\n //Get the alignment into fields.\n String[] c_toks = align.split(\"\\t\");\n String c_miRNAID = c_toks[0];\n String c_sRNA = c_toks[1].split(\"\\\\(\")[0];\n \n //Get the abundance for the patman alignment - we will use this as a sanity check to make \n //sure the sRNA in each of the alignments is the same abundance (as it should be impossible for a different abundance).\n int c_abundance = Integer.parseInt( c_toks[1].split(\"\\\\(\")[1].replace(\")\", \"\") );\n //Get the number of mismatches for the alignment.\n int c_mismatches = Integer.parseInt(c_toks[5]); \n \n //Sanity check that each alignment that we look at has the same abundance as the alignment provided.\n if(c_abundance != q_abundance){\n System.err.println(\"Error: a sRNA with the same sequence does not hold the same abundance.\");\n } \n //BEST MATCH LOGIC!\n //Look to see if there are multiple alignments and if one or more have 0 mismatches and one or more have 1 mismatches\n switch (c_mismatches) {\n case 0:\n Zero_MM.add(align);\n \n break;\n case 1:\n One_MM.add(align);\n \n break;\n default:\n System.err.println(\"Error: an alignment was checked that had more than 1 mismatch in the alignment - this means that more than one mismatch is within the patman alignment record.\");\n break;\n }//end switch \n }//end looking through the list.\n if(Zero_MM.size() > 0 && One_MM.isEmpty()){\n //Test to see if the list contained duplicate hits on a single reference.\n ArrayList<String> noDups = this.hasDuplicatesRemoved(Zero_MM);\n if(noDups != null){\n //It did, so return the list with one hit on a single reference assigned, and any other 0mm hits on other refs for this srna.\n return noDups;\n } else {\n //Else if we have a list of only exact matches between different ref seqs, then there is no 'best match' and return null.\n return null;\n }\n }\n else if(Zero_MM.isEmpty() && One_MM.size() > 0){\n\n //Test to see if the list contained duplicate hits on a single reference.\n ArrayList<String> noDups = this.hasDuplicatesRemoved(One_MM);\n if(noDups != null){\n //It did, so return the list with one hit on a single reference assigned, and any other 1mm hits on other refs for this srna.\n return noDups;\n } else {\n //If we have a list of only One Mismatch accross multiple references, then there is no 'best match' and return null.\n return null;\n }\n }\n else if(!Zero_MM.isEmpty() && !One_MM.isEmpty()){\n //If there are alignments for both 0mm and 1mm, then there are some 'best matches' and return the best (0mm)\n //Either with dups removes (if found) or as listed because there are no dupes. \n //Test to see if the list contained duplicate hits on a single reference.\n ArrayList<String> noDups = this.hasDuplicatesRemoved(Zero_MM);\n if(noDups != null){\n //It did, so return the list with one hit on a single reference assigned, and any other 0mm hits on other refs for this srna.\n return noDups;\n } else {\n return Zero_MM;\n }\n }\n //We have a sanity check to make sure that there is no other option - this should never happen so report an error!\n System.err.println(\"Error: an error has occured that is not well defined. A best match may not have been reported.\");\n return null; //This return of null should never be used and has been reported as an error. \n }", "private String parseDescrName(String line) {\n\t\t// d1f74a_ 201-209;3-11 DGAIGSTFN LKGIFSALL #7\n\t\t// d1nvra_ 226-253;184-204 IDSAPLALL GIVLTAMLA 0_0:-5_-8 0.477587\n\t\t// GroupName is created as name of domain (remove proceeding 'd') + pdb\n\t\t// number of the first residue\n\t\t// in the second segment (3-11 in the example) increased by 10000 + '_'\n\t\t// + number of cluster (7 in the case)\n\t\t// the residue with fasta number 3 is translated into address A4_ - so\n\t\t// the pdb number is 4\n\t\t// finally the group name will be 1f74a_#10004_7\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString dom = tokens[0].substring(1);\n\t\tString noClust = \"\";\n\t\t@SuppressWarnings(\"unused\")\n\t\tint shift1 = 0; // segment1 shift\n\t\tint shift2 = 0; // segment2 shift\n\t\ttry {\n\t\t\tif (tokens[4].startsWith(\"#\")) {\n\t\t\t\tnoClust = \"_\" + tokens[4].substring(1);\n\t\t\t} else {\n\t\t\t\tnoClust = \"\";\n\t\t\t}\n\t\t\tif (tokens[4].startsWith(\"0_0\")) {\n\t\t\t\ttokens[4] = tokens[4].replaceFirst(\"0_0:\", \"\");\n\t\t\t\tString[] shifts = tokens[4].split(\"_\");\n\t\t\t\tshift1 = Integer.valueOf(shifts[0]);\n\t\t\t\tshift2 = Integer.valueOf(shifts[1]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// do nothing keep default values\n\t\t}\n\t\t// get the first number of second segment : e.g. 3 from 201-209;3-11\n\t\tString[] tokensA = tokens[1].split(\";\");\n\t\tString[] tokensB = tokensA[1].split(\"-\");\n\t\tInteger fastaNo = (Integer.valueOf(tokensB[0]) - shift2 >= 0 ? Integer\n\t\t\t\t.valueOf(tokensB[0]) - shift2 : Integer.valueOf(tokensB[0]));\n\n\t\t// get pdb address\n\t\tString pdbResAddr = hashResMapInt2Str.get(dom).get(fastaNo);\n\t\tpdbResAddr = pdbResAddr.substring(1, pdbResAddr.length() - 1);\n\t\tint pdbResNo = Integer.valueOf(pdbResAddr);\n\n\t\treturn (dom + \"#\" + (10000 + pdbResNo) + noClust);\n\t}", "public void traductorIngles() throws IOException {\n BufferedReader abc = new BufferedReader(new FileReader(\"texto.txt\"));\n List<String> lines = new ArrayList<String>();\n String line = \"\";\n while((line = abc.readLine()) != null) {\n\n lines.add(line);\n\n }\n abc.close();\n\n String[] data = lines.toArray(new String[]{});\n\n String oracion = data[0];\n String oraciontraducida = \"\";\n String[] oracionpartida = oracion.split(\" \");\n for (int i = 0; i < oracionpartida.length; i++){\n if(DiccionarioIngles.contains(oracionpartida[i])) {\n String[] arraypalabras = DiccionarioIngles.get(oracionpartida[i]).split(\",\");\n oracionpartida[i] = \" \"+arraypalabras[2]+\" \";\n } else {\n String palabra = \" *\"+oracionpartida[i]+\"* \";\n oracionpartida[i] = palabra;\n }\n oraciontraducida = oraciontraducida.concat(oracionpartida[i]);\n }\n System.out.println(\"Traduccion de ingles a frances: \" + oraciontraducida);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on Meetingweb Conferencing Made Simple And Easy. Link.
public zoho clickMeetingwebConferencingMadeSimpleAndEasy1Link() { meetingwebConferencingMadeSimpleAndEasy1.click(); return this; }
[ "HtmlPage clickSiteLink();", "public zoho clickMeetingwebConferencingMadeSimpleAndEasy2Link() {\n meetingwebConferencingMadeSimpleAndEasy2.click();\n return this;\n }", "public void clicktraveltheworllink() {\r\n\t\tdriver.findElement(travel_the_world_link).click();\r\n\t}", "java.lang.String getClickURL();", "@Override\n public void onClick(View view) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://whitney.org/\")));\n }", "public void clickonAutomotiveDealership() {\n\t\tAutomotiveDealershiplink.click();\r\n\t}", "public void GoToSurvey(View view) {\n String url = \"https://globalobesity.com.au\";\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));\n }", "public boolean clickScheduleAWebinarLink(){\n\t\tif(util.clickElementByLinkText(\"Schedule a Webinar\")==\"Pass\"){\n\t\t\tSystem.out.println(\"Left Frame >> Schedule A Webinar link clicked successfully..................\");\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void openTermsAndConditionsLink(){\n\t\treporter.reportAction(\"Click on Terms and Conditions link\");\n\t\tsignupTermsAndConditionsLink.clickOnLink();\n\t\treporter.takeScreenshot(\"clickOnTermsAndConditionsLink\");\n\t}", "public static String _lblwebsite_click() throws Exception{\nanywheresoftware.b4a.keywords.Common.StartActivity(processBA,(Object)(mostCurrent._p.OpenBrowser(\"http://www.geovin.com.ar\")));\r\n //BA.debugLineNum = 117;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}", "private void jLabelMailTeamMouseClicked(java.awt.event.MouseEvent evt) {\n try {\n Desktop.getDesktop().browse(new URI(\"http://www.google.com/webhp?nomo=1&hl=fr\"));\n } catch (URISyntaxException | IOException ex) {\n //It looks like there's a problem\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString url = \"http://facerecognition.twidel.nl\";\n\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\ti.setData(Uri.parse(url));\n\t\t\t\tstartActivity(i);\n\t\t\t\t\n\t\t\t\tLog.d(TAG, \"Click on drunkenhamster uber logo button\");\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(BIOMAP_WEBPAGE)));\n }", "public void clickPeopleOnDeliveryPartners() {\r\n\t\tPeople_Link_DeliveryPartners.click();\r\n\t}", "public void generateEnquireLink();", "public KPAUISignOnFccPage clickAppointmentsLink(){\n getMakeAnAppointmentLink().click();\n return new KPAUISignOnFccPage(driver);\n }", "public void clickingOnGiftLink(WebDriver driver)\r\n\t {\r\n\t\t try\r\n\t\t {\r\n\t\t\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t driver.findElement(By.xpath(\"//a[contains(text(),'Gift')]\")).click();\r\n\t\t\t log.info(\"Clicked on View/Edit Credits Link\");\r\n\t driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS); \r\n\t\t }catch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t }", "public void clickAwaitingClaimOnCommercial() {\r\n\t\tAwaitingClaim_Link_Commercial.click();\r\n\t}", "public zoho clickMeetingLink() {\n meeting.click();\n return this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ A method that returns the factorial of a number x. Will crash if x is greater than the stack size limit of Java.
public static int factorial(int x) { if (isNegative(x)) return -1; else if (x==1 || x==0) return x; else return x*factorial(x-1); }
[ "private static double callFactorial(double x) { \n\t\treturn factorialIndirect.applyAsDouble(x);\n\t}", "int factorial (int n)\r\n {\r\n int resultado = 1;\r\n for (int i = 1; i <= n; i++)\r\n resultado = resultado * i;\r\n return resultado;\r\n }", "private double factorial(double x) {\n if (x <= -0.5 || x > 170.5) {\r\n addCase(-1);\r\n return Double.NaN;\r\n }\r\n int n = (int)x;\r\n addCase(n);\r\n double ans = 1;\r\n for (int i = 1; i <= n; i++)\r\n ans *= i;\r\n return ans;\r\n }", "private static int factorial(int n) {\n\t\tint result = 1;\n\t\tif(n>0) {\n\t\t\tfor (int i =1; i<=n;i++) {\n\t\t\t\tresult = result * i;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static int factorial(int n){\r\n\t\t\r\n\t\tif (n == 0 || n == 1) return 1;\r\n\t\telse return n * factorial(n-1);//this is O(N)\r\n\t\t\r\n\t\t\r\n\t}", "static int calFactorial(int num) {\r\n\t\tif(num == 0) {\r\n\t\t\treturn 1; //Since factorial of 0 is 1\r\n\t\t\t// This statement also works as the end point of our recursive calling\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// return multiplication the original number with (num-1)! \r\n\t\t\treturn num*calFactorial(num-1);\r\n\t\t}\r\n\t}", "static long factorialRecurse(int n) {\r\n if (n == 0 || n == 1) {\r\n return 1;\r\n }\r\n return factorialRecurse(n - 1) * n;\r\n }", "public static BigInteger factorial(int value) {\n BigInteger rvalue = BigInteger.ONE;\n for(int i = 2; i <= value; i++) {\n rvalue = rvalue.multiply(BigInteger.valueOf(i));\n }\n return rvalue; // your implementation here\n }", "static long Factorial(int a) // 定义阶乘方法\n {\n if(a != 1){\n return a*Factorial(a-1);\n }\n else{\n return 1;\n }\n }", "public int factorial(int f) {\r\n\t\tif(f == 0)\r\n\t\t\treturn 1;\r\n\r\n\t\tint result = 1;\r\n\t\tfor(int i = f; i>1; i--) {\r\n\t\t\tresult = result * i;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public double findFactorial(double num) \r\n\t{ \r\n\t if (num == 0) \r\n\t return 1; \r\n\t return num * findFactorial(num - 1); \r\n\t}", "public static final int factorial(int value)\n {\n int unsignedRes = 0;\n if (value > 0)\n for (unsignedRes = 1; value > 1; unsignedRes *= value--);\n return unsignedRes;\n }", "private static double factorial(int k) {\n if (k < 0) {\n throw new IllegalArgumentException();\n }\n\n int length1 = LONG_FACTORIALS.length;\n if (k < length1) {\n return LONG_FACTORIALS[k];\n }\n\n int length2 = DOUBLE_FACTORIALS.length;\n if (k < length1 + length2) {\n return DOUBLE_FACTORIALS[k - length1];\n } else {\n return Double.POSITIVE_INFINITY;\n }\n }", "static BigInteger factorial(int N) \n\t{ \n\t\t// Initialize result \n\t\tBigInteger f = new BigInteger(\"1\"); // Or BigInteger.ONE \n\n\t\t// Multiply f with 2, 3, ...N \n\t\tfor (int i = 2; i <= N; i++) \n\t\t\tf = f.multiply(BigInteger.valueOf(i)); \n\n\t\treturn f; \n\t}", "public static int factorial(int input) {\n \n for (int i = input - 1; i > 0; i--) {\n input *= i;\n }//end fo loop\n //returns the value of new value of input-- the factorial of the input.\n return input;\n }", "public static BigInteger factorial(int value) {\n BigInteger res = BigInteger.ONE;\n for(int i = 2; i <= value; i++) {\n res = res.multiply(BigInteger.valueOf(i));\n }\n return res;\n }", "public static int factorial(int number) {\r\n\t\tint factorial = 1;\r\n\t\tif (number == 0)\r\n\t\t\treturn 0;\r\n\t\telse {\r\n\t\t\twhile (number > 1) {\r\n\t\t\t\tfactorial = factorial * number;\r\n\t\t\t\tnumber--;\r\n\t\t\t}\r\n\t\t\treturn factorial;\r\n\t\t}\r\n\t}", "int factorialAPedal (int n)\r\n {\r\n int resultado = 1;\r\n for (int i = 1; i <= n; i++)\r\n resultado = producto (resultado,i);\r\n return resultado;\r\n }", "public static int factorial(int p){\n\t\t// in this application p cannot be negative, so no logic for negative factorials\n\t\t// is included. if p=0 or 1 then 1 is returned.\n\t\t// if p>1 then p! is returned\n\t\t// also, in this application p is small (p will generally be 5, \n\t\t// but could range from 2 to 7)\n\t\t// so no logic for large p or exception handling for memory overflow is included\n\t\tint returnValue = p;\n\t\tif(p > 1) {\n\t\t\tfor(int m = 1; m < p; m++){\n\t\t\t\treturnValue = returnValue*(p-m);\n\t\t\t}\n\t\t} else if(p==0) {\n\t\t\treturnValue = 1;\n\t\t}\n\t\treturn(returnValue);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the lsb property.
public long getLsb() { return lsb; }
[ "public long getMsb() {\n return msb;\n }", "public long getLeastSignificantBits() {\n return lsb;\n }", "BitField getLSBs(int digits);", "public int getDigitalLSBMask() {\n\t\treturn digitalLSBMask;\n\t}", "public void setLsb(long value) {\n this.lsb = value;\n }", "public int getValue()\n { \n return bitVal;\n }", "byte getLedByte();", "public double getSouthBL()\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(SOUTHBL$4, 0);\n if (target == null)\n {\n return 0.0;\n }\n return target.getDoubleValue();\n }\n }", "public long longValue()\n {\n return this.unsignedValue & JavaConsts.INT_LMASK;\n }", "private int byteToLSB(byte b) {\r\n\t\tbyte result = (byte) (b >>4);\r\n\t\treturn byteToInt(result);\r\n\t}", "public byte getValue() {\n return value;\n }", "public byte getValue() {\n return value;\n }", "public long getMostSignificantBits() {\n return msb;\n }", "public java.lang.Integer getSubLed () {\n\t\treturn subLed;\n\t}", "public byte byteValue() {\r\n\treturn value;\r\n }", "public double[] getAverageLSB(){\r\n\t\treturn averageLSB;\r\n\t}", "public long longValue() {\r\n\treturn (long)value;\r\n }", "public byte byteValue() {\n\t\treturn (byte) re;\n\t}", "public int readUWord() {\n return bytes.getShort() & 0xFFFF;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the select statement to retrieve a full schema
private String sqlSelectSchema() { return String.format("SELECT event_type, field_name, field_type, field_id, description, sql_type, sql_length, sql_scale, sql_precision FROM %s ORDER BY field_id ASC", tableName); }
[ "public String getTableSQL();", "protected String getSelectQuery() {\n StringBuilder query = new StringBuilder();\n DBConfiguration dbConf = getDBConf();\n String conditions = getConditions();\n String tableName = getTableName();\n String [] fieldNames = getFieldNames();\n\n // Oracle-specific codepath to use rownum instead of LIMIT/OFFSET.\n if(dbConf.getInputQuery() == null) {\n query.append(\"SELECT \");\n \n for (int i = 0; i < fieldNames.length; i++) {\n query.append(fieldNames[i]);\n if (i != fieldNames.length -1) {\n query.append(\", \");\n }\n }\n \n query.append(\" FROM \").append(tableName);\n if (conditions != null && conditions.length() > 0)\n query.append(\" WHERE \").append(conditions);\n String orderBy = dbConf.getInputOrderBy();\n if (orderBy != null && orderBy.length() > 0) {\n query.append(\" ORDER BY \").append(orderBy);\n }\n } else {\n //PREBUILT QUERY\n query.append(dbConf.getInputQuery());\n }\n \n try {\n DBInputFormat.DBInputSplit split = getSplit();\n if (split.getLength() > 0){\n String querystring = query.toString();\n\n query = new StringBuilder();\n query.append(\"SELECT * FROM (SELECT a.*,ROWNUM dbif_rno FROM ( \");\n query.append(querystring);\n query.append(\" ) a WHERE rownum <= \").append(split.getEnd());\n query.append(\" ) WHERE dbif_rno > \").append(split.getStart());\n }\n } catch (IOException ex) {\n // ignore, will not throw.\n }\t\t \n\n return query.toString();\n }", "private String selectByIdStatement(){\n if ( selectByIdStatement == null ){\n StringBuilder sb = new StringBuilder();\n sb.append(\"SELECT * FROM \\\"\").append(tableName).append(\"\\\" where id=?\");\n selectByIdStatement = sb.toString();\n }\n return selectByIdStatement;\n }", "String getMetadataSelectClause();", "public static String getBasicSelect(){\n\t\treturn \"select * from cruxhit\";\n\t}", "public java.sql.ResultSet getSchemas() throws SQLException {\n java.sql.Statement statement = connection.createStatement();\n\n String sql = Driver.JDBC3\n ? \"SELECT name AS TABLE_SCHEM, NULL as TABLE_CATALOG FROM dbo.sysusers\"\n : \"SELECT name AS TABLE_SCHEM FROM dbo.sysusers\";\n\n //\n // MJH - isLogin column only in MSSQL >= 7.0\n //\n if (tdsVersion >= Driver.TDS70) {\n sql += \" WHERE islogin=1\";\n } else {\n sql += \" WHERE uid>0\";\n }\n\n sql += \" ORDER BY TABLE_SCHEM\";\n\n return statement.executeQuery(sql);\n }", "String getSQL();", "SELECT createSELECT();", "public SelectStatement getSelectStatement() {\r\n return selectStatement;\r\n }", "public String getSchemaTerm()\n throws SQLException\n {\n return \"SCHEMA\";\n }", "public String getSqlSelectAllFields() {\n return \"SELECT * FROM \" + getTableName() + Db.WHEREALL_CLAUSE;\n }", "protected String getSelectSQL() {\n\t\treturn queryData.getString(\"SelectSQL\");\n\t}", "public abstract TableSchema getOutputSchema();", "private String createFindAllQuery() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT * FROM `\");\r\n sb.append(type.getSimpleName() + \"`\");\r\n return sb.toString();\r\n }", "public String executeSchemaName(){ return null; }", "public SelectStatement() {\n\t\tthis.columnSpecs = new ArrayList<>();\n\t}", "private String getFrom() {\n String selectSub = getSelectSubquery();\n\n String fromSub = \"from \" + jam.getFromSourceClause(params) + \" as \" + ANALYTICS_TBL_ALIAS + \" \";\n\n String whereSub = getWhereSubquery();\n\n String groupBySub = getGroupBySubquery();\n\n return \"from (\"\n + selectSub\n + fromSub\n + whereSub\n + groupBySub\n + \") as \"\n + ANALYTICS_TBL_ALIAS\n + \" \";\n }", "private void appendSelectStatement() {\n builder.append(SELECT).append(getSelectedFields()).append(FROM);\n }", "protected String generateSQL() {\n String fields = generateFieldsJSON();\n return String.format(QUERY_PATTERN, fields, esQuery.generateQuerySQL(), from, size);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
treat request to add to notifications table that one user was granted with admin
private void treatNotifyUserAboutAdminGranted(HashMap<String, String> map) throws SQLException { String user = map.get("user"); String[] a = {"username, notificationType", "'"+user+"', 'you now have admin permissions!'"}; SQL.addValuesToTable("notifications", a); }
[ "public void notifyAdmins(){\n \tfor(PlayerHandler player : players){\n \t\tif(player.isAdmin()){\n \t\t\tplayer.notify(1);\n \t\t}\n \t}\n }", "@Override\r\n public void addGrantedNotification(NotificationDetail notificationDetail) {\n }", "private void treatGrantAdmin(HashMap<String, String> map) throws SQLException {\r\n String username = map.get(\"username\");\r\n HashMap<String, String> hmap = new HashMap<String, String>();\r\n hmap.put(\"type\", \"checkGrantAdmin\");\r\n hmap.put(\"username\", username);\r\n if(SQL.grantAdminToUser(username)) {\r\n hmap.put(\"condition\", \"true\");\r\n ConnectionFunctions.sendUdpPacket(hmap);\r\n }\r\n else {\r\n hmap.put(\"condition\", \"false\");\r\n ConnectionFunctions.sendUdpPacket(hmap);\r\n }\r\n }", "private void note(Notification n){\r\n\t\tusers.get(n.userID).addNotification(n);\r\n\t\tif (loggedInUsers.contains(n.userID))\r\n\t\t\tcomms.sendMessage(n);\r\n\t}", "public void grantAdminOnIndividualToSystemUser(Individual i, SystemUser user);", "public void lastUserNotAdmin(){\n \tint a;\n \ta=userList.size();\n \tlastUser = userList.get(a-1);\n \tlastUser.setUserType(\"user\");\n }", "protected void notifyAdmins (String message) {\n if (! getConfig().getBoolean(\"NotifyAdminOnTicketClose\")) { return; }\n Player[] players = Bukkit.getOnlinePlayers();\n for(Player op : players) { if(op.hasPermission(\"tan.admin\")) { op.sendMessage(message); } }\n }", "public void grantPermissionPending(String objectId, String objectType, User user, List<String> actions) throws UserManagementException;", "void sendAdminCommandLocked(String action, int reqPolicy, int userHandle, Bundle adminExtras) {\n final DevicePolicyData policy = getUserData(userHandle);\n final int count = policy.mAdminList.size();\n for (int i = 0; i < count; i++) {\n final ActiveAdmin admin = policy.mAdminList.get(i);\n if (admin.info.usesPolicy(reqPolicy)) {\n sendAdminCommandLocked(admin, action, adminExtras, null);\n }\n }\n }", "public void grantAdministrate(User user) throws ServiceException{\n }", "private void processNotifications(ActionRequest req, SiteVO site, boolean notifyAdmin) {\n\t\tBusinessVO business = new BusinessVO(req);\n\t\t//notify the admin if a new business got created - it requires approval\n\t\tif (notifyAdmin) {\n\t\t\t//repopulate the VO when what the form handler repositioned for us\n\t\t\tCampaignMessageSender emailer = new CampaignMessageSender(getAttributes());\n\t\t\tList<EmailRecipientVO> rcpts = new ArrayList<>();\n\t\t\trcpts.add(new EmailRecipientVO(null, site.getAdminEmail(), EmailRecipientVO.TO));\n\t\t\tMap<String, Object> data = new HashMap<>();\n\t\t\tdata.put(\"businessName\", business.getBusinessName());\n\t\t\tdata.put(\"phoneNumber\", business.getMainPhoneText());\n\t\t\tdata.put(\"websiteUrl\", business.getWebsiteUrl());\n\t\t\tdata.put(\"address\", business.getAddress());\n\t\t\tdata.put(\"address2\", business.getAddress2());\n\t\t\tdata.put(\"city\", business.getCity());\n\t\t\tdata.put(\"state\", business.getState());\n\t\t\tdata.put(\"zip\", business.getZipCode());\n\t\t\tdata.put(\"category\", StringUtil.checkVal(business.getCategoryName(), business.getCategoryCd()));\n\t\t\tdata.put(\"subcategory\", business.getSubCategoryCd());\n\t\t\tdata.put(\"email\", business.getEmailAddressText());\n\n\t\t\temailer.sendMessage(data, rcpts, RezDoxUtils.EmailSlug.BUSINESS_PENDING.name());\n\n\t\t} else {\n\t\t\t//if not a new business, and files were uploaded (ads or images), notify connected members of the change\n\t\t\tboolean hasNewAdFile = Convert.formatBoolean(req.getAttribute(\"adFileUploaded\"));\n\t\t\tboolean hasNewVideoUrl = !StringUtil.checkVal(req.getAttribute(\"newYoutubeAdUrl\"), \"~|~\").equals(req.getParameter(\"oldYoutubeAdUrl\"));\n\t\t\tlog.debug(String.format(\"adFileUploaded=%s - hasNewYoutubeUrl=%s\", hasNewAdFile, hasNewVideoUrl));\n\n\t\t\tif (hasNewAdFile || hasNewVideoUrl)\n\t\t\t\tnotifyNewPromo(site, business);\n\t\t}\n\t}", "private void checkAdminInDB(DB db) {\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tlong hashCode = (long) \"admin\".hashCode();\n\t\tif(!users.containsKey(hashCode))\n\t\t\tusers.put(hashCode, new Admin(\"admin\", \"admin\"));\n\t}", "void promoteAdmin(User user);", "public boolean isAdmin(String adminId, String eventId);", "public void sendReplyReminderAdmin() {\n\n\t}", "private void addPrivilegedUser(ActionEvent actionEvent) {\n if (addUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(addUserMenu.getSelectionModel().getSelectedItem())) {\n selectedAddUser = user;\n }\n }\n // set selected user to channel as privileged\n channel.withPrivilegedUsers(selectedAddUser);\n // update addMenu\n addUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (!user.getPrivileged().contains(channel)) {\n addUserMenu.getItems().add(user.getName());\n }\n }\n // update removeMenu\n removeUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (user.getPrivileged().contains(channel)) {\n removeUserMenu.getItems().add(user.getName());\n }\n }\n channelPrivilegedUserUpdate();\n }\n }", "void setAdminStatus(User user, boolean adminStatus);", "@Override\r\n\tpublic void addUser(Room room, Normal user) {\n\t\tJOptionPane.showMessageDialog(null, \"User impossibility run this action because don't allowed to add users in room that you don't are administration power!!!\", \"Error\", JOptionPane.WARNING_MESSAGE);\r\n\t}", "private void markNotified(int custId, String type) {\n\t\tconnect();\n\t\ttry {\n\t\t\tStatement statement = connection.createStatement();\n\t\t\t// Sets user notified\n\t\t\tString query = \"UPDATE Notification SET Notified=\" + true +\n\t\t\t\t\t\t\t\" WHERE CustID=\" + custId + \" AND Type='\" + type + \"'\";\n\t\t\tstatement.executeUpdate(query);\n\t\t\tstatement.close();\n\t\t\tlog.info(\"NOTIFICATION UPDATE\");\n\t\t} catch (SQLException e) {\n\t\t\tlog.severe(\"Could not mark notified\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns true if the pattern is readable i.e. isn't a match for a nonreadable UUID
private boolean isReadable(String uuid) { return !NON_READABLE_UUID.matcher(uuid).matches(); }
[ "private static boolean isUUID(String s)\n\t{\n\t\tif (s.length() > 35)\n\t\t{\n\t\t\tif (s.charAt(8) == '-' && s.charAt(13) == '-' && s.charAt(18) == '-' &&\n\t\t\t\ts.charAt(23) == '-')\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean validatePattern(String raw);", "boolean supportsFormat(UUID formatid);", "boolean hasUuidLeast();", "protected boolean isPattern(Symbol eventID) {\n\tfor (int i = 0; i < ev_Pattern.length; i++) {\n\t if (eventID.equals(ev_Pattern[i])) return true;\n\t}\n\treturn false;\n }", "@Override\n public boolean isUhUuid(String naming) {\n return naming.matches(\"\\\\d+\");\n }", "public static boolean isValidUUID(String str) {\n\t\ttry {\n\t\t\tUUID.fromString(str);\n\t\t\treturn true;\n\t\t} catch (IllegalArgumentException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean doesMatchPattern() {\n \treturn barcodeMatcher.matches();\n }", "public static boolean renderPattern(FacesContext facesContext, UIInput component) throws IOException\r\n {\r\n String pattern = null;\r\n\r\n pattern = _getPatternFromValidators(component.getValidators());\r\n\r\n if (pattern == null)\r\n pattern = _getPatternFromConverter(component.getConverter());\r\n\r\n if (pattern != null)\r\n {\r\n ResponseWriter writer = facesContext.getResponseWriter();\r\n writer.writeAttribute(HTML5.PATTERN_ATTR, pattern, null);\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n\r\n }", "@Test\n public void regexPatternTest() throws Exception {\n\n // valid patterns\n assertTrue(Pattern.matches(InstaYakCredentials.pattern, \"CRED 000102030405060708090A0B0C0D0E0F\"));\n assertTrue(Pattern.matches(InstaYakCredentials.pattern, \"CRED FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\"));\n assertTrue(Pattern.matches(InstaYakCredentials.pattern, \"CRED 00000000000000000000000000000000\"));\n\n // invalid patterns\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \"CRED 000102030405060708090A0B0C0D0E\"));\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \"CRED 000102030405060708090a0b0c0d0e0f\"));\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \"CRED 000102030405060708090A0B0C0D0E0G\"));\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \"000102030405060708090A0B0C0D0E0F\"));\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \"CRED\"));\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \"CRED 000102030405060708090A0B0C0D0E0F \"));\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \" CRED 000102030405060708090A0B0C0D0E0F\"));\n assertFalse(Pattern.matches(InstaYakCredentials.pattern, \"CRED 000102030405060708090A0B0C0D0E0F\"));\n\n }", "private boolean validId(String id) {\n Matcher matcher = pattern.matcher(id);\n return matcher.matches();\n }", "boolean hasConflictingUuid(UUID uuid);", "protected boolean isValidPattern(String pattern) {\n \t\t\tfor (int i= 0; i < pattern.length(); i++) {\n \t\t\t\tchar ch= pattern.charAt(i);\n \t\t\t\tif (!(ch == 9 || ch == 10 || ch == 13 || ch >= 32))\n \t\t\t\t\treturn false;\n \t\t\t}\n \t\t\treturn true;\n \t\t}", "private static boolean match(String kmer, String pattern) {//Restituisce true se kmer e' \"compatibile\" con pattern.\n\n\t\tif(kmer.length()!=pattern.length()) \n\t\t\treturn false;\n\n\t\tString patternKmer = Util.extractPattern(kmer);\n\n\t\tif(!patternKmer.equals(pattern))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "boolean isPattern(String path);", "private static void validateUUID(final String uuid) {\n UUID.fromString(uuid);\n }", "public boolean validate(final String hex) {\n\n matcher = pattern.matcher(hex);\n return matcher.matches();\n\n }", "public boolean validate(final String hex) {\n\n matcher = pattern.matcher(hex);\n\n return matcher.matches();\n\n }", "public boolean validString() {\n\t\tboolean valid = false;\n\t\tString regexPattern = \"^[0-9A-F]+$\";\n\n\t\tApplication.LOGGER.log(Level.INFO, \"Validating the format of the hex number \" + hexNumber + \".\");\n\n\t\tPattern regex = Pattern.compile(regexPattern);\n\t\tMatcher match = regex.matcher(hexNumber);\n\n\t\tif (match.find()) {\n\t\t\tvalid = true;\n\t\t}\n\n\t\treturn (valid);\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to find the BankAccount with the lowest balance in an array of BankAccounts. The code allows null elements to appear in the array.
public static BankAccount minBal(BankAccount[] array) { BankAccount minAcc = null; if (array != null && array.length > 0) { minAcc = array[0]; int i = 0; while(minAcc == null && i < array.length - 1 ) { i++; minAcc = array[i]; } for (i++; i < array.length; i++) { if (array[i] != null && array[i].getBalance() < minAcc.getBalance()) { minAcc = array[i]; } } } return minAcc; }
[ "public static BankAccount minBalBAD(BankAccount[] arr) {\n BankAccount minAcc = null;\n if (arr != null && arr.length > 0) { \n //FIRST ASSUME ALL ELEMENTS ARE NOT null\n minAcc = arr[0];\n for (int i = 1; i < arr.length; i++) {\n if (arr[i].getBalance() < minAcc.getBalance()) {\n minAcc = arr[i];\n } \n }\n }\n return minAcc;\n }", "private Person findMin() {\n int min = people.get(0).getBalance();\n for (int i = 1; i < people.size(); i++) {\n int balance = people.get(i).getBalance();\n\n if (balance < min) {\n return people.get(i);\n }\n\n }\n return people.get(0);\n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "private double findMin(double[] array) {\n\t\tdouble lowest = 1000000000;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < lowest) {\n\t\t\t\tlowest = array[i];\n\t\t\t}\n\t\t}\n\t\treturn lowest;\n\t}", "private static Key min(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey min = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(min) < 0) {\n\t\t\t\tmin = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public static int findMinimum(int[] array) {\n if (array == null || array.length == 0) {\n return Integer.MIN_VALUE;\n }\n int left = 0;\n int right = array.length -1;\n int element = findPivot(array, left, right);\n return element;\n }", "private double getArrayMinValue(double[] array) {\r\n if (array == null)\r\n return -1;\r\n double min = Double.MAX_VALUE;\r\n for (int i = 0; i < 12; i++)\r\n if (array[i] < min)\r\n min = array[i];\r\n return min;\r\n }", "public Transaction e8_getTransactionWithSmallestValue(List<Transaction> transactions) { return null; }", "public static int findMinValueR(int[] arr) {\r\n\t\tif (arr.length <= 0) {\r\n\t\t\treturn Integer.MAX_VALUE;\r\n\t\t} else if (arr.length == 1) {\r\n\t\t\treturn arr[0];\r\n\t\t} else {\r\n\t\t\tint[] newArray = new int[arr.length-1];\r\n\t\t\tfor (int i = 0; i < newArray.length; i++) {\r\n\t\t\t\tnewArray[i] = arr[i+1];\r\n\t\t\t}\r\n\t\t\treturn Math.min(arr[0], findMinValueR(newArray));\r\n\t\t}\r\n\t}", "public int findMin(int array[]){\n \n min = array[0];\n \n for(int i = 0; i < array.length; i++){\n \n if(min > array[i]){\n \n min = array[i];\n \n }\n\n }\n return min;\n}", "int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}", "public static int indexFirstMin1(double[] array) {\n int minIndex = -1;\n if (array != null && array.length > 0) {\n minIndex = 0;\n for (int i = 1; i < array.length; i++) {\n if (array[i] < array[minIndex]) {\n minIndex = i;\n } \n }\n }\n return minIndex;\n }", "public static double minElement1(double[] array) {\n double minVal = 0;\n if (array != null && array.length > 0) { //NOTE\n minVal = array[0];\n for (int i = 1; i < array.length; i++) {\n if (array[i] < minVal) {\n minVal = array[i];\n } \n }\n }\n return minVal; \n }", "public static double min(double[] arr){\n double min = arr[0];\n\n for(double each : arr) {\n if (each < min) {\n min = each;\n }\n }\n\n return min;\n }", "int smallest(int[] array) {\n int min = array[0];\n\n for (int i = 0; i < array.length; i++) {\n if (array[i] < min){\n min = array[i];\n }\n }\n return min;\n }", "public Region findLowestEarningRegion() {\n Region low = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (low.calcEarnings() >= regionList[i].calcEarnings())\n low = regionList[i];\n }\n return low;\n }", "public static int findMinValueI(int[] arr) {\r\n\t\tint min = Integer.MAX_VALUE;\r\n\t\tfor(int elem : arr) {\r\n\t\t\tif (elem < min) {\r\n\t\t\t\tmin = elem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn min;\r\n\t}", "public Treasure min(Treasure[] tsureArray)\n {\n Treasure min = tsureArray[0];\n int minValue = min.getValue();\n \n for(int i = 0; i < tsureArray.length; i++)\n {\n if(tsureArray[i].getValue() < minValue)\n {\n minValue = tsureArray[i].getValue();\n min = tsureArray[i];\n }\n }\n \n return min;\n }", "public static int min(int[] array){\n int min = array[0];\n for(int each: array) {\n min= Math.min(each, min);\n }\n return min;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns list of projects manager is leading by projName
public String[] getMgrProjects(int mgrID) { String[] emptyProjects = {}; Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { DBConnection db = new DBConnection(); conn = db.ConnectDB(); String query = "SELECT projName " + "FROM Manager, Project " + "WHERE Manager.id = Project.mgrID AND mgrID = ?; "; stmt = conn.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY ); stmt.setInt(1, mgrID); rs = stmt.executeQuery(); int i = 0; if(rs.last()) { int rows = rs.getRow(); String[] results = new String[rows]; // Move to beginning rs.beforeFirst(); while(rs.next()) { String projName = rs.getString(1); results[i] = projName; i++; } return results; } } catch(SQLException e) { e.printStackTrace(); } finally { if(rs != null) try{rs.close();} catch (SQLException ignore) {} if(stmt != null) try {stmt.close();} catch (SQLException ignore) {} if(conn != null) try {conn.close();} catch (SQLException ignore){} } return emptyProjects; }
[ "public String getProjectManagerName();", "public ListProjects getListProjects()\n\t{\n\t\treturn ListProjects.getInstance();\n\t\t\n\t}", "List<Project> getProjectList();", "List<Project> getAllProjects(String workspaceName);", "List<Project> listAccessibleProjects();", "public List<Project> getAllProjects();", "@ModelAttribute(\"list_Project_For_menu\")\t\n\tpublic List<ProjectInfo> getListProject(Principal principal) {\n\t\tUser user = userDao.getUserInfoByUserMail(principal.getName());\n\t\t\n\t\t//check role: if user is Admin => list all projects \n\t\tif(user.getRole_id()==1){\n\t\t\treturn projectDao.getAllProject();\n\t\t}\n\t\telse{\n\t\t\t//only get list projects that user access\n\t\t\t//get List project_ids of user is PM\n\t\t\treturn projectDao.getListPRojectOfUserAccessed(user.getUser_id());\n\t\t\t\n\t\t}\n\t}", "public static Collection<String> getProjectNames() {\n\t\tsynchronized (projects) {\n\t\t\treturn new TreeSet<String>(projectNames);\n\t\t\t//return new TreeSet<String>(projects.keySet());\n\t\t}\n\t}", "public List<MavenModuleSet> memberProjectList() {\n\t\treturn memberProjectList(getFamilyID());\n\t}", "protected ArrayList<String> getProjectsFromUser(){\n\n String userFirstName = ApplicationData.currentUser.getFirstName();\n if(userFirstName.equals(\"None\")) {\n userFirstName = \"\";\n }\n else {\n userFirstName = \" \" + userFirstName;\n }\n\n String projectList = ApplicationData.currentUser.getProjectList();\n\n // Clean the project list before viewing\n projectList = ApplicationData.removeDuplicates(projectList);\n\n if(projectList == null){\n projectList = \"\";\n }\n\n ArrayList projectArray = new ArrayList();\n\n TextView header = (TextView) findViewById(R.id.Header);\n Log.d(\"debug\", \"Project List: \" + projectList);\n if(\"None\".equals(projectList) || \"\".equals(projectList)){\n header.setText(\"Welcome\" + userFirstName + \",\" + \"\\n\" + \"Click \\\"+\\\" to create a project\");\n return null;\n } else {\n header.setText(\"Project List\");\n String[] projects = projectList.split(\"--\");\n\n for(String project : projects){\n // Wipe leftover python structures\n project = project.replaceAll(\"u'\", \"\");\n project = project.replaceAll(\"'\", \"\");\n\n if(!\"\".equals(project)) {\n if(!\"None\".equals(project)) {\n // Get the project name of project\n ProjectTableEntry entry = null;\n try {\n Log.d(\"debug\", project);\n entry = (ProjectTableEntry) new HTTPHandler().select(\n project, \"ProjectId\", new ProjectTableEntry(), \"ProjectTable\"\n );\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (entry != null && entry.getProjectName() != null) {\n String projectName = project + \": \" + entry.getProjectName().substring(2, entry.getProjectName().length() - 1);\n projectName = projectName.replaceAll(\"_\", \" \");\n projectArray.add(projectName);\n } else {\n projectArray.add(project);\n }\n }\n }\n }\n }\n\n return projectArray;\n }", "public String[] getProjectsNames(){\n\t\tCollection<String> listNames = new ArrayList<String>();\n\t\tfor( Project project : m_Projects){\n\t\t\tlistNames.add(project.m_Name);\n\t\t}\n\t\t\n\t\tString[] names = new String[listNames.size()]; \n\t\tnames = listNames.toArray(names);\n\t\treturn names;\t\t\n\t}", "public ArrayList<Project> allProjects() {\n ArrayList<Project> projects = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Member) {\n projects.add(((Member) role).getProject());\n } else if (role instanceof Leader) {\n projects.add(((Member) role).getProject());\n }\n }\n return projects;\n }", "public static MapList getCurrentUserProjects(Context context, String[] args) throws MatrixException {\n MapList projectList = new MapList();\n try {\n // rp3 : This needs to be tested to make sure the result creates no issue and returns the same set\n projectList = (MapList) JPO.invoke(context, \"emxProjectSpace\", null, \"getAllProjects\", args, MapList.class);\n\n // rp3 : Replace this code with the JPO invoke from the program central API.\n /*\n * com.matrixone.apps.common.Person person = (com.matrixone.apps.common.Person) DomainObject.newInstance(context, DomainConstants.TYPE_PERSON); com.matrixone.apps.program.ProjectSpace\n * project = (com.matrixone.apps.program.ProjectSpace) DomainObject.newInstance(context, DomainConstants.TYPE_PROJECT_SPACE,DomainConstants.PROGRAM);\n * \n * String ctxPersonId = person.getPerson(context).getId(); person.setId(ctxPersonId);\n * \n * //System.out.println(\"the project id is \" + ctxPersonId);\n * \n * StringList busSelects = new StringList(11); busSelects.add(project.SELECT_ID); busSelects.add(project.SELECT_TYPE); busSelects.add(project.SELECT_NAME);\n * busSelects.add(project.SELECT_CURRENT);\n * \n * //projectList = project.getUserProjects(context,person,null,null,null,null); // expand to get project members Pattern typePattern = new Pattern(DomainConstants.TYPE_PROJECT_SPACE);\n * typePattern.addPattern(DomainConstants.TYPE_PROJECT_CONCEPT);\n * \n * projectList = (person.getRelatedObjects( context, // context DomainConstants.RELATIONSHIP_MEMBER, // relationship pattern typePattern.getPattern(), // type filter. busSelects, //\n * business selectables null, // relationship selectables true, // expand to direction false, // expand from direction (short) 1, // level null, // object where clause null)); //\n * relationship where clause\n */\n\n // System.out.println(\"the project list is \" + projectList);\n } catch (Exception ex) {\n throw (new MatrixException(\"emxMsoiPMCUtil:getCurrentUserProjects : \" + ex.toString()));\n }\n return projectList;\n }", "public List<String> getmanagers();", "public List<ProjectEntity> findProjects(EmployeeEntity emp) {\n List<ProjectEntity> list = null;\n TypedQuery<ProjectEntity> query = em.createQuery(\"SELECT p FROM ProjectEntity p where p.projectManager = :user\", ProjectEntity.class);\n query.setParameter(\"user\", emp);\n try {\n \tlist = query.getResultList(); \n } catch (Exception ex) {\n \tlist = null;\n }\n return list;\n }", "private ProjectBaseBean[] getAllProjects() {\n ProjectBaseBean[] projects = ProjectServiceClient.findProjectsTM75(\"\");\n return projects;\n }", "public List getProjects(XWikiContext context) throws XWikiException {\r\n List list = null;\r\n String key = context.getDatabase() + \":\" + context.getLocalUser();\r\n \r\n initProjectsCache(context);\r\n synchronized (key) {\r\n try {\r\n // retreive projects list from cache\r\n list = (List) projectsCache.getFromCache(key);\r\n } catch (XWikiCacheNeedsRefreshException e) {\r\n // update the projects list cache\r\n projectsCache.cancelUpdate(key);\r\n String hql;\r\n list = new ArrayList<Object>();\r\n List projectList = new ArrayList<Object>();\r\n if (plugin.getUserManager().isAdmin(context) ||\r\n plugin.getUserManager().isManager(context)) {\r\n // admin & managers\r\n // the distinct + order here are not hsqldb not compliant\r\n hql =\r\n \"select distinct doc.web from XWikiDocument doc, BaseObject as obj where obj.name=doc.fullName\" +\r\n \" and doc.web != '\" + TEMPLATE_DEFAULT_SPACE + \"'\" +\r\n \" and obj.className='\" + Project.CLASS_PROJECT + \"'\";\r\n projectList = context.getWiki().search(hql, context);\r\n } else {\r\n // basic users\r\n hql =\r\n \"select distinct doc.web, pdate.value from XWikiDocument doc, XWikiDocument pdoc, BaseObject obj, StringProperty prop, \" +\r\n \"BaseObject pobj, DateProperty pdate where doc.fullName=obj.name \" +\r\n \"and doc.web != '\" + TEMPLATE_DEFAULT_SPACE + \"'\" +\r\n \"and obj.className='XWiki.XWikiGroups' and obj.id=prop.id.id and prop.id.name='member' \" +\r\n \"and (prop.value='\" + context.getLocalUser() + \"' or prop.value='XWiki.XWikiAllGroup')\" +\r\n \" and pdoc.web=doc.web and pdoc.name='WebHome' \" +\r\n \"and pdoc.fullName=pobj.name and pobj.id=pdate.id.id and pdate.id.name='end' order by pdate.value\";\r\n // workaround for HSQLDB distinct/order limitation\r\n List tmplist = context.getWiki().search(hql, context);\r\n list = new ArrayList();\r\n for (int i = 0; i < tmplist.size(); i++) {\r\n String prj = (String) ((java.lang.Object[]) tmplist.get(i))[0];\r\n if (prj != null)\r\n projectList.add(prj);\r\n }\r\n }\r\n \r\n Iterator it = projectList.iterator();\r\n while (it.hasNext()) {\r\n String docName = (String) it.next();\r\n BaseObject bobj = context.getWiki()\r\n .getDocument(docName + \".\" + Project.PROJECT_HOMEDOC, context)\r\n .getObject(Project.CLASS_PROJECT);\r\n Object obj = new Object(bobj, context);\r\n if (!list.contains(obj))\r\n list.add(obj);\r\n }\r\n projectsCache.putInCache(key, list);\r\n }\r\n }\r\n \r\n return list;\r\n }", "public List<String[]> getAllProject() {\n String url = Host.getSonar() + \"api/projects/index\";\n String json = null;\n try {\n Object[] response = HttpUtils.sendGet(url, Authentication.getBasicAuth(\"sonar\"));\n if (Integer.parseInt(response[0].toString()) == 200) {\n json = response[1].toString();\n }\n } catch (Exception e) {\n logger.error(\"Get sonar project list: GET request error.\", e);\n }\n if (json == null) {\n logger.warn(\"Get sonar project list: response empty.\");\n return null;\n }\n List<Map<String, Object>> projects = JSONArray.fromObject(json);\n if (projects.size() == 0) {\n logger.warn(\"Get sonar project list: empty list.\");\n return null;\n }\n List<String[]> result = new ArrayList<>();\n for (Map<String, Object> oneProject : projects) {\n result.add(new String[]{oneProject.get(\"nm\").toString(), oneProject.get(\"k\").toString()});\n }\n return result;\n }", "List<Project> getAllProjects(final Repository repo);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns AArch64Address of given StackSlot. We cannot use CompilationResultBuilder.asAddress since this calls AArch64MacroAssembler.makeAddress with displacements that may be larger than 9bit signed, which cannot be handled by that method. Instead we create an address ourselves. We use scaled unsigned addressing since we know the transfersize, which gives us a 15bit address range (for longs/doubles) respectively a 14bit range (for everything else).
private static AArch64Address loadStackSlotAddress(CompilationResultBuilder crb, AArch64MacroAssembler masm, StackSlot slot, AllocatableValue scratch) { Register scratchReg = Value.ILLEGAL.equals(scratch) ? zr : asRegister(scratch); return loadStackSlotAddress(crb, masm, slot, scratchReg); }
[ "public Addr getLocationOnStack() {\n\n\t\tImm immediateStackPointerOffset = new Imm(String.valueOf(this.spOffset));\n\t\tAddr spilledValueLocationOnStack = new Addr(immediateStackPointerOffset, this.sp);\n\t\treturn spilledValueLocationOnStack;\n\t}", "io.swisschain.sirius.vaultApi.generated.transferValidationRequests.TransferValidationRequestsOuterClass.DestinationAddress getDestinationAddress();", "public int translateAddress (int va) throws AbstractMainMemory.InvalidAddressException {\n return va;\n }", "IAddress getInstructionAddress();", "public int getJumpOperand(\n ) throws MachineInterrupt,\n UnresolvedAddressException {\n int relAddress = calculateRelativeAddressForGRSOrStorage(0);\n\n // The following bit is how we deal with indirect addressing for basic mode.\n // If we are doing that, it will update the U portion of the current instruction with new address information,\n // then throw UnresolvedAddressException which will eventually route us back through here again, but this\n // time with new address info (in reladdress), and we keep doing this until we're not doing indirect addressing.\n // We never actually use the result of findBaseRegisterIndex...\n findBaseRegisterIndex(relAddress, false);\n incrementIndexRegisterInF0();\n return relAddress;\n }", "public static synchronized Address createBuiltinAddr() {\n\tAddress address = new Address(builtinAddress, \"\");\n\tbuiltinAddress = builtinAddress.subtract(BigInteger.valueOf(1));\n\treturn address;\n }", "private long to64bitStoreAddress(NodeReference node_ref) {\n long ref64bit = node_ref.getLowLong();\n return ref64bit;\n }", "public Stack getStack(int slot);", "public int getCraftingSlot(int daemonSlot){\n\t\t\tif(daemonSlot < 4) return daemonSlot;\n\t\t\tif(daemonSlot < 8) return daemonSlot - DaemonMatrix.MATRIX_DIM - 3;\n\t\t\treturn daemonSlot - 2 * (DaemonMatrix.MATRIX_DIM - 3);\n\t\t}", "int meetStack(int slot, int[] rhs, BasicBlock bb);", "public int get_addr() {\n return (int)getUIntElement(offsetBits_addr(), 16);\n }", "private Expression addressOf (Expression expression) {\n return expression;\n }", "public Address64 (String addrStr) {\n\t\taddrStr = addrStr.replaceAll(\"\\\\s+\",\"\");\n\t\taddrStr = addrStr.replaceAll(\":\",\"\");\n\t\tint i;\n\t\tfor (i = 0; i < 8; i++) {\n\t\t\taddr64[i] = (byte)Integer.parseInt(addrStr.substring(i*2,i*2+2),16);\n\t\t}\n\t}", "private NodeReference from64bitStoreAddress(long ref64bit) {\n return new NodeReference(0, ref64bit);\n }", "public Address computeTargetAddress() {\n\t\tif (recorder == null) {\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\treturn recorder.getMemoryMapper().traceToTarget(address);\n\t}", "public static Address getMaxAddress(AddressSpace addrSpace, long namespaceID) {\n\t\tif (addrSpace.isStackSpace()) {\n\t\t\treturn new OldGenericNamespaceAddress(addrSpace, -1, namespaceID);\n\t\t}\n\t\treturn new OldGenericNamespaceAddress(addrSpace, addrSpace.getMaxAddress().getOffset(), namespaceID);\n\t}", "public int getAddress() {\n return Sys.getDirectBufferAddress(eaxBufferProperties);\n }", "int getAbsAddr();", "public int stackSize(final int slotIndex) {\n return slots.get(slotIndex);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleAstOutputPattern" $ANTLR start "ruleAstOutputPattern" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1191:1: ruleAstOutputPattern : ( ( rule__AstOutputPattern__Group__0 ) ) ;
public final void ruleAstOutputPattern() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1195:2: ( ( ( rule__AstOutputPattern__Group__0 ) ) ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1196:1: ( ( rule__AstOutputPattern__Group__0 ) ) { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1196:1: ( ( rule__AstOutputPattern__Group__0 ) ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1197:1: ( rule__AstOutputPattern__Group__0 ) { before(grammarAccess.getAstOutputPatternAccess().getGroup()); // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1198:1: ( rule__AstOutputPattern__Group__0 ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1198:2: rule__AstOutputPattern__Group__0 { pushFollow(FOLLOW_rule__AstOutputPattern__Group__0_in_ruleAstOutputPattern2496); rule__AstOutputPattern__Group__0(); state._fsp--; } after(grammarAccess.getAstOutputPatternAccess().getGroup()); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__AstOutputPattern__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14623:1: ( rule__AstOutputPattern__Group__0__Impl rule__AstOutputPattern__Group__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14624:2: rule__AstOutputPattern__Group__0__Impl rule__AstOutputPattern__Group__1\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__0__Impl_in_rule__AstOutputPattern__Group__029548);\n rule__AstOutputPattern__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__1_in_rule__AstOutputPattern__Group__029551);\n rule__AstOutputPattern__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__AstOutputPattern__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14635:1: ( ( ( rule__AstOutputPattern__Group_0__0 )? ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14636:1: ( ( rule__AstOutputPattern__Group_0__0 )? )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14636:1: ( ( rule__AstOutputPattern__Group_0__0 )? )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14637:1: ( rule__AstOutputPattern__Group_0__0 )?\n {\n before(grammarAccess.getAstOutputPatternAccess().getGroup_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14638:1: ( rule__AstOutputPattern__Group_0__0 )?\n int alt124=2;\n int LA124_0 = input.LA(1);\n\n if ( (LA124_0==RULE_ID) ) {\n alt124=1;\n }\n switch (alt124) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14638:2: rule__AstOutputPattern__Group_0__0\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group_0__0_in_rule__AstOutputPattern__Group__0__Impl29578);\n rule__AstOutputPattern__Group_0__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getAstOutputPatternAccess().getGroup_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstOutputPattern__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14812:1: ( rule__AstOutputPattern__Group_0__0__Impl rule__AstOutputPattern__Group_0__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14813:2: rule__AstOutputPattern__Group_0__0__Impl rule__AstOutputPattern__Group_0__1\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group_0__0__Impl_in_rule__AstOutputPattern__Group_0__029924);\n rule__AstOutputPattern__Group_0__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstOutputPattern__Group_0__1_in_rule__AstOutputPattern__Group_0__029927);\n rule__AstOutputPattern__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__AstOutputPattern__Group_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14852:1: ( ( ':' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14853:1: ( ':' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14853:1: ( ':' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14854:1: ':'\n {\n before(grammarAccess.getAstOutputPatternAccess().getColonKeyword_0_1()); \n match(input,51,FOLLOW_51_in_rule__AstOutputPattern__Group_0__1__Impl30012); \n after(grammarAccess.getAstOutputPatternAccess().getColonKeyword_0_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstOutputPattern__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14683:1: ( rule__AstOutputPattern__Group__2__Impl rule__AstOutputPattern__Group__3 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14684:2: rule__AstOutputPattern__Group__2__Impl rule__AstOutputPattern__Group__3\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__2__Impl_in_rule__AstOutputPattern__Group__229671);\n rule__AstOutputPattern__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__3_in_rule__AstOutputPattern__Group__229674);\n rule__AstOutputPattern__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 entryRuleAstOutputPattern() throws RecognitionException {\n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1183:1: ( ruleAstOutputPattern EOF )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1184:1: ruleAstOutputPattern EOF\n {\n before(grammarAccess.getAstOutputPatternRule()); \n pushFollow(FOLLOW_ruleAstOutputPattern_in_entryRuleAstOutputPattern2463);\n ruleAstOutputPattern();\n\n state._fsp--;\n\n after(grammarAccess.getAstOutputPatternRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleAstOutputPattern2470); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final void rule__AstOutputPattern__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14712:1: ( rule__AstOutputPattern__Group__3__Impl rule__AstOutputPattern__Group__4 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14713:2: rule__AstOutputPattern__Group__3__Impl rule__AstOutputPattern__Group__4\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__3__Impl_in_rule__AstOutputPattern__Group__329731);\n rule__AstOutputPattern__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__4_in_rule__AstOutputPattern__Group__329734);\n rule__AstOutputPattern__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__AstOutputPattern__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14841:1: ( rule__AstOutputPattern__Group_0__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14842:2: rule__AstOutputPattern__Group_0__1__Impl\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group_0__1__Impl_in_rule__AstOutputPattern__Group_0__129984);\n rule__AstOutputPattern__Group_0__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstOutputPattern__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14724:1: ( ( ( rule__AstOutputPattern__Group_3__0 )* ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14725:1: ( ( rule__AstOutputPattern__Group_3__0 )* )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14725:1: ( ( rule__AstOutputPattern__Group_3__0 )* )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14726:1: ( rule__AstOutputPattern__Group_3__0 )*\n {\n before(grammarAccess.getAstOutputPatternAccess().getGroup_3()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14727:1: ( rule__AstOutputPattern__Group_3__0 )*\n loop125:\n do {\n int alt125=2;\n int LA125_0 = input.LA(1);\n\n if ( (LA125_0==62) ) {\n alt125=1;\n }\n\n\n switch (alt125) {\n \tcase 1 :\n \t // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14727:2: rule__AstOutputPattern__Group_3__0\n \t {\n \t pushFollow(FOLLOW_rule__AstOutputPattern__Group_3__0_in_rule__AstOutputPattern__Group__3__Impl29761);\n \t rule__AstOutputPattern__Group_3__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop125;\n }\n } while (true);\n\n after(grammarAccess.getAstOutputPatternAccess().getGroup_3()); \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__AstOutputPattern__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14741:1: ( rule__AstOutputPattern__Group__4__Impl rule__AstOutputPattern__Group__5 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14742:2: rule__AstOutputPattern__Group__4__Impl rule__AstOutputPattern__Group__5\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__4__Impl_in_rule__AstOutputPattern__Group__429792);\n rule__AstOutputPattern__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__5_in_rule__AstOutputPattern__Group__429795);\n rule__AstOutputPattern__Group__5();\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__AstOutputPattern__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14772:1: ( rule__AstOutputPattern__Group__5__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14773:2: rule__AstOutputPattern__Group__5__Impl\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group__5__Impl_in_rule__AstOutputPattern__Group__529854);\n rule__AstOutputPattern__Group__5__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__AstOutputPattern__Group_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14906:1: ( rule__AstOutputPattern__Group_3__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14907:2: rule__AstOutputPattern__Group_3__1__Impl\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group_3__1__Impl_in_rule__AstOutputPattern__Group_3__130109);\n rule__AstOutputPattern__Group_3__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstOutputPattern__Group__5__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14783:1: ( ( ( rule__AstOutputPattern__Group_5__0 )? ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14784:1: ( ( rule__AstOutputPattern__Group_5__0 )? )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14784:1: ( ( rule__AstOutputPattern__Group_5__0 )? )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14785:1: ( rule__AstOutputPattern__Group_5__0 )?\n {\n before(grammarAccess.getAstOutputPatternAccess().getGroup_5()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14786:1: ( rule__AstOutputPattern__Group_5__0 )?\n int alt126=2;\n int LA126_0 = input.LA(1);\n\n if ( (LA126_0==83) ) {\n alt126=1;\n }\n switch (alt126) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14786:2: rule__AstOutputPattern__Group_5__0\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group_5__0_in_rule__AstOutputPattern__Group__5__Impl29881);\n rule__AstOutputPattern__Group_5__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getAstOutputPatternAccess().getGroup_5()); \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__AstOutputPattern__Group_5__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14969:1: ( rule__AstOutputPattern__Group_5__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14970:2: rule__AstOutputPattern__Group_5__1__Impl\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__Group_5__1__Impl_in_rule__AstOutputPattern__Group_5__130232);\n rule__AstOutputPattern__Group_5__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstOutputPattern__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14664:1: ( ( '[' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14665:1: ( '[' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14665:1: ( '[' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14666:1: '['\n {\n before(grammarAccess.getAstOutputPatternAccess().getLeftSquareBracketKeyword_1()); \n match(input,81,FOLLOW_81_in_rule__AstOutputPattern__Group__1__Impl29640); \n after(grammarAccess.getAstOutputPatternAccess().getLeftSquareBracketKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstAction__OutputsAssignment_6_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24384:1: ( ( ruleAstOutputPattern ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24385:1: ( ruleAstOutputPattern )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24385:1: ( ruleAstOutputPattern )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24386:1: ruleAstOutputPattern\n {\n before(grammarAccess.getAstActionAccess().getOutputsAstOutputPatternParserRuleCall_6_1_1_0()); \n pushFollow(FOLLOW_ruleAstOutputPattern_in_rule__AstAction__OutputsAssignment_6_1_148946);\n ruleAstOutputPattern();\n\n state._fsp--;\n\n after(grammarAccess.getAstActionAccess().getOutputsAstOutputPatternParserRuleCall_6_1_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstOutputPattern__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14753:1: ( ( ']' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14754:1: ( ']' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14754:1: ( ']' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14755:1: ']'\n {\n before(grammarAccess.getAstOutputPatternAccess().getRightSquareBracketKeyword_4()); \n match(input,82,FOLLOW_82_in_rule__AstOutputPattern__Group__4__Impl29823); \n after(grammarAccess.getAstOutputPatternAccess().getRightSquareBracketKeyword_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 ruleAstInputPattern() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1139:2: ( ( ( rule__AstInputPattern__Group__0 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1140:1: ( ( rule__AstInputPattern__Group__0 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1140:1: ( ( rule__AstInputPattern__Group__0 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1141:1: ( rule__AstInputPattern__Group__0 )\n {\n before(grammarAccess.getAstInputPatternAccess().getGroup()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1142:1: ( rule__AstInputPattern__Group__0 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1142:2: rule__AstInputPattern__Group__0\n {\n pushFollow(FOLLOW_rule__AstInputPattern__Group__0_in_ruleAstInputPattern2376);\n rule__AstInputPattern__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstInputPatternAccess().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\n }\n return ;\n }", "public final void rule__AstAction__OutputsAssignment_6_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24369:1: ( ( ruleAstOutputPattern ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24370:1: ( ruleAstOutputPattern )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24370:1: ( ruleAstOutputPattern )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24371:1: ruleAstOutputPattern\n {\n before(grammarAccess.getAstActionAccess().getOutputsAstOutputPatternParserRuleCall_6_0_0()); \n pushFollow(FOLLOW_ruleAstOutputPattern_in_rule__AstAction__OutputsAssignment_6_048915);\n ruleAstOutputPattern();\n\n state._fsp--;\n\n after(grammarAccess.getAstActionAccess().getOutputsAstOutputPatternParserRuleCall_6_0_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new GFFStreamFeature from the given line. The String should be in gene finder format.
private GFFStreamFeature (final String line) throws ReadFormatException { super (null); final StringVector line_bits = StringVector.getStrings (line, "\t", true); if (line_bits.size () < 8) { throw new ReadFormatException ("invalid GFF line: 8 fields needed " + "(got " + line_bits.size () + " fields) from: " + line); } final String start_base_string = line_bits.elementAt (3).trim (); final String end_base_string = line_bits.elementAt (4).trim (); final int start_base; final int end_base; try { start_base = Integer.parseInt (start_base_string); } catch (NumberFormatException e) { throw new ReadFormatException ("Could not understand the start base " + "of a GFF feature: " + start_base_string); } try { end_base = Integer.parseInt (end_base_string); } catch (NumberFormatException e) { throw new ReadFormatException ("Could not understand the end base " + "of a GFF feature: " + end_base_string); } // start of qualifier parsing and setting try { final boolean complement_flag; if (line_bits.elementAt (6).equals ("+")) { complement_flag = false; } else { if (line_bits.elementAt (6).equals ("-")) { complement_flag = true; } else { // must be unstranded complement_flag = false; // best we can do final String note_string = "this feature is unstranded"; setQualifier (new Qualifier ("note", note_string)); } } if (line_bits.size () == 9) { final String rest_of_line = line_bits.elementAt (8); // parse the rest of the line as ACeDB format attributes final Hashtable attributes = parseAttributes (rest_of_line); for (final java.util.Enumeration attribute_enum = attributes.keys (); attribute_enum.hasMoreElements();) { final String name = (String) attribute_enum.nextElement(); final StringVector values = (StringVector) attributes.get (name); if (values.size () == 0) { setQualifier (new Qualifier (name)); } else { setQualifier (new Qualifier (name, values)); } } } final Qualifier gff_seqname = new Qualifier ("gff_seqname", line_bits.elementAt (0)); setQualifier (gff_seqname); final Key key = new Key (line_bits.elementAt (2)); setKey (key); final Qualifier source_qualifier = new Qualifier ("gff_source", line_bits.elementAt (1)); setQualifier (source_qualifier); final Qualifier score_qualifier = new Qualifier ("score", line_bits.elementAt (5)); setQualifier (score_qualifier); String frame = line_bits.elementAt (7); if (frame.equals ("0")) { frame = "1"; } else { if (frame.equals ("1")) { frame = "2"; } else { if (frame.equals ("2")) { frame = "3"; } else { frame = "."; } } } if (!frame.equals ("1") && !frame.equals (".")) { final Qualifier codon_start_qualifier = new Qualifier ("codon_start", frame); setQualifier (codon_start_qualifier); } if (start_base > end_base) { throw new ReadFormatException ("start position is greater than end " + "position: " + start_base + " > " + end_base); } if (start_base < 0) { throw new ReadFormatException ("start position must be positive: " + start_base); } final Range location_range = new Range (start_base, end_base); final RangeVector location_ranges = new RangeVector (location_range); setLocation (new Location (location_ranges, complement_flag)); } catch (ReadOnlyException e) { throw new Error ("internal error - unexpected exception: " + e); } catch (EntryInformationException e) { throw new Error ("internal error - unexpected exception: " + e); } catch (OutOfRangeException e) { throw new Error ("internal error - unexpected exception: " + e); } this.gff_lines = new StringVector (line); }
[ "protected static GFFStreamFeature readFromStream (LinePushBackReader stream)\n throws IOException, InvalidRelationException {\n\n String line = stream.readLine ();\n\n if (line == null) {\n return null;\n }\n\n try {\n final GFFStreamFeature new_feature = new GFFStreamFeature (line);\n\n return new_feature;\n } catch (ReadFormatException exception) {\n // re-throw the exception with the line number added\n\n final String new_error_string = exception.getMessage ();\n\n throw new ReadFormatException (new_error_string,\n stream.getLineNumber ());\n }\n }", "public Feature decode(String line) {\n\n // we may be asked to process a header line; ignore it\n if (line.startsWith(\"#\")) return null;\n\n // split the line\n String[] tokens = line.split(\"\\\\t+\");\n\n // check to see if we've parsed the string into the right number of tokens (expectedTokenCount)\n if (tokens.length != expectedTokenCount)\n return null;\n // throw new CodecLineParsingException(\"the dbSNP line didn't have the expected number of tokens \" +\n // \"(expected = \" + expectedTokenCount + \", saw = \" + tokens.length + \" on \" +\n //\n // \"line = \" + line + \")\");\n // create a new feature from the line\n int start = Integer.valueOf(tokens[2])+1;\n int stop = Integer.valueOf(tokens[3]);\n stop = (stop < start) ? start : stop; // Indels can be of length zero in dbSNP, we make them length one\n OldDbSNPFeature feature = new OldDbSNPFeature(tokens[1],\n\t\t\t\t\t\t start,\n\t\t\t\t\t\t stop);\n\n feature.setRsID(tokens[4]);\n feature.setScore(Integer.valueOf(tokens[5]));\n feature.setStrand(tokens[6].equals(\"+\") ? Strand.POSITIVE : Strand.NEGATIVE);\n feature.setNCBIRefBase(tokens[7]);\n feature.setUCSCRefBase(tokens[8]);\n // split the observed bases\n feature.setObserved(tokens[9].split(\"/\")); \n feature.setMolType(tokens[10]);\n feature.setVariantType(tokens[11]);\n feature.setValidationStatus(tokens[12]);\n feature.setAvHet(Double.valueOf(tokens[13]));\n feature.setAvHetSE(Double.valueOf(tokens[14]));\n feature.setFunction(tokens[15]);\n feature.setLocationType(tokens[16]);\n feature.setWeight(Integer.valueOf(tokens[17]));\n\n // return the setup feature \n return feature;\n }", "public static Gene parse(String line) {\n line = _init(line);\n if (line == \"\") return null;\n\n Gene result = new Gene();\n\n int pos = line.indexOf('-');\n if (pos == -1) {\n result._parse(line);\n } else {\n result._parse(line.substring(0, pos));\n result._parse(line.substring(pos + 1));\n }\n\n return result;\n }", "private static Instance createInstance(String line)\n\t{\n\t\tScanner lineScanner = new Scanner(line);\n\t\t\n\t\tchar label = lineScanner.next().charAt(0);\n\t\tFeatureVector featureVector = new FeatureVector();\n\t\t\n\t\tint index = 0;\n\t\twhile (lineScanner.hasNext())\n\t\t{\n\t\t\tint feature = lineScanner.nextInt();\n\t\t\tif (feature != 0)\n\t\t\t\tfeatureVector.add(index, feature);\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\treturn new Instance(featureVector, new ClassificationLabel(label - 'a'));\n\t}", "private GISrecord makeGIS(String line) {\r\n\t\tGISrecord ans = new GISrecord();\r\n\t\tString temp = line;\r\n\t\tfor (int i = 0; i < 19; i++) {\r\n\t\t\tif (temp.indexOf('|') != -1) {\r\n\t\t\t\tif (temp.substring(0, temp.indexOf('|')).length() > 1) {\r\n\t\t\t\t\tswitch (i) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\tans.setFeatureID(Integer.valueOf(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tans.setFeatureName(temp.substring(0, temp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tans.setFeatureClass(temp.substring(0, temp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tans.setStateAlphabeticCode(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tans.setStateNumericCode(Integer.valueOf(temp.substring(\r\n\t\t\t\t\t\t\t\t0, temp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 5:\r\n\t\t\t\t\t\tans.setCountryName(temp.substring(0, temp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 6:\r\n\t\t\t\t\t\tans.setCountryNumericCode(Integer.valueOf(temp\r\n\t\t\t\t\t\t\t\t.substring(0, temp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 7:\r\n\t\t\t\t\t\tans.setPrimaryLatitude(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 8:\r\n\t\t\t\t\t\tans.setPrimaryLongitude(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 9:\r\n\t\t\t\t\t\tans.setLat(Double.valueOf(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 10:\r\n\t\t\t\t\t\tans.setPrimaryLongitudeDec(Double.valueOf(temp\r\n\t\t\t\t\t\t\t\t.substring(0, temp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 11:\r\n\t\t\t\t\t\tans.setSourceLatitude(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 12:\r\n\t\t\t\t\t\tans.setSourceLongitude(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 13:\r\n\t\t\t\t\t\tans.setSourceLat(Double.valueOf(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 14:\r\n\t\t\t\t\t\tans.setSourceLong(Double.valueOf(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 15:\r\n\t\t\t\t\t\tans.setMeterElev(Integer.valueOf(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 16:\r\n\t\t\t\t\t\tans.setFeetElev(Integer.valueOf(temp.substring(0,\r\n\t\t\t\t\t\t\t\ttemp.indexOf('|'))));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 17:\r\n\t\t\t\t\t\tans.setMapName(temp.substring(0, temp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 18:\r\n\t\t\t\t\t\tans.setDateCreated(temp.substring(0, temp.indexOf('|')));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"|\") + 1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn ans;\r\n\t}", "public GFFStreamFeature (final Feature feature) {\n this (feature.getKey (), feature.getLocation (), feature.getQualifiers ());\n\n if (feature instanceof GFFStreamFeature) {\n gff_lines = new StringVector (((GFFStreamFeature)feature).gff_lines);\n }\n }", "public static Flight parseLine(String line) {\r\n\t\tScanner s = new Scanner(line);\r\n\t\ts.useDelimiter(\", \");\r\n\t\tFlight f = new Flight();\r\n\t\tif (s.hasNext()) {\r\n\t\t\tf.flightcode = s.next();\r\n\t\t\tf.origin = s.next();\r\n\t\t\tf.destination = s.next();\r\n\t\t\tf.departureDate = s.next();\r\n\t\t\tf.departureTime = s.next();\r\n\t\t\tf.arrivalDate = s.next();\r\n\t\t\tf.arrivalTime = s.next();\r\n\t\t\tf.cost = s.nextDouble();\r\n\t\t}\r\n\t\ts.close();\r\n\t\treturn f;\r\n\t}", "public static Classification parseLine(String line) {\r\n\t\tScanner s = new Scanner(line);\r\n\t\tClassification c = new Classification();\r\n\t\tif (s.hasNext()) {\r\n\t\t\tc.imageUUID = s.nextInt();\r\n\t\t\ts.nextInt();\r\n\t\t\tc.speciesName = s.next();\r\n\t\t}\r\n\t\ts.close();\r\n\t\treturn c;\r\n\r\n\t}", "public TFRule createTFRuleFromLine(String line) {\n\n line = removeTailComment(line);\n\n //skip blank lines or comments\n line = line.trim();\n\n try (Scanner rowScanner = new Scanner(line)) {\n rowScanner.useDelimiter(\",\");\n\n SensorData lhsExt = null;\n SensorData rhsExt = null;\n\n int[] lhsInt = null;\n String action = \"\\0\";\n\n double conf = -1.0;\n\n String lhsIntData = rowScanner.next().trim();\n\n try {\n lhsInt = getLHSIntFromString(lhsIntData);\n lhsExt = getSDFromString(rowScanner.next().trim());\n action = rowScanner.next().trim();\n rhsExt = getSDFromString(rowScanner.next().trim());\n String dblStr = rowScanner.next().trim();\n conf = Double.parseDouble(dblStr);\n } catch(InputMismatchException ime) {\n System.err.println(\"oh no!\");\n }\n\n return new TFRule(this.agent, action.charAt(0), lhsInt, lhsExt, rhsExt, conf);\n }\n }", "private static Vertex stringToVertexFacet(String line) {\n return getVertex(line.stripLeading().substring(AllgemeineKonstanten.ASCII_TRIANGLE_PATTERN[2].length() + 1).stripLeading());\n }", "public DirectInputOperator(String line){\n\t\t String[] cols=line.trim().split(\" \");\n \n if (cols.length>=2){\n this.feature=cols[1];\n return;\n }\n this.feature=line;\n\t }", "public static Input readInput(String line) {\n\t\tint indexOfComma = line.indexOf(',');\n\t\tint ngram = Integer.valueOf(line.substring(0, indexOfComma));\n\t\tString text = line.substring(indexOfComma + 1, line.length());\n\t\treturn new Main().new Input(text, ngram);\n\t}", "public Gff3Feature(String unParsedGff3Line){\r\n\t\tString[] items = unParsedGff3Line.trim().split(\"\\\\t\");\r\n\t\t\r\n\t\t//check length\r\n\t\tif (items.length>7){\r\n\t\t\ttry{\r\n\t\t\t\t//set columns\r\n\t\t\t\tseqId = items[0];\r\n\t\t\t\tsource = items[1];\r\n\t\t\t\ttype = items[2];\r\n\t\t\t\tif (items[3].equals(\".\") == false) {\r\n\t\t\t\t\tstart = Integer.parseInt(items[3]); \r\n\t\t\t\t\tstartSet = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (items[4].equals(\".\") == false) {\r\n\t\t\t\t\tend = Integer.parseInt(items[4]); \r\n\t\t\t\t\tendSet = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (items[5].equals(\".\") == false) {\r\n\t\t\t\t\tscore = Double.parseDouble(items[5]); \r\n\t\t\t\t\tscoreSet = true;\r\n\t\t\t\t}\r\n\t\t\t\tstrand = items[6];\r\n\t\t\t\tif (items[7].equals(\".\") == false) {\r\n\t\t\t\t\tphase = Integer.parseInt(items[7]); \r\n\t\t\t\t\tphaseSet = true; \r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException e){\r\n\t\t\t\tvalid = false;\r\n\t\t\t}\r\n\t\t\t//any attributes?\r\n\t\t\tif (items.length>8){\r\n\t\t\t//split attributes on ; but not /;\r\n\t\t\tattributes = items[8];\r\n\t\t\tString[] attributes = Misc.splitString(items[8], \";\");\r\n\t\t\tint numAtts = attributes.length;\r\n\t\t\tArrayList custom = new ArrayList();\r\n\t\t\tString[] tagValue;\r\n\t\t\tfor (int i=0; i<numAtts; i++){\r\n\t\t\t\t//split tag on = but not /=\r\n\t\t\t\ttagValue = Misc.splitString(attributes[i],\"=\");\r\n\t\t\t\t//check if ok if not break\r\n\t\t\t\tif (tagValue.length!=2) {\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t//attempt to assign reserved tags, don't use a hash since there may be duplicates\r\n\t\t\t\tif (tagValue[0].equals(\"ID\")) id = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"Name\")) name = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"Alias\")) alias = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"Parent\")) parent = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"CompositCNV\")) target = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"Gap\")) gap = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"Note\")) note = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"Dbxref\")) dbxref = tagValue[1];\r\n\t\t\t\telse if (tagValue[0].equals(\"Ontology_term\")) ontologyTerm = tagValue[1];\r\n\t\t\t\telse {\r\n\t\t\t\t\tcustom.add(attributes[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//convert custom attributes to a String[]\r\n\t\t\tcustomAttributes = new String[custom.size()];\r\n\t\t\tcustom.toArray(customAttributes);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t//incorrect number of columns\r\n\t\telse valid = false;\r\n\t}", "public Record(String line)\t// create a record from a line\n\t{\n\t\tint i;\n\t\trecordMap = new HashMap<>(); \n\t\tStringTokenizer st = new StringTokenizer(line, DELIMITER);\n\n\t\tfor (i=0; i < NUMBER_OF_FIELDS; i++)\n\t\t{\n\t\t\trecordMap.put(i, new Field(FIELD_TYPES[i], FIELD_LABELS[i], st.nextToken()));\n\t\t}\t\t\n\t}", "static public GFF parseGFF3(String line) throws InvalidFormatException {\n\t\tMap<String,String> attrs;\n\t\tchar strand;\n\t\tlong start;\n\t\tlong end;\n\t\tbyte phase;\n\t\tdouble score;\n\t\t\n\t\tString[] fields = line.split(\"\\t\");\n\n\t\t// Trim all fields\n\t\tfor(int i=0;i<fields.length;i++)\n\t\t\tfields[i] = fields[i].trim();\n\t\t\n\n\t\t// Parse attrs\n\t\t\n\t\tif (fields.length == 8) {\n\t\t\tattrs = new HashMap<String,String>();\n\t\t} else if (fields.length == 9) {\n\t\t\tattrs = parseAttrs(fields[8]);\n\t\t} else {\n\t\t\tthrow new InvalidFormatException(\"Not enought coluns in GFF line. Founded %d but needs at least 8.\\n\" + \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \" GFF line: '%s'\",fields.length,line);\n\t\t}\n\t\t\n\t\t// Parse Strand\n\t\tstrand = fields[6].charAt(0);\n\t\tif (\"?.+-\".indexOf(strand) == -1) {\n\t\t\tthrow new InvalidFormatException(\"Strand should be one of this simbols +-?. instead of %c \",strand);\n\t\t}\n\t\t\n\t\t// Parse Start\n\t\ttry {\n\t\t\tstart = Long.parseLong(fields[3]);\n\t\t} catch(NumberFormatException e) {\n\t\t\tthrow new InvalidFormatException(\"Invaid number format in start field: '%s' is not a number\",fields[3]);\n\t\t}\n\n\t\t// Parse End\n\t\ttry {\n\t\t\tend = Long.parseLong(fields[4]);\n\t\t} catch(NumberFormatException e) {\n\t\t\tthrow new InvalidFormatException(\"Invaid number format in end field: '%s' is not a number\",fields[4]);\n\t\t}\n\n\t\t// Parse Score\n\t\ttry {\n\t\t\tscore = Double.parseDouble(fields[5]);\n\t\t} catch(NumberFormatException e) {\n\t\t\tthrow new InvalidFormatException(\"Invaid number format in score field: '%s' is not a number\",fields[5]);\n\t\t}\n\t\t\n\t\t// Parse phase\n\t\ttry {\n\t\t\tif (fields[7].charAt(0) == '.') {\n\t\t\t\tphase = 0;\n\t\t\t} else \n\t\t\t\tphase = Byte.parseByte(fields[7]);\n\t\t\tif (phase < 0 || phase > 2) {\n\t\t\t\tthrow new InvalidFormatException(\"Invaid phase field value: Founded '%s', should be 0,1 or 2\",fields[7]);\t\t\t\t\n\t\t\t}\n\t\t} catch(NumberFormatException e) {\n\t\t\tthrow new InvalidFormatException(\"Invaid number format in phase field: '%s' is not a number\",fields[7]);\n\t\t}\n\t\t\n\t\treturn new GFF(fields[0], \n\t\t\t\tfields[1], fields[2], start, end, score,strand, phase, attrs);\n\t}", "private void _parseGene() {\n\t\ttry {\n\t\t\t// assemble the Gene\n\t\t\tString name = _line[ _geneIdField ];\n\t\t\tString hgnc_symbol = _line[ _hgncSymbolField ];\n\t\t\t// set the Gene\n\t\t\t_gene = new Gene(name,hgnc_symbol);\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEnvironment.errorMessage(\"Error parsing Gene !\");\n\t\t}\n\t}", "public Edge loadEdgesFromString(String edgeLine){\n\n int index; /* index for loops */\n Edge newEdge; /* new Edge */\n StringBuilder sourceNumber = new StringBuilder(); /* For The Source Number */\n StringBuilder destinationNumber = new StringBuilder(); /* For The Destination Number */\n StringBuilder weight = new StringBuilder(); /* For The Source Name */\n\n /* Pass the until source number */\n for (index = 0; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) == 'v')\n break;\n }\n\n /* Source Number */\n for (index = index + 1 ; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) != '\"')\n sourceNumber.append(edgeLine.charAt(index));\n else\n break;\n }\n\n /* Pass the until destination number */\n for (; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) == 'v')\n break;\n }\n\n /* Destination Number */\n for (index = index + 1; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) != '\"')\n destinationNumber.append(edgeLine.charAt(index));\n else\n break;\n }\n\n /* Pass the until weight */\n for (index = index+1; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) == '\"')\n break;\n }\n\n /* Destination Number */\n for (index = index+1; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) != '\"')\n weight.append(edgeLine.charAt(index));\n else\n break;\n }\n\n return newEdge = new Edge(Integer.parseInt(String.valueOf(sourceNumber)),\n Integer.parseInt(String.valueOf(destinationNumber)),\n Integer.parseInt(String.valueOf(weight)));\n }", "public ExpenseEntity parse(String line);", "protected abstract E createEntity(String line);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates or finds a DocumentSource from its string representation.
@JsonCreator public static DocumentSource fromString(String name) { return fromString(name, DocumentSource.class); }
[ "protected Source convertString2Source(String param) {\n Source src;\n try {\n src = uriResolver.resolve(param, null);\n } catch (TransformerException e) {\n src = null;\n }\n if (src == null) {\n src = new StreamSource(new File(param));\n }\n return src;\n }", "public DefaultDocumentSource(String urlstring) throws IOException\n {\n super(null, urlstring);\n URL url = DataURLHandler.createURL(null, urlstring);\n con = createConnection(url);\n is = null;\n }", "public static InputSource getInputSourceFromString(String xml) {\n InputSource retVal = null;\n try {\n retVal = new InputSource(new StringReader(xml));\n } catch (Exception ex) {\n }\n return retVal;\n }", "public StringInputSource(String s) {\n _index = 0;\n _input = s;\n }", "static Source newStringSource(String contents, String description) {\n // Compute line offsets up front as they are referred to frequently.\n IntArrayList offsets = new IntArrayList();\n for (int i = 0; i <= contents.length(); ) {\n if (i > 0) {\n // don't add '0' for the first line, it's implicit\n offsets.add(i);\n }\n int nl = contents.indexOf('\\n', i);\n if (nl == -1) {\n offsets.add(contents.length() + 1);\n break;\n } else {\n i = nl + 1;\n }\n }\n\n return new SourceImpl(contents, description, offsets);\n }", "public ReportDefinition fromString(String xmlString);", "Source createSource();", "@Override\n public CoordinateReferenceSystem createFromWKT(final String wkt) throws FactoryException {\n Objects.requireNonNull(wkt);\n final ReferencingFormat parser = new ReferencingFormat();\n parser.setConvention(ReferencingFormat.Convention.WKT);\n parser.setStrict(true);\n try {\n return (CoordinateReferenceSystem) parser.parse(wkt);\n } catch (UnparsableObjectException | ClassCastException e) {\n throw new FactoryException(e.getMessage(), e);\n }\n }", "@JsonCreator\n public static SourceDataStoreType fromString(String name) {\n return fromString(name, SourceDataStoreType.class);\n }", "public StringLexerSource(String string) {\r\n this(string, false);\r\n }", "public Source resolve(String uri, String baseUri)\r\n \t\t\tthrows TransformerException {\r\n// \t\tLOG.debug(\"Resolve document URI: '\" + uri + \"'\");\r\n \t\tSource source = null;\r\n \t\ttry {\r\n\t \t\tDocument doc = database.getDocument(uri);\r\n\t \t\ttry {\r\n\t \t\t source = new StreamSource(doc.getContent());\r\n\t \t\t} catch (XmldbException e) {\r\n\t \t\t LOG.error(String.format(\r\n\t \t\t \"Error retrieving content of document '%s': %s\",\r\n\t \t\t doc, e.getMessage()));\r\n\t \t\t}\r\n \t\t} catch (XmldbException e) {\r\n \t\t // Runtime query error (client side)\r\n \t\t LOG.debug(\"Document not found: '\" + uri + \"'\");\r\n \t\t}\r\n \t\treturn source;\r\n\t\t}", "public SosSource newSosSource(Project project, URI uri, String sUrl, String title,\n String description, String version )\n throws IOException;", "public static InputSource createInputSource(InputStream xmlStream) throws IOException {\r\n\t\tBufferedInputStream bis = new BufferedInputStream(xmlStream);\r\n\t\t//String charSet = CastorHelper.getStreamEncoding(bis);\r\n\t\tString charSet = \"\";\r\n\t\t//if the character set name is not existing in the input, or is not\r\n\t\t// valid,\r\n\t\t// use the default character set name\r\n\t\tif (charSet == null || charSet.length() <= 0\r\n\t\t\t\t|| !Charset.isSupported(charSet))\r\n\t\t\tcharSet = (new OutputStreamWriter(new ByteArrayOutputStream()))\r\n\t\t\t\t\t.getEncoding();\r\n\t\tReader reader = new InputStreamReader(bis, charSet);\r\n\t\treturn new InputSource(reader);\r\n\t}", "public Source getXmlSource(final Object payload)\r\n throws TransformerException {\r\n try {\r\n if (payload instanceof String) {\r\n return new StreamSource(new StringReader((String) payload));\r\n } else if (payload instanceof byte[]) {\r\n return new StreamSource(new InputStreamReader(\r\n new ByteArrayInputStream((byte[]) payload),\r\n XML_ENCODING));\r\n\r\n } else if (payload instanceof InputStream) {\r\n return new StreamSource(new InputStreamReader(\r\n (InputStream) payload, XML_ENCODING));\r\n } else {\r\n throw new TransformerException(getI18NMessages()\r\n .payloadNotXmlSource(), this);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n throw new TransformerException(getI18NMessages().encodingFailure(\r\n XML_ENCODING), this, e);\r\n }\r\n\r\n }", "private InputSource createInputStreamXML(String htmlString) {\r\n try {\r\n // Create InputSource, specify encoding\r\n InputSource in = new InputSource(new StringReader(htmlString));\r\n in.setEncoding(\"UTF-8\");\r\n return in;\r\n } catch (Exception e) {\r\n log.error(\"Error creating InputSource: \" + e.toString());\r\n return null;\r\n }\r\n }", "public static Document createDocument(String xmlString) throws Exception {\n\t\t\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tdbf.setValidating(false);\n\t\t\n\t\tDocument doc = null;\n DocumentBuilder builder = null;\n \n try {\n \tbuilder = dbf.newDocumentBuilder();\n\n\t Reader r = new StringReader( xmlString );\n\t doc = builder.parse( new InputSource(r) );\n\t r.close();\n\n } catch (Exception e) {\n \tthrow e;\n }\n\n return doc;\n\t}", "public InputSource getXmlInputSource(final Object payload)\r\n throws TransformerException {\r\n if (payload instanceof String) {\r\n return new InputSource(new StringReader((String) payload));\r\n } else if (payload instanceof byte[]) {\r\n return new InputSource(new ByteArrayInputStream((byte[]) payload));\r\n\r\n } else if (payload instanceof InputStream) {\r\n return new InputSource((InputStream) payload);\r\n } else {\r\n throw new TransformerException(getI18NMessages()\r\n .payloadNotXmlSource(), this);\r\n }\r\n\r\n }", "public Document generateDocumentFromString(String xmlInput) throws SCNotifyRequestProcessingException {\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = null;\n\t\tDocument xmlDocument;\n\t\tlogger.debug(\".xmlInput : \"+xmlInput);\n\t\ttry {\n\t\t\tbuilder = builderFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\tthrow new SCNotifyRequestProcessingException(\"Unable to initiate the document builder..\", e);\n\t\t}\n\t\ttry {\n\t\t\txmlDocument = builder.parse(new ByteArrayInputStream(xmlInput.getBytes(\"UTF-16\")));\n\t\t} catch (SAXException | IOException e) {\n\t\t\tthrow new SCNotifyRequestProcessingException(\"Unable to parse the xmlString into document..\", e);\n\t\t}\n\t\treturn xmlDocument;\n\t}", "public JavaSourceFromString(final String name, final String code)\r\n {\r\n super(URI.create(\"string:///\" + name.replace('.', '/') + Kind.SOURCE.extension), Kind.SOURCE);\r\n this.code = code;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a ContinuousElevationModel based on HGT Files that covers the Swiss alps
private ContinuousElevationModel loadCEM() { HgtDiscreteElevationModel hgt1 = new HgtDiscreteElevationModel( new File("N45E006.hgt")); HgtDiscreteElevationModel hgt2 = new HgtDiscreteElevationModel( new File("N45E007.hgt")); HgtDiscreteElevationModel hgt3 = new HgtDiscreteElevationModel( new File("N45E008.hgt")); HgtDiscreteElevationModel hgt4 = new HgtDiscreteElevationModel( new File("N45E009.hgt")); HgtDiscreteElevationModel hgt5 = new HgtDiscreteElevationModel( new File("N46E006.hgt")); HgtDiscreteElevationModel hgt6 = new HgtDiscreteElevationModel( new File("N46E007.hgt")); HgtDiscreteElevationModel hgt7 = new HgtDiscreteElevationModel( new File("N46E008.hgt")); HgtDiscreteElevationModel hgt8 = new HgtDiscreteElevationModel( new File("N46E009.hgt")); DiscreteElevationModel dem = hgt1.union(hgt2).union(hgt3).union(hgt4) .union(hgt5.union(hgt6).union(hgt7).union(hgt8)); return new ContinuousElevationModel(dem); }
[ "public HgtDiscreteElevationModel(File file){\r\n\t\t//File checks\r\n\t\tcheckArgument(checkFileName(file), \"File name is not correct\");\r\n\t\tcheckArgument(checkFileLength(file), \"File length is not 25'934'402 octets\");\r\n\t\t\r\n\t\tString filename = file.getName();\r\n\t long l = file.length();\r\n\t \r\n\t //opening channel to map .hgt file\r\n\t try {\r\n\t\t\ts = new FileInputStream(file);\r\n\t\t\tb = s.getChannel().map(MapMode.READ_ONLY, 0, l).asShortBuffer();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Error while opening file\");\r\n\t\t}\r\n\t \r\n\t //Getting information from file name\r\n\t String longitudeSubstring = filename.substring(4, 7);\r\n\t\tString latitudeSubstring = filename.substring(1, 3);\r\n\t\t\r\n\t\t//A check has already been made on these substrings to see if they are integers\r\n\t\tif(filename.charAt(0)=='S'){\r\n\t\t\tthis.startingX = SAMPLES_PER_DEGREE * parseInt(longitudeSubstring)*-1;\r\n\t\t} else {\r\n\t\t\tthis.startingX = SAMPLES_PER_DEGREE * parseInt(longitudeSubstring);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(filename.charAt(3) == 'W'){\r\n\t\t\tthis.startingY = SAMPLES_PER_DEGREE * parseInt(latitudeSubstring)*-1;\r\n\t\t} else {\r\n\t\t\tthis.startingY = SAMPLES_PER_DEGREE * parseInt(latitudeSubstring);\r\n\t\t}\r\n\t\t\r\n\t\textent = new Interval2D(new Interval1D(startingX, startingX + SAMPLES_PER_DEGREE), new Interval1D(startingY, startingY + SAMPLES_PER_DEGREE));\r\n\t}", "public HgtDiscreteElevationModel(File file) {\n String fileName = file.getName();\n\n checkArgument(fileName.length() == 11, \"wrong length\");\n checkArgument(fileName.charAt(0) == 'N' || fileName.charAt(0) == 'S',\n \"Should begin by N or S\");\n checkArgument(fileName.charAt(3) == 'E' || fileName.charAt(3) == 'W',\n \"Should be E or W\");\n\n int fromLatitude;\n int fromLongitude;\n\n try {\n fromLatitude = Integer.parseInt(fileName.substring(1, 3));\n if (fileName.charAt(0) != 'N') {\n fromLatitude = -fromLatitude;\n }\n fromLongitude = Integer.parseInt(fileName.substring(4, 7));\n if (fileName.charAt(3) == 'W') {\n fromLongitude = -fromLongitude;\n }\n\n } catch (NumberFormatException e) {\n // if NumberFormatException, the file name is wrongly formatted\n throw new IllegalArgumentException();\n }\n\n checkArgument(fileName.substring(7).equals(\".hgt\"), \"should be a .hgt\");\n\n // create the extent\n extent = new Interval2D(\n new Interval1D(fromLongitude * SAMPLES_PER_DEGREE,\n (fromLongitude + 1) * SAMPLES_PER_DEGREE),\n new Interval1D(fromLatitude * SAMPLES_PER_DEGREE,\n (fromLatitude + 1) * SAMPLES_PER_DEGREE));\n\n try (FileInputStream fileStream = new FileInputStream(file)) {\n\n long length = file.length();\n\n checkArgument(length == 25934402, \"wrong length\");\n\n buffer = fileStream.getChannel().map(MapMode.READ_ONLY, 0, length)\n .asShortBuffer();\n } catch (IOException e) {\n // if exception, input file wrongly formatted\n throw new IllegalArgumentException();\n }\n }", "public HGTDigitalElevationModel(File file) throws IllegalArgumentException,\n IOException {\n String fileName = file.getName();\n \n // 1. Get point at the bottom left (south west)\n \n double lat = Double.parseDouble(fileName.substring(1, 3));\n double lon = Double.parseDouble(fileName.substring(4, 7));\n \n switch (fileName.substring(0, 1)) {\n case \"S\":\n lat *= -1;\n break;\n case \"N\":\n // wonderful, lat is positive, do nothing\n break;\n default:\n throw new IllegalArgumentException(\n \"first character in file name must be either 'S' or 'N'\");\n }\n \n switch (fileName.substring(3, 4)) {\n case \"W\":\n lon *= -1;\n break;\n case \"E\":\n // wonderful, lon is positive, do nothing\n break;\n default:\n throw new IllegalArgumentException(\n \"fourth character in file name must be either 'W' or 'E'\");\n }\n \n southWest = new PointGeo(Math.toRadians(lon), Math.toRadians(lat));\n \n // 2. Find resolution\n \n long length = file.length();\n double n = Math.sqrt(length / 2);\n \n if (Math.floor(n) != n) {\n throw new IllegalArgumentException(\n \"illegal file format (file length must be a square)\");\n }\n \n rowLength = (int) n;\n resolution = HGT_FILE_WIDTH / (rowLength - 1);\n s = resolution * Earth.RADIUS;\n \n // 3. Buffer file\n \n stream = new FileInputStream(file);\n \n buffer = stream\n .getChannel()\n .map(MapMode.READ_ONLY, 0, length)\n .asShortBuffer();\n }", "EFolge createEFolge();", "public Earth()\n {\n }", "public Vector<StateVector> readStkEphemeris(String filename) throws Exception\n {\n // clean up data\n stkVer = \"\";\n centralBody = \"\";\n coordSys = \"\";\n scenarioEpoch = \"\";\n this.filename = filename;\n\n Vector<StateVector> ephemeris = new Vector<StateVector>(50,50); // ini size, increment\n\n try\n {\n //use buffering, reading one line at a time\n //FileReader always assumes default encoding is OK!\n \n //Code for reading ephemeris from a URL (6/14/2011)\n URL url = new URL(filename);\n InputStream is = url.openStream();\n //ZipInputStream in = new ZipInputStream(is);\n //ZipEntry entry = in.getNextEntry();\n BufferedReader input = new BufferedReader(new InputStreamReader(is));\n \n //BufferedReader input = new BufferedReader(new FileReader(filename));\n try\n {\n String line = null; //not declared within while loop\n \n /*\n * readLine is a bit quirky :\n * it returns the content of a line MINUS the newline.\n * it returns null only for the END of the stream.\n * it returns an empty String if two newlines appear in a row.\n */\n \n\n boolean ephemerisBegin = false; // flag for when the ephemeris is about to begin\n\n while((line = input.readLine()) != null && !ephemerisBegin)\n {line = line.trim(); // removes excess white space so line doesn't begin with ' '\n \n \n if(line.startsWith(\"Ephemeris\"))\n {\n ephemerisBegin = true;\n break; // need to break out of loop without reading another line in the while statement\n }\n else if(line.startsWith(\"stk.v\"))\n {\n stkVer = line.trim();\n }\n else if(line.startsWith(\"CentralBody\"))\n {\n centralBody = line.substring(11).trim();\n }\n else if(line.startsWith(\"CoordinateSystem\"))\n {\n coordSys = line.substring(16).trim();\n }\n else if(line.startsWith(\"ScenarioEpoch\"))\n {\n scenarioEpoch = line.substring(13).trim();\n }\n \n } // while reading file\n\n // convert ScenarioEpoch to Julian Date -- if not read in throw an Exception - the method throws exception\n // format: 1 Jul 2007 12:00:00.00 (implied UTC)\n double jdStart = StkEphemerisReader.convertScenarioTimeString2JulianDate(scenarioEpoch + \" UTC\");\n\n // read ephemeris\n while((line = input.readLine()) != null && ephemerisBegin)\n \n {\n if(line.length() < 1)\n {\n // no data on this line, ignore\n }\n else if(line.startsWith(\"END\"))\n {\n ephemerisBegin = false; // no more data\n }\n else //so far seems ok lets parse the line and see if it is valid\n {\n String[] data = line.split(\" \");\n if(data.length == 7) // data line has enough data points\n {\n // convert data to doubles and save to ephem vector\n double[] state = new double[7];\n\n // UTC time (as STK file has UTC time in the file\n state[0] = jdStart + Double.parseDouble(data[0])/(86400.0); // JD // can throw exception\n // convert to TT time\n state[0] = state[0] + Time.deltaT(state[0] - AstroConst.JDminusMJD);\n\n for(int i=1;i<7;i++)\n {\n state[i] = Double.parseDouble(data[i]); // can throw exception\n }\n\n ephemeris.add(new StateVector(state));\n\n } // enough points\n }\n\n } // while reading file\n\n }finally\n {\n input.close(); // always close file even if there is an exception\n }\n }\n catch(IOException ex)\n {\n throw ex;\n }\n\n return ephemeris;\n\n }", "@Override\n public void createTerrain( ) {\n\n ElevationGridGenerator gridGenerator = new ElevationGridGenerator(\n getTerrainWidth(),\n getTerrainDepth(),\n getTerrainHeights()[0].length,\n getTerrainHeights().length,\n getTranslation(),\n isTerrainCentered() );\n\n // set the terrain into the elevation grid handler\n gridGenerator.setTerrainDetail( getTerrainHeights(), 0 );\n\n GeometryData data = new GeometryData();\n data.geometryType = getGeometryType();\n data.geometryComponents = GeometryData.NORMAL_DATA;\n if ( getTexture() != null ){\n data.geometryComponents |= GeometryData.TEXTURE_2D_DATA;\n }\n try {\n gridGenerator.generate( data );\n } catch ( UnsupportedTypeException ute ) {\n System.out.println( \"Geometry type is not supported\" );\n }\n int format = GeometryArray.COORDINATES | GeometryArray.NORMALS;\n if ( getTexture() != null )\n format |= GeometryArray.TEXTURE_COORDINATE_2;\n GeometryArray geom = createGeometryArray( data, format );\n\n geom.setCoordinates( 0, data.coordinates );\n \n// try {\n// File tmpFile = File.createTempFile( \"stripedata\", \".txt\" );\n// tmpFile.deleteOnExit();\n// PrintStream ps = new PrintStream( new BufferedOutputStream( new FileOutputStream( tmpFile ) ) );\n// System.out.println( ps + \": outputting coords.\");\n// for( int i = 0; i+2< data.coordinates.length ; i += 3 ){\n// ps.println ( data.coordinates[i] + \" \" + data.coordinates[i+1] + \" \" + data.coordinates[i+2] );\n// }\n// } catch ( IOException e ) {\n// // TODO Auto-generated catch block\n// e.printStackTrace();\n// }\n geom.setNormals( 0, data.normals );\n if ( getTexture() != null ){\n// File f = File.createTempFile(\"texcoords\", \".txt\");\n// f.deleteOnExit();\n// PrintStream ps = new PrintStream( new BufferedOutputStream( new FileOutputStream( f ) ) );\n// System.out.println( ps + \": outputting texcoord.\");\n// for( int i = 0; i< data.textureCoordinates.length ; ++i ){\n// ps.println( data.textureCoordinates[i] );\n// }\n geom.setTextureCoordinates( 0, 0, data.textureCoordinates );\n }\n \n setGeometry( geom );\n// addTexture();\n\n }", "public void createStations() \n\t{\n\t\tint stationID;\n\t\tint routeID=0;\n\t\tString[] files = {\"Western.csv\", \"Central.csv\", \"Harbour.csv\"};\n\t\tArrayList<Station> stationList = new ArrayList<Station>();\t\t\n\t\ttry \n\t\t{\n\t\t\tfor (String f : files) \n\t\t\t{\t\t\t\t\n\t\t\t\tFile file = new File(f);\n\t\t\t\tif (!file.exists()) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Input file not exist\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@SuppressWarnings(\"resource\")\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\t\t\n\t\t\t\tString line;\n\t\t\t\tString route= br.readLine().split(\",\")[0];\n\t\t\t\tStation.routeName[routeID++] = route;\n\t\t\t\tstationID=0;\n\t\t\t\tdouble dist = 0.0;\n\t\t\t\twhile ((line = br.readLine()) != null) \n\t\t\t\t{\t\n\t\t\t\t\tString[] stn = line.split(\",\");\n\t\t\t\t\tif(stn[1]==\"\")\tstn[1]= \"1\";\n\t\t\t\t\tdist += Double.parseDouble(stn[1]);\n\t\t\t\t\tStation st = new Station(routeID, route+\"_\"+(++stationID), stn[0], Double.parseDouble(stn[1]),dist);\n\t\t\t\t\t\n\t\t\t\t\tstationList.add(st);\n\t\t\t\t}\n\t\t\t\tStation.routeList.add(stationList);\n\t\t\t\tStation.TerminalsUp.add(stationList.get(0).stationName);\n\t\t\t\tStation.TerminalsDown.add(stationList.get(stationList.size()-1).stationName);\n\t\t\t\t\n\t\t\t\tstationList = new ArrayList<>();\n\t\t\t}\n\t\t}catch(IOException e) {}\n\t}", "public Steganography() {}", "public HdtModel() {\n model = null;\n directory = this.getClass().getResource(\"/importedDatasets/\").getFile().toString();\n hdt = null;\n }", "private void initTerrain() {\n\t\tHillHeightMap myHillHeightMap = new HillHeightMap(300, 2000, 5.0f, 20.0f, (byte) 2, 12345);\n\t\tmyHillHeightMap.setHeightScale(0.1f);\n\t\thillTerrain = createTerBlock(myHillHeightMap);\n\t\t// create texture and texture state to color the terrain\n\t\tTextureState grassState;\n\t\tTexture grassTexture = TextureManager.loadTexture2D(\"./images/grass.jpg\");\n\t\tgrassTexture.setWrapMode(Texture.WrapMode.Repeat);\n\t\tgrassTexture.setApplyMode(sage.texture.Texture.ApplyMode.Replace);\n\t\tgrassState = (TextureState) display.getRenderer().createRenderState(RenderStateType.Texture);\n\t\tgrassState.setTexture(grassTexture, 0);\n\t\tgrassState.setEnabled(true);\n\t\t// apply the texture to the terrain\n\t\thillTerrain.setRenderState(grassState);\n\t\taddGameWorldObject(hillTerrain);\n\n\t\thillTerrain.updateGeometricState(1.0f, true);\n\n\t\t//Add Terrain Physics\n\t\tfloat up[] = { 0, 1, 0 };\n\t\tterrainP = physicsEngine.addStaticPlaneObject(physicsEngine.nextUID(),\n\t\t\t\thillTerrain.getWorldTransform().getValues(), up, 0.0f);\n\t\tterrainP.setBounciness(0.0f);\n\t\t//remove this line for ODE4J.\n\t\thillTerrain.setPhysicsObject(terrainP);\n\n\t\t//TODO: should also set damping, friction, etc.\n\t}", "public TrainStation(){\n drawImage();\n Area=300;\n infectionRate=1.7;\n }", "public DaisyWorld() {\n grid = new Patch[Params.EDGE][Params.EDGE];\n // Initialize grid\n if (Params.QUALITY_SWITCH == 0) {\n for (int i = 0; i < Params.EDGE; i++) {\n for (int j = 0; j < Params.EDGE; j++) {\n grid[i][j] = new Patch();\n }\n }\n } else {\n // If the switch of extension is on, also initialize the quality attribute\n Random rand = new Random();\n for (int i = 0; i < Params.EDGE; i++) {\n for (int j = 0; j < Params.EDGE; j++) {\n grid[i][j] = new Patch();\n grid[i][j].setSoilQuality(rand.nextDouble() * Params.INITIAL_MAX_QUALITY);\n }\n }\n // Diffuse for 20 rounds after randomly initializing soil quality to maintain\n // the gradual change in soil quality\n for (int i = 0; i < 20; i++) Util.diffuseSoilQuality(grid, Params.DIFFUSION_RATIO);\n }\n\n // Initialize global temperature and black and white population record\n globalTempRecord = new ArrayList<>();\n blackPopulation = new ArrayList<>();\n whitePopulation = new ArrayList<>();\n globalSoilQualityRecord = new ArrayList<>();\n // Seed daisies\n seedDaisies(grid, Params.START_BLACK, Params.START_WHITE);\n // First round absorb and recording results\n absorb();\n recordGlobalTemp();\n recordPopulation();\n recordGlobalSoilQuality();\n }", "private RawModel generateTerrain(Loader loader, String heightMap){\n BufferedImage image = null;\n \n try {\n image = ImageIO.read(new File(\"src/res/\" + heightMap + \".png\"));\n } catch (IOException ex) {\n System.out.println(\"Image Read Error\");\n }\n //System.out.println(\"Height: \" + image.getHeight());\n int VERTEX_COUNT = image.getHeight();\n int count = VERTEX_COUNT * VERTEX_COUNT;\n heights = new float[VERTEX_COUNT][VERTEX_COUNT];\n //Varaibles to hold the data it needs\n float[] vertices = new float[count * 3];\n float[] normals = new float[count * 3];\n float[] textureCoords = new float[count*2];\n int[] indices = new int[6*(VERTEX_COUNT-1)*(VERTEX_COUNT-1)];\n int vertexPointer = 0;\n //Goes through all the verticies its needs and creates the points\n for(int i=0;i<VERTEX_COUNT;i++){\n for(int j=0;j<VERTEX_COUNT;j++){\n //x pos\n vertices[vertexPointer*3] = (float)j/((float)VERTEX_COUNT - 1) * SIZE;\n //Y pos\n float height = getHeight(j, i, image);\n heights[j][i] = height;\n vertices[vertexPointer*3+1] = height;\n //Z Pos\n vertices[vertexPointer*3+2] = (float)i/((float)VERTEX_COUNT - 1) * SIZE;\n Vector3f normal = calculateNormals(j, i, image);\n normals[vertexPointer*3] = normal.x;\n normals[vertexPointer*3+1] = normal.y;\n normals[vertexPointer*3+2] = normal.z;\n textureCoords[vertexPointer*2] = (float)j/((float)VERTEX_COUNT - 1);\n textureCoords[vertexPointer*2+1] = (float)i/((float)VERTEX_COUNT - 1);\n vertexPointer++;\n }\n }\n int pointer = 0;\n //Binds the indicies from the vertexes\n for(int gz=0;gz<VERTEX_COUNT-1;gz++){\n for(int gx=0;gx<VERTEX_COUNT-1;gx++){\n int topLeft = (gz*VERTEX_COUNT)+gx;\n int topRight = topLeft + 1;\n int bottomLeft = ((gz+1)*VERTEX_COUNT)+gx;\n int bottomRight = bottomLeft + 1;\n indices[pointer++] = topLeft;\n indices[pointer++] = bottomLeft;\n indices[pointer++] = topRight;\n indices[pointer++] = topRight;\n indices[pointer++] = bottomLeft;\n indices[pointer++] = bottomRight;\n }\n }\n return loader.loadToVAO(vertices, textureCoords, normals, indices);\n }", "public Geant4Basic createRegion(int isector, int iregion) {\n\n \n double regionDZ = (this.getChamberThickness())/2. + URWellConstants.ZENLARGEMENT ;\n double regionDY = URWellConstants.SECTORHEIGHT/2 + URWellConstants.YENLARGEMENT ;\n double regionDX0 = URWellConstants.DX0CHAMBER0 + URWellConstants.XENLARGEMENT ;\n double regionDX1 = (regionDY*2)*Math.tan(Math.toRadians(URWellConstants.THOPEN/2))+regionDX0 ; \n double regionThilt = Math.toRadians(URWellConstants.THTILT);\n\n // baricenter coordinate in CLAS12 frame \n\n Vector3d vCenter = new Vector3d(0, 0, 0);\n vCenter.x = 0 ;\n vCenter.y =URWellConstants.SECTORHEIGHT/2*Math.cos(regionThilt)+URWellConstants.YMIN;\n vCenter.z =-URWellConstants.SECTORHEIGHT/2*Math.sin(regionThilt)+URWellConstants.ZMIN;\n vCenter.rotateZ(-Math.toRadians(90 - isector * 60));\n\n // Sector construction\n Geant4Basic sectorVolume = new G4Trap(\"region_uRwell_\" + (iregion + 1) + \"_s\" + (isector + 1),\n regionDZ, -regionThilt, Math.toRadians(90.0),\n regionDY, regionDX0, regionDX1, 0.0,\n regionDY, regionDX0, regionDX1, 0.0);\n\n sectorVolume.rotate(\"yxz\", 0.0, regionThilt, Math.toRadians(90.0 - isector * 60.0));\n sectorVolume.translate(vCenter.x, vCenter.y, vCenter.z);\n sectorVolume.setId(isector + 1, iregion + 1, 0, 0);\n \n // Chambers construction\n for (int ich = 0; ich < URWellConstants.NCHAMBERS; ich++) {\n double y_chamber = (2*ich+1)*(URWellConstants.SECTORHEIGHT/URWellConstants.NCHAMBERS/2+0.05);\n //double y_chamber = (2*ich+1)*(SECTORHEIGHT/nChambers/2);\n Geant4Basic chamberVolume = this.createChamber(isector, iregion, ich);\n chamberVolume.setName(\"rg\" + (iregion + 1) + \"_s\" + (isector + 1) + \"_c\" + (ich +1));\n chamberVolume.setMother(sectorVolume);\n chamberVolume.translate(0.0,y_chamber-URWellConstants.SECTORHEIGHT/2,0. );\n chamberVolume.setId(isector + 1, iregion + 1, ich +1, 0);\n }\n \n return sectorVolume;\n }", "public TerrainModel(SpatioTemporalDomain domain)\r\n {\r\n // Defer initialization of terrain flatfield member\r\n this(domain, false);\r\n }", "public Steganography()\n {\n }", "public Geant4Basic createChamber(int iSector, int iRegion, int iChamber) {\n \n \n double chamberDZ = (this.getChamberThickness())/2. + URWellConstants.ZENLARGEMENT/2;\n double chamberDX0 = (iChamber*URWellConstants.SECTORHEIGHT/URWellConstants.NCHAMBERS)*Math.tan(Math.toRadians(URWellConstants.THOPEN/2.))+ URWellConstants.DX0CHAMBER0 +0.1; \n double chamberDX1 = (URWellConstants.SECTORHEIGHT/URWellConstants.NCHAMBERS)*Math.tan(Math.toRadians(URWellConstants.THOPEN/2.))+chamberDX0; \n double chamberDY = URWellConstants.SECTORHEIGHT/URWellConstants.NCHAMBERS/2+0.05;\n double chamberThilt = Math.toRadians(URWellConstants.THTILT);\n Geant4Basic chamberVolume = new G4Trap(\"r\" + (iRegion + 1) + \"_s\" + (iSector + 1) + \"_c\" + (iChamber+1),\n chamberDZ, -chamberThilt, Math.toRadians(90.0),\n chamberDY, chamberDX0, chamberDX1, 0.0,\n chamberDY, chamberDX0, chamberDX1, 0.0);\n\n double daugtherVolumeZ =0;\n double daughterVolumeY =0;\n double[] chamberDim = getChamberDimensions(iChamber);\n \n double daugtherDX0 = chamberDim[0];\n double daugtherDX1 = chamberDim[1];\n double daugtherDY = chamberDim[2];\n \n for (int i=0; i< URWellConstants.CHAMBERVOLUMESTHICKNESS.length; i++ ){\n \n if(i==0) {daugtherVolumeZ = URWellConstants.CHAMBERVOLUMESTHICKNESS[i]/2 - (this.getChamberThickness())/2.;\n } else daugtherVolumeZ += URWellConstants.CHAMBERVOLUMESTHICKNESS[i-1]/2 + URWellConstants.CHAMBERVOLUMESTHICKNESS[i]/2;\n \n daughterVolumeY = -daugtherVolumeZ *Math.tan(Math.toRadians(URWellConstants.THTILT));\n \n Geant4Basic daugtherVolume = new G4Trap(\"daughter_volume\",\n URWellConstants.CHAMBERVOLUMESTHICKNESS[i]/2, -chamberThilt, Math.toRadians(90.0),\n daugtherDY, daugtherDX0, daugtherDX1, 0.0,\n daugtherDY, daugtherDX0, daugtherDX1, 0.0);\n \n daugtherVolume.setName(\"rg\" + (iRegion + 1) + \"_s\" + (iSector + 1) + \"_c\" + (iChamber +1) +\"_\"+URWellConstants.CHAMBERVOLUMESNAME[i] );\n daugtherVolume.setMother(chamberVolume);\n daugtherVolume.setPosition(0.0, daughterVolumeY,daugtherVolumeZ);\n }\n return chamberVolume;\n }", "public EarthEnvironment () {\n set_Planetradius(6378137.0);\n set_Timestep(0.01);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the color code of the bottom border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
public String getBottomColor() { return bottomColor; }
[ "public String getBorderBottomColor();", "public XSSFColor getBottomBorderXSSFColor() {\n if(_ctDxf.isSetBorder()) {\n \tfinal CTBorder ct = _ctDxf.getBorder();\n \tif (ct.isSetBottom()) {\n \t\tfinal CTBorderPr pr = ct.getBottom();\n \t\tif (pr.isSetColor()) {\n \t\t\tfinal CTColor color = pr.getColor();\n \t\t\treturn new XSSFColor(color);\n \t\t}\n \t}\n }\n return null;\n }", "public BorderCode getBrcBottom()\n {\n return field_36_brcBottom;\n }", "protected Color getUpperBgColor() {\r\n \treturn C64_BLUE;\r\n }", "public static Color getBottomColor(int i) {\n float hue = (i * 3 % 5) * 0.2f;\n float sat = 0.7f;\n float bright = 0.9f;\n\n return new Color(Color.HSBtoRGB(hue, sat, bright));\n }", "public String getBorderBottom();", "public short getTopBorderColor()\n {\n return format.getTopBorderPaletteIdx();\n }", "public String getBorderTopColor();", "public String getBorderBottomStyle();", "public Vector4f getBorderColour()\n\t{ return borderColour; }", "String getEndColor();", "public void setBrcBottom( BorderCode field_36_brcBottom )\n {\n this.field_36_brcBottom = field_36_brcBottom;\n }", "public String getHexColor() {\r\n\t\tString substring = Integer.toHexString(\r\n\t\t\t\t(monitorStatusColor.getRGB() & CONST_0XFFFFFF)\r\n\t\t\t\t\t\t| CONST_0X1000000).substring(1);\r\n\t\treturn Constant.HASH + substring;\r\n\t}", "public String getBorderLeftColor();", "public String getBorderColor();", "public java.lang.String getSCALE_BORDER_COLOR_h() {\n return SCALE_BORDER_COLOR_h;\n }", "public String getBorderRightColor();", "public short getLeftBorderColor()\n {\n return format.getLeftBorderPaletteIdx();\n }", "public Color getEndColor() {\n return new Color(this.endColor.getRGB());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the hints file to use.
public void setHintsFile(String file) { this.hintsFile = file; }
[ "public String getHintsFile() {\n return hintsFile;\n }", "public void setHints(final String[] hints) {\n this.hints = hints;\n }", "public void setUsedHints(int usedHints) {\n\t\tthis.usedHints = usedHints;\n\t}", "Imports setFile(String file);", "public void setHints(ResourceBundle aHints) {\n if(aHints == null) {\n throw new IllegalArgumentException(\"Hints property can not be null!\");\n } else {\n hints = aHints;\n allkeys.clear();\n stats = null;\n Enumeration keys = hints.getKeys();\n while(keys.hasMoreElements()) {\n Object akey = keys.nextElement();\n allkeys.add(akey);\n }\n stats = new int[allkeys.size()];\n for(int i=0; i<stats.length; i++) {\n stats[i] = 0;\n }\n } \n }", "public void setHint(boolean hint) {\n this.hint = hint;\n this.setColor(Color.CORNSILK);\n }", "public void setHintPath(List<Room> hintPath) {\n this.hintPath = hintPath;\n }", "public static void setPreferences(String file)\n throws IOException\n {\n if (file.startsWith(\"http://\") || file.startsWith(\"www.\"))\n {\n setPreferences(new URL(file));\n }\n else\n {\n setPreferences(new File(file));\n }\n }", "void setKarafPropertiesFileLocation(String propFile);", "public void setHint(CharSequence hintText) {\n this.hintText = hintText;\n searchEdit.setHint(hintText);\n }", "void setHintWord(String s);", "public void setLocalFile(String f);", "public synchronized void setPreferencesFile(File preferencesFile) {\r\n _preferencesFile = preferencesFile;\r\n }", "public void set(File source) throws IOException {\r\n set(new FileInputStream(source));\r\n }", "public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue){\n _hints.put(hintKey, hintValue);\n }", "@DISPID(1610874897) //= 0x60040011. The runtime will prefer the VTID if present\r\n @VTID(48)\r\n void setHelpFile(\r\n java.lang.String pbstrFilename);", "public void setLangDefFilePath(final String filePath) {\n InputStream in = null;\n try {\n in = new FileInputStream(filePath);\n setLangDefStream(in);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n finally {\n if (in != null) {\n try {\n in.close();\n }\n catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n }\n }", "public void setFile(File file) {\n Log.debug(\"Script file set to \" + file);\n if (file == null)\n throw new IllegalArgumentException(\"File must not be null\");\n if (filename == null || !file.equals(getFile())) {\n\n // Convert to full absolute version \n //\n\n file = resolveRelativeReferences(file);\n filename = file.getPath();\n \n Log.debug(\"Script filename set to \" + filename);\n if (relativeDirectory != null)\n setRelativeTo(relativeDirectory);\n }\n lastSaved = getHash() + 1;\n }", "Help(String fname) {\n helpfile = fname;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "typeCode" element
void unsetTypeCode();
[ "public void unsetTitleTypeCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(TITLETYPECODE$0, 0);\n }\n }", "void unsetType();", "public void unsetType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(TYPE$4, 0);\n }\n }", "public void unsetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CODE$2, 0);\n }\n }", "public void unsetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CODE$6, 0);\n }\n }", "public void unsetType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(TYPE$0);\n }\n }", "public void unsetSuffixTypeCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SUFFIXTYPECODE$8, 0);\n }\n }", "void unsetCode();", "public void unsetTypeId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(TYPEID$2, 0);\n }\n }", "void unsetControlType();", "public maestro.layouts.internal.Browse.Builder clearType() {\n type = null;\n fieldSetFlags()[0] = false;\n return this;\n }", "void unsetItemtype();", "public void unsetSwiftCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWIFTCODE$8, 0);\n }\n }", "void xsetTypeCode(org.apache.xmlbeans.XmlString typeCode);", "public void unsetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(CLASSCODE$30);\n }\n }", "void unsetProductType();", "public void unsetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STYLECODE$16);\n }\n }", "public void unsetContructionType()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(CONTRUCTIONTYPE$24);\r\n }\r\n }", "public void unsetParcelType()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(PARCELTYPE$30);\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
send an interval end to all registered topics
private void IntervalEndMessageAndSend0() { // TODO Auto-generated method stub String topic; Iterator<String> ier = TopicMap.keySet().iterator(); while(ier.hasNext()){ topic = ier.next(); //AsyncPushOneFlow(topic, new byte[](new Key(new byte[]{0,0,0}),Sub4SketchingKVStream.endSignal)); } }
[ "public void unsubscribe() {\r\n new Thread(new Runnable() {\r\n public void run() {\r\n int attempts = 0;\r\n while(++attempts < 20) {\r\n try {\r\n if (server.removeSubscriber(PubSubAgent.this.agentID)) {\r\n subscriberKeywords.clear();\r\n subscriberTopics.clear();\r\n }\r\n System.out.print(\"Unsubscribed from all Topics.\");\r\n return;\r\n } catch(RemoteException e) {\r\n System.err.println(\"Could not connect to server. Retrying...\");\r\n try {\r\n Thread.sleep(800);\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n System.err.println(\"Couldn't Unsubscribe from all the topics...\");\r\n }\r\n }).start();\r\n }", "void endPeriodic() {\n\t\tupdateDashboard();\n\t}", "public void closeAllTopicSubscribers()\n {\n for(int ii = 0; ii < topicSubscriberList.size(); ii++)\n {\n TopicSubscriber subscriber = (TopicSubscriber)topicSubscriberList.get(ii);\n try\n {\n subscriber.close();\n }\n catch(JMSException exc)\n {\n\n }\n }\n }", "@Override\n public void shutdown() throws Exception {\n synchronized (this) {\n shouldBeShuttingDown = true;\n for (Topic topic : map.values()) {\n topic.shutdown();\n }\n }\n }", "public void unsubscribeAllTopics(){\n for ( String topic : currentTopics ) {\n firebaseMessaging.unsubscribeFromTopic(topic);\n }\n currentTopics.clear();\n Log.d(TAG,\"Unsubscribe all topics\");\n }", "void sendInterval() {\n OscilloscopeMsg omsg = new OscilloscopeMsg();\n\n omsg.set_version(version);\n omsg.set_interval(interval);\n omsg.set_token(Constants.TOKEN_SECRET_PC);\n\n System.out.println(\"Send out omsg\");\n try {\n mote.send(MoteIF.TOS_BCAST_ADDR, omsg);\n }\n catch (IOException e) {\n window.error(\"Cannot send message to mote\");\n }\n }", "void sendInterval() {\n\t\tOscilloscopeMsg omsg = new OscilloscopeMsg();\n\n\t\tomsg.set_version(version);\n\t\tomsg.set_interval(interval);\n\t\ttry {\n\t\t mote.send(MoteIF.TOS_BCAST_ADDR, omsg);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t window.error(\"Cannot send message to mote\");\n\t\t}\n }", "void setHeartbeatInterval(int interval);", "public void endTasks() {\n\n\t\t/*\n\t\t * Any task that is in running STATE should be killed via a CANCEL_TASK\n\t\t * message\n\t\t */\n\t\tfor (TaskHandler handler : tasks.values()) {\n\t\t\tif (handler.getStatus() == TaskHandlerStatus.RUNNING) {\n\t\t\t\t\n\t\t\t\tfinal CancelTaskMessage kill =\t\n\t\t\t\t\tnew CancelTaskMessage(handler.getTaskId(), \n\t\t\t\t\t\t\tTaskRequester.TASK_CLIENT,\n\t\t\t\t\t\t\t\"The user decided to cancel all tasks\");\n\n\t\t\t\ttry {\n\t\t\t\t\t// send the message\n\t\t\t\t\ttaskOutputChannel.send(bus.generateMessage(kill,\n\t\t\t\t\t\t\tTaskMessage.CANCEL_TASK));\n\t\t\t\t\t\n\t\t\t\t\t// terminate the task\n\t\t\t\t\tcancelTask(handler.getTaskId(), \n\t\t\t\t\t\t\t\"Task Client ending all tasks\");\n\n\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void subscribeToTopics(String[] topics){\n for ( String topic : topics ) {\n firebaseMessaging.subscribeToTopic(topic);\n currentTopics.add(topic);\n Log.d(TAG,\"Subscribe to topic <\"+topic+\">\");\n }\n }", "public void closeAllTopicDurableSubscribers()\n {\n Iterator keys = topicDurableSubscriberMap.keySet().iterator();\n while(keys.hasNext())\n {\n TopicSubscriber subscriber = (TopicSubscriber)topicDurableSubscriberMap.get(keys.next());\n try\n {\n subscriber.close();\n }\n catch(JMSException exc)\n {\n\n }\n }\n }", "private void subscribeToAllTopics() {\n for (SingleConversation cr : chatRoomArrayList) {\n\n Intent intent = new Intent(this.getContext(), GcmIntentService.class);\n intent.putExtra(GcmIntentService.KEY, GcmIntentService.SUBSCRIBE);\n intent.putExtra(GcmIntentService.TOPIC, \"topic_\" + cr.getId());\n getActivity().startService(intent);\n }\n }", "private void scheduleTasks() {\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// Prepare JSON Ping Message\n\t\t\t\ttry {\n\t\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\t\tObjectNode objectNode = mapper.createObjectNode();\n\t\t\t\t\tobjectNode.put(\"type\", \"PING\");\n\n\t\t\t\t\twebSocket.sendText(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(objectNode));\n\n\t\t\t\t\tlog.debug(\"Send Ping to Twitch PubSub. (Keep-Connection-Alive)\");\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlog.error(\"Failed to Ping Twitch PubSub. ({})\", ex.getMessage());\n\t\t\t\t\treconnect();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}, 7000, 282000);\n\t}", "void setIntervalEnd(java.util.Calendar intervalEnd);", "@Override\n public void teleopPeriodic() {\n }", "@Override\n protected void shutDown() throws Exception {\n List<BrokerApi.ShardOffset> offsets = new ArrayList<>();\n handlers.asMap().values().forEach(h -> {\n h.stopAsync();// will sync invoke triggerShutdown() to finish current records\n h.getProcessedRecords().ifPresent(offsets::add);\n });\n handlers.invalidateAll();\n\n brokerApi.unsubscribe(BrokerApi.DispatcherRequest.with(BrokerApi.ClientId.clientId(clientId, group, topic),\n offsets));\n }", "private void notifyComplete() {\n for (DataRequestListener l : listeners)\n l.intervalComplete(this);\n }", "public void shutdown() {\n\t\ttry {\n\t\t\ttsub.close();\n\t\t} catch (JMSException e) {\n\t\t\tSystem.out.println(\"> Error while closing the topic subscriber\");\n\t\t}\n\t\tArrayList<String> list = msgList.removeAllMessages();\n\t\tfor (String s : list) {\n\t\t\t//TODO save unprocessed messages to file\n\t\t}\n\t}", "public void tick() {\n Instant now = clock.instant();\n SortedMap<Instant, Set<Endpoint>> range = timeouts.headMap(now);\n\n Set<Endpoint> processed = new HashSet<>();\n for (Set<Endpoint> batch : range.values()) {\n for (Endpoint endpoint : batch) {\n if (processed.contains(endpoint)) {\n continue;\n }\n processed.add(endpoint);\n checkExpiration(now, endpoint);\n }\n }\n range.clear();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
percentage of fat in total Calories
public double caloriesInFat(double fatCalories, double calories) { double totalCalories = (fatCalories / calories) * 100; return totalCalories; }
[ "public abstract double percentFat();", "Float getFedAnimalsPercentage();", "public double getPercentOfTotal();", "BigDecimal getMilkFatPercentage();", "public float percentOfDiscount() {\n\t\treturn 0.7f; \r\n\t}", "public static float percentageF(float n, float total) {\r\n return n * 100f / total;\r\n }", "private double calcFatGrams() {\r\n return ((totalCals * FAT_PERCENT) / NINE_CAL_PER_GRAM);\r\n }", "BigDecimal getAlcoholPercentage();", "public abstract double percentCarbohydrates();", "double getPercent(double percentOf, double total);", "public float percentOfDiscount() {\n\t\treturn 0.8f;\r\n\t}", "@Override\n public double getAlcoholPercent() {\n return (getAlcoholVolume() / getVolume()) * 100.0;\n }", "private float getPercentage(int n, int total) {\n float proportion = ((float) n) / ((float) total);\n return proportion * 100;\n }", "public void calculatePf()\n {\n totalMonthlyPf=2*info.monthlyIncome*info.pfPercentage/100; \n \n }", "public double calculateHpPercent();", "private float getPercentage() {\n if (totalGamePlayed == 0) {\n return 0;\n } else {\n return (totalGameWin * 100) / totalGamePlayed;\n }\n }", "public double caloriesinProtein(double proteinCalories, double calories)\n {\n double totalCalories = (proteinCalories / calories) * 100;\n\n return totalCalories;\n\n }", "int getPercentageHeated();", "double totalFare() {\n return computeFare(totalPassengers - discountPassengers, BASE_FARE) + computeFare(discountPassengers, DISC_FARE);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end student attendance temp history insert into Student Academics Temp History
public AbstractWrapper insertStudentAcademicsTempHistory()throws Exception { Connection con = null; ResultSet resultSet = null; DataArrayWrapper dataArrayWrapper = new DataArrayWrapper(); String sql=null; //SimpleDateFormat dmyFormat = new SimpleDateFormat("dd-MMM-yyyy"); DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); symbols.setGroupingSeparator(','); formatter.applyPattern("###,###,###,##0.00"); formatter.setDecimalFormatSymbols(symbols); PreparedStatement pstmt =null; //StudentAcademicsWrapper studentAcademicsWrapper=new StudentAcademicsWrapper(); try { //----insert into StudentAcademics Temp History con = getConnection(); sql= "INSERT INTO StudentAcademicsTempHistory(RefNo, StudentID, GradeID, SectionID, AcademicYearID, TermID, SubjectID, TargetMarks, " + " SecuredMarks, Percentage, RankID, GroupTerm, Grade, MakerID, MakerDateTime, UploadStatus, UploadRemarks) SELECT RefNo, Studentid, Gradeid, " + " Sectionid, Academicyearid,TermID,Subjectid, TargetMarks, SecuredMarks, Percentage, RankID, GroupTerm, Grade , MakerID, " + " MakerDateTime, 'U', UploadRemarks from StudentAcademicsTemp WHERE UploadStatus='I'"; System.out.println("sql " + sql); pstmt = con.prepareStatement(sql); pstmt.executeUpdate(); pstmt.close(); /*sql="UPDATE StudentAcademicsTempHistory SET UploadStatus='U' WHERE UploadStatus='I'"; pstmt=con.prepareStatement(sql); pstmt.executeUpdate(); pstmt.close();*/ sql="DELETE FROM StudentAcademicsTemp WHERE UploadStatus='I'"; pstmt=con.prepareStatement(sql); pstmt.executeUpdate(); pstmt.close(); // studentAcademicsWrapper.recordFound=true; // // dataArrayWrapper.studentAcademicsWrapper = new StudentAcademicsWrapper[1]; // dataArrayWrapper.studentAcademicsWrapper[0]= studentAcademicsWrapper; dataArrayWrapper.recordFound=true; System.out.println("Successfully inserted into StudentAcademicsTempHistory"); } catch (SQLException se) { se.printStackTrace(); throw new SQLException(se.getSQLState()+ " ; "+ se.getMessage()); } catch (NamingException ne) { ne.printStackTrace(); throw new NamingException(ne.getMessage()); } catch (Exception ex) { ex.printStackTrace(); throw new Exception(ex.getMessage()); } finally { try { releaseConnection(resultSet, con); } catch (SQLException se) { se.printStackTrace(); throw new Exception(se.getSQLState()+ " ; "+ se.getMessage()); } } return dataArrayWrapper; }
[ "public AbstractWrapper insertStudentAttendanceTempHistory()throws Exception {\r\n\t\t\t\t\r\n\t\t\t\tConnection con = null;\r\n\t\t\t\tResultSet resultSet = null;\r\n\r\n\t\t\t\tDataArrayWrapper dataArrayWrapper = new DataArrayWrapper();\r\n\t\t\t\tString sql=null;\r\n\t\t\t\t\r\n\t\t\t\t//SimpleDateFormat dmyFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\r\n\t\t\t\tDecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);\r\n\t\t\t\tDecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();\r\n\t\t\t\tsymbols.setGroupingSeparator(',');\r\n\t\t\t\tformatter.applyPattern(\"###,###,###,##0.00\");\r\n\t\t\t\tformatter.setDecimalFormatSymbols(symbols);\r\n\t\t\t\t\r\n\t\t\t\tPreparedStatement pstmt =null;\r\n\t\t\t\t//StudentAttendanceWrapper studentAttendanceWrapper=new StudentAttendanceWrapper();\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\t\t//----insert into studentAttendance Temp History\r\n\t\t\t \t\t\r\n\t\t\t \t\tcon = getConnection();\r\n\t\t\r\n\t\t\t\t\t\t\tsql=\"INSERT INTO StudentAttendanceTempHistory(RefNo,AcademicYearID,StudentID,GradeID,SectionID, \"\r\n\t\t\t\t\t\t\t\t\t+ \"CalendarDate,MorningStatus,EveningStatus,MakerID,MakerDateTime, UploadStatus, UploadRemarks) SELECT RefNo, AcademicYearID, \"\r\n\t\t\t\t\t\t\t\t\t+ \"StudentID, GradeID, SectionID, CalendarDate, MorningStatus, EveningStatus, MakerID, \"\r\n\t\t\t\t\t\t\t\t\t+ \" MakerDateTime, 'U', UploadRemarks FROM StudentAttendanceTemp WHERE UploadStatus='I' \"; // \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpstmt=con.prepareStatement(sql);\r\n\t\t\t\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\t\t\tpstmt.close();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// UPDATE StudentAttendanceTempHistory set UploadStatus='U' where UploadStatus='I';\r\n\t\t\t\t\t\t\t// DELETE FROM StudentAttendanceTemp Where UploadStatus='I';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/*sql=\"UPDATE StudentAttendanceTempHistory SET UploadStatus='U' WHERE UploadStatus='I'\";\r\n\t\t\t\t\t\t\tpstmt=con.prepareStatement(sql);\r\n\t\t\t\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\t\t\tpstmt.close();*/\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsql=\"DELETE FROM StudentAttendanceTemp WHERE UploadStatus='I'\";\r\n\t\t\t\t\t\t\tpstmt=con.prepareStatement(sql);\r\n\t\t\t\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\t\t\tpstmt.close();\r\n\t\t\t\t\t\t\t\r\n//\t\t\t\t\t\t\tstudentAttendanceWrapper.recordFound=true;\r\n//\t\t\t\t\t\r\n//\t\t\t\t\t\t\tdataArrayWrapper.studentAttendanceWrapper = new StudentAttendanceWrapper[1];\r\n//\t\t\t\t\t\t\tdataArrayWrapper.studentAttendanceWrapper[0]= studentAttendanceWrapper;\r\n\t\t\t\t\t\t\tdataArrayWrapper.recordFound=true;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println(\"Successfully inserted into StudentAttendanceTempHistory\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tse.printStackTrace();\r\n\t\t\t\t\tthrow new SQLException(se.getSQLState()+ \" ; \"+ se.getMessage());\r\n\t\t\t\t\r\n\t\t\t\t} catch (NamingException ne) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tne.printStackTrace();\r\n\t\t\t\t\tthrow new NamingException(ne.getMessage());\r\n\t\t\t\t}\r\n\t\t\t\t catch (Exception ex) {\r\n\t\t\t\t\r\n\t\t\t\t\t ex.printStackTrace();\r\n\t\t\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t\t\t}\r\n\t\t\t\tfinally\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treleaseConnection(resultSet, con);\r\n\t\t\t\t\t} \r\n\t\t\t\t\tcatch (SQLException se)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tse.printStackTrace();\r\n\t\t\t\t\t\tthrow new Exception(se.getSQLState()+ \" ; \"+ se.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dataArrayWrapper;\r\n\t\t}", "int insert(ac_teacher_instrument record);", "@Test\n\tvoid addStudentAttendance() {\n\t\tLocalDate ld = LocalDate.now();\t\t\t\t\t\t\t\t//load attenance file using today's date\n\t\trepo.addStudentAttendance(ld, \"Attendance.csv\");\n\n\t\tassertEquals(repo.roster.get(0).getASURITE(), \"jpark310\");\t//checks if student entries have correct ASURITE\n\t\tassertEquals(repo.roster.get(1).getASURITE(), \"aidan20\");\n\t\tassertEquals(repo.roster.get(2).getASURITE(), \"hunter420\");\n\t\t\n\t\tassertEquals(repo.roster.get(0).getDateAttendance(ld), 35);\t//check if loaded student entries have correct time of attendance\n\t\tassertEquals(repo.roster.get(1).getDateAttendance(ld), 200);\n\t\tassertEquals(repo.roster.get(2).getDateAttendance(ld), 22);\n\n\t}", "public AbstractWrapper insertStudentAttendanceTemp(UsersWrapper usersProfileWrapper,String[] lineData)throws Exception {\r\n\t\t\t\r\n\t\t\t\tConnection con = null;\r\n\t\t\t\tResultSet resultSet = null;\r\n\t\t\r\n\t\t\t\tDataArrayWrapper dataArrayWrapper = new DataArrayWrapper();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//SimpleDateFormat dmyFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\r\n\t\t\t\tDecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);\r\n\t\t\t\tDecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();\r\n\t\t\t\tsymbols.setGroupingSeparator(',');\r\n\t\t\t\tformatter.applyPattern(\"###,###,###,##0.00\");\r\n\t\t\t\tformatter.setDecimalFormatSymbols(symbols);\r\n\t\t\t\r\n\t\t\t\tString sql=null;\r\n\t\t\t\tPreparedStatement pstmt=null;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\t\tcon = getConnection();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\tsql=\"INSERT INTO StudentAttendanceTemp(RefNo,AcademicYearID,StudentID,GradeID,SectionID, \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ \"CalendarDate,MorningStatus,EveningStatus,MakerID,MakerDateTime, UploadStatus, UploadRemarks) Values(?,?,?,?,?,?,?,?,?,?,?,?)\";\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tpstmt=con.prepareStatement(sql);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(1,Utility.trim(lineData[0])); //refNo\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(2,Utility.trim(lineData[1]));//academicYearID\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(3,Utility.trim(lineData[2])); //studentID\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(4,Utility.trim(lineData[3])); //gradeID\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(5,Utility.trim(lineData[4])); //sectionID\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(6,lineData[5]); //calendarDate\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(7,Utility.trim(lineData[6])); //morningStatus\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(8,Utility.trim(lineData[7])); //eveningStatus\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(9,Utility.trim(usersProfileWrapper.userid)); //makerid\r\n\t\t\t\t\t\t\t\t\tpstmt.setTimestamp(10,Utility.getCurrentTime()); \r\n\t\t\t\t\t\t\t\t\tpstmt.setString(11,\"I\");//\"I\"\r\n\t\t\t\t\t\t\t\t\tpstmt.setString(12,\"Upload Remarks\");//Upload Remarks\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\t\t\t\t\tpstmt.close();\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//studentAttendanceWrapper[i].recordFound=true;\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t//AY1617\r\n\t\t\t\t\t\t\t\t\t//AY1622 - Invalid AcademicYearID, UploadStatus='R'\r\n\t\t\t\t\t\t\t\t\t//StudentId - SIS201600001, SHS20220005 - UploadRemarks - Invalid AcademicYearID,InvalidStudentID\r\n\t\t\t\t\t\t\t//dataArrayWrapper.studentAttendanceWrapper=new StudentAttendanceWrapper[1];\r\n\t\t\t\t\t\t\t//dataArrayWrapper.studentAttendanceWrapper[0]=studentAttendanceWrapper;\r\n\t\t\t\t\t\t\tdataArrayWrapper.recordFound=true;\r\n\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println(\"Successfully inserted StudentAttendanceTemp \");\r\n\t\t\t\t\t\t\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace();\r\n\t\t\t\t\tthrow new SQLException(se.getSQLState()+ \" ; \"+ se.getMessage());\r\n\t\t\t\t} catch (NamingException ne) {\r\n\t\t\t\t\tne.printStackTrace();\r\n\t\t\t\t\tthrow new NamingException(ne.getMessage());\r\n\t\t\t\t}\r\n\t\t\t\t catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t\t\t}\r\n\t\t\t\tfinally\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treleaseConnection(resultSet, con);\r\n\t\t\t\t\t} \r\n\t\t\t\t\tcatch (SQLException se)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tse.printStackTrace();\r\n\t\t\t\t\t\tthrow new Exception(se.getSQLState()+ \" ; \"+ se.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\treturn dataArrayWrapper;\r\n\t\t}", "void createAttendance(Attendance attendance);", "private void addAttendance(){ \t\r\n\t\t Iterator<Row> rowIterator2 = Attendance.iterator();\r\n\t while (rowIterator2.hasNext()) \r\n\t {\r\n\t Row row2 = rowIterator2.next();\r\n\t for (Student s : studentset) {\r\n\t if (s.getName().compareTo(row2.getCell(0).getStringCellValue()) == 0)\r\n\t {\r\n\t \t if (row2.getCell(1).getCellType()==0) \r\n\t \t\t \t s.setAttendance((int) row2.getCell(1).getNumericCellValue());\r\n\t }\r\n\t } \r\n\t }\r\n\t }", "void saveActivityHistForAddEntity(Record inputRecord);", "int insert(TeacherCourseArrangement record);", "@Insert({\n \"insert into inst_class_hour_course_teacher_daily (inst_id, course_id, \",\n \"teacher_id, class_hour, \",\n \"price, type, day)\",\n \"values (#{instId,jdbcType=BIGINT}, #{courseId,jdbcType=BIGINT}, \",\n \"#{teacherId,jdbcType=BIGINT}, #{classHour,jdbcType=BIGINT}, \",\n \"#{price,jdbcType=BIGINT}, #{type,jdbcType=BIGINT}, #{day,jdbcType=DATE})\"\n })\n int insert(InstClassHourCourseTeacherDaily record);", "public void addMedicalHistory(MedicalHistory medicalHistory){}", "public static int addAttendanceDetail(beans.AttendanceDetailBean attendanceDetailBean)throws java.sql.SQLException{\n\n\t\tjava.sql.Statement st=null;\n java.sql.Statement mySqlSt=null;\n\n\t\ttry{\n mySqlSt=mySqlCon.createStatement();\n\t\t\tst = con.createStatement();\n\t\t\tString query = \"INSERT INTO attendance_detail(class_id, roll_no, status\"\n\t\t\t\t+\", remarks, term, attendance_date,scheme_id) VALUES(\"+attendanceDetailBean.getClassId()+\", \"+attendanceDetailBean.getRollNo()+\", \"+attendanceDetailBean.getStatus()+\"\"\n\t\t\t\t+\", '\"+attendanceDetailBean.getRemarks()+\"', \"+attendanceDetailBean.getTerm()+\", '\"+attendanceDetailBean.getAttendanceDate()+\"' ,\"+attendanceDetailBean.getSchemeId()+\")\";\n mySqlSt.executeUpdate(query);\n\t\t\treturn st.executeUpdate(query);\n\t\t}finally{\n\t\t\tst.close();\n\t\t}\n\n\t}", "public void addTimetable(String date, String slot, String room, String teacher, String classes) throws Exception;", "private static void addFinedStudentsToTable(StudentDetails student) {\n\t\tif(student.getTotalFine() > 0)\n\t\t\tFINED_STUDENTS.put(student.getId(), student.toString());\n\t}", "public void submitAbsence (Absence absence) throws SQLException {\n if (!checkForAbsenceInDB(absence)) {\n String sql = \"INSERT INTO ABSENCE(studentKey, date) VALUES (?,?)\";\n java.sql.Date sqlDate = java.sql.Date.valueOf(absence.getDate()); // converts LocalDate date to sqlDate\n try (Connection con = dbc.getConnection()) {\n PreparedStatement stmt = con.prepareStatement(sql, PreparedStatement.RETURN_GENERATED_KEYS);\n stmt.setInt(1, absence.getStudentKey());\n stmt.setDate(2, sqlDate);\n int affectedRows = stmt.executeUpdate();\n if (affectedRows == 0) {\n throw new SQLException(\"Creating absence failed, no rows affected.\");\n }\n } catch (SQLServerException ex) {\n Logger.getLogger(AttendanceDBDAO.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(AttendanceDBDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n deleteExpiredAbsences(); //TEST\n\n int testmonth = 4;\n int[] test = getTotalOfAbsencesInAMonthByDay(testmonth);\n for (int i = 0; i < test.length; i++) {\n }\n }\n }", "private void makeSessionInfoTbl(int expMs) throws SQLException, IOException {\n\n attachDb();\n\n try (PreparedStatement stmt =\n conn.prepareStatement(\"CREATE TABLE sessioninfo(id int, lastmodificationdate timestamp)\")) {\n\n stmt.executeUpdate();\n }\n\n try (PreparedStatement stmt =\n conn.prepareStatement(\"INSERT into sessioninfo(id, lastmodificationdate) values(?, ?)\")) {\n\n Timestamp ts;\n\n // current data\n ts = new Timestamp(System.currentTimeMillis());\n stmt.setTimestamp(2, ts);\n\n stmt.setInt(1, 1);\n stmt.executeUpdate();\n\n stmt.setInt(1, 4);\n stmt.executeUpdate();\n\n stmt.setInt(1, 5);\n stmt.executeUpdate();\n\n // expired data\n ts = new Timestamp(System.currentTimeMillis() - expMs);\n stmt.setTimestamp(2, ts);\n\n stmt.setInt(1, 2);\n stmt.executeUpdate();\n\n stmt.setInt(1, 3);\n stmt.executeUpdate();\n }\n }", "protected void saveEarningHistory(EarningHistory earningHistory){\n }", "public void giveHistoryToUniversity(MedicalHistory medicalHistory, University university){}", "private void saveInfo() {\n\n\t\t// make sure the data in here is stored in the consultation class.\n\t\tVerifyPhysicianInfo();\n\t\tVerifySocialHistory();\n\t\tVerifyAssessmentAndPlan();\n\t\tVerifyVitalSigns();\n\n\t\t// ////////////////Physician Info ////////////////////////////\n\t\tPhysicianInfo pI = _globals.GetConsultation().GetPI();\n\t\tif (pI != null) \n\t\t{\n\t\t\tString Sname = pI.PhysicianName;\n\t\t\tString Sorg = pI.PhysicianOrganization;\n\t\t\tMap<String, Object> columnsValuesPI = new HashMap<String, Object>();\n\t\t\tcolumnsValuesPI.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\tcolumnsValuesPI.put(\"profileID\", SprofileId_);\n\t\t\tcolumnsValuesPI.put(\"Name\", Sname);\n\t\t\tcolumnsValuesPI.put(\"Organization\", Sorg);\n\n\t\t\t_db.addRow(columnsValuesPI, \"physician_info\");\n\t\t\t_db.printAllValues(\"physician_info\");\n\t\t}\n\t\t\n\t\t// ////////////////Assesmnt & Plans ////////////////////////////\n\t\tString sAssesmentPlans = \" \";\n\t\tsAssesmentPlans = _assesmentPlans_EditText.getText().toString();\n\t\t\n\t\tMap<String, Object> columnsValuesAP = new HashMap<String, Object>();\n\t\tcolumnsValuesAP.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\tcolumnsValuesAP.put(\"profileID\", SprofileId_);\n\t\tcolumnsValuesAP.put(\"Note\", sAssesmentPlans);\n\n\t\t_db.addRow(columnsValuesAP, \"assesment_note\");\n\t\t_db.printAllValues(\"assesment_note\");\n\t\t\t\n\t\t// ////////////////IllnessHistory ////////////////////////////\n\t\tList<ChiefComplaint> listHistory = _globals.GetConsultation().GetCCs();\n\t\tif (listHistory != null)\n\t\t{\n\t\t\tfor (int i = 0; i < listHistory.size(); i++) \n\t\t\t{\n\t\t\t\tChiefComplaint hist1 = listHistory.get(i);\n\t\t\t\t// Long ScurrTimestamp = System.currentTimeMillis()/1000;\n\t\t\t\t// int profileId_ = _globals.GetProfile().ProfileID;\n\t\t\t\tString Ssymptom = hist1.Symptom;\n\t\t\t\tString Sonset = hist1.OnsetOfSymptom;\n\t\t\t\tString Lduration = hist1.duration;\n\t\t\t\tString SOTC = hist1.OTCTreatment;\n\t\t\t\t// String LendDate = hist1.Note;\n\t\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\t\tMap<String, Object> columnsValues2 = new HashMap<String, Object>();\n\t\t\t\tcolumnsValues2.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\t\tcolumnsValues2.put(\"profileID\", SprofileId_);\n\t\t\t\tcolumnsValues2.put(\"Symptom\", Ssymptom);\n\t\t\t\tcolumnsValues2.put(\"Onset\", Sonset);\n\t\t\t\tcolumnsValues2.put(\"Duration\", Lduration);\n\t\t\t\tcolumnsValues2.put(\"OTC\", SOTC);\n\n\t\t\t\t_db.addRow(columnsValues2, \"illness_history\");\n\t\t\t\t_db.printAllValues(\"illness_history\");\n\t\t\t}\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\n\t\t// //////////////// Medication ////////////////////////////\n\t\tList<Medication> listMeds = _globals.GetConsultation().GetMeds();\n\t\tif (listMeds != null) {\n\t\t\tfor (int i = 0; i < listMeds.size(); i++) {\n\t\t\t\tMedication med1 = listMeds.get(i);\n\n\t\t\t\tString Sdosage = med1.Dosage;\n\t\t\t\tString Sdrug = med1.Drug;\n\t\t\t\tString Sfreq = med1.Freq;\n\t\t\t\tLong LstartDate = med1.StartDate;\n\t\t\t\tLong LendDate = med1.EndDate;\n\t\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\t\tMap<String, Object> columnsValues2 = new HashMap<String, Object>();\n\t\t\t\tcolumnsValues2.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\t\tcolumnsValues2.put(\"profileID\", SprofileId_);\n\t\t\t\tcolumnsValues2.put(\"drug\", Sdrug);\n\t\t\t\tcolumnsValues2.put(\"dosage\", Sdosage);\n\t\t\t\tcolumnsValues2.put(\"frequency\", Sfreq);\n\t\t\t\tcolumnsValues2.put(\"start_date\", LstartDate);\n\t\t\t\tcolumnsValues2.put(\"stop_date\", LendDate);\n\n\t\t\t\t_db.addRow(columnsValues2, \"current_medication\");\n\t\t\t\t_db.printAllValues(\"current_medication\");\n\t\t\t}\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\n\t\t// //////////////// Allergies ////////////////////////////\n\n\t\tList<Allergy> listAllergies = _globals.GetConsultation().GetAlgs();\n\t\tif (listAllergies != null) {\n\t\t\tfor (int i = 0; i < listAllergies.size(); i++) {\n\t\t\t\tAllergy all1 = listAllergies.get(i);\n\n\t\t\t\tString Stype = all1.Type;\n\t\t\t\tString Sreaction = all1.Reaction;\n\t\t\t\tString Sseverity = all1.Severity;\n\t\t\t\tLong LlastDate = all1.LastDate;\n\t\t\t\tString Streatment = all1.Treatment;\n\t\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\t\tMap<String, Object> columnsValues2 = new HashMap<String, Object>();\n\t\t\t\tcolumnsValues2.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\t\tcolumnsValues2.put(\"profileID\", SprofileId_);\n\t\t\t\tcolumnsValues2.put(\"allergyType\", Stype);\n\t\t\t\tcolumnsValues2.put(\"reaction\", Sreaction);\n\t\t\t\tcolumnsValues2.put(\"severity\", Sseverity);\n\t\t\t\tcolumnsValues2.put(\"date_last_occurred\", LlastDate);\n\t\t\t\tcolumnsValues2.put(\"treatment\", Streatment);\n\n\t\t\t\t_db.addRow(columnsValues2, \"allergies\");\n\t\t\t\t_db.printAllValues(\"allergies\");\n\t\t\t}\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\n\t\t// //////////////// Body Systems ////////////////////////////\n\t\tBodySystemReview listRBS = _globals.GetConsultation().GetRBS();\n\t\tif (listRBS != null) {\n\t\t\t//System.out.println(\"RBS \" + listRBS);\n\t\t\tBodySystemReview rbs1 = listRBS;\n\t\t\t\n\t\t\tString SSkin = rbs1.Skin;\n\t\t\tSystem.out.println(\"RBS \" + SSkin);\n\t\t\tString SVision = rbs1.Vision;\n\t\t\tString SHearing = rbs1.Hearing;\n\t\t\tString SRespiratory = rbs1.Respiratory;\n\t\t\tString SCardiovascular = rbs1.Cardiovascular;\n\t\t\tString SGastrointestinal = rbs1.Gastrointestinal;\n\t\t\tString SGynecologic = rbs1.Gynecologic;\n\t\t\tString SMusculoskeletal = rbs1.Musculoskeletal;\n\t\t\tString SVascular = rbs1.Vascular;\n\t\t\tString SNeurologic = rbs1.Neurologic;\n\t\t\tString SHematologic = rbs1.Hematologic;\n\t\t\tString SEndocrine = rbs1.Endocrine;\n\t\t\tString SPsychiatric = rbs1.Psychiatric;\n\t\t\tString SUrological = rbs1.Urological;\n\t\t\tSystem.out.println(\"S_Uro: \" + rbs1.Urological);\n\t\t\tString SOther = rbs1.Other;\n\n\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\tMap<String, Object> columnsValues2 = new HashMap<String, Object>();\n\t\t\tcolumnsValues2.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\tcolumnsValues2.put(\"profileID\", SprofileId_);\n\t\t\tcolumnsValues2.put(\"skin\", SSkin);\n\t\t\tcolumnsValues2.put(\"vision\", SVision);\n\t\t\tcolumnsValues2.put(\"hearing\", SHearing);\n\t\t\tcolumnsValues2.put(\"respiratory\", SRespiratory);\n\t\t\tcolumnsValues2.put(\"cardiovascular\", SCardiovascular);\n\t\t\tcolumnsValues2.put(\"gastrointestinal\", SGastrointestinal);\n\t\t\tcolumnsValues2.put(\"gynecologic\", SGynecologic);\n\t\t\tcolumnsValues2.put(\"musculoskeletal\", SMusculoskeletal);\n\t\t\tcolumnsValues2.put(\"vascular\", SVascular);\n\t\t\tcolumnsValues2.put(\"neurologic\", SNeurologic);\n\t\t\tcolumnsValues2.put(\"hematologic\", SHematologic);\n\t\t\tcolumnsValues2.put(\"endocrine\", SEndocrine);\n\t\t\tcolumnsValues2.put(\"psychiatric\", SPsychiatric);\n\t\t\tcolumnsValues2.put(\"urological\", SUrological);\n\t\t\tcolumnsValues2.put(\"other\", SOther);\n\t\t\t\n\t\t\t_db.addRow(columnsValues2, \"body_systems\");\n\t\t\t_db.printAllValues(\"body_systems\");\n\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\n\t\t// //////////////// Procedure History ////////////////////////////\n\n\t\tList<ProcedureHistory> listProcedures = _globals.GetConsultation()\n\t\t\t\t.GetPHs();\n\t\tif (listProcedures != null) {\n\t\t\tfor (int i = 0; i < listProcedures.size(); i++) {\n\t\t\t\tProcedureHistory ph1 = listProcedures.get(i);\n\n\t\t\t\tString SProcedure = ph1.Procedure;\n\t\t\t\tString SPhysician = ph1.Physician;\n\t\t\t\tString SLocation = ph1.Location;\n\t\t\t\tLong LDate = ph1.Date;\n\t\t\t\tString SResult = ph1.Result;\n\t\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\t\tMap<String, Object> columnsValues2 = new HashMap<String, Object>();\n\t\t\t\tcolumnsValues2.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\t\tcolumnsValues2.put(\"profileID\", SprofileId_);\n\t\t\t\tcolumnsValues2.put(\"procedure_name\", SProcedure);\n\t\t\t\tcolumnsValues2.put(\"physician_name\", SPhysician);\n\t\t\t\tcolumnsValues2.put(\"institution_location\", SLocation);\n\t\t\t\tcolumnsValues2.put(\"date\", LDate);\n\t\t\t\tcolumnsValues2.put(\"result\", SResult);\n\t\t\t\t_db.addRow(columnsValues2, \"procedure_history\");\n\t\t\t\t_db.printAllValues(\"procedure_history\");\n\t\t\t}\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\n\t\t// ////////////////Diagnostic Findings ////////////////////////////\n\n\t\tList<DiagnosticFinding> listDiagnostics = _globals.GetConsultation()\n\t\t\t\t.GetDFs();\n\t\tif (listDiagnostics != null) {\n\t\t\tfor (int i = 0; i < listDiagnostics.size(); i++) {\n\t\t\t\tDiagnosticFinding df1 = listDiagnostics.get(i);\n\n\t\t\t\tString STest = df1.Test;\n\t\t\t\tString SResult = df1.Result;\n\t\t\t\tString SInterpretation = df1.Interpretation;\n\t\t\t\tLong LDate = df1.Date;\n\n\t\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\t\tMap<String, Object> columnsValues2 = new HashMap<String, Object>();\n\t\t\t\tcolumnsValues2.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\t\tcolumnsValues2.put(\"profileID\", SprofileId_);\n\t\t\t\tcolumnsValues2.put(\"test_name\", STest);\n\t\t\t\tcolumnsValues2.put(\"result_finding\", SResult);\n\t\t\t\tcolumnsValues2.put(\"interpretation\", SInterpretation);\n\t\t\t\tcolumnsValues2.put(\"date\", LDate);\n\n\t\t\t\t_db.addRow(columnsValues2, \"diagnosis_finding\");\n\t\t\t\t_db.printAllValues(\"diagnosis_finding\");\n\t\t\t}\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\n\t\t// ////////////////Immunization ////////////////////////////\n\t\tList<Immunization> listImmune = _globals.GetConsultation().GetIVs();\n\t\tif (listImmune != null) {\n\t\t\tfor (int i = 0; i < listImmune.size(); i++) {\n\t\t\t\tImmunization if1 = listImmune.get(i);\n\n\t\t\t\tString SName = if1.Vaccine;\n\t\t\t\tString SType = if1.Type;\n\t\t\t\tString SDose = if1.Dose;\n\t\t\t\tLong LDate = if1.Date;\n\t\t\t\tint IAge = if1.Age;\n\t\t\t\tString SLot = if1.LotNumber;\n\n\t\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\t\tMap<String, Object> columnsValues2 = new HashMap<String, Object>();\n\t\t\t\tcolumnsValues2.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\t\tcolumnsValues2.put(\"profileID\", SprofileId_);\n\t\t\t\tcolumnsValues2.put(\"vaccine_name\", SName);\n\t\t\t\tcolumnsValues2.put(\"vaccine_type\", SType);\n\t\t\t\tcolumnsValues2.put(\"dose\", SDose);\n\t\t\t\tcolumnsValues2.put(\"age\", IAge);\n\t\t\t\tcolumnsValues2.put(\"date_administered\", LDate);\n\t\t\t\tcolumnsValues2.put(\"lot_number\", SLot);\n\n\t\t\t\t_db.addRow(columnsValues2, \"immunization\");\n\t\t\t\t_db.printAllValues(\"immunization\");\n\t\t\t}\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\n\t\t// ////////////////Social History ////////////////////////////\n\t\tSocialHistory listSocialhist = _globals.GetConsultation().GetSH();\n\t\tif (listSocialhist != null) {\n\t\t\tString SmaritalStatus = listSocialhist.MaritalStatus;\n\t\t\tString Soccupation = listSocialhist.Occupation;\n\t\t\tString Scoffe_consumption = listSocialhist.CoffeeConsumption;\n\t\t\tString Stobacco_use = listSocialhist.TobaccoUse;\n\t\t\tString Salcohol_Use = listSocialhist.AlcoholUse;\n\t\t\tString Sdrug_use = listSocialhist.DrugUse;\n\n\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\tMap<String, Object> columnsValuessoc = new HashMap<String, Object>();\n\t\t\tcolumnsValuessoc.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\tcolumnsValuessoc.put(\"profileID\", SprofileId_);\n\t\t\tcolumnsValuessoc.put(\"maritalStatus\", SmaritalStatus);\n\t\t\tcolumnsValuessoc.put(\"occupation\", Soccupation);\n\t\t\tcolumnsValuessoc.put(\"coffe_consumption\", Scoffe_consumption);\n\t\t\tcolumnsValuessoc.put(\"tobacco_use\", Stobacco_use);\n\t\t\tcolumnsValuessoc.put(\"alcohol_use\", Salcohol_Use);\n\t\t\tcolumnsValuessoc.put(\"drug_use\", Sdrug_use);\n\n\t\t\t_db.addRow(columnsValuessoc, \"social_history\");\n\t\t\t_db.printAllValues(\"social_history\");\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\t\t\n\t\t// ////////////////Vital Signs ////////////////////////////\n\t\tVitalSigns listVS = _globals.GetConsultation().GetVS();\n\t\tif (listVS != null) {\n\t\t\t\t\t \n\t\t\t// System.out.println(\"dosage \" + med1.StartDate);\n\t\t\tMap<String, Object> columnsValuessoc = new HashMap<String, Object>();\n\t\t\tcolumnsValuessoc.put(\"MyTimeStamp\", ScurrTimestamp);\n\t\t\tcolumnsValuessoc.put(\"profileID\", SprofileId_);\n\t\t\tcolumnsValuessoc.put(\"pulse\", listVS.Pulse);\n\t\t\tcolumnsValuessoc.put(\"respiratory_rate\", listVS.RespirateRate);\n\t\t\tcolumnsValuessoc.put(\"systolic_blood_pressure\", listVS.SystolicBloodPressure);\n\t\t\tcolumnsValuessoc.put(\"diastolic_blood_pressure\", listVS.DisstolicBloodPressure);\n\t\t\tcolumnsValuessoc.put(\"body_temp\", listVS.BodyTemp);\n\t\t\tcolumnsValuessoc.put(\"height\", listVS.Height);\n\t\t\tcolumnsValuessoc.put(\"weight\", listVS.Weight);\n\t\t\tcolumnsValuessoc.put(\"BMI\", listVS.BMI);\n\t\t\tSystem.out.println(\"Systolic \" + listVS.SystolicBloodPressure + \" \" + listVS.DisstolicBloodPressure + \" \" + listVS.BodyTemp);\n\t\t\t_db.addRow(columnsValuessoc, \"vital_signs\");\n\t\t\t_db.printAllValues(\"vital_signs\");\n\t\t}\n\t\t// //////////////////////////////////////////////////////////\n\t\t_globals.GetConsultation().ClearThemAll();\n\t\tIntent i = new Intent(Page_ConsultationReport.this,\n\t\t\t\tPage_Patient_History.class);\n\t\tstartActivity(i);\n\t}", "void saveExpirableTransactionRecord();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes directory necessary for image uploads.
public static void makeUploadDir() { try { new File("uploads").mkdir(); } catch (Exception e) { e.printStackTrace(); OSPErrors.storeInternalErrors(e, null); } }
[ "@EventListener(ApplicationReadyEvent.class)\n private void createImageDirectory()\n {\n new File(productImageUpload).mkdir();\n }", "public static void init(){\n File directory = new File(IMAGE_FOLDER);\n if(!directory.exists()){\n directory.mkdir();\n }\n }", "private void createFolders() {\n File f = new File(System.getProperty(\"user.dir\") + \"/chatimages/\");\n if (!f.exists()){\n f.mkdir();\n }\n }", "private void createImageFolder()\n {\n File imageFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n mImageFolder = new File(imageFile, \"CapCam\");\n if(!mImageFolder.exists()){\n mImageFolder.mkdirs();\n }\n }", "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void initDirectory(){\n makeDir(DirectoryConfig.getInstance().getDirectory());\n }", "private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }", "private void createMediaDirectory() {\n try {\n File mFilename = new File(RECEIVED_MEDIA_PATH);\n if (!mFilename.exists()) {\n mFilename.mkdirs();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public File createImageFolder() {\n\n File imageFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);\n File mImageFolder = new File(imageFile, \"Camera\");\n\n if (!mImageFolder.exists()) {\n mImageFolder.mkdirs();\n }\n\n return mImageFolder;\n }", "private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}", "private void managePhotoDirs() {\r\n // If tmpPhotoDir already exists check if there are unused\r\n // tmpPhoto of old Days and remove them\r\n File tmpDir = new File(tmpDirPath);\r\n if (tmpDir.exists()) {\r\n File[] oldTmpPhotos = tmpDir.listFiles();\r\n if (oldTmpPhotos != null ) {\r\n for ( File oldPhoto: oldTmpPhotos) {\r\n // Keep the tmp File for Today\r\n if (!oldPhoto.getAbsolutePath().equals(tmpPhotoPath)) {\r\n Log.v(TAG_LOG, \"removed \" + oldPhoto.getAbsolutePath());\r\n oldPhoto.delete();\r\n }\r\n }\r\n }\r\n }\r\n // Create the photoDir and tmpPhotoDir if they doesn't exists\r\n else {\r\n if(!tmpDir.mkdirs()) {\r\n Toast.makeText(\r\n getApplicationContext(),\r\n getString(R.string.PhotoActivity_ExternalStorageError),\r\n Toast.LENGTH_SHORT\r\n ).show();\r\n }\r\n else {\r\n Log.v(TAG_LOG, \"tmpDir successfully created!\");\r\n }\r\n }\r\n }", "private void createFolderForFiles() {\n File f = new File(\"./src/main/resources/DB\");\n if (!f.exists() && !f.isDirectory()) {\n f.mkdir();\n }\n }", "void makeDir(File direc) {\n\t\tif (!direc.exists())\n\t\t\tdirec.mkdir();\n\t}", "public static void CreateFilesAndDirectories()\r\n {\r\n //Check if the directories exists, otherwise create it.\r\n if(!Files.exists(PixelCenter.instance.saveFile.getParent()))\r\n {\r\n try \r\n {\r\n Files.createDirectories(PixelCenter.instance.saveFile.getParent());\r\n } catch (IOException ex) {\r\n PixelCenter.getLogger().info(Level.SEVERE + ex.toString());\r\n }\r\n }\r\n if(!Files.exists(PixelCenter.instance.userDataPath))\r\n {\r\n try \r\n {\r\n Files.createDirectories(PixelCenter.instance.userDataPath);\r\n } catch (IOException ex) {\r\n PixelCenter.getLogger().info(Level.SEVERE + ex.toString());\r\n }\r\n }\r\n if(!Files.exists(PixelCenter.instance.configPath.getParent()))\r\n {\r\n try \r\n {\r\n Files.createDirectories(PixelCenter.instance.configPath.getParent());\r\n } catch (IOException ex) {\r\n PixelCenter.getLogger().info(Level.SEVERE + ex.toString());\r\n }\r\n }\r\n \r\n //Check if the file exists, otherwise create it.\r\n if(!Files.exists(PixelCenter.instance.saveFile))\r\n {\r\n try \r\n {\r\n Files.createFile(PixelCenter.instance.saveFile);\r\n } catch (IOException ex) {\r\n PixelCenter.getLogger().info(Level.SEVERE + ex.toString());\r\n }\r\n }\r\n if(!Files.exists(PixelCenter.instance.defaultNodeFile))\r\n {\r\n try \r\n {\r\n Files.createFile(PixelCenter.instance.defaultNodeFile);\r\n } catch (IOException ex) {\r\n PixelCenter.getLogger().info(Level.SEVERE + ex.toString());\r\n }\r\n }\r\n }", "public void createMediaFileDirectory(MediaFileDirectory directory)\n throws WebloggerException;", "void createDirectory(String path);", "private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}", "public static void initFilePath() {\n\t\tFile dir = new File(mContext.getFilesDir().getPath()+\"/Once/temp_pic/\");\n\t\tif (!dir.exists() || !dir.isDirectory()) {\n\t\t\tdir.mkdirs();\n\t\t}\n\t\t\n\t}", "private void createDirectoryFolders() {\n final Path botDirectoryPath = Paths.get(SPXScriptUtil.getScriptDataPath(getMeta().name()));\n if (Files.exists(botDirectoryPath))\n return;\n\n try {\n Files.createDirectory(botDirectoryPath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add additional dateFrom query parameter
public <TValue> ByProjectKeyByResourceTypeGet addDateFrom(final TValue dateFrom) { return copy().addQueryParam("date.from", dateFrom); }
[ "public <TValue> ByProjectKeyByResourceTypeGet addDateFrom(final Collection<TValue> dateFrom) {\n return copy().addQueryParams(\n dateFrom.stream().map(s -> new ParamEntry<>(\"date.from\", s.toString())).collect(Collectors.toList()));\n }", "public ByProjectKeyByResourceTypeGet addDateFrom(final Function<StringBuilder, StringBuilder> op) {\n return copy().addQueryParam(\"date.from\", op.apply(new StringBuilder()));\n }", "public ByProjectKeyByResourceTypeGet addDateFrom(final Supplier<Object> supplier) {\n return copy().addQueryParam(\"date.from\", supplier.get());\n }", "public <TValue> ByProjectKeyByResourceTypeGet addDateTo(final TValue dateTo) {\n return copy().addQueryParam(\"date.to\", dateTo);\n }", "public ByProjectKeyByResourceTypeGet addDateTo(final Function<StringBuilder, StringBuilder> op) {\n return copy().addQueryParam(\"date.to\", op.apply(new StringBuilder()));\n }", "public ByProjectKeyByResourceTypeGet addDateTo(final Supplier<Object> supplier) {\n return copy().addQueryParam(\"date.to\", supplier.get());\n }", "public void setFromDate(String fromDateString) {\r\n this.fromDateString = fromDateString;\r\n }", "public <TValue> ByProjectKeyByResourceTypeGet addDateTo(final Collection<TValue> dateTo) {\n return copy().addQueryParams(\n dateTo.stream().map(s -> new ParamEntry<>(\"date.to\", s.toString())).collect(Collectors.toList()));\n }", "public void setOfferFromDt(String frm) {\n this.from_dt = frm;\n }", "public void setFROM_DATE(Date FROM_DATE)\r\n {\r\n\tthis.FROM_DATE = FROM_DATE;\r\n }", "public void setDateFrom(java.util.Calendar dateFrom) {\n this.dateFrom = dateFrom;\n }", "public void setRequestDate(Date requestDate) { this.requestDate = requestDate; }", "public String getParameterFromDateTime();", "public void setRequestDate(Date requestDate);", "protected Date getFromDate() {\n\t\treturn from;\n\t}", "public void setValidFrom(Date validFrom);", "public final void setFromDate(java.util.Date fromdate)\r\n\t{\r\n\t\tsetFromDate(getContext(), fromdate);\r\n\t}", "private static String setQuery(String query, String date1, String date2){\n\t\tint position;\n\t\tString include = \"TIMESTAMP between '\" + date1 + \"' and '\" + date2 + \"'\";\n\t\t// Move to correct position\n\t\tif(query.contains(where)){\n\t\t\tposition = query.lastIndexOf(where) + where.length() + 1;\n\t\t\tinclude = String.format(include+\"%s\", \" and \"); \n\t\t}else{\n\t\t\tposition = query.lastIndexOf(from) + from.length() + 1;\n\t\t\twhile(true){\n\t\t\t\tif(query.charAt(position) != ' '){\n\t\t\t\t\tposition++;\n\t\t\t\t}else {\n\t\t\t\t\tposition++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tinclude = String.format(\"%s\"+include, where+\" \");\n\t\t}\n\t\t// Modify query by defined timestamp range\n\t\tString resultQuery = new StringBuilder(query).insert(\n\t\t\t\tposition,include).toString();\n\t\t\t\t\n\t\treturn resultQuery;\n\t}", "private void addDateRangeFiltering(Map params, String dateProperty, Date startDate, Date endDate) {\n\n\t\t// date range filter is enabled\n\t\tif (dateProperty != null) {\n\n\t\t\tparams.put(IReportDAO.DATE_COLUMN, dateProperty);\n\t\t\tString check = (String) params.get(IReportDAO.DATE_COLUMN);\n\t\t\tif (check.equalsIgnoreCase(\"lastModifiedTime\")) {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, null);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, null);\n\t\t\t} else {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, startDate);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, endDate);\n\t\t\t}\n\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Eat event for special food from farming levels that applies boons based on item desc.
@EventHandler() public void onPlayerItemConsume(PlayerItemConsumeEvent event){ List<String> item_desc = event.getItem().getLore(); if (item_desc != null){ Player target = event.getPlayer(); for (String line : item_desc ) { if (line.contains("Hunger")) { int value = Integer.parseInt(line.substring(line.lastIndexOf(" ") + 1)); target.setFoodLevel(target.getFoodLevel() + value ); } else if (line.contains("Saturation")) { int value = Integer.parseInt(line.substring(line.lastIndexOf(" ") + 1)); target.setSaturation(target.getSaturation() + value ); } else if (line.contains("Effect")) { String effect_full = line.substring(line.lastIndexOf(": ") + 2, line.lastIndexOf("- ")); // Get the first number in the desc, which will be the strength of the effect by splitting the string at the number. String[] strength_effect = effect_full.split("(?<=\\D)(?=\\d)"); String effect = strength_effect[0]; String strength = strength_effect[1]; String duration_mins = line.substring(line.lastIndexOf("- ") + 2, line.lastIndexOf(":")); String duration_secs = line.substring(line.lastIndexOf(":") + 1, line.lastIndexOf(" min")); int amplifier = Integer.parseInt(strength.trim()) - 1; // Here we have to convert mins to seconds and also multiply the entire duration by the tick rate, which is default 20. int duration = (Integer.parseInt(duration_mins.trim()) * 60 + Integer.parseInt(duration_secs.trim())) * 20; PotionEffectType pot_effect = PotionEffectType.getByName(effect.trim()); PotionEffect food_effect = new PotionEffect(pot_effect, duration , amplifier); target.addPotionEffect(food_effect); } } } }
[ "private void eatFoodBonus(EntityAnimal entity, ICapabilityHungryAnimal capHungry, ICapabilityTamableAnimal capTaming, ItemStack item) {\n\t\tif (item.isEmpty())\n\t\t\treturn;\n\n\t\tIFoodPreference<ItemStack> pref = FoodPreferences.getInstance().REGISTRY_ITEM.get(entity.getClass());\n\n\t\tdouble nutrient = pref.getNutrient(item);\n\t\tcapHungry.addNutrient(nutrient);\n\n\t\tdouble stomach = pref.getStomach(item);\n\t\tcapHungry.addStomach(stomach);\n\n\t\tif (entity.getGrowingAge() < 0) {\n\t\t\tNBTTagCompound tag = item.getTagCompound();\n\t\t\tif (tag == null || !tag.hasKey(\"isNatural\") || !tag.getBoolean(\"isNatural\")) {\n\t\t\t\tint duration = (int) (nutrient / entity.getEntityAttribute(ModAttributes.hunger_weight_bmr).getAttributeValue());\n\t\t\t\tentity.addPotionEffect(new PotionEffect(ModPotions.potionGrowth, duration, 1));\n\t\t\t}\n\t\t}\n\n\t\tNBTTagCompound tag = item.getTagCompound();\n\t\tif (tag == null || !tag.hasKey(\"isNatural\") || !tag.getBoolean(\"isNatural\")) {\n\t\t\tdouble taming_factor = entity.getEntityAttribute(ModAttributes.taming_factor_food).getAttributeValue();\n\t\t\tcapTaming.addTaming(taming_factor / entity.getEntityAttribute(ModAttributes.hunger_weight_bmr).getAttributeValue() * nutrient);\n\t\t}\n\t}", "public void feedAnimals(){\n\t\tfor(Animal animal : animals)\n\t\t\tif(availableFood >= Math.min(animal.getMealAmount(), (100-animal.getEnergy()))) \n\t\t\t// no penalty if student uses: if(availableFood >= animal.getMealAmount())\n\t\t\t\tavailableFood -= animal.eat();\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Not enough food for your animals! You need to collect more food items.\");\n\t}", "private void controlFallingItem() {\n double decision = Math.random();\n switch (fallingItemProb) {\n case 1:\n if (decision <= 0.004) createFallingItem(\"death\");\n if (decision >= 0.996) createFallingItem(\"speed\");\n break;\n\n case 2:\n if (decision <= 0.005) createFallingItem(\"death\");\n if (decision >= 0.995) createFallingItem(\"speed\");\n break;\n\n case 3:\n if (decision <= 0.006) createFallingItem(\"death\");\n if (decision >= 0.992) createFallingItem(\"speed\");\n break;\n }\n }", "public void eatItem(Command command) {\n if (!command.hasSecondWord()) { // check if there's a second word\n System.out.println(\"Eat what?\");\n return;\n }\n String itemToBeEaten = command.getSecondWord();\n List<Item> playerInventory = player.getPlayerInventory(); // load the inventory of the player\n\n boolean somethingToUse = false;\n int notThisItem = 0;\n int loop;\n\n for (loop = 0; loop < playerInventory.size(); loop++) { // loop through the player inventory\n Item currentItem = playerInventory.get(loop); // set currentitem on the item that is currently in the loop\n if (itemToBeEaten.equals(currentItem.getItemName()) ){ // get the item name, then check if that matches the secondWord\n if (currentItem.getItemCategory().equals(\"food\")){ // check if the item used is an item in the \"food\" category\n if((player.getHealth())<(20)) { // check if the player's health is full\n player.addHealth(currentItem.getHealAmount()); // heal the player\n player.removeItemFromInventory(currentItem); // remove item from inventory\n System.out.println(\"You eat the \" + itemToBeEaten + \". It heals for \" + currentItem.getHealAmount()+\".\");\n } else { // the player's health is full\n System.out.println(\"Your are at full health!\");\n }\n } else { // item is not a food item\n System.out.println(\"You can't eat that item!\");\n }\n } else { // the item did not match the player provided name\n notThisItem++;\n }\n somethingToUse = true;\n }\n\n //errors afvangen\n if (!somethingToUse) { // the item is not found in the player inventory\n System.out.println(\"You can't eat that!\");\n }\n\n if (loop == notThisItem) { // the player has nothing to burn secondWord with\n //ThisItem is the same amount as loop. Then the player put something in that is not in the room\n System.out.println(\"You cannot eat \" + itemToBeEaten + \" because you don't have it in your inventory!\");\n }\n }", "public void eat() {\n\t\tif (super.getHungerLevel() > 0 && super.getToiletDesire() < 90) {\n\t\t\tchooseMeal();\n\t\t\tsuper.eat();\n\t\t}else if (this.toiletDesire >= 90) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"\\nVotre tamagotchi a trop envie d'aller au toilet pour manger il risque de se faire dessus\\n\");\n\t\t} else {\n\t\t\tSystem.out.println(\"\\nVotre tamagotchi n'a pas faim vous ne pouvez pas le nourrir\\n\");\n\t\t}\n\t\t\n\t}", "public void foodPhase(){\n\t\tsupplies.eatFood(people.getLiving());\n\t\tsupplies.forage(people.getLiving());\n\t\tsupplies.getForaged();\n\t}", "@Override\n protected void acquireTargetItem(FarmYardItem item) {\n if (item instanceof Egg) {\n super.acquireTargetItem(item);\n totalEggsCollected++;\n } else if (item instanceof Crop) {\n animalFeed++;\n ((Crop) item).harvestParentPlant();\n\n super.acquireTargetItem(item);\n }\n }", "private void createItemsInBusiness() {\n business.createItem(\"Key to exit\",\"exitKey\", 2, true); // Don't put it anywhere, given out by the friendly NPC!\n business.createItem(\"Coffee pot\", \"coffeepot\", 10, true);\n business.createPositiveDrinkableItem(\"Water Bottle\", \"waterBottle\", 10, true, 300);\n business.createPositiveDrinkableItem(\"Coffee\",\"coffee\", 2, true, 200);\n business.createPositiveDrinkableItem(\"Cola\", \"cola\", 2, true, 200);\n business.createItem(\"Lunch box\", \"lunchBox\", 0, false);\n business.createFlashlightItem(\"Flashlight\", \"flashLight\", 10, true);\n business.createItem(\"Battery\", \"battery\", 5, true);\n business.createItem(\"Mobile Phone\", \"mobilePhone\", 0, false);\n business.createItem(\"Beer Bottle\", \"beerBottle\", 2, true);\n business.getItem(\"Mobile Phone\").setText(\"The battery is dead\");\n business.createItem(\"Key to bathroom\", \"keyToBathroom\", 5, true);\n business.createItem(\"Calender\", \"calender\", 0, false);\n business.createWearableItem(\"Pants\", \"pants\", 0, true, 10);\n //To be deleted, test!\n business.createNegativeDrinkableItem(\"Beer\", \"beer\", 5, true, 300);\n business.createNegativeDrinkableItem(\"Second Beer\", \"beerTwo\", 5, true, 300);\n business.createNegativeDrinkableItem(\"Gasoline\", \"gasoline\", 5, true, 400);\n business.getItem(\"Calender\").setText(\"20.12.2018\");\n business.getItem(\"Lunch box\").setText(\"\");\n business.createItem(\"Broom\", \"broom\", 5, true);\n business.createItem(\"History Book\", \"historyBook\", 10, true);\n }", "private void attemptEat(Entity e, CrewMember.Effect newEffect) {\n\n // progress to next state, there is a 25% chance of not needing food, to give the ship a chance.\n if (MathUtils.random(0f, 0.99f) > foodFactor + 0.25f) {\n changeState(e, newEffect);\n } else {\n crewThatAte++;\n changeState(e, CrewMember.Effect.HEALTHY);\n }\n }", "protected void handleFeeding(AbstractHorse abstractHorse, SavedHorse savedHorse, Player player) {\n // Handle health training only if the event was not cancelled.\n ItemStack foodItem = player.getEquipment().getItemInMainHand();\n int nuggetValue = getNuggetValue(foodItem);\n if (CONFIG.DEBUG_EVENTS && savedHorse.isDebug()) {\n getLogger().info(\"Nugget value: \" + nuggetValue);\n }\n\n if (nuggetValue > 0) {\n // For undead horses, they take the food right away.\n if (Util.isUndeadHorse(abstractHorse)) {\n foodItem.setAmount(foodItem.getAmount() - 1);\n player.getEquipment().setItemInMainHand(foodItem);\n consumeGoldenFood(savedHorse, abstractHorse, nuggetValue, player);\n\n // And let's simulate healing with golden food too.\n // Golden apples (both types) heal (10); carrots heal 4.\n int foodValue = (foodItem.getType() == Material.GOLDEN_APPLE) ? 10 : 4;\n AttributeInstance maxHealth = abstractHorse.getAttribute(Attribute.GENERIC_MAX_HEALTH);\n abstractHorse.setHealth(Math.min(maxHealth.getValue(), abstractHorse.getHealth() + foodValue));\n\n } else {\n // For other types of horses, detect whether the food\n // was consumed by running a task in the next tick.\n Bukkit.getScheduler().runTaskLater(this, new GoldConsumerTask(\n player, abstractHorse, foodItem, nuggetValue, player.getInventory().getHeldItemSlot()), 0);\n }\n } else if (foodItem != null && foodItem.getType() == Material.WATER_BUCKET) {\n // Handle rehydration.\n if (!savedHorse.isFullyHydrated()) {\n player.getEquipment().setItemInMainHand(new ItemStack(Material.BUCKET, 1));\n savedHorse.setHydration(savedHorse.getHydration() + EasyRider.CONFIG.BUCKET_HYDRATION);\n Location loc = abstractHorse.getLocation();\n loc.getWorld().playSound(loc, Sound.ENTITY_GENERIC_DRINK, SoundCategory.NEUTRAL, 2.0f, 1.0f);\n }\n\n if (savedHorse.isFullyHydrated()) {\n player.sendMessage(ChatColor.GOLD + savedHorse.getMessageName() + \" is no longer thirsty.\");\n } else {\n player.sendMessage(ChatColor.GOLD + savedHorse.getMessageName() + \" is still thirsty.\");\n }\n }\n }", "@EventHandler (priority = EventPriority.HIGHEST)\n \tpublic void onCrafting(CraftItemEvent event){\n \t\tif(event.isCancelled())\n \t\t\treturn;\n \n \t\tHumanEntity he = event.getWhoClicked();\n \t\tif((he instanceof Player)){\n \t\t\tPlayer player = (Player) he;\n \t\t\tAlertType type = AlertType.ILLEGAL;\n \t\t\tif(player.getGameMode() == GameMode.CREATIVE){\n \t\t\t\tif(plugin.isBlocked(player, PermissionNodes.MAKE_ANYTHING, player.getWorld())){\n \t\t\t\t\ttype = AlertType.LEGAL;\n \t\t\t\t}\n \t\t\t\tASRegion region = plugin.getRegionManager().getRegion(player.getLocation());\n \t\t\t\tif(region != null){\n \t\t\t\t\tif(!region.getConfig().isBlocked(event.getRecipe().getResult().getType(), ListType.CRAFTING)){\n \t\t\t\t\t\ttype = AlertType.LEGAL;\n \t\t\t\t\t}\n \t\t\t\t}else{\n \t\t\t\t\tif(config.get(player.getWorld()).isBlocked(event.getRecipe().getResult().getType(), ListType.CRAFTING)){\n \t\t\t\t\t\ttype = AlertType.LEGAL;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}else{\n \t\t\t\ttype = AlertType.LEGAL;\n \t\t\t}\n \t\t\tString message = ChatColor.YELLOW + player.getName() + ChatColor.WHITE + (type == AlertType.ILLEGAL ? \" tried to craft an item\" : \" crafted an item\");\n \t\t\tString playerMessage = plugin.getMessage(\"blocked-action.crafting\");\n \t\t\tplugin.getAlerts().alert(message, player, playerMessage, type, AlertTrigger.CRAFTING);\n \t\t\tif(type == AlertType.ILLEGAL){\n \t\t\t\tevent.setCancelled(true);\n \t\t\t}\n \t\t}\n \t}", "public void eatAlive()\n\t{\n\t\tif ((veges.get(0).getDead() )|| (veges.get(1).getDead())) // If either vegetable is dead will no longer eat anything \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (veges.get(0).getCanibalPoints() > veges.get(1).getCanibalPoints())\n\t\t{\n\t\t\tveges.get(1).setEaten(true);\n\t\t\tveges.get(1).setDead(true);\n\t\t\t\n\t\t\tveges.get(0).setFoodLevel(100); // Once it eats a vegetable the canibal will get full water and food & continue to grow\n\t\t\tveges.get(0).setWaterLevel(100);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tveges.get(0).setEaten(true);\n\t\t\tveges.get(0).setDead(true);\n\t\t\t\n\t\t\tveges.get(1).setFoodLevel(100); // Once it eats a vegetable the canibal will get full water and food & continue to grow\n\t\t\tveges.get(1).setWaterLevel(100);\n\t\t}\n\t}", "private void reactToEnemyDefeat(BasicEnemy enemy) {\n // react to character defeating an enemy\n // item rewards\n triggerDropItem(0.5);\n triggerDropPotion(0.1);\n triggerDropTheOneRing(0.002);\n\n // gold & exp rewards\n triggerGainGold(10, 0.2);\n triggerGainExp(5, 1);\n\n // card rewards\n triggerDropCard(0.4); // 0.08 actual, 0.5 for test\n }", "@OnlyIn(Dist.CLIENT)\n @SubscribeEvent(priority = EventPriority.LOWEST)\n public void onBonemeal(BonemealEvent event) {\n if (event.getPlayer() != Minecraft.getInstance().player || event.getPlayer().isCreative()\n || System.currentTimeMillis() < lastReplace + 100) return;\n\n if (event.getPlayer().getHeldItemMainhand() == event.getStack()) {\n Functions.replaceItem(event.getPlayer(), Hand.MAIN_HAND, null);\n } else if (event.getPlayer().getHeldItemOffhand() == event.getStack()) {\n Functions.replaceItem(event.getPlayer(), Hand.OFF_HAND, null);\n }\n\n lastReplace = System.currentTimeMillis();\n }", "private void setBossTraits() {\n\t\tif (name.equals(\"Tristan\")) {\n\t\t\tspecialAttackName = \"Terminating your terminal\";\n\t\t\tspecialAttackDamage = 20;\n\t\t\tweakness = \"Skip class\";\n\t\t\tspecialItem = new Item(Item.HAND,\"Tristans terminal\", \"You didnt practice enough.\", 3, 30, -10, false, 70);\n\t\t} else if (name.equals(\"Ruud\")) {\n\t\t\tspecialAttackName = \"Data loss\";\n\t\t\tspecialAttackDamage = 25;\n\t\t\tweakness = \"Apple talk\";\n\t\t\tspecialItem = new Item(Item.HAND,\"Ruuds Iphone\", \"Feel the power of the crapple!\", 15, 5, 5, false, 60);\n\t\t} else if (name.equals(\"Frank\")) {\n\t\t\tspecialAttackName = \"Hard question\";\n\t\t\tspecialAttackDamage = 30;\n\t\t\tweakness = \"Hard question\";\n\t\t\tspecialItem = new Item(Item.HAND,\"CPO Book\", \"You feel yourself becoming very creative.\", 25, -10, -20, false, 40);\n\t\t} else if (name.equals(\"Evert\")) {\n\t\t\tspecialAttackName = \"More exercises\";\n\t\t\tspecialAttackDamage = 35;\n\t\t\tweakness = \"Throw exception\";\n\t\t\tspecialItem = new Item(Item.HAND,\"Big Java Book\", \"The power is in the reading between the lines.\", 30, -10, -10, false, 50);\n\t\t} else if (name.equals(\"Syntaxis\")) {\n\t\t\tspecialAttackName = \"Monthly bill\";\n\t\t\tspecialAttackDamage = 40;\n\t\t\tweakness = \"None\";\n\t\t\tspecialItem = new Item(Item.HAND,\"Spiekbriefje\", \"Take a peek.\", 5, 10, 0, false, 10);\n\t\t} else if (name.equals(\"Jan\")) {\n\t\t\tspecialAttackName = \"Supply more documents!\";\n\t\t\tspecialAttackDamage = 50;\n\t\t\tweakness = \"None\";\n\t\t\tspecialItem = new Item(Item.HEAD,\"Highscore\", \"Brag to your friends!\", 100, 100, 100, false, 500);\n\t\t} else {\n\t\t\tspecialItem = new Item(Item.HAND,\"Broom\", \"Clean your dorm room!\", 10, -5, -5, false, 20);\n\t\t}\n\t}", "void eat(Position position, Bacteria bacterium, Optional<Position> foodPosition, boolean isSafe, Energy cost);", "public void processFood(){\n\t\tif(ateFood()){\n\t\t\tsnake.addBlock();\n\t\t\tthis.food = new Food(getRandomPosition());\n\t\t}\n\t}", "public void doItemEffect(RobotPeer robot){\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\trobot.updateEnergy(-15);\n\t\t//System.out.println(\"Poison item USED\");\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\t\n\t}", "public void eat(Food food) {\n\t\tfood.getEaten();\n\t\tfoodLevel = food.getFoodValue();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks what Player owns the colony on this Planet and returns the value. If there is no Colony the Planet is owned by Player.WORLD
public Player controlledBy() { if (hasColony()) { return colony.getOwner(); } else { return Player.WORLD; } }
[ "public Colony getColony() {\n return this.colony;\n }", "public Colony getColony(String name) {\n Iterator<Player> pit = getPlayerIterator();\n while (pit.hasNext()) {\n Player p = pit.next();\n Iterator<Settlement> it = p.getSettlementIterator();\n while (it.hasNext()) {\n Colony colony = (Colony) it.next();\n if (colony.getName().equals(name)) {\n return colony;\n }\n }\n }\n return null;\n }", "public int getPlayerIndexOfOwner() {\n\t\tif (this.settlement == null) {\n\t\t\tif (this.city == null) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this.city.getPlayerIndex();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn this.settlement.getPlayerIndex();\n\t\t}\n\t}", "public Colony getColony() {\n\t\treturn colony;\n\t}", "public Colony getColony() {\n return colony;\n }", "public boolean isPlayerOwned(int row, int column) {\n return getCell(row, column).isPlayerOwned();\n }", "@Test\n void SettlersFoundedCityIsOwnedByTheOwnerOfTheSettler() {\n // The settler is owned by player red\n Position position = new Position(4,3);\n game.performUnitActionAt(position);\n assertThat(game.getCityAt(position).getOwner(), is(Player.RED));\n }", "public Player enemyHasAContinent() {\r\n\t\tfor (int i = 0; i < Board.getBoard().getPlayers().size(); i++) {\r\n\t\t\tif (Board.getBoard().getPlayers().get(i).fullContinent() == 0) {\r\n\t\t\t\treturn Board.getBoard().getPlayers().get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Player getOwner() {\n checkRep();\n if(!hasOwner()) {\n throw new RuntimeException(\"Tried calling get owner on a word that isn't owned!\");\n }\n return owner.get();\n }", "public Player getWinningPlayer(){\n if (this.getWinner() == PLAYER_1){\n return state.getPlayer(PLAYER_ONE);\n } else if (this.getWinner() == PLAYER_1){\n return state.getPlayer(PLAYER_TWO);\n } else {\n return null;\n }\n }", "public Winner whoWins(){\r\n\r\n /* transfer the matrix to an array */\r\n Sign[] flatBoard = flattenBoard();\r\n\r\n /* check if someone has won */\r\n if (CompPlayer.compWon(flatBoard))\r\n return Winner.COMPUTER;\r\n else if (CompPlayer.playerWon(flatBoard))\r\n return Winner.PLAYER;\r\n else\r\n return Winner.NON;\r\n }", "public static boolean ownedByCurrentPlayer(Game game, ModelTile t) {\r\n\t\treturn t.getColor().equals(game.getCurrentPlayer().getColor());\r\n\t}", "public Player getOccupant()\n {\n\t\treturn this.occupant;\n }", "public PlayerColor getOwner() {\n return ownership;\n }", "private boolean isTerritoryOwnedBy(Territory t, Player p) {\n return t.getOwner() == p;\n }", "public void checkOwner() {\n try {\n Village v = getVillage();\n if (v == null) {\n return;\n }\n Conquer conquer = ConquerManager.getSingleton().getConquer(v);\n if (v.getTribe().getId() != ownerId || conquer != null) {\n if (conquer != null) {\n ownerId = conquer.getWinner().getId();\n } else {\n ownerId = v.getTribe().getId();\n }\n if (ownerId != 0 && !v.getTribe().equals(Barbarians.getSingleton())) {\n // village was really conquered\n setStatus(FARM_STATUS.CONQUERED);\n }\n }\n } catch (ConcurrentModificationException cme) {\n // ignore and keep status\n }\n }", "@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPlayerProto getOpponent() {\n return opponent_ == null ? POGOProtos.Rpc.CombatProto.CombatPlayerProto.getDefaultInstance() : opponent_;\n }", "boolean setPlayerOwned(int row, int column, boolean force) {\n return getCell(row, column).setPlayerOwned(force);\n }", "public Player getOwner() {\n return owner;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compile a ddlog program stored in a file and generate Rust sources in a directory named _ddlog
public static void compileDDlogProgramToRust( String ddlogFile, CompilationResult result, String... ddlogLibraryPath) { Path path = Paths.get(ddlogFile); Path dir = path.getParent(); Path file = path.getFileName(); List<String> command = new ArrayList<String>(); // Run DDlog compiler command.add("ddlog"); command.add("-i"); String currentDir = System.getProperty("user.dir"); command.add(file.toString()); for (String s: ddlogLibraryPath) { command.add("-L"); if (!s.startsWith("/")) s = currentDir + "/" + s; command.add(s); } runProcess(command, dir != null ? dir.toString() : null, result); }
[ "public static void compileDDlogProgram(\n String ddlogFile,\n String outLibName,\n CompilationResult result,\n String... ddlogLibraryPath) throws DDlogException {\n compileDDlogProgramToRust(ddlogFile, result, ddlogLibraryPath);\n if (!result.isSuccess())\n return;\n\n String os = System.getProperty(\"os.name\").toLowerCase();\n String ddlogInstallationPath = ddlogInstallationPath();\n\n List<String> command = new ArrayList<String>();\n command.add(\"cargo\");\n command.add(\"build\");\n command.add(\"--release\");\n int dot = ddlogFile.lastIndexOf('.');\n String rustDir = ddlogFile;\n if (dot >= 0)\n rustDir = ddlogFile.substring(0, dot);\n rustDir += \"_ddlog\";\n runProcess(command, rustDir, result);\n if (!result.isSuccess())\n return;\n\n // Run C compiler\n command.clear();\n command.add(\"cc\");\n command.add(\"-shared\");\n command.add(\"-fPIC\");\n String javaHome = System.getenv(\"JAVA_HOME\");\n\n String ospath = os;\n if (os.equals(\"mac os x\"))\n ospath = \"darwin\";\n command.add(\"-I\" + javaHome + \"/include\");\n command.add(\"-I\" + javaHome + \"/include/\" + ospath);\n command.add(\"-I\" + rustDir);\n command.add(\"-I\" + ddlogInstallationPath + \"/lib\");\n command.add(ddlogInstallationPath + \"/java/ddlogapi.c\");\n command.add(\"-L\" + rustDir + \"/target/release/\");\n String libRoot = Paths.get(rustDir).getFileName().toString();\n command.add(\"-l\" + libRoot);\n command.add(\"-o\");\n command.add(outLibName);\n runProcess(command, null, result);\n }", "public static void compileDDlogProgram(\n String ddlogFile,\n CompilationResult result,\n String... ddlogLibraryPath) throws DDlogException {\n compileDDlogProgram(ddlogFile, libName(ddlogLibrary), result, ddlogLibraryPath);\n }", "protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }", "public void compile(String fileName)\n {\n Emitter e = new Emitter(fileName);\n e.emit(\".data\");\n e.emit(\"newLine:\\t.asciiz \\\"\\\\n\\\"\");\n for(Assignment s: stringList)\n {\n int value = s.getExpression() == null ? 0 : ((Number)s.getExpression()).getValue();\n e.emit(\"var\" + s.getVariable() + \":\\t.word\\t\" + value);\n }\n\n e.emit(\".text\");\n e.emit(\".globl main\");\n e.emit(\"main:\");\n\n stmt.compile(e);\n\n e.emit(\"li $v0 10\");\n e.emit(\"syscall\");\n for(ProcedureDeclaration d : dec)\n d.compile(e);\n }", "public void run() {\n\t\t\n\t\ttry {\n\t\t\t// Open output file for writing\n\t\t\tFile outputFile = new File(Compiler.cmdLineArgValue(\"--dst-file-name\"));\n\t\t\tBufferedWriter output = new BufferedWriter(new FileWriter(outputFile));\n\n\t\t\t// Generate BOOTSTRAP code and write it to file\n\t\t\tfor (String instruction : generateBootstrapRoutine())\n\t\t\t\toutput.write(instruction + \"\\n\");\n\n\t\t\t// Generate STANDARD LIBRARY and write it to file\n\t\t\tfor (String instruction : generateStandardLibrary())\n\t\t\t\toutput.write(instruction + \"\\n\");\n\n\t\t\t// Generate PROLOGUE and EPILOGUE for each function and write it to\n\t\t\t// file\n\t\t\tfor (String instruction : generateCode())\n\t\t\t\toutput.write(instruction + \"\\n\");\n\n\t\t\toutput.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }", "public void generateCDAFiles() throws Exception {\n\n String stopwatchStart = new SimpleDateFormat(\"yyyy-MM-dd-HH.mm.ss\").format(new Date());\n\n // file/directory locations for the app\n// String labid_file = getPropValues(\"labid-file\") + ts;\n// String comb_dir = getPropValues(\"combined-xml-dir\") + ts;\n// String mal_dir = getPropValues(\"malformed-xml-dir\") + ts;\n// String cda_dir = getPropValues(\"cda-dir\") + ts;\n\n String labid_file = getPropValues(\"labid-file\");\n String haidisplay_file = getPropValues(\"haidisplay-file\");\n String comb_dir = getPropValues(\"combined-xml-dir\");\n String mal_dir = getPropValues(\"malformed-xml-dir\");\n String cda_dir = getPropValues(\"cda-dir\"); //+ \"/\" + stopwatchStart;\n\n // hai-display must be in the same directory as the final CDAs for them to be displayed properly\n File sourceHai = new File(haidisplay_file);\n File targetHai = new File(cda_dir + \"/hai-display.xsl\");\n FileUtils.copyFile(sourceHai, targetHai);\n\n // create new XML Builder\n XMLBuilder xmlBuilder = new XMLBuilder();\n\n // creates ADT + ORU XML files in src/main/resources/ directory\n xmlBuilder.process();\n\n // get list of combined XML (ADT) files\n File dir = new File(comb_dir);\n File[] files = dir.listFiles();\n\n if (files != null) {\n for (File file : files) {\n // Transform XML files using an XSL file to CDA-like files\n\n //src/main/resources/combinedXML/[id]-source.xml\n String relPath = file.getPath();\n //[id]-source.xml\n String filename = file.getName();\n //2.16.840.1.114222.4.1.646522\n String id = filename.substring(0, filename.length() - 11);\n // System.out.println(relPath);\n // System.out.println(filename);\n // System.out.println(id);\n\n\n String inputXSL = labid_file;\n String inputXML = relPath;\n String outputLabId = mal_dir + \"/\" + id + \".xml\";\n Transform transform = new Transform();\n\n /**/\n\n /**\n String inputXSL = \"src/main/resources/labid.xsl\";\n String inputXML = \"src/main/resources/combinedXML/2.16.840.1.114222.4.1.646516-source.xml\";\n String outputLabId = \"src/main/resources/malformedCDA/2.16.840.1.114222.4.1.646516.xml\";\n Transform transform = new Transform();\n\n /**/\n\n try {\n transform.transformXML(inputXSL, inputXML, outputLabId);\n } catch (Exception e) {\n System.out.println(\"well... that didn't work...\");\n e.printStackTrace();\n }\n /**/\n\n }\n }\n\n\n //TODO: clean up Silas's CDA-like file\n // get list of malformed CDA files\n File mcdaDir = new File(mal_dir);\n File[] mcdafiles = mcdaDir.listFiles();\n\n int count = 0;\n int badCount = 0;\n List<String> badList = new ArrayList<String>();\n\n if (files != null) {\n for (File file : mcdafiles) {\n\n //src/main/resources/malformedCDA/[id].xml\n String relPath = file.getPath();\n //[id].xml\n String filename = file.getName();\n //2.16.840.1.114222.4.1.646522\n String id = filename.substring(0, filename.length() - 4);\n System.out.println(relPath);\n System.out.println(filename);\n System.out.println(id);\n\n FileReader reader = null;\n String content = \"\";\n try {\n reader = new FileReader(file);\n char[] chars = new char[(int) file.length()];\n try {\n reader.read(chars);\n } catch (IOException e) {\n e.printStackTrace();\n }\n content = new String(chars);\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n // System.out.println(content);\n\n\n int cdaRootIndex = content.indexOf(\"<ClinicalDocument\");\n if (cdaRootIndex < 1) {\n System.out.println(\"no clinical document tag found in malformed CDA with id: \" + id);\n badCount++;\n badList.add(id);\n continue;\n } else {\n String clinicalDoc = content.substring(cdaRootIndex);\n\n\n //System.out.println(clinicalDoc);\n String cleanTop = replace(clinicalDoc, \"<ClinicalDocument\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"hai-display.xsl\\\"?>\\n<ClinicalDocument\");\n String cleanCDA = replace(cleanTop, \"</root>\", \"\");\n //System.out.println(cleanCDA);\n String now = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n try {\n FileUtils.writeStringToFile(new File(cda_dir + \"/\" + id + \"--\" + now + \".xml\"), cleanCDA);\n System.out.println(\"wrote to \" + cda_dir + \"/\" + id + \"--\" + now + \".xml\");\n count++;\n } catch (IOException e) {\n System.out.println(\"problem writing to \" + cda_dir + \"/\" + id + \"--\" + now + \".xml\");\n e.printStackTrace();\n }\n }\n\n }\n\n System.out.println(\"# CDA Files created: \" + count);\n System.out.println(\"# bad malformed CDAs: \" + badCount);\n for(String id: badList) {\n System.out.println(\"bad id:\" + id);\n }\n }\n }", "void decompile() {\r\n File srcDir = new File(BASEDIR, \"src\");\r\n if(srcDir.exists()) {\r\n errMsg(\"'src' already exists, will not decompile.\");\r\n return;\r\n }\r\n \r\n File innJar = new File(BASEDIR, \"tmp\" + S_ + \"inn.jar\");\r\n if(!innJar.isFile()) {\r\n errMsg(\"Please run setup first!\");\r\n }\r\n \r\n int ret = command(\"java\", \"-jar tmp\" + S_ + \"fix.jar -bto=0 -log=ERROR tmp\" + S_ + \"inn.jar tmp\" + S_ + \"dec\");\r\n assert(ret != ERROR_VALUE);\r\n \r\n File decDir = new File(BASEDIR, \"dec\");\r\n mkdir(decDir);\r\n \r\n /* FIXME: add zip extractor */\r\n /* FIXME: copy files from dec to src */\r\n }", "public void transformWithMDRnewJVM(IFile anIFile) throws java.io.IOException\n\t{\n\t\tjava.lang.Runtime.getRuntime().exec(\"C:\\\\j2sdk1.4.1_01\\\\bin\\\\javac -help\");\n\t\tSystem.out.println(\"exec launched\\n\");\n\t}", "public void compile(MindFile f) {\n \t\t\n \t}", "private void createExecutableFile() throws IOException {\r\n //if (report.getErrorList() == null)\r\n //{\r\n System.out.println(\"Currently generating the executable file.....\");\r\n executableFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful, then you can start to write in the lst file\r\n executableFile.delete();\r\n if (executableFile.createNewFile()) {\r\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sourceName + \".asm\"), \"utf-8\")); //create an object to write into the lst file\r\n\r\n String [] hex = generate.split(\" \");\r\n\r\n for (int index = 0; index < hex.length; index++) {\r\n String hex1 = hex[index].trim();\r\n System.out.println(hex1);\r\n\r\n int i = Integer.parseInt(hex1, 16);\r\n String bin = Integer.toBinaryString(i);\r\n System.out.println(bin);\r\n\r\n writer.write(bin); // once the instruction is converted to binary it is written into the exe file\r\n }\r\n\r\n writer.close();\r\n\r\n }\r\n }", "public void callDebug() throws IOException, FileNotFoundException, DebuggerCompilationException{\n //try{\n String debugArgs[] = new String[4];\n debugArgs[0] = ocamlDebugC;\n debugArgs[1] = outFile;\n debugArgs[2] = \"-s\";\n debugArgs[3] = \"localhost\";\n try{\n debugger = runtime.exec(debugArgs);\n }catch(IOException e){\n //e.printStackTrace();\n throw new DebuggerCompilationException();\n }\n debugWriter = new OutputStreamWriter(debugger.getOutputStream());\n\n InputStream debuggerInputStream = debugger.getInputStream();\n InputStream debuggerErrorStream = debugger.getErrorStream();\n debugReader = new DebugListener(debuggerInputStream, this.observers, handle);\n debugReader.start();\n debugErrorReader = new DebugListener(debuggerErrorStream, this.observers, handle);\n debugErrorReader.start();\n\n //}catch(IOException e){\n // throw new FileNotFoundException();\n //}\n }", "void compiledAnotherFile();", "public static void main(String[] args) {\n File file = new File(SOURCE);\n System.out.println(String.format(\"Compiling file: %s, Mode: %s, Instances: %s\", file.getName(), BUILD_TYPE\n .string(), SPROCKELL_INSTANCES));\n new SprockelBuilder().build(file, BUILD_TYPE, SPROCKELL_INSTANCES);\n System.out.println(\"Done.\");\n }", "String compile() throws IOException {\n\t\tString line = \"\";\n\t\tString[] command = {\n\t\t\t\tjavacPath,\n\t\t\t\tsavedFilePath\n\t\t};\n\t\tProcessBuilder pb=new ProcessBuilder(command);\n\t\tpb.redirectErrorStream(true);\n\t\tProcess process=pb.start();\n\t\tBufferedReader inStreamReader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(process.getInputStream())); \n\n\t\tline = inStreamReader.readLine();\n\t\tif(line == null) {\n\t\t\tline = \"\";\n\t\t\tcompiled = true;\n\t\t}\n\t\treturn line;\n\t}", "private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] files = {f};\n Iterable<? extends JavaFileObject> compilationUnits =\n fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));\n compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();\n fileManager.close();\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/MC/MCDwarf.cpp\", line = 911,\n old_source = \"${LLVM_SRC}/llvm/lib/MC/MCDwarf.cpp\", old_line = 908,\n FQN=\"llvm::MCGenDwarfLabelEntry::Make\", NM=\"_ZN4llvm20MCGenDwarfLabelEntry4MakeEPNS_8MCSymbolEPNS_10MCStreamerERNS_9SourceMgrERNS_5SMLocE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.adtsupport/llvmToClangType ${LLVM_SRC}/llvm/lib/MC/MCDwarf.cpp -nm=_ZN4llvm20MCGenDwarfLabelEntry4MakeEPNS_8MCSymbolEPNS_10MCStreamerERNS_9SourceMgrERNS_5SMLocE\")\n //</editor-fold>\n public static void Make(MCSymbol /*P*/ Symbol, MCStreamer /*P*/ MCOS, \n final SourceMgr /*&*/ SrcMgr, final SMLoc /*&*/ Loc) {\n // We won't create dwarf labels for temporary symbols.\n if (Symbol.isTemporary()) {\n return;\n }\n final MCContext /*&*/ context = MCOS.getContext();\n // We won't create dwarf labels for symbols in sections that we are not\n // generating debug info for.\n if (!(context.getGenDwarfSectionSyms().count(MCOS.getCurrentSection().first) != 0)) {\n return;\n }\n \n // The dwarf label's name does not have the symbol name's leading\n // underbar if any.\n StringRef Name = Symbol.getName();\n if (Name.startswith(/*STRINGREF_STR*/\"_\")) {\n Name.$assignMove(Name.substr(1, Name.size() - 1));\n }\n \n // Get the dwarf file number to be used for the dwarf label.\n /*uint*/int FileNumber = context.getGenDwarfFileNumber();\n \n // Finding the line number is the expensive part which is why we just don't\n // pass it in as for some symbols we won't create a dwarf label.\n /*uint*/int CurBuffer = SrcMgr.FindBufferContainingLoc(new SMLoc(Loc));\n /*uint*/int LineNumber = SrcMgr.FindLineNumber(new SMLoc(Loc), CurBuffer);\n \n // We create a temporary symbol for use for the AT_high_pc and AT_low_pc\n // values so that they don't have things like an ARM thumb bit from the\n // original symbol. So when used they won't get a low bit set after\n // relocation.\n MCSymbol /*P*/ Label = context.createTempSymbol();\n MCOS.EmitLabel(Label);\n \n // Create and entry for the info and add it to the other entries.\n MCOS.getContext().addMCGenDwarfLabelEntry(new MCGenDwarfLabelEntry(new StringRef(Name), FileNumber, LineNumber, Label));\n }", "public static void main(String[] args) {\n\r\n String source = \"src/io/gadget/input.txt\";\r\n createReport(source);\r\n createReport2(source);\r\n }", "public final void compileTo(String goloSourceFilename, InputStream sourceCodeInputStream, File targetFolder) throws GoloCompilationException, IOException {\n if (targetFolder.isFile()) {\n throw new IllegalArgumentException(targetFolder + \" already exists and is a file.\");\n }\n List<CodeGenerationResult> results = compile(goloSourceFilename, sourceCodeInputStream);\n for (CodeGenerationResult result : results) {\n File outputFolder = new File(targetFolder, result.getPackageAndClass().packageName().replaceAll(\"\\\\.\", \"/\"));\n if (!outputFolder.exists() && !outputFolder.mkdirs()) {\n throw new IOException(\"mkdir() failed on \" + outputFolder);\n }\n File outputFile = new File(outputFolder, result.getPackageAndClass().className() + \".class\");\n try (FileOutputStream out = new FileOutputStream(outputFile)) {\n out.write(result.getBytecode());\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the fireBase Analytics Properties
public void setFireBaseProperties() { mFireBaseAnalytics.setAnalyticsCollectionEnabled(true); mFireBaseAnalytics.setMinimumSessionDuration(MIN_SESSION_DURATION); mFireBaseAnalytics.setSessionTimeoutDuration(SESSION_TIME_OUT_DURATION); }
[ "private void initializeGa() {\n\n // Set dryRun flag.\n GoogleAnalytics.getInstance(this).setDryRun(GA_IS_DRY_RUN);\n\n // Set the log level to verbose if dryRun.\n // DEFAULT is set to DRY RUN (only logging will happen)\n GoogleAnalytics.getInstance(this).getLogger()\n .setLogLevel(GA_IS_DRY_RUN || BuildConfig.DEBUG ?\n Logger.LogLevel.VERBOSE : Logger.LogLevel.WARNING);\n\n // Set the opt out flag when user updates a tracking preference.\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n sp.registerOnSharedPreferenceChangeListener(\n new SharedPreferences.OnSharedPreferenceChangeListener() {\n @Override\n public void onSharedPreferenceChanged(SharedPreferences pref, String key) {\n if (key.equals(TRACKING_PREF_KEY)) {\n GoogleAnalytics.getInstance(getApplicationContext()).setAppOptOut(\n pref.getBoolean(key, false));\n }\n }\n });\n }", "public AnalyticsMediator() {\n firebaseAnalyticsTracker = FirebaseAnalyticsMonitor.getInstance();\n faceBookAnalyticsTracker = FaceBookAnalyticsMonitor.getInstance();\n flurryAnalyticsTracker = FlurryAnalyticsMonitor.getInstance();\n// huaweiAnalyticsTracker = HuaweiAnalyticsTracker.getInstance();\n }", "private void initDataProperties() {\n dataProperties.setUrl(properties.getProperty(datastore + \"url\"));\n dataProperties.setDbName(properties.getProperty(datastore + \"dbName\"));\n dataProperties.setUserName(properties.getProperty(datastore + \"userName\"));\n dataProperties.setPassword(properties.getProperty(datastore + \"password\"));\n dataProperties.setRetention(properties.getProperty(datastore + \"retention\"));\n dataProperties.setBatchNum(Integer.parseInt(properties.getProperty(datastore + \"batchNum\")));\n dataProperties.setTopicName(properties.getProperty(datastore + \"topicName\"));\n }", "public void sendFirebaseAnalytics(){\n //send firebase analytics\n Bundle bundle = new Bundle();\n bundle.putString(FirebaseAnalytics.Param.ITEM_ID, \"homepage\");\n bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, \"user home\");\n bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, \"reddit user home\");\n mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);\n }", "public traceProperties() { \n //setProperty(\"WorkingDirectory\",\"null\");\n //setProperty(\"situated\",\"false\"); \n \n }", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testSetDatabaseProperty_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\n\t\tfixture.setDatabaseProperty(aArguments);\n\n\t\t// add additional test code here\n\t}", "public void setGoogleAnalyticsQuery(GaQuery googleAnalyticsQuery) {\n this.googleAnalyticsQuery = googleAnalyticsQuery;\n }", "private void setDataBase(Settings set) {\n URL_BASE_POSTGRES = set.getValue(\"jdbc.urlBasePostgres\");\n URL_BASE_VACANCY = set.getValue(\"jdbc.urlBaseVacancy\");\n USER_NAME = set.getValue(\"jdbc.userName\");\n PASSWORD = set.getValue(\"jdbc.password\");\n }", "private static void populatePropFields() {\n prometheusDNS = prop.get(\"prometheus.dns\").toString();\n prometheusPort = prop.get(\"prometheus.port\").toString();\n prometheusRegName = prop.get(\"prometheus.registry.name\").toString();\n }", "@Override\n public void afterPropertiesSet() {\n initialize();\n }", "Update withProperties(TimeSeriesDatabaseConnectionProperties properties);", "private void properties(Document track) {\r\n Bundle b = new Bundle();\r\n b.putSerializable(BundleConstant.KEY_SESSION, session);\r\n b.putString(BundleConstant.KEY_CMISOBJECT_ID, (String) track.getId());\r\n Intent i = new Intent(this, PropertyActivity.class);\r\n i.putExtra(BundleConstant.KEY_EXTRAS, b);\r\n startActivity(i);\r\n }", "TimeSeriesDatabaseConnectionProperties properties();", "@ApiModelProperty(value = \"Google Analytics can be used with Connect to provide an additional layer of transparency of end user engagement\")\n \n public String getAnalytics() {\n return analytics;\n }", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testSetDatabaseProperty_3()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\n\t\tfixture.setDatabaseProperty(aArguments);\n\n\t\t// add additional test code here\n\t}", "@AfterSuite(alwaysRun = true)\n public static void createAllureProperties() {\n AllurePropertiesUtil.create();\n }", "public static void setSoProps() {\n PolicyEngine.manager.setEnvironmentProperty(\"so.url\", \"http://localhost:6667\");\n PolicyEngine.manager.setEnvironmentProperty(\"so.username\", \"SO\");\n PolicyEngine.manager.setEnvironmentProperty(\"so.password\", \"SO\");\n }", "public void setProperties(final Map<String, EventProperty> properties) {\n mStorage.setProperties(properties);\n }", "private void setAttributes() {\n mAuth = ServerData.getInstance().getMAuth();\n user = ServerData.getInstance().getUser();\n sharedpreferences = getSharedPreferences(GOOGLE_CALENDAR_SHARED_PREFERENCES, Context.MODE_PRIVATE);\n walkingSharedPreferences = getSharedPreferences(ACTUAL_WALK, Context.MODE_PRIVATE);\n\n notificationId = 0;\n requestCode = 0;\n fragmentManager = getSupportFragmentManager();\n\n context = this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Should we index this inputRow? Decision is based on our interval and shardSpec.
private boolean shouldIndex(InputRow inputRow) { if(!getImplicitLockInterval().get().contains(inputRow.getTimestampFromEpoch())) { return false; } final Map<String, String> eventDimensions = Maps.newHashMapWithExpectedSize(inputRow.getDimensions().size()); for(final String dim : inputRow.getDimensions()) { final List<String> dimValues = inputRow.getDimension(dim); if(dimValues.size() == 1) { eventDimensions.put(dim, Iterables.getOnlyElement(dimValues)); } } return schema.getShardSpec().isInChunk(eventDimensions); }
[ "@Override\n public boolean isUsableIndex(int idx) {\n if ( idx < 0 )\n return false;\n if ( idx >= numDataCols )\n return false;\n return Boolean.TRUE.equals(standardized[idx]);\n }", "@Override\n\tpublic boolean isUsableIndex(int idx) {\n\t\tif ( idx < 0 )\n\t\t\treturn false;\n\t\tif ( idx >= numDataCols )\n\t\t\treturn false;\n\t\treturn Boolean.TRUE.equals(standardized[idx]);\n\t}", "boolean isNeedSharding();", "boolean isIndexationValid();", "private boolean isIncrementalPhase(RowData rowData) {\n return rowData.getBoolean(incrementalFieldIndex);\n }", "public abstract boolean isIndexable();", "public boolean shouldIndex(IDocument document);", "private boolean needToOptimize() {\n int optimizeFrequency = queryConfiguration.indexerOptimizeFrequency;\n if (optimizeFrequency == 0) {\n return false;\n }\n if (optimizeFrequency == 1) {\n return true;\n }\n\n // use a random int to determine if we may execute\n int randomInt = 1 + (int) (Math.random() * optimizeFrequency);\n if (randomInt == 1) {\n return true;\n } else {\n return false;\n }\n }", "boolean hasRowConditionExpectation();", "boolean isIndexingSupport();", "public boolean isIndexed()\n {\n //only when criterion is indexed but not required it will be considered as indexed\n return (_attrDef.isIndexed() && !_attrDef.isMandatory());\n }", "private void maybeIndexPrimaryKeyColumns(Row row)\n {\n long timestamp = row.primaryKeyLivenessInfo().timestamp();\n int ttl = row.primaryKeyLivenessInfo().ttl();\n\n for (Cell cell : row)\n {\n long cellTimestamp = cell.livenessInfo().timestamp();\n if (cell.isLive(nowInSec))\n {\n if (cellTimestamp > timestamp)\n {\n timestamp = cellTimestamp;\n ttl = cell.livenessInfo().ttl();\n }\n }\n }\n\n indexer.maybeIndex(row.clustering(), timestamp, ttl, row.deletion());\n }", "public boolean index(FeatureRow row) {\n TableIndex tableIndex = getTableIndex();\n if (tableIndex == null) {\n throw new GeoPackageException(\n \"GeoPackage table is not indexed. GeoPackage: \"\n + getGeoPackage().getName() + \", Table: \"\n + getTableName());\n }\n boolean indexed = index(tableIndex, row.getId(), row.getGeometry());\n\n // Update the last indexed time\n updateLastIndexed();\n\n return indexed;\n }", "boolean index(final Indexable indexable) throws IndexingException;", "public boolean isSharding() {\n return sharding;\n }", "boolean getIsIndexOnValues();", "boolean hasTrainIdx();", "boolean isIndex();", "private boolean isRowCorrect(int rowIdx) {\n return domainFactory.createDomain(result[rowIdx], columnsCount, rowConstrains[rowIdx].constrains) == null;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the cartDetail to the list of cart details.
public void addCartDetail(CartDetail cartDetail){ cartDetails.add(cartDetail); cartDetail.setCart(this); }
[ "public void setCartDetails(List<CartDetail> cartDetails) {\n this.cartDetails = cartDetails;\n }", "public void addCarToCart(CarDetailInCartDTO dto){\n if (this.cars == null) {\n this.cars = new HashMap<>();\n }\n \n int key = dto.getPrice();\n if (this.cars.containsKey(key)) {\n int oldQuantity = this.cars.get(key).getAmountAdd();\n int quantityAdd = dto.getAmountAdd();\n this.cars.get(key).setAmountAdd(oldQuantity + quantityAdd);\n this.cars.get(key).setRentalDate(dto.getRentalDate());\n this.cars.get(key).setReturnDate(dto.getReturnDate());\n } else {\n this.cars.put(key, dto);\n }\n }", "public void addCart(Cart cart){\n this.carts.add(cart);\n // cart.setCustomer(this);\n }", "public List<CartDetail> getCartDetails() {\n return cartDetails;\n }", "@Override\n\tpublic Cart addCart(Cart cart) {\n\t\tlogger.info(\"Adding cart in the database\");\n\t\treturn cartRepo.save(cart);\n }", "public final void setCart(final List<Item> cartNew) {\n this.cart = cartNew;\n }", "public void setCartInfo(ArrayList<String> cartInfo)\n {\n this.cartInfo = cartInfo;\n }", "CartItems addCartItemsDetails(CartItems transientPOJO);", "public void addProductInCart(String productInfo)\n {\n cartInfo.add(productInfo);\n }", "void addProductToCartList(Product product);", "void addCartItem(CartItem cartItem);", "@GetMapping(value = { \"\", \"/cart\" })\n\tpublic @NotNull ShoppingCartDto getShoppingCartDetail() {\n\t\tLOGGER.info(\"ShoppingCartRestController.getCartDetail() invocation started\");\n\t\treturn theShoppingCartService.getItemDetailFromCart();\n\t}", "public String getCartDetails() {\n String list = \"\";\n String previousItemId = \"\";\n for (Product p : this.cardProducts\n ) {\n if (p.getProductId().equals(previousItemId)) {\n } else {\n list += \"Product id: \" + p.getProductId() + \", Items: \" + numberOfItemsOfAProduct(p) + \"\\n\";\n previousItemId = p.getProductId();\n }\n }\n return list + \"Total price: \" + this.totalPrice;\n }", "public void addToCart(int id) {\n // no duplicates\n removeFromCart(id);\n cartIDs.add(0, id);\n }", "public void setCartId(int cartId) {\n this.cartId = cartId;\n }", "public void addProductToCartByPID(Product product) {\n\r\n\t\tcart.add(product);\r\n\t\t\r\n\t\tsetCart(cart);\r\n\t\t//System.out.println(\"\"+cart);\r\n\t\t//System.out.println(\"addtocart\" + product);\r\n\t\t\r\n\t\t//System.out.println(\"get cart\" + cart);\r\n\t\t//return cart;\r\n\t\t\r\n\t\r\n}", "@ApiModelProperty(required = true, value = \"The items to add to this sessions. - If cart item flattening is disabled: **Do not exceed 1000 items** (regardless of their `quantity`) per request. - If cart item flattening is enabled: **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. \")\n\n public List<CartItem> getCartItems() {\n return cartItems;\n }", "@Override\r\n public boolean addCart(Cart cart) {\r\n em.persist(cart);\r\n return true;\r\n }", "List<CartModificationData> addDealToCart(AddDealToCartData addDealToCartData);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Augment the path from a to b (neither should be in the matching)
public void AugmentPath(Node a, Node b, Graph graph) { if (IsNodeMatched(a, matching) || IsNodeMatched(b, matching)) { System.out.println("ERROR - Attempting to augment between two nodes and one is already matched..."); return; } // Now we can do the augmenting ... if (!a.GetIsXNode()) { System.out.println("ERROR!! Augment path called on a non-X node..."); return; } // Simple check, is edge (x,y) in the tight edges but not in the matching? Edge e = graph.getEdge(a.GetIndex(), b.GetIndex()); if (tightEdges.contains(e)) { if (!matching.contains(e)) { AddMatchingEdge(e); return; } } List<Node> visited = new ArrayList<Node>(); if (!FindPath(a, b, graph, visited)) { System.out.println("ERROR!! Not able to find an augmenting path..."); return; } // Now, loop through the list and augment the edges between matched and unmatched for (int i = 1; i < visited.size(); ++i) { Edge ed = graph.getEdge(visited.get(i - 1), visited.get(i)); // if i is odd, edge is unmatched and should become matched if (i % 2 == 0) { // i is even RemoveMatchingEdge(ed); } else { AddMatchingEdge(ed); } } }
[ "public static void shortestPath(Person a, Person b){\r\n\t\t/*Nishanth*/\r\n\t}", "public void findAugmentingPath(){\n\t\tresetResidualGraph();\n\t\tVertex v1;\n\t\tVertex v2;\n\t\tEdge e;\n\t\tHashtable<Vertex,Vertex> prevNode = new Hashtable<Vertex,Vertex>();\n\t\tHashtable<Vertex,Edge> vertexEdge = new Hashtable<Vertex,Edge>();\n\t\tLinkedList<Vertex> queue = new LinkedList<Vertex>();\n\t\tboolean pathFound = false;\n\t\t\n\t\tv1 = (Vertex) Gf.vertexList.getFirst();\n\t\tqueue.addFirst(v1); //add to front of queue\n\t\tv1.setData(true); //mark visited\n\t\t\n\t\twhile(!queue.isEmpty() && !pathFound){ //while queue is not empty and while no path to sink\n\t\t\tv1 = queue.remove();\n\t\t\tfor(int i = 0; i < v1.incidentEdgeList.size(); i++){\n\t\t\t\te = (Edge) v1.incidentEdgeList.get(i);\n\t\t\t\tv2 = Gf.opposite(v1, e);\n\t\t\t\t\n\t\t\t\tif(v2.getData().equals(true) || (Double) e.getData() == 0.0 || (Double) e.getData() < delta){\n\t\t\t\t\t//node visited or residual capacity 0 or capacity less than delta: don't select node\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//node selected\n\t\t\t\t\tqueue.addLast(v2);\n\t\t\t\t\tv2.setData(true); //mark visited\n\t\t\t\t\tprevNode.put(v2, v1); // mark its previous node\n\t\t\t\t\tvertexEdge.put(v2, e); //mark edge leading to previous node\n\t\t\t\t\tif (v2.getName().equals(\"t\")) {\n\t\t\t\t\t\t//if t reached,exit and find augmenting path;\n\t\t\t\t\t\tpathFound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(queue.isEmpty()){\n\t\t\t//no augmenting path\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t//retrace augmenting path\n\t\t\tv2 = queue.getLast();\n\t\t\twhile(!v2.getName().equals(\"s\")){\n\t\t\t\tpath.addFirst(v2); //add nodes to beginning of list\n\t\t\t\tv1 = prevNode.get(v2); //find previous node\n\t\t\t\tpathEdges.addFirst(vertexEdge.get(v2)); //find edge leading to previous node\n\t\t\t\tv2 = v1;\n\t\t\t\tif(v2.getName().equals(\"s\")){\n\t\t\t\t\tpath.addFirst(v2); //add s to augmenting path\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}", "public PathAnchor andThen(PathAnchor other) {\n if (this.equals(other)) {\n return this;\n }\n return new Chain(this, other);\n }", "public ArrayList<Point> joinPath(ArrayList<Point> path1, ArrayList<Point> path2) {\r\n\t\tif (!path2.get(path2.size() - 1).theSame(path1.get(0))) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tfor (int i = 1; i < path1.size(); i++) {\r\n\t\t\tpath2.add(path1.get(i));\r\n\t\t}\r\n\r\n\t\treturn simplify(path2);\r\n\t}", "private void compute(LatLng a, LatLng b) {\n mFromIdx = 0;\n mToIdx = mPath.size();\n //int distancePath = (int) LatLngUtils.calculatePathDistance(mPath, mFromIdx, mToIdx);\n int distanceA = (int) LatLngUtils.distanceBetween(a, mPath.get(mFromIdx));\n int distanceB = (int) LatLngUtils.distanceBetween(b, mPath.get(mToIdx));\n //int distance = distanceA + distancePath + distanceB;\n int distance = distanceA + distanceB;\n\n mFromFraction = (float) (((double) distanceA) / ((double) distance));\n mToFraction = (float) (1f - ((double) distanceB) / ((double) distance));\n\n }", "public static Path getPath(IPoint a, IPoint b) throws PathNotFoundException {\n\t\tIPoint[] destinations = new IPoint[2];\n\t\tdestinations[0] = a;\n\t\tdestinations[1] = b;\n\n\t\treturn getPath(destinations);\n\t}", "public Pair<Integer, Boolean> findPath(BabelSynset bs1, BabelSynset bs2) throws Exception {\n\t\tif(bs1.equals(bs2) && !bs1.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(0, false);\n\t\tif(bs1.equals(bs2) && bs1.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(0, true);\n\t\t\n\t\tA_parentsHigh = new ArrayList<String>();\n\t\t\n\t\tPair<Integer, Boolean> default_result = new Pair<Integer, Boolean>(0, true);\n\t\t\n\t\tint A_path = 0;\n\t\tString A_parent = bs1.getId().toString();\n\t\tB_recoverAncestors(bs2, 25);\n\t\t\n\t\tSystem.out.println(B_Ancestors+\"\\n\\n\");\n\t\t\n\t\tif(A_parent == null) return new Pair<Integer, Boolean>(B_Ancestors.size(), true);\n\t\tif(A_parent.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(B_Ancestors.size()+1, true);\n\t\tfor(int i=0; i<50; i++) {\n\t\t\tSystem.out.println(A_parent);\n\t\t\tint B_path = 0;\n\t\t\tfor(String id : B_Ancestors) {\n\t\t\t\tif(A_parent.equals(id)) {\n\t\t\t\t\tSystem.out.println(\"Path di A: \" + A_path + \"\\nPath di B: \" + B_path);\n\t\t\t\t\tif(id.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(A_path+B_path, true);\n\t\t\t\t\telse return new Pair<Integer, Boolean>(A_path+B_path, false);\n\t\t\t\t}\n\t\t\t\tB_path++;\n\t\t\t}\n\t\t\tif(A_parent.equals(\"bn:00031027n\")) break;\n\t\t\tA_parent = recoverParent(bn.getSynset(new BabelSynsetID(A_parent)));\n\t\t\tA_path++;\n\t\t}\n\t\treturn default_result;\n\t}", "public static String addToPath(String path, String path2) { return path + \"/\" + path2; }", "@Test\n public void smoothPathDoesntModifyPathWithTwoPoints() {\n Path<Point> path = new Path<>(pt(0.4, 1.6), pt(0.6, 0.4));\n assertThat(pathPlanner.smoothPath(path), is(path));\n }", "public TPath join(TPath path) {\n return append(path).normalize();\n }", "@Override\n public void getPathsWithValue(String valueToMatch, String pathPrefix, Set<String> result) {\n synchronized (VALUE_TO_PATH_MUTEX) {\n if (VALUE_TO_PATH == null) {\n VALUE_TO_PATH = new Relation(new HashMap(), HashSet.class);\n for (Iterator<String> it = iterator(); it.hasNext();) {\n String path = it.next();\n String value = normalize(getValueAtDPath(path));\n VALUE_TO_PATH.put(value, path);\n }\n }\n Set<String> paths = VALUE_TO_PATH.getAll(normalize(valueToMatch));\n if (paths == null) {\n return;\n }\n if (pathPrefix == null || pathPrefix.length() == 0) {\n result.addAll(paths);\n return;\n }\n for (String path : paths) {\n if (path.startsWith(pathPrefix)) {\n // if (altPath.originalPath.startsWith(altPrefix.originalPath)) {\n result.add(path);\n }\n }\n }\n }", "@Generated\n @CFunction\n public static native void CGPathAddPath(@Nullable CGMutablePathRef path1,\n @Nullable @UncertainArgument(\"Options: reference, array Fallback: reference\") CGAffineTransform m,\n @Nullable CGPathRef path2);", "public ExchangeList routeCall(MobilePhone a, MobilePhone b) throws MobilePhoneNotFoundException,MobilePhoneSwitchedOffException{\n\n Exchange A = findPhone(a);\n Exchange B = findPhone(b);\n Exchange commonParent = lowestRouter(A,B);\n ExchangeList path = new ExchangeList();\n ExchangeList temp = new ExchangeList();\n path.add(A);\n\n while(A!=commonParent){\n \tA = A.parent();\n \tpath.add(A);\n }\n\n while(B!=commonParent){\n \ttemp.add(B);\n\t\t\tB=B.parent();\n }\n\n while(!temp.isEmpty()){\n \tpath.add(temp.remove());\n }\n\n return path;\t\n\n\t}", "private Path(Path oldPath1, Path oldPath2, ASTNode node, boolean forceJoin)\r\n\t{\r\n\t\tsuper(oldPath1.bot, oldPath2.theDefault, oldPath1.joinMaps(oldPath1, oldPath2, node));\r\n\r\n\t\tif (forceJoin)\r\n\t\t{\r\n\t\t\t// Compute the intersection of path constraints\r\n\t\t\tthis.pathConstraints = new DNFConstraints(oldPath1.pathConstraints, oldPath2.pathConstraints);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (!oldPath1.pathConstraints.equals(oldPath2.pathConstraints))\r\n\t\t\t\tthrow new RuntimeException(\"Cannot merge paths that have different path constraints! Path1:\" \r\n\t\t\t\t\t+ oldPath1.pathConstraints.toString() + \"Path2: \" + oldPath2.pathConstraints.toString());\r\n\t\t\tthis.pathConstraints = new DNFConstraints(oldPath1.pathConstraints);\r\n\t\t}\r\n\t\t\r\n\t\tif (log.isLoggable(Level.FINEST))\r\n\t\t{\r\n\t\t\tSystem.out.println((forceJoin ? \"Force\" : \"\") + \"Joining \" + oldPath1);\r\n\t\t\tSystem.out.println(\"and \" + oldPath2);\r\n\t\t\tSystem.out.println(\"into \" + this);\r\n\t\t}\r\n\t}", "@Test\n public void testEquivalentAlternatePaths() {\n Point2D startCellPoint = complexStartCell.getCenterPoint();\n // our starting position will be close to the StartCell but not at the\n // StartCell itself. This is to ensure that we properly identify the\n // StartCell as our first waypoint\n Point2D startPoint = new Point2D(startCellPoint.getX() - 0.1, startCellPoint.getY() + 0.2);\n \n // generate a path from our starting position to our goal position given\n // our pre-constructed graph; this path is what we are interested in\n Path foundPath = PathFinder.generatePath(complexGraphModel, startPoint, complexGoalCell.getCenterPoint());\n \n // the path should have waypoints\n assertTrue(foundPath.hasNextWayPoint());\n \n // represents the actual shortest paths through the graph\n ArrayList<Point2D> shortestPathA = new ArrayList<Point2D>();\n ArrayList<Point2D> shortestPathB = new ArrayList<Point2D>();\n \n shortestPathA.add(complexStartCell.getCenterPoint());\n shortestPathB.add(complexStartCell.getCenterPoint());\n \n shortestPathA.add(new Point2D(15, 2));\n shortestPathA.add(new Point2D(25, 2));\n shortestPathA.add(new Point2D(40, 2));\n shortestPathA.add(complexGoalCell.getCenterPoint());\n \n shortestPathB.add(new Point2D(5, 0));\n shortestPathB.add(new Point2D(5, -2));\n shortestPathB.add(new Point2D(15, -1));\n shortestPathB.add(new Point2D(25, -1));\n shortestPathB.add(new Point2D(25, 2));\n shortestPathB.add(new Point2D(40, 2));\n shortestPathB.add(complexGoalCell.getCenterPoint());\n \n \n // ensure that the generated path is one of the two shortest paths\n if (foundPath.numWayPoints() == 5) {\n comparePaths(foundPath, shortestPathA);\n }\n else if (foundPath.numWayPoints() == 8) {\n comparePaths(foundPath, shortestPathB);\n }else{\n \n fail(\"Generated path did not match either of equivalent shortest paths\");\n }\n }", "public void testFirstOrPathOriANDPathInANDNotCommIn() {\r\n\r\n\t\tfinal int firstElemValue = 50;\r\n\t\tfinal int lastElemValue = 10;\r\n\t\tfinal int inValue = 30;\r\n\t\tfinal int notinValue = 40;\r\n\t\tfinal int otherElem1 = 20;\r\n\t\tfinal int otherElem2 = 70;\r\n\t\t\r\n\t\tfinal PathOri lastElemAS = new PathOri(lastElemValue);\r\n\t\tfinal PathNei firstElemAS = new PathNei(firstElemValue);\r\n\t\tfinal PathIn inAS = new PathIn(inValue);\r\n\t\tfinal CommIn inCom = new CommIn(notinValue);\r\n\t\tfinal IAction pathAction1 = new PathPrepend(otherElem1);\r\n\t\tfinal IAction pathAction2 = new PathPrepend(otherElem2);\r\n\t\t\r\n\t\tfinal IPredicate predUnion = new PredicateOr(lastElemAS, firstElemAS);\r\n\t\tfinal IPredicate predInter = new PredicateAnd(inAS, predUnion);\r\n\t\t\r\n\t\tfinal IPredicate predComplCommIn = new PredicateNot(inCom);\r\n\t\tfinal IPredicate predicate = \r\n\t\t\tnew PredicateAnd(predComplCommIn, predInter);\r\n\t\t\r\n\t\tRouteAlphabet alphabet = alphabetForPredicate(predicate);\r\n\t\talphabet = alphabet.union(\r\n\t\t\tnew Filter(pathAction1, pathAction2).filterAlphabet());\r\n\t\tfinal IDTA<ILabel, IState> automaton = \r\n\t\t\tpredicate.automaton(alphabet);\r\n\r\n\t\t//destlist\r\n\t\tList<ILabel> destList = new ArrayList<ILabel>();\r\n\t\tdestList.add(RouteAlphabet.DEST);\r\n\r\n\t\t//pathList\r\n\t\tList<ILabel> pathList = new ArrayList<ILabel>();\r\n\t\tpathList.add(RouteAlphabet.integer(otherElem1));\r\n\t\tpathList.add(RouteAlphabet.integer(lastElemValue));\r\n\t\tpathList.add(RouteAlphabet.integer(inValue));\r\n\t\tpathList.add(RouteAlphabet.integer(firstElemValue));\r\n\t\tpathList.add(RouteAlphabet.PATH);\r\n\t\t\r\n\t\t//prefval\r\n\t\tILabel prefVal = RouteAlphabet.integer(Filter.DEFAULT_LOCAL_PREF);\r\n\t\t\r\n\t\t//comList\r\n\t\tList<ILabel> comList = new ArrayList<ILabel>();\r\n\t\tcomList.add(RouteAlphabet.COM);\r\n\t\t\r\n\t\t//accept val\r\n\t\tILabel acceptVal = RouteAlphabet.MODIFIED;\r\n\t\t\r\n\t\tITerm<ILabel> tree = PredicateTree.getPredicateTree(\r\n\t\t\tdestList, pathList, prefVal, comList, acceptVal, alphabet);\r\n\t\t\r\n\t\tassertTrue(\"The automaton should accept the routing tree.\",\r\n\t\t\tautomaton.accepts(tree));\r\n\r\n\t\t//pathList2\r\n\t\tList<ILabel> pathList2 = new ArrayList<ILabel>();\r\n\t\tpathList2.add(RouteAlphabet.integer(lastElemValue));\r\n\t\tpathList2.add(RouteAlphabet.integer(otherElem1));\r\n\t\tpathList2.add(RouteAlphabet.integer(inValue));\r\n\t\tpathList2.add(RouteAlphabet.PATH);\r\n\t\t\r\n\t\t//comList2\r\n\t\tList<ILabel> comList2 = new ArrayList<ILabel>();\r\n\t\tcomList2.add(RouteAlphabet.COM);\r\n\t\t\r\n\t\tITerm<ILabel> tree2 = PredicateTree.getPredicateTree(\r\n\t\t\tdestList, pathList2, prefVal, comList2, acceptVal, alphabet);\r\n\t\t\r\n\t\tassertTrue(\"The automaton should accept the routing tree.\",\r\n\t\t\t\tautomaton.accepts(tree2));\r\n\r\n\t\t//pathList3\r\n\t\tList<ILabel> pathList3 = new ArrayList<ILabel>();\r\n\t\tpathList3.add(RouteAlphabet.integer(lastElemValue));\r\n\t\tpathList3.add(RouteAlphabet.integer(otherElem1));\r\n\t\tpathList3.add(RouteAlphabet.integer(inValue));\r\n\t\tpathList3.add(RouteAlphabet.PATH);\r\n\t\t\r\n\t\t//comList3\r\n\t\tList<ILabel> comList3 = new ArrayList<ILabel>();\r\n\t\tcomList3.add(RouteAlphabet.integer(notinValue));\r\n\t\tcomList3.add(RouteAlphabet.COM);\r\n\t\t\r\n\t\tITerm<ILabel> tree3 = PredicateTree.getPredicateTree(\r\n\t\t\tdestList, pathList3, prefVal, comList3, acceptVal, alphabet);\r\n\t\t\r\n\t\tassertFalse(\"The automaton should not accept the routing tree.\",\r\n\t\t\t\tautomaton.accepts(tree3));\r\n}", "private LinkedList<Point> constructPath(Point a, HashMap<Point, Point> allPaths) {\n\t\tLinkedList<Point> ret = new LinkedList<Point>();\n\t\tret.addLast(a);\n\t\tPoint current = a;\n\t\twhile (allPaths.containsKey(current)) {\n\t\t\tcurrent = allPaths.get(current);\n\t\t\tret.addLast(current);\n\t\t}\n\t\treturn ret;\n\t}", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "public Path shortestPath(Vertex a, Vertex b) {\n\t\t\n\t\t//Queue to store the vertices\n\t\t PriorityQueue<Vertex> vertexQue = populateQueue(a);\n\n\t\t //Stores if we have visited a node or not\n\t\t Set<Vertex> visited = new HashSet<>();\n\t List<Vertex> path = new ArrayList<>();\n\t \n\t //Checks if we are already at the location.\n\t\t\tif(a.equals(b)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tfor(Edge theEdge :myEdges) {\n\t\t\t\ttheEdge.getSource().cost = Integer.MAX_VALUE;\n\t\t\t\ttheEdge.getSource().path = null;\n\t\t\t\ttheEdge.getDestination().cost = Integer.MAX_VALUE;\n\t\t\t\ttheEdge.getDestination().path = null;\n\t\t\t\t\n\t\t\t}\n\t \n\t //While the queue of vertices is empty\n\t while(!vertexQue.isEmpty()) {\n\t Vertex source = vertexQue.poll();\n\t \n\t //sets the source to known\n\t //since we have visited it\n\t \n\t visited.add(source);\n\t for(Edge theEdge: myEdges) {\n\t \t \n\t \t //checks to make sure the edge cost actually exists\n\t \t if(edgeCost(theEdge.getSource(),theEdge.getDestination()) != -1) {\n\t \t\t \n\t\t Vertex destination = theEdge.getDestination();\n\t\t \n\t\t Collection<Vertex> adjacentVertices = adjacentVertices(source);\n\t\t \n\t\t //If the destination hasn't been iterated through yet\n\t\t //and the adjacent vertices adjacent to the source contains the edges destination\n\t\t if(!visited.contains(destination) && source.equals(theEdge.getSource())\n\t\t \t\t && adjacentVertices.contains(theEdge.getDestination())) {\n\t\t \t \n\t\t if(source.cost + theEdge.getWeight() < destination.cost) {\n\t\t \t \n\t\t \t //sets this destinations cost\n\t\t destination.cost = source.cost + theEdge.getWeight();\n\t\t //and sets the destinations path\n\t\t destination.path = source;\n\t\t \n\t\t //if b is the same as the destination and the cost\n\t\t //is less than the cost of b\n\t\t //set them\n\t\t //allows for shorter paths to be found\n\t\t if(b.equals(destination) && destination.cost<b.cost) {\n\t\t \t \n\t\t \t b.path = destination.path;\n\t\t \t \n\t\t \t b.cost = destination.cost;\n\t\t \t \n\t\t }\n\t\t \n\t\t //adds the destination vertex into the que\n\t\t //so that it may be iterated over since we have not\n\t\t //\"seen\" it yet as a source\n\t\t vertexQue.add(destination);\n\t\t }\n\t\t }\n\t \t }\n\n\t }\n\t }\n\n\t path.add(b.path);\n\t return new Path(path, b.cost);\n\t }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the IPermissions owner has granted this Principal for the specified activity and target. Null parameters will be ignored, that is, all IPermissions matching the nonnull parameters are retrieved. So, getPermissions(principal,null, null, null) should retrieve all IPermissions for a Principal.
public IPermission[] getPermissionsForPrincipal ( IAuthorizationPrincipal principal, String owner, String activity, String target) throws AuthorizationException;
[ "public IPermission[] getAllPermissionsForPrincipal (\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target)\n throws AuthorizationException;", "public IPermission[] getPermissionsForOwner(String owner, String activity, String target)\n throws AuthorizationException;", "@NotNull\r\n public Set<Permission> getPermissions();", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target)\n throws AuthorizationException;", "public ResourceInformation.Permissions getEffectivePermissions() {\n\t\tif (effectivePermissions == null)\n\t\t\tfetchInfo();\n\t\treturn effectivePermissions;\n\t}", "@NonNull\n public Set<Permission> getConfiguredPermissions() {\n synchronized (permissionDelegateMap) {\n return permissionDelegateMap.keySet();\n }\n }", "public List<IPermissionOwner> getAllPermissionOwners();", "public abstract Set<Permission> getMatchingPermissions(Target aTarget, String aUrl);", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target,\n IPermissionPolicy policy)\n throws AuthorizationException;", "List<IPermission> getPermissions();", "Set<Permission> getCurrentUserPermissions(TenantContext context);", "public abstract Set<Permission> getMatchingPermissions(Target aTarget, Seed aSeed);", "@Nullable\n public String getAcceptablePermissions();", "ObjectPermissionSet getActiveConnectionPermissions()\n throws GuacamoleException;", "public Permissions getPermissions() {\r\n \t\treturn permissions;\r\n \t}", "boolean hasPermission(String owner, String activity, String target);", "public IGrantSet getPermissions()\n throws OculusException;", "public List<Permission> getPermissions(User user) throws UserManagementException;", "public List<Permission> getPermissions(T object, User user);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Name Provider'. This implementation returns null; returning a nonnull result will terminate the switch.
public T1 caseNameProvider(NameProvider object) { return null; }
[ "public String getProviderName();", "public String getProviderClassName();", "Identifier getProviderIdentifier();", "public String getProviderName(\n\t) {\n\t return this.providerName;\n\t}", "private ObjectName getObjectNameFor(MarketDataProvider inProvider)\n throws MalformedObjectNameException\n {\n return new ObjectName(\"org.marketcetera.marketdata.provider:name=\" + inProvider.getProviderName());\n }", "public ProviderName provider() {\n return this.provider;\n }", "@Override\n public String getProviderName() {\n return mDeveloperProvider;\n }", "public T caseNameUse(NameUse object) {\n\t\treturn null;\n\t}", "ProviderDescription getProviderDescription();", "public String getInternalName();", "SMFTypeRef getSnkName();", "java.lang.String getPvname();", "protected String getName(NameIF obj) {\n String value = null;\n \n // --- first try if it's a base name\n if (obj instanceof TopicNameIF) {\n TopicNameIF basename = (TopicNameIF) obj;\n\n // try to get sort variant name for this base name\n initSortNameGrabber( basename );\n VariantNameIF sortVariant = sortNameGrabber.apply( basename );\n if (sortVariant != null) {\n if (sortVariant.getValue() != null) {\n value = sortVariant.getValue();\n } else {\n value = sortVariant.getLocator().getAddress();\n }\n }\n else {\n value = basename.getValue();\n }\n\n } else if (obj instanceof VariantNameIF) {\n // --- ...second try if it's a variant name\n VariantNameIF variant = (VariantNameIF) obj;\n if (variant.getValue() != null) {\n value = variant.getValue();\n } else {\n value = variant.getLocator().getAddress();\n }\n } else {\n throw new OntopiaRuntimeException(\"NameComparator Error: This comparator only compares \" +\n \"TopicNameIFs and VariantNameIFs. Got \" + obj);\n }\n\n return value;\n }", "public interface Provider {\n /**\n * Returns lookup associated with the object.\n * @return fully initialized lookup instance provided by this object\n */\n Lookup getLookup();\n }", "java.lang.String getNamecard();", "public CrawlerWebPage getProvider(String name)\n {\n CrawlerWebPage ret = null;\n for(CrawlerWebPage provider : getProviders())\n {\n if(provider.getName().equals(name))\n {\n ret = provider;\n break;\n }\n }\n\n return ret;\n }", "Reference getProviderReference();", "String getPName();", "public ViewObjectImpl getProviderKind() {\n return (ViewObjectImpl)findViewObject(\"ProviderKind\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
chang the color of the squares
public void changeSquareColorImplement(){ for (int j = 0; j < 8; j++) { for (int i = 0; i < 8; i++) { if ((i % 2 == 1 && j % 2 == 1) || (i % 2 == 0 && j % 2 == 0)) { //loop through the whole board chessBoardSquares[i][j].setBackground(whiteSquare); } else { chessBoardSquares[i][j].setBackground(blackSquare); } } } }
[ "public void recolorBoard(){\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor(int j=0;j<8;j++){\n\t\t\t\tsquares[i][j].setBackground(((i + j) % 2 == 0)? LIGHTBROWN : DARKBROWN);\n\t\t\t}\n\t\t}\t\n\t\tthis.repaint();\n\t}", "void changeColor(Shape s, float red, float blue, float green, int start, int end);", "public void updateColor();", "void changeColor();", "public void resetColor() {\n for (int col = 0; col < squares.length; col++) {\n for (int row = 0; row < squares[0].length; row++) {\n squares[col][row].determineColor(); \n }\n }\n }", "public void change(){\n colour = new Color(randomRange(0, 255),randomRange(0, 255),randomRange(0, 255));\n }", "private void colorSquares(Stack squares) {\n Border greenBorder = BorderFactory.createLineBorder(Color.GREEN, 3);\n while (!squares.empty()) {\n Square s = (Square) squares.pop();\n int location = s.getPosX() + ((s.getPosY()) * 8);\n JPanel panel = (JPanel) chessBoard.getComponent(location);\n panel.setBorder(greenBorder);\n }\n }", "void drawSquare() {\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tgrey.move(200);\r\n\t\t\tgrey.turn(90);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public void reColor() {\n\t\tint colorMaxVal = 256;\n\t\tthis.setOutlineColor(new Color(rad.nextInt(colorMaxVal), rad\n\t\t\t\t.nextInt(colorMaxVal), rad.nextInt(colorMaxVal)));\n\n\t\tthis.setFillColor(new Color(rad.nextInt(colorMaxVal), rad\n\t\t\t\t.nextInt(colorMaxVal), rad.nextInt(colorMaxVal)));\n\n\t}", "public void changeColor(){\n colorSign = \"wine\";\n sign.changeColor(colorSign); \n }", "public ColorSquare() {\n this.color = new Color(255, 255,255);\n this.score = 0; //TODO: update with square box\n }", "private void updateBoard(){\n\t\t\tfor(int i = 0; i<6;i++){\n\t\t\t\tfor(int q = 0;q <7; q++){\n\n\t\t\t\t\t//updates the board with red color\n\n\t\t\t\t\tif(controller.getColour(i,q)==\"red\"){\n\t\t\t\t\t\tcells[i][q].setBackground(Color.red);\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//updates the board with blue color\n\n\t\t\t\t\telse if(controller.getColour(i,q)==\"blue\"){\n\t\t\t\t\t\tcells[i][q].setBackground(Color.blue);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}", "void setRed(int x, int y, int value);", "public void changeEvenToBlack()\n {\n for (int i = 0; i < sqList.size(); i += 2)\n {\n sqList.get(i).setColor(\"black\");\n }\n }", "private void setYellow()\n {\n setColors(2.0,3.0,4.0,5.0,3.0,4.0);\n }", "public void highlightSquare()\n\t{\n\t\t// Depending on the square's colour, determine if the highlight should be light or dark green.\n\t\tif(color == Color.GRAY)\n\t\t{\n\t this.setBackground(Color.GREEN.darker());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.setBackground(Color.GREEN);\n\t\t}\n\t\t\n\t\t// Set the square that it can be occupied by a piece\n\t\tsetCanOccupy(true);\n\t}", "private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }", "public void makeOpaque(){\n sign.changeColor(sign.getColor().replace(\"-\",\"\"));\n frame.changeColor(frame.getColor().replace(\"-\",\"\"));\n square.changeColor(square.getColor().replace(\"-\",\"\"));\n }", "public void updateColor() {\r\n repaint();\r\n cc.updateColors();\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a reference to the microsoft.windowsazure.management.sql.SqlManagementClientImpl.
public SqlManagementClientImpl getClient() { return this.client; }
[ "public interface ResourceManagementClient {\n /**\n * Gets The Microsoft Azure subscription ID.\n *\n * @return the subscriptionId value.\n */\n String getSubscriptionId();\n\n /**\n * Gets server parameter.\n *\n * @return the endpoint value.\n */\n String getEndpoint();\n\n /**\n * Gets Api Version.\n *\n * @return the apiVersion value.\n */\n String getApiVersion();\n\n /**\n * Gets The HTTP pipeline to send requests through.\n *\n * @return the httpPipeline value.\n */\n HttpPipeline getHttpPipeline();\n\n /**\n * Gets The default poll interval for long-running operation.\n *\n * @return the defaultPollInterval value.\n */\n Duration getDefaultPollInterval();\n\n /**\n * Gets the OperationsClient object to access its operations.\n *\n * @return the OperationsClient object.\n */\n OperationsClient getOperations();\n\n /**\n * Gets the DeploymentsClient object to access its operations.\n *\n * @return the DeploymentsClient object.\n */\n DeploymentsClient getDeployments();\n\n /**\n * Gets the ProvidersClient object to access its operations.\n *\n * @return the ProvidersClient object.\n */\n ProvidersClient getProviders();\n\n /**\n * Gets the ProviderResourceTypesClient object to access its operations.\n *\n * @return the ProviderResourceTypesClient object.\n */\n ProviderResourceTypesClient getProviderResourceTypes();\n\n /**\n * Gets the ResourcesClient object to access its operations.\n *\n * @return the ResourcesClient object.\n */\n ResourcesClient getResources();\n\n /**\n * Gets the ResourceGroupsClient object to access its operations.\n *\n * @return the ResourceGroupsClient object.\n */\n ResourceGroupsClient getResourceGroups();\n\n /**\n * Gets the TagOperationsClient object to access its operations.\n *\n * @return the TagOperationsClient object.\n */\n TagOperationsClient getTagOperations();\n\n /**\n * Gets the DeploymentOperationsClient object to access its operations.\n *\n * @return the DeploymentOperationsClient object.\n */\n DeploymentOperationsClient getDeploymentOperations();\n}", "public interface SqlManagedInstancesClient {\n /**\n * List sqlManagedInstance resources in the subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a list of SqlManagedInstance as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<SqlManagedInstanceInner> list();\n\n /**\n * List sqlManagedInstance resources in the subscription.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a list of SqlManagedInstance as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<SqlManagedInstanceInner> list(Context context);\n\n /**\n * List sqlManagedInstance resources in the resource group\n *\n * <p>Gets all sqlManagedInstances in a resource group.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return all sqlManagedInstances in a resource group as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<SqlManagedInstanceInner> listByResourceGroup(String resourceGroupName);\n\n /**\n * List sqlManagedInstance resources in the resource group\n *\n * <p>Gets all sqlManagedInstances in a resource group.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return all sqlManagedInstances in a resource group as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<SqlManagedInstanceInner> listByResourceGroup(String resourceGroupName, Context context);\n\n /**\n * Retrieves a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName Name of SQL Managed Instance.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a SqlManagedInstance along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<SqlManagedInstanceInner> getByResourceGroupWithResponse(\n String resourceGroupName, String sqlManagedInstanceName, Context context);\n\n /**\n * Retrieves a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName Name of SQL Managed Instance.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a SqlManagedInstance.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n SqlManagedInstanceInner getByResourceGroup(String resourceGroupName, String sqlManagedInstanceName);\n\n /**\n * Creates or replaces a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of SQL Managed Instances.\n * @param sqlManagedInstance The SQL Managed Instance to be created or updated.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link SyncPoller} for polling of a SqlManagedInstance.\n */\n @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)\n SyncPoller<PollResult<SqlManagedInstanceInner>, SqlManagedInstanceInner> beginCreate(\n String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceInner sqlManagedInstance);\n\n /**\n * Creates or replaces a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of SQL Managed Instances.\n * @param sqlManagedInstance The SQL Managed Instance to be created or updated.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link SyncPoller} for polling of a SqlManagedInstance.\n */\n @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)\n SyncPoller<PollResult<SqlManagedInstanceInner>, SqlManagedInstanceInner> beginCreate(\n String resourceGroupName,\n String sqlManagedInstanceName,\n SqlManagedInstanceInner sqlManagedInstance,\n Context context);\n\n /**\n * Creates or replaces a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of SQL Managed Instances.\n * @param sqlManagedInstance The SQL Managed Instance to be created or updated.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a SqlManagedInstance.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n SqlManagedInstanceInner create(\n String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceInner sqlManagedInstance);\n\n /**\n * Creates or replaces a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of SQL Managed Instances.\n * @param sqlManagedInstance The SQL Managed Instance to be created or updated.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a SqlManagedInstance.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n SqlManagedInstanceInner create(\n String resourceGroupName,\n String sqlManagedInstanceName,\n SqlManagedInstanceInner sqlManagedInstance,\n Context context);\n\n /**\n * Deletes a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of Sql Managed Instances.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link SyncPoller} for polling of long-running operation.\n */\n @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)\n SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String sqlManagedInstanceName);\n\n /**\n * Deletes a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of Sql Managed Instances.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link SyncPoller} for polling of long-running operation.\n */\n @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)\n SyncPoller<PollResult<Void>, Void> beginDelete(\n String resourceGroupName, String sqlManagedInstanceName, Context context);\n\n /**\n * Deletes a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of Sql Managed Instances.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String sqlManagedInstanceName);\n\n /**\n * Deletes a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName The name of Sql Managed Instances.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String sqlManagedInstanceName, Context context);\n\n /**\n * Updates a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName Name of sqlManagedInstance.\n * @param parameters The SQL Managed Instance.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a SqlManagedInstance along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<SqlManagedInstanceInner> updateWithResponse(\n String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceUpdate parameters, Context context);\n\n /**\n * Updates a SQL Managed Instance resource.\n *\n * @param resourceGroupName The name of the Azure resource group.\n * @param sqlManagedInstanceName Name of sqlManagedInstance.\n * @param parameters The SQL Managed Instance.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a SqlManagedInstance.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n SqlManagedInstanceInner update(\n String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceUpdate parameters);\n}", "public SqlMapClient getSqlMapClient() {\n\t\treturn sqlMapClient;\n\t}", "public interface CdnManagementClient {\n /**\n * Gets Azure Subscription ID.\n *\n * @return the subscriptionId value.\n */\n String getSubscriptionId();\n\n /**\n * Gets server parameter.\n *\n * @return the endpoint value.\n */\n String getEndpoint();\n\n /**\n * Gets Api Version.\n *\n * @return the apiVersion value.\n */\n String getApiVersion();\n\n /**\n * Gets The HTTP pipeline to send requests through.\n *\n * @return the httpPipeline value.\n */\n HttpPipeline getHttpPipeline();\n\n /**\n * Gets The default poll interval for long-running operation.\n *\n * @return the defaultPollInterval value.\n */\n Duration getDefaultPollInterval();\n\n /**\n * Gets the AfdProfilesClient object to access its operations.\n *\n * @return the AfdProfilesClient object.\n */\n AfdProfilesClient getAfdProfiles();\n\n /**\n * Gets the AfdCustomDomainsClient object to access its operations.\n *\n * @return the AfdCustomDomainsClient object.\n */\n AfdCustomDomainsClient getAfdCustomDomains();\n\n /**\n * Gets the AfdEndpointsClient object to access its operations.\n *\n * @return the AfdEndpointsClient object.\n */\n AfdEndpointsClient getAfdEndpoints();\n\n /**\n * Gets the AfdOriginGroupsClient object to access its operations.\n *\n * @return the AfdOriginGroupsClient object.\n */\n AfdOriginGroupsClient getAfdOriginGroups();\n\n /**\n * Gets the AfdOriginsClient object to access its operations.\n *\n * @return the AfdOriginsClient object.\n */\n AfdOriginsClient getAfdOrigins();\n\n /**\n * Gets the RoutesClient object to access its operations.\n *\n * @return the RoutesClient object.\n */\n RoutesClient getRoutes();\n\n /**\n * Gets the RuleSetsClient object to access its operations.\n *\n * @return the RuleSetsClient object.\n */\n RuleSetsClient getRuleSets();\n\n /**\n * Gets the RulesClient object to access its operations.\n *\n * @return the RulesClient object.\n */\n RulesClient getRules();\n\n /**\n * Gets the SecurityPoliciesClient object to access its operations.\n *\n * @return the SecurityPoliciesClient object.\n */\n SecurityPoliciesClient getSecurityPolicies();\n\n /**\n * Gets the SecretsClient object to access its operations.\n *\n * @return the SecretsClient object.\n */\n SecretsClient getSecrets();\n\n /**\n * Gets the ValidatesClient object to access its operations.\n *\n * @return the ValidatesClient object.\n */\n ValidatesClient getValidates();\n\n /**\n * Gets the LogAnalyticsClient object to access its operations.\n *\n * @return the LogAnalyticsClient object.\n */\n LogAnalyticsClient getLogAnalytics();\n\n /**\n * Gets the ProfilesClient object to access its operations.\n *\n * @return the ProfilesClient object.\n */\n ProfilesClient getProfiles();\n\n /**\n * Gets the EndpointsClient object to access its operations.\n *\n * @return the EndpointsClient object.\n */\n EndpointsClient getEndpoints();\n\n /**\n * Gets the OriginsClient object to access its operations.\n *\n * @return the OriginsClient object.\n */\n OriginsClient getOrigins();\n\n /**\n * Gets the OriginGroupsClient object to access its operations.\n *\n * @return the OriginGroupsClient object.\n */\n OriginGroupsClient getOriginGroups();\n\n /**\n * Gets the CustomDomainsClient object to access its operations.\n *\n * @return the CustomDomainsClient object.\n */\n CustomDomainsClient getCustomDomains();\n\n /**\n * Gets the ResourceUsagesClient object to access its operations.\n *\n * @return the ResourceUsagesClient object.\n */\n ResourceUsagesClient getResourceUsages();\n\n /**\n * Gets the OperationsClient object to access its operations.\n *\n * @return the OperationsClient object.\n */\n OperationsClient getOperations();\n\n /**\n * Gets the EdgeNodesClient object to access its operations.\n *\n * @return the EdgeNodesClient object.\n */\n EdgeNodesClient getEdgeNodes();\n\n /**\n * Gets the PoliciesClient object to access its operations.\n *\n * @return the PoliciesClient object.\n */\n PoliciesClient getPolicies();\n\n /**\n * Gets the ManagedRuleSetsClient object to access its operations.\n *\n * @return the ManagedRuleSetsClient object.\n */\n ManagedRuleSetsClient getManagedRuleSets();\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * afdx endpoint.\n *\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param checkEndpointNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API along with {@link Response} on successful completion of {@link\n * Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<Response<CheckEndpointNameAvailabilityOutputInner>> checkEndpointNameAvailabilityWithResponseAsync(\n String resourceGroupName, CheckEndpointNameAvailabilityInput checkEndpointNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * afdx endpoint.\n *\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param checkEndpointNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API on successful completion of {@link Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<CheckEndpointNameAvailabilityOutputInner> checkEndpointNameAvailabilityAsync(\n String resourceGroupName, CheckEndpointNameAvailabilityInput checkEndpointNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * afdx endpoint.\n *\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param checkEndpointNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(\n String resourceGroupName, CheckEndpointNameAvailabilityInput checkEndpointNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * afdx endpoint.\n *\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param checkEndpointNameAvailabilityInput Input to check.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<CheckEndpointNameAvailabilityOutputInner> checkEndpointNameAvailabilityWithResponse(\n String resourceGroupName,\n CheckEndpointNameAvailabilityInput checkEndpointNameAvailabilityInput,\n Context context);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API along with {@link Response} on successful completion of {@link\n * Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<Response<CheckNameAvailabilityOutputInner>> checkNameAvailabilityWithResponseAsync(\n CheckNameAvailabilityInput checkNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API on successful completion of {@link Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<CheckNameAvailabilityOutputInner> checkNameAvailabilityAsync(\n CheckNameAvailabilityInput checkNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n CheckNameAvailabilityOutputInner checkNameAvailability(CheckNameAvailabilityInput checkNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<CheckNameAvailabilityOutputInner> checkNameAvailabilityWithResponse(\n CheckNameAvailabilityInput checkNameAvailabilityInput, Context context);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API along with {@link Response} on successful completion of {@link\n * Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<Response<CheckNameAvailabilityOutputInner>> checkNameAvailabilityWithSubscriptionWithResponseAsync(\n CheckNameAvailabilityInput checkNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API on successful completion of {@link Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<CheckNameAvailabilityOutputInner> checkNameAvailabilityWithSubscriptionAsync(\n CheckNameAvailabilityInput checkNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n CheckNameAvailabilityOutputInner checkNameAvailabilityWithSubscription(\n CheckNameAvailabilityInput checkNameAvailabilityInput);\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a\n * CDN endpoint.\n *\n * @param checkNameAvailabilityInput Input to check.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of check name availability API along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<CheckNameAvailabilityOutputInner> checkNameAvailabilityWithSubscriptionWithResponse(\n CheckNameAvailabilityInput checkNameAvailabilityInput, Context context);\n\n /**\n * Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on\n * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative\n * to the origin path specified in the endpoint configuration.\n *\n * @param validateProbeInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of the validate probe API along with {@link Response} on successful completion of {@link Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<Response<ValidateProbeOutputInner>> validateProbeWithResponseAsync(ValidateProbeInput validateProbeInput);\n\n /**\n * Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on\n * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative\n * to the origin path specified in the endpoint configuration.\n *\n * @param validateProbeInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of the validate probe API on successful completion of {@link Mono}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Mono<ValidateProbeOutputInner> validateProbeAsync(ValidateProbeInput validateProbeInput);\n\n /**\n * Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on\n * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative\n * to the origin path specified in the endpoint configuration.\n *\n * @param validateProbeInput Input to check.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of the validate probe API.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n ValidateProbeOutputInner validateProbe(ValidateProbeInput validateProbeInput);\n\n /**\n * Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on\n * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative\n * to the origin path specified in the endpoint configuration.\n *\n * @param validateProbeInput Input to check.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return output of the validate probe API along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<ValidateProbeOutputInner> validateProbeWithResponse(\n ValidateProbeInput validateProbeInput, Context context);\n}", "@ServiceMethod(returns = ReturnType.SINGLE)\n SqlManagedInstanceInner getByResourceGroup(String resourceGroupName, String sqlManagedInstanceName);", "public DnsManagementClientImpl() {\n this(\n new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(),\n AzureEnvironment.AZURE);\n }", "public interface WebSiteManagementClient extends Closeable, FilterableService<WebSiteManagementClient> {\n /**\n * Gets the API version.\n * @return The ApiVersion value.\n */\n String getApiVersion();\n \n /**\n * Gets the URI used as the base for all cloud service requests.\n * @return The BaseUri value.\n */\n URI getBaseUri();\n \n /**\n * Gets subscription credentials which uniquely identify Microsoft Azure\n * subscription. The subscription ID forms part of the URI for every\n * service call.\n * @return The Credentials value.\n */\n SubscriptionCloudCredentials getCredentials();\n \n /**\n * Gets or sets the initial timeout for Long Running Operations.\n * @return The LongRunningOperationInitialTimeout value.\n */\n int getLongRunningOperationInitialTimeout();\n \n /**\n * Gets or sets the initial timeout for Long Running Operations.\n * @param longRunningOperationInitialTimeoutValue The\n * LongRunningOperationInitialTimeout value.\n */\n void setLongRunningOperationInitialTimeout(final int longRunningOperationInitialTimeoutValue);\n /**\n * Gets or sets the retry timeout for Long Running Operations.\n * @return The LongRunningOperationRetryTimeout value.\n */\n int getLongRunningOperationRetryTimeout();\n \n /**\n * Gets or sets the retry timeout for Long Running Operations.\n * @param longRunningOperationRetryTimeoutValue The\n * LongRunningOperationRetryTimeout value.\n */\n void setLongRunningOperationRetryTimeout(final int longRunningOperationRetryTimeoutValue);\n /**\n * Operations for managing web hosting plans beneath your subscription.\n * @return The WebHostingPlansOperations value.\n */\n WebHostingPlanOperations getWebHostingPlansOperations();\n \n /**\n * Operations for managing the web sites in a web space. (see\n * http://msdn.microsoft.com/en-us/library/windowsazure/dn166981.aspx for\n * more information)\n * @return The WebSitesOperations value.\n */\n WebSiteOperations getWebSitesOperations();\n \n /**\n * Operations for managing web spaces beneath your subscription.\n * @return The WebSpacesOperations value.\n */\n WebSpaceOperations getWebSpacesOperations();\n \n /**\n * The Get Operation Status operation returns the status of the specified\n * operation. After calling a long-running operation, you can call Get\n * Operation Status to determine whether the operation has succeeded,\n * failed, timed out, or is still in progress. (see\n * http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx for\n * more information)\n *\n * @param webSpaceName Required. The name of the webspace for the website\n * where the operation was targeted.\n * @param siteName Required. The name of the site where the operation was\n * targeted.\n * @param operationId Required. The operation ID for the operation you wish\n * to track. The operation ID is returned in the ID field in the body of\n * the response for long-running operations.\n * @throws IOException Signals that an I/O exception of some sort has\n * occurred. This class is the general class of exceptions produced by\n * failed or interrupted I/O operations.\n * @throws ServiceException Thrown if an unexpected response is found.\n * @throws ParserConfigurationException Thrown if there was a serious\n * configuration error with the document parser.\n * @throws SAXException Thrown if there was an error parsing the XML\n * response.\n * @return The response body contains the status of the specified\n * long-running operation, indicating whether it has succeeded, is\n * inprogress, has timed out, or has failed. Note that this status is\n * distinct from the HTTP status code returned for the Get Operation Status\n * operation itself. If the long-running operation failed, the response\n * body includes error information regarding the failure.\n */\n WebSiteOperationStatusResponse getOperationStatus(String webSpaceName, String siteName, String operationId) throws IOException, ServiceException, ParserConfigurationException, SAXException;\n \n /**\n * The Get Operation Status operation returns the status of the specified\n * operation. After calling a long-running operation, you can call Get\n * Operation Status to determine whether the operation has succeeded,\n * failed, timed out, or is still in progress. (see\n * http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx for\n * more information)\n *\n * @param webSpaceName Required. The name of the webspace for the website\n * where the operation was targeted.\n * @param siteName Required. The name of the site where the operation was\n * targeted.\n * @param operationId Required. The operation ID for the operation you wish\n * to track. The operation ID is returned in the ID field in the body of\n * the response for long-running operations.\n * @return The response body contains the status of the specified\n * long-running operation, indicating whether it has succeeded, is\n * inprogress, has timed out, or has failed. Note that this status is\n * distinct from the HTTP status code returned for the Get Operation Status\n * operation itself. If the long-running operation failed, the response\n * body includes error information regarding the failure.\n */\n Future<WebSiteOperationStatusResponse> getOperationStatusAsync(String webSpaceName, String siteName, String operationId);\n \n /**\n * Register your subscription to use Azure Web Sites.\n *\n * @throws IOException Signals that an I/O exception of some sort has\n * occurred. This class is the general class of exceptions produced by\n * failed or interrupted I/O operations.\n * @throws ServiceException Thrown if an unexpected response is found.\n * @return A standard service response including an HTTP status code and\n * request ID.\n */\n OperationResponse registerSubscription() throws IOException, ServiceException;\n \n /**\n * Register your subscription to use Azure Web Sites.\n *\n * @return A standard service response including an HTTP status code and\n * request ID.\n */\n Future<OperationResponse> registerSubscriptionAsync();\n \n /**\n * Unregister your subscription to use Azure Web Sites.\n *\n * @throws IOException Signals that an I/O exception of some sort has\n * occurred. This class is the general class of exceptions produced by\n * failed or interrupted I/O operations.\n * @throws ServiceException Thrown if an unexpected response is found.\n * @return A standard service response including an HTTP status code and\n * request ID.\n */\n OperationResponse unregisterSubscription() throws IOException, ServiceException;\n \n /**\n * Unregister your subscription to use Azure Web Sites.\n *\n * @return A standard service response including an HTTP status code and\n * request ID.\n */\n Future<OperationResponse> unregisterSubscriptionAsync();\n}", "public interface EventHubManagementClient {\n /**\n * Gets the REST client.\n *\n * @return the {@link RestClient} object.\n */\n RestClient restClient();\n\n /**\n * The default base URL.\n */\n String DEFAULT_BASE_URL = \"https://management.azure.com\";\n\n /**\n * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call..\n *\n * @return the subscriptionId value.\n */\n String subscriptionId();\n\n /**\n * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call..\n *\n * @param subscriptionId the subscriptionId value.\n * @return the service client itself\n */\n EventHubManagementClient withSubscriptionId(String subscriptionId);\n\n /**\n * Gets Client API Version..\n *\n * @return the apiVersion value.\n */\n String apiVersion();\n\n /**\n * Sets Client API Version..\n *\n * @param apiVersion the apiVersion value.\n * @return the service client itself\n */\n EventHubManagementClient withApiVersion(String apiVersion);\n\n /**\n * Gets the Operations object to access its operations.\n * @return the Operations object.\n */\n Operations operations();\n\n /**\n * Gets the Namespaces object to access its operations.\n * @return the Namespaces object.\n */\n Namespaces namespaces();\n\n /**\n * Gets the EventHubs object to access its operations.\n * @return the EventHubs object.\n */\n EventHubs eventHubs();\n\n /**\n * Gets the ConsumerGroups object to access its operations.\n * @return the ConsumerGroups object.\n */\n ConsumerGroups consumerGroups();\n\n}", "public static SqlServerManager authenticate(RestClient restClient, String subscriptionId) {\n return new SqlServerManager(restClient, subscriptionId);\n }", "protected static ResourceManagementClient createResourceManagementClient() throws Exception {\n Configuration config = createConfiguration();\n return ResourceManagementService.create(config);\n }", "protected IdentityManagementService getIdentityManagementService() {\r\n return identityManagementService;\r\n }", "AmazonSQS getSyncClient() throws CoreException {\n if(sqsClient == null) {\n throw new CoreException(\"Amazon SQS Connection is not initialized\");\n }\n\n return sqsClient;\n }", "public static AmazonSQS getSQSClient() {\n\t\tAWSCredentials myCredentials;\n\t\tAmazonSQS sqsClient = null;\n\t\t\n\t\ttry {\n\t\t\tmyCredentials = new DefaultAWSCredentialsProviderChain().getCredentials();\n\t\t\tsqsClient = new AmazonSQSClient(myCredentials); \n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"There was a problem reading your credentials.\");\n\t\t\tSystem.out.println(\"Please make sure you have updated your environment variables with your AWS credentials and restart.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\treturn sqsClient;\n\t}", "public interface ManagementGroup {\n /**\n * Gets the serverCount property: The number of servers connected to the management group.\n *\n * @return the serverCount value.\n */\n Integer serverCount();\n\n /**\n * Gets the isGateway property: Gets or sets a value indicating whether the management group is a gateway.\n *\n * @return the isGateway value.\n */\n Boolean isGateway();\n\n /**\n * Gets the name property: The name of the management group.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the id property: The unique ID of the management group.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the created property: The datetime that the management group was created.\n *\n * @return the created value.\n */\n OffsetDateTime created();\n\n /**\n * Gets the dataReceived property: The last datetime that the management group received data.\n *\n * @return the dataReceived value.\n */\n OffsetDateTime dataReceived();\n\n /**\n * Gets the version property: The version of System Center that is managing the management group.\n *\n * @return the version value.\n */\n String version();\n\n /**\n * Gets the sku property: The SKU of System Center that is managing the management group.\n *\n * @return the sku value.\n */\n String sku();\n\n /**\n * Gets the inner com.azure.resourcemanager.loganalytics.fluent.models.ManagementGroupInner object.\n *\n * @return the inner object.\n */\n ManagementGroupInner innerModel();\n}", "public MuleClient muleClient() {\n return muleContext.getClient();\n }", "public com.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.Builder\n getCloudSqlInstanceBuilder() {\n return getCloudSqlInstanceFieldBuilder().getBuilder();\n }", "private Connection getConn_MsSql() {\n\n String url = \"jdbc:sqlserver://\" + dd.host + \";user=\" + dd.username\n + \";password=\" + dd.password + \";databaseName=\" + dd.database + \";\";\n String driver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";\n System.out.println(\"getConn_MsSql: url:\" + url + \" user: \" + dd.username\n + \" driver: \" + driver);\n\n Connection conn = null;\n try {\n Class.forName(driver);\n conn = DriverManager.getConnection(url);\n } catch (Exception e) {\n System.err.println(\"MsSql Connection Error: \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n return conn;\n }", "public SqlSession getSqlSession() {\n return this.sqlSession;\n }", "public interface DesktopVirtualizationApiClient {\n /**\n * Gets The ID of the target subscription.\n *\n * @return the subscriptionId value.\n */\n String getSubscriptionId();\n\n /**\n * Gets server parameter.\n *\n * @return the endpoint value.\n */\n String getEndpoint();\n\n /**\n * Gets Api Version.\n *\n * @return the apiVersion value.\n */\n String getApiVersion();\n\n /**\n * Gets The HTTP pipeline to send requests through.\n *\n * @return the httpPipeline value.\n */\n HttpPipeline getHttpPipeline();\n\n /**\n * Gets The default poll interval for long-running operation.\n *\n * @return the defaultPollInterval value.\n */\n Duration getDefaultPollInterval();\n\n /**\n * Gets the OperationsClient object to access its operations.\n *\n * @return the OperationsClient object.\n */\n OperationsClient getOperations();\n\n /**\n * Gets the WorkspacesClient object to access its operations.\n *\n * @return the WorkspacesClient object.\n */\n WorkspacesClient getWorkspaces();\n\n /**\n * Gets the ScalingPlansClient object to access its operations.\n *\n * @return the ScalingPlansClient object.\n */\n ScalingPlansClient getScalingPlans();\n\n /**\n * Gets the ScalingPlanPooledSchedulesClient object to access its operations.\n *\n * @return the ScalingPlanPooledSchedulesClient object.\n */\n ScalingPlanPooledSchedulesClient getScalingPlanPooledSchedules();\n\n /**\n * Gets the ApplicationGroupsClient object to access its operations.\n *\n * @return the ApplicationGroupsClient object.\n */\n ApplicationGroupsClient getApplicationGroups();\n\n /**\n * Gets the StartMenuItemsClient object to access its operations.\n *\n * @return the StartMenuItemsClient object.\n */\n StartMenuItemsClient getStartMenuItems();\n\n /**\n * Gets the ApplicationsClient object to access its operations.\n *\n * @return the ApplicationsClient object.\n */\n ApplicationsClient getApplications();\n\n /**\n * Gets the DesktopsClient object to access its operations.\n *\n * @return the DesktopsClient object.\n */\n DesktopsClient getDesktops();\n\n /**\n * Gets the HostPoolsClient object to access its operations.\n *\n * @return the HostPoolsClient object.\n */\n HostPoolsClient getHostPools();\n\n /**\n * Gets the UserSessionsClient object to access its operations.\n *\n * @return the UserSessionsClient object.\n */\n UserSessionsClient getUserSessions();\n\n /**\n * Gets the SessionHostsClient object to access its operations.\n *\n * @return the SessionHostsClient object.\n */\n SessionHostsClient getSessionHosts();\n\n /**\n * Gets the MsixPackagesClient object to access its operations.\n *\n * @return the MsixPackagesClient object.\n */\n MsixPackagesClient getMsixPackages();\n\n /**\n * Gets the MsixImagesClient object to access its operations.\n *\n * @return the MsixImagesClient object.\n */\n MsixImagesClient getMsixImages();\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempts to create a new direct property path.
protected void createDirectPath (String path) { if (path.startsWith(".")) { path = path.substring(1); } if (path.length() > 0 && _object instanceof ParameterizedConfig) { if (((ParameterizedConfig)_object).isInvalidParameterPath(path)) { getToolkit().beep(); return; } String name = path.substring(path.lastIndexOf(".") + 1); if (name.endsWith("]")) { int brack1 = name.lastIndexOf('['); int quote2 = name.lastIndexOf('"'); name = (quote2 > brack1) // is there a " within the []? ? name.substring(brack1 + 2, quote2) // get what's within the quotes : name.substring(0, brack1); // everything up to the [ } if (_ddialog == null) { _ddialog = DirectDialog.createDialog(this, _ctx); } _ddialog.show(this, name, path); } }
[ "@Test(timeout = TestGmplsWebservice.TIMEOUT)\n\tpublic final void testCreatePath() throws InvalidRequestFaultException,\n\t\t\tJAXBException, IOException, SoapFault, SAXException {\n\t\tif (TestGmplsWebservice.serviceAvailable) {\n\n\t\t\tfinal org.opennaas.extensions.gmpls.serviceinterface.databinding.jaxb.CreatePathResponseType response = GmplsWS\n\t\t\t\t\t.createPath(this.createPathSourceTNA,\n\t\t\t\t\t\t\tthis.createPathDestinationTNA,\n\t\t\t\t\t\t\tthis.createPathBandwidth);\n\t\t\tTestGmplsWebservice.createdPathId = response.getPathIdentifier()\n\t\t\t\t\t.getPathIdentifier();\n\t\t} else {\n\t\t\tAssert.fail(\"Service unavailable\");\n\t\t}\n\n\t}", "LocationWithPathAndProperty( Path path,\n Property idProperty ) {\n super(path, Collections.singletonList(idProperty));\n assert idProperty != null;\n assert !idProperty.isEmpty();\n }", "ICriteriaQueryCreatorBuilder<PARAMETER_TYPE> addParentPropertyPath(boolean linked, String... parentPropertyPath);", "Property createProperty();", "private static PropertyPath transformToPropertyPath( String propName, NamespaceContext nsContext )\n throws InvalidParameterValueException {\n String[] steps = propName.split( \"/\" );\n List<PropertyPathStep> propertyPathSteps = new ArrayList<PropertyPathStep>( steps.length );\n\n for ( int i = 0; i < steps.length; i++ ) {\n PropertyPathStep propertyStep = null;\n QualifiedName propertyName = null;\n String step = steps[i];\n boolean isAttribute = false;\n boolean isIndexed = false;\n int selectedIndex = -1;\n\n // check if step begins with '@' -> must be the final step then\n if ( step.startsWith( \"@\" ) ) {\n if ( i != steps.length - 1 ) {\n String msg = \"PropertyName '\" + propName\n + \"' is illegal: the attribute specifier may only \"\n + \"be used for the final step.\";\n throw new InvalidParameterValueException( msg );\n }\n step = step.substring( 1 );\n isAttribute = true;\n }\n\n // check if the step ends with brackets ([...])\n if ( step.endsWith( \"]\" ) ) {\n if ( isAttribute ) {\n String msg = \"PropertyName '\" + propName\n + \"' is illegal: if the attribute specifier ('@') is used, \"\n + \"index selection ('[...']) is not possible.\";\n throw new InvalidParameterValueException( msg );\n }\n int bracketPos = step.indexOf( '[' );\n if ( bracketPos < 0 ) {\n String msg = \"PropertyName '\" + propName\n + \"' is illegal. No opening brackets found for step '\" + step\n + \"'.\";\n throw new InvalidParameterValueException( msg );\n }\n try {\n selectedIndex = Integer.parseInt( step.substring( bracketPos + 1,\n step.length() - 1 ) );\n } catch ( NumberFormatException e ) {\n LOG.logError( e.getMessage(), e );\n String msg = \"PropertyName '\" + propName + \"' is illegal. Specified index '\"\n + step.substring( bracketPos + 1, step.length() - 1 )\n + \"' is not a number.\";\n throw new InvalidParameterValueException( msg );\n }\n step = step.substring( 0, bracketPos );\n isIndexed = true;\n }\n\n // determine namespace prefix and binding (if any)\n int colonPos = step.indexOf( ':' );\n String prefix = \"\";\n String localName = step;\n if ( colonPos > 0 ) {\n prefix = step.substring( 0, colonPos );\n localName = step.substring( colonPos + 1 );\n }\n URI nsURI = nsContext.getURI( prefix );\n if ( nsURI == null && prefix.length() > 0 ) {\n String msg = \"PropertyName '\" + propName + \"' uses an unbound namespace prefix: \"\n + prefix;\n throw new InvalidParameterValueException( msg );\n }\n propertyName = new QualifiedName( prefix, localName, nsURI );\n\n if ( isAttribute ) {\n propertyStep = PropertyPathFactory.createAttributePropertyPathStep( propertyName );\n } else if ( isIndexed ) {\n propertyStep = PropertyPathFactory.createPropertyPathStep( propertyName,\n selectedIndex );\n } else {\n propertyStep = PropertyPathFactory.createPropertyPathStep( propertyName );\n }\n propertyPathSteps.add( propertyStep );\n }\n return PropertyPathFactory.createPropertyPath( propertyPathSteps );\n }", "private ObjectProperty getOrCreateProperty(ObjectPropertyStatement ops) {\n\t\t\tif (ops.getProperty() != null) {\n\t\t\t\treturn ops.getProperty();\n\t\t\t}\n\t\t\tif (ops.getPropertyURI() == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tObjectProperty op = new ObjectProperty();\n\t\t\top.setURI(ops.getPropertyURI());\n\t\t\top.setDomainVClassURI(SOME_URI);\n\t\t\top.setRangeVClassURI(SOME_URI);\n\t\t\treturn op;\n\t\t}", "PropertyPathStep( QualifiedName propertyName ) {\n this.propertyName = propertyName;\n }", "private RemotePath(RemotePath existing_path, Path new_path) {\n hostname = existing_path.hostname;\n path = new_path;\n }", "protected abstract Property createProperty(String key, Object value);", "public PathExpressionIF createPathExpression();", "PathExistence createPathExistence();", "public PathSpecifier createPathSpecifier() throws UnknownHostException {\n // START SNIPPET: createPathSpecifier\n InetAddress source = InetAddress.getByName(sourceAddr);\n InetAddress destination = InetAddress.getByName(destAddr);\n\n /* Construct a PathSpecifier object at the specified node endpoints.\n * An endpoint is defined by an address and a port number, with 0\n * denoting the default port number.\n */\n PathSpecifier pathSpecifier = new PathSpecifier(source, 0,\n destination, 0,\n ProtocolType.TCP);\n \n return pathSpecifier;\n // END SNIPPET: createPathSpecifier\n }", "protected void addExplicitPathPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_ClasspathEntry_explicitPath_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_ClasspathEntry_explicitPath_feature\", \"_UI_ClasspathEntry_type\"),\n\t\t\t\t EmfsPackage.Literals.CLASSPATH_ENTRY__EXPLICIT_PATH,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "@Test\n public void a_hierarchical_non_existent_path_can_be_created_and_value_set() {\n\n String path = \"$.shipment.extensionFields.carrier\";\n JsonPath compiledPath = JsonPath.compile(path);\n Object output = compiledPath.set(pathConfiguration.jsonProvider().parse(inputObject),\n \"Alpha Transports\",pathConfiguration);\n String result = parse(output).read(path);\n assertThat(result).matches(\"Alpha Transports\");\n\n }", "public static AccessPath create(AccessPath p, jq_Field f, Node n) {\n if (p == null) return new AccessPath(f, n, true);\n p = p.copy();\n AccessPath that = p.findNode(n);\n if (that == null) {\n that = new AccessPath(f, n);\n }\n that.setLast();\n for (Iterator i = p.findLast(); i.hasNext(); ) {\n AccessPath last = (AccessPath)i.next();\n last.unsetLast();\n last.addSuccessor(that);\n }\n return p;\n }", "private List<String> constructProperties(final Class<?> managedType, final String path, final List<Field> fieldsAndKeys) {\n final List<String> newIncludedProps = new ArrayList<>();\n for (final Field field : fieldsAndKeys) {\n final String property = StringUtils.isEmpty(path) ? field.getName() : path + \".\" + field.getName();\n final String reflectionProperty = reflectionProperty(property);\n if (!isExcludedImmutably(managedType, reflectionProperty)) {\n newIncludedProps.add(property);\n\n // determine the type of property, which can be a) \"union entity\" property b) property under \"union entity\" c) collection property d) entity property e) simple property\n final Pair<Class<?>, String> penultAndLast = PropertyTypeDeterminator.transform(managedType, reflectionProperty);\n final Class<?> parentType = penultAndLast.getKey();\n final Class<?> propertyType = PropertyTypeDeterminator.determineClass(parentType, penultAndLast.getValue(), true, true);\n\n // add the children for \"property\" based on its nature\n if (EntityUtils.isEntityType(propertyType)) {\n final boolean propertyTypeWasInHierarchyBefore = typesInHierarchy(managedType, reflectionProperty, true).contains(DynamicEntityClassLoader.getOriginalType(propertyType));\n \n // The logic below (determining whether property represents link property) is important to maintain the integrity of domain trees.\n // However, it also causes performance bottlenecks when invoking multiple times.\n // In current Web UI logic, that uses centre domain trees, the following logic does not add any significant value.\n // Reintroducing may be significant when management of domain trees from UI will be implemented.\n // Please note number 1. indicates \"old\" simplified version and number 2. indicates newer version with link property handling.\n // Perhaps some \"hybrid\" of both can be used to achieve acceptable performance.\n \n // 1. final boolean isKeyPart = Finder.getKeyMembers(parentType).contains(field); // indicates if field is the part of the key.\n // 2. final boolean isEntityItself = \"\".equals(property); // empty property means \"entity itself\"\n // 2. final Pair<Class<?>, String> transformed = PropertyTypeDeterminator.transform(managedType, property);\n // 2. final String penultPropertyName = PropertyTypeDeterminator.isDotNotation(property) ? PropertyTypeDeterminator.penultAndLast(property).getKey() : null;\n // 2. final String lastPropertyName = transformed.getValue();\n // 2. final boolean isLinkProperty = !isEntityItself && PropertyTypeDeterminator.isDotNotation(property)\n // 2. && Finder.isOne2Many_or_One2One_association(managedType, penultPropertyName)\n // 2. && lastPropertyName.equals(Finder.findLinkProperty((Class<? extends AbstractEntity<?>>) managedType, penultPropertyName)); // exclude link properties in one2many and one2one associations\n \n if (level(property) >= LOADING_LEVEL && !EntityUtils.isUnionEntityType(propertyType) //\n || propertyTypeWasInHierarchyBefore /* && 2. !isLinkProperty */ /* && 1. !isKeyPart */) {\n newIncludedProps.add(createDummyMarker(property));\n }\n // TODO Need to review the following commet during removal of the \"common properties\" concept for union entities.\n //\t\t else if (EntityUtils.isUnionEntityType(propertyType)) { // \"union entity\" property\n //\t\t\tfinal Pair<List<Field>, List<Field>> commonAndUnion = commonAndUnion((Class<? extends AbstractUnionEntity>) propertyType);\n //\t\t\t// a new tree branch should be created for \"common\" properties under \"property\"\n //\t\t\tfinal String commonBranch = createCommonBranch(property);\n //\t\t\tnewIncludedProps.add(commonBranch); // final DefaultMutableTreeNode nodeForCommonProperties = addHotNode(\"common\", null, false, klassNode, new Pair<String, String>(\"Common\", TitlesDescsGetter.italic(\"<b>Common properties</b>\")));\n //\t\t\tnewIncludedProps.addAll(constructProperties(managedType, commonBranch, commonAndUnion.getKey()));\n //\t\t\t// \"union\" properties should be added directly to \"property\"\n //\t\t\tnewIncludedProps.addAll(constructProperties(managedType, property, commonAndUnion.getValue()));\n //\t\t } else if (EntityUtils.isUnionEntityType(parentType)) { // property under \"union entity\"\n //\t\t\t// the property under \"union entity\" should have only \"non-common\" properties added\n //\t\t\tfinal List<Field> propertiesWithoutCommon = constructKeysAndProperties(propertyType);\n //\t\t\tfinal List<String> parentCommonNames = AbstractUnionEntity.commonProperties((Class<? extends AbstractUnionEntity>) parentType);\n //\t\t\tpropertiesWithoutCommon.removeAll(constructKeysAndProperties(propertyType, parentCommonNames));\n //\t\t\tnewIncludedProps.addAll(constructProperties(managedType, property, propertiesWithoutCommon));\n //\t\t }\n else { // collectional or non-collectional entity property\n newIncludedProps.addAll(constructProperties(managedType, property, constructKeysAndProperties(propertyType)));\n }\n }\n }\n }\n return newIncludedProps;\n }", "public static <T> Path<?> findPropertyPath(String propertyPath, Path startRoot, EntityManager entityManager,\n BuilderTools misc) {\n String[] graph = propertyPath.split(\"\\\\.\");\n\n Metamodel metaModel = entityManager.getMetamodel();\n ManagedType<?> classMetadata = metaModel.managedType(startRoot.getJavaType());\n\n Path<?> root = startRoot;\n\n for (String property : graph) {\n String mappedProperty = misc.getPropertiesMapper().translate(property, classMetadata.getJavaType());\n if (!mappedProperty.equals(property)) {\n root = findPropertyPath(mappedProperty, root, entityManager, misc);\n } else {\n if (!hasPropertyName(mappedProperty, classMetadata)) {\n throw new IllegalArgumentException(\n \"Unknown property: \" + mappedProperty + \" from entity \" + classMetadata.getJavaType().getName());\n }\n\n if (isAssociationType(mappedProperty, classMetadata)) {\n Class<?> associationType = findPropertyType(mappedProperty, classMetadata);\n String previousClass = classMetadata.getJavaType().getName();\n classMetadata = metaModel.managedType(associationType);\n log.infof(\"Create a join between %s and %s.\",\n new Object[] { previousClass, classMetadata.getJavaType().getName() });\n\n if (root instanceof From) {\n root = ((From) root).join(mappedProperty);\n } else {\n root = root.get(mappedProperty);\n }\n } else {\n log.debugf(\"Create property path for type %s property %s.\",\n new Object[] { classMetadata.getJavaType().getName(), mappedProperty });\n root = root.get(mappedProperty);\n\n if (isEmbeddedType(mappedProperty, classMetadata)) {\n Class<?> embeddedType = findPropertyType(mappedProperty, classMetadata);\n classMetadata = metaModel.managedType(embeddedType);\n }\n }\n }\n }\n\n return root;\n }", "public void initPath(Path p) {\r\n\tpath = new Path(p);\r\n}", "@NotNull\n @Generated\n @CFunction\n public static native CGMutablePathRef CGPathCreateMutable();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getPayloadBlock return the bundle's payload bundle or null if no payload block exists. Per the RFC, there is only one payload block per bundle.
PayloadBlock getPayloadBlock();
[ "public static void checkBundlePayload(Bundle bundle) {\n // assert\n assertEquals(true, bundle != null);\n String[] payload = {null};\n if (bundle != null) {\n for (CanonicalBlock block : bundle.getBlocks()) {\n assertEquals(true, block.isTagged(\"crc_check\"));\n assertEquals(true, block.<Boolean>getTagAttachment(\"crc_check\"));\n }\n\n bundle.getPayloadBlock().data.observe().subscribe(\n buffer -> {\n byte[] arr = new byte[buffer.remaining()];\n buffer.get(arr);\n payload[0] = new String(arr);\n });\n\n assertEquals(true, payload[0] != null);\n assertEquals(testPayload, payload[0]);\n }\n }", "public gov.nih.nlm.ncbi.www.PRFBlockDocument.PRFBlock getPRFBlock()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.PRFBlockDocument.PRFBlock target = null;\r\n target = (gov.nih.nlm.ncbi.www.PRFBlockDocument.PRFBlock)get_store().find_element_user(PRFBLOCK$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }", "public ByteBuf getPayload() {\r\n\t\treturn payload;\r\n\t}", "@Nonnull\n Optional<XBBlock> getRootBlock();", "public interface BundleApi {\n\n /**\n * clear all extension from this bundle.\n */\n void clearBundle();\n\n /**\n * check if ths current Bundle has a block of given type.\n *\n * @param type of the block\n * @return true if one or more block is present in bundle, false otherwise\n */\n boolean hasBlock(int type);\n\n /**\n * return the list of {@link CanonicalBlock} that are encapsulated in this current Bundle.\n *\n * @return list of block\n */\n LinkedList<CanonicalBlock> getBlocks();\n\n /**\n * return the list of {@link CanonicalBlock} that are encapsulated in this current Bundle\n * of a given type.\n *\n * @param blockType type to filter\n * @return list of block\n */\n LinkedList<CanonicalBlock> getBlocks(int blockType);\n\n /**\n * Get a specific block by its block number.\n *\n * @param blockNumber of the block to query.\n * @return a Block if found, null otherwise.\n */\n CanonicalBlock getBlock(int blockNumber);\n\n /**\n * Replace a specific block with another.\n *\n * @param blockNumber of the block to query.\n * @param block replacement block.\n */\n void updateBlock(int blockNumber, CanonicalBlock block);\n\n /**\n * adds a {@link CanonicalBlock} to the current Bundle.\n *\n * @param block to be added\n */\n void addBlock(CanonicalBlock block);\n\n /**\n * delete a {@link CanonicalBlock} to the current Bundle.\n *\n * @param block to be deleted\n */\n void delBlock(CanonicalBlock block);\n\n /**\n * getPayloadBlock return the bundle's payload bundle or null if no payload block exists.\n * Per the RFC, there is only one payload block per bundle.\n *\n * @return PayloadBlock\n */\n PayloadBlock getPayloadBlock();\n\n}", "public ExcelBlock getExcelBlock(){\r\n if (excelBlocks.isEmpty()){\r\n return null;\r\n }\r\n return excelBlocks.iterator().next();\r\n }", "public StructuredBlock getBlock() {\r\n return block;\r\n }", "public Block getBlock() {\n return block;\n }", "public ProductionBlock getSpecificProductionBlock(int id);", "public com.google.protobuf.Any getPayload() {\n if (payloadBuilder_ == null) {\n return payload_ == null ? com.google.protobuf.Any.getDefaultInstance() : payload_;\n } else {\n return payloadBuilder_.getMessage();\n }\n }", "public byte[] getPayload() {\n return mPayload;\n }", "public Block getBlock(){\n return block;\n }", "public String getBlock() {\n return block;\n }", "com.google.protobuf.ByteString getPayload();", "public Block getBlock() {\n return (Block)getChild(0);\n }", "public int getPayload() {\n return payload;\n }", "public MIHPayload getPayload() {\n return payload;\n }", "public static Bundle testBundle1() {\n Bundle bundle = testBundle0();\n bundle.addBlock(new PayloadBlock(testPayload));\n return bundle;\n }", "public Bundle getBundle(String bundleName) {\n Bundle[] bundles = getBundles(bundleName, null);\n if (bundles != null && bundles.length > 0)\n return bundles[0];\n return null;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RBBISymbolTable::lookupNode Given a key (a variable name), return the corresponding RBBI Node. If there is no entry in the table for this name, return NULL.
RBBINode lookupNode(String key) { RBBINode retNode = null; RBBISymbolTableEntry el; el = fHashTable.get(key); if (el != null) { retNode = el.val; } return retNode; }
[ "public OMNode lookup(String key);", "public String lookup(String key){\n Node N = front;\n while( N != null){\n if( N.key.equals(key)){\n return N.value;\n }\n N = N.next;\n }\n return null;\n }", "private String lookupInLeafNode(Integer key, LeafNode node) {\n String value = null;\n for (int i = 0; i < node.getValues().length; i++) {\n if (node.keys[i] != null) {\n if (key == node.keys[i]) {\n value = node.getValues()[i];\n }\n }\n }\n return value;\n }", "public Node findNode( String key )\n {\n Data found = null;\n Node cur = _root;\n while ( cur != null && found == null )\n {\n int cmp = key.compareTo( cur.data.key );\n if ( cmp == 0 )\n found = cur.data;\n else if ( cmp < 0 )\n cur = cur.left;\n else \n cur = cur.right;\n }\n return cur;\n }", "public NodeT getNode(String key) {\n return nodeTable.get(key);\n }", "@Override\n\tpublic K lookup(K key) {\n\t\treturn lookup(root, key);\n\t}", "private Node find(String key) {\n Node now = head;\n while (now != null) {\n if (now.pairStringString.getKey().equals(key)) {\n return now;\n }\n now = now.next;\n }\n return null;\n }", "public VariableEntry lookupVariable(Symbol s) throws LispException {\n VariableEntry ve = variables.get(s);\n\n // found variable entry\n if (ve != null) return ve;\n\n // did not find variable entry and there is no outer scope\n if (enclosingTable == null) return null;\n\n // search outer scope\n return enclosingTable.lookupVariable(s);\n }", "private Node findKey(String key){\n Node N = front;\n while(N != null){\n if(N.key.equals(key)){\n return N; \n }\n else{\n N = N.next; \n }\n }\n return null;\n }", "public TValue find(TKey key) {\n Node n = bstFind(key, mRoot); // find the Node containing the key if any\n if (n == null || n == NIL_NODE)\n throw new RuntimeException(\"Key not found\");\n return n.mValue;\n }", "public V get(K key) {\n int hashCode = scaledHashCode(key);\n OwnLinkedList<K, V> list = table[hashCode];\n if (list == null) {\n return null;\n }\n PairNode<K, V> result = list.search(key);\n if (result == null) {\n return null;\n }\n return result.getValue();\n }", "private Node findKey(Node R, String key){\n\t\tif(R == null || key.compareTo(R.key) == 0 ){\n\t\t\treturn R;\n\t\t}\n\t\tif( key.compareTo(R.key) < 0 ){\n\t\t\treturn findKey(R.left, key);\n\t\t}else{\n\t\t\treturn findKey(R.right, key);\n\t\t}\n\t}", "public Entry find(Object key) {\n\t // Replace the following line with your solution.\n\t int position;\n\t DListNode temp;\n\t position=compFunction(key.hashCode());\n\t if (table[position].length()>0){\n\t try{\n\t temp = (DListNode)(table[position].front());\n\t while (temp.item()!=null) {\n\t if (key.equals(((Entry)(temp.item())).key)) {\n\t return (Entry)(temp.item());\n\t }\n\t if (temp==(DListNode)(table[position].back())){\n\t break;\n\t }\n\t temp=(DListNode)(temp.next());\n\t }\n\t }\n\t catch(InvalidNodeException e){\n\t e.printStackTrace();\n\t }\n\t }\n\t return null;\n\t }", "private Node find(Node find, String lookup) {\r\n\t\twhile (find != null && !(find.key.equals(lookup))) {\r\n\t\t\tfind = find.next;\r\n\t\t}\r\n\t\treturn find;\r\n\t}", "private static AhoCorasick lookupTree(String key) {\n\t\t// Quick return if the request cannot be processed\n\t\tif (key == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tsynchronized (mLock) {\n\t\t\treturn mTreeMap.get(key);\n\t\t}\n\t}", "final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }", "public boolean lookup(int key) {\r\n\t\tboolean found = false;\r\n\t\tNode llist = new Node(null);\r\n\t\tllist = head.getNext();\r\n\t\t// condition to check if LList is empty or not\r\n\t\tif (llist == null) {\r\n\t\t\treturn found;\r\n\t\t} else {\r\n\t\t\twhile (llist.getNext() != null) {\r\n\t\t\t\t// condition to check if node contains key value\r\n\t\t\t\tif (llist.getData() == key) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t}\r\n\t\t\t\tllist = llist.getNext();\r\n\t\t\t}\r\n\t\t\t// condition to check if key is found in the last node\r\n\t\t\tif (llist.getData() == key) {\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t\treturn found;\r\n\t\t}\r\n\t}", "private ListNode find(K key) {\r\n\t\t\tif (key == null) throw new NullPointerException();\r\n\t\t\tListNode current = header;\r\n\t\t\twhile (current != null) {\r\n\t\t\t\tif (current.key.equals(key)) return current;\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "public Variable get(String rootName) {\n//\t\tSystem.out.println(\"symbolTable get \"+n);\n\t\tNameSSA ssa = name.get(rootName);\t\n//\t\tSystem.out.println(\"ssa \" + ssa);\n\t\tif (ssa != null) \n\t\t\treturn var.get(ssa.current());\n\t\telse\n\t\t\treturn null;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The list of path rules.
@Updatable public List<ComputePathRule> getPathRule() { if (pathRule == null) { pathRule = new ArrayList<>(); } return pathRule; }
[ "public List<PathRule> getPathRulesList() {\n return pathRules;\n }", "public List<PathRule> getPathRulesList() {\n return pathRules;\n }", "public ArrayList<String> getRules() {\n return rules;\n }", "public List<String> getRules() {\n return this.rules;\n }", "java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();", "public List<Rule> getRules() {\n return rules;\n }", "public List<HttpRouteRule> getRouteRulesList() {\n return routeRules;\n }", "public List<HttpRouteRule> getRouteRulesList() {\n return routeRules;\n }", "public static List<String> getRuleList(){\n if(ruleList.isEmpty())\r\n createRuleList();\r\n return ruleList;\r\n }", "public String[] getRuleFileList() {\r\n\t\tFile dir = new File(\"config/rule\");\r\n\r\n\t\tFilenameFilter filter = new FilenameFilter() {\r\n\t\t\tpublic boolean accept(File dir1, String name) {\r\n\t\t\t\treturn name.endsWith(\".rul\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tString[] list = dir.list(filter);\r\n\r\n\t\tif(!System.getProperty(\"os.name\").startsWith(\"Windows\")) {\r\n\t\t\t// Sort if not windows\r\n\t\t\tArrays.sort(list);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "@ApiModelProperty(value = \"Path rewrite rules with haproxy formatted regex. Deprecated: Use backendRule, will be removed.\")\n public List<String> getRewriteRules() {\n return rewriteRules;\n }", "public CSSRuleList getCssRules();", "java.util.List<? extends com.appscode.api.kubernetes.v1beta2.RuleOrBuilder> \n getRulesOrBuilderList();", "public String getRules()\r\n {\r\n return rules;\r\n }", "public int[] getRules() {\n\t\treturn rules.toArray();\n\t}", "String getRules();", "public synchronized List<Rule> getAllRules() {\n checkSafeToUpdate();\n return ruleStore.getAllRules();\n }", "public abstract List<String> getControlledPaths();", "public Collection<ExtractedRule> getRules()\r\n\t{\r\n\t\treturn rules;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Search our map of online meta regions to find the first meta region that should contain a pointer to newRegion.
public MetaRegion getFirstMetaRegionForRegion(HRegionInfo newRegion) { synchronized (onlineMetaRegions) { return getMetaRegionPointingTo(onlineMetaRegions, newRegion); } }
[ "NavigableMap<byte[], MetaRegion> getAllMetaRegionLocations() {\n NavigableMap<byte[], MetaRegion> m =\n new TreeMap<byte[], MetaRegion>(Bytes.BYTES_COMPARATOR);\n m.putAll(metaRegionLocationsBeforeScan);\n m.putAll(onlineMetaRegions);\n return m;\n }", "public MetaRegion offlineMetaRegionWithStartKey(byte [] startKey) {\n LOG.info(\"META region whose startkey is \" + Bytes.toString(startKey) +\n \" removed from onlineMetaRegions\");\n return onlineMetaRegions.remove(startKey);\n }", "private HRegionLocation locateRegionInMeta(final byte [] parentTable,\n final byte [] tableName, final byte [] row, boolean useCache,\n Object regionLockObject, boolean retry)\n throws IOException {\n HRegionLocation location;\n // If we are supposed to be using the cache, look in the cache to see if\n // we already have the region.\n if (useCache) {\n location = getCachedLocation(tableName, row);\n if (location != null) {\n return location;\n }\n }\n\n int localNumRetries = retry ? numRetries : 1;\n // build the key of the meta region we should be looking for.\n // the extra 9's on the end are necessary to allow \"exact\" matches\n // without knowing the precise region names.\n byte [] metaKey = HRegionInfo.createRegionName(tableName, row,\n HConstants.NINES, false);\n for (int tries = 0; true; tries++) {\n if (tries >= localNumRetries) {\n throw new NoServerForRegionException(\"Unable to find region for \"\n + Bytes.toStringBinary(row) + \" after \" + numRetries + \" tries.\");\n }\n\n HRegionLocation metaLocation = null;\n try {\n // locate the root or meta region\n metaLocation = locateRegion(parentTable, metaKey, true, false);\n // If null still, go around again.\n if (metaLocation == null) continue;\n HRegionInterface server =\n getHRegionConnection(metaLocation.getHostname(), metaLocation.getPort());\n\n Result regionInfoRow = null;\n if (useCache) {\n if (Bytes.equals(parentTable, HConstants.META_TABLE_NAME)\n && (getRegionCachePrefetch(tableName))) {\n // This block guards against two threads trying to load the meta\n // region at the same time. The first will load the meta region and\n // the second will use the value that the first one found.\n synchronized (regionLockObject) {\n // Check the cache again for a hit in case some other thread made the\n // same query while we were waiting on the lock.\n location = getCachedLocation(tableName, row);\n if (location != null) {\n return location;\n }\n // If the parent table is META, we may want to pre-fetch some\n // region info into the global region cache for this table.\n prefetchRegionCache(tableName, row);\n }\n }\n location = getCachedLocation(tableName, row);\n if (location != null) {\n return location;\n }\n } else {\n // If we are not supposed to be using the cache, delete any existing cached location\n // so it won't interfere.\n deleteCachedLocation(tableName, row);\n }\n\n // Query the root or meta region for the location of the meta region\n regionInfoRow = server.getClosestRowBefore(\n metaLocation.getRegionInfo().getRegionName(), metaKey,\n HConstants.CATALOG_FAMILY);\n if (regionInfoRow == null) {\n throw new TableNotFoundException(Bytes.toString(tableName));\n }\n byte [] value = regionInfoRow.getValue(HConstants.CATALOG_FAMILY,\n HConstants.REGIONINFO_QUALIFIER);\n if (value == null || value.length == 0) {\n throw new IOException(\"HRegionInfo was null or empty in \" +\n Bytes.toString(parentTable) + \", row=\" + regionInfoRow);\n }\n // convert the row result into the HRegionLocation we need!\n HRegionInfo regionInfo = (HRegionInfo) Writables.getWritable(\n value, new HRegionInfo());\n // possible we got a region of a different table...\n if (!Bytes.equals(regionInfo.getTableName(), tableName)) {\n throw new TableNotFoundException(\n \"Table '\" + Bytes.toString(tableName) + \"' was not found, got: \" +\n Bytes.toString(regionInfo.getTableName()) + \".\");\n }\n if (regionInfo.isSplit()) {\n throw new RegionOfflineException(\"the only available region for\" +\n \" the required row is a split parent,\" +\n \" the daughters should be online soon: \" +\n regionInfo.getRegionNameAsString());\n }\n if (regionInfo.isOffline()) {\n throw new RegionOfflineException(\"the region is offline, could\" +\n \" be caused by a disable table call: \" +\n regionInfo.getRegionNameAsString());\n }\n\n value = regionInfoRow.getValue(HConstants.CATALOG_FAMILY,\n HConstants.SERVER_QUALIFIER);\n String hostAndPort = \"\";\n if (value != null) {\n hostAndPort = Bytes.toString(value);\n }\n if (hostAndPort.equals(\"\")) {\n throw new NoServerForRegionException(\"No server address listed \" +\n \"in \" + Bytes.toString(parentTable) + \" for region \" +\n regionInfo.getRegionNameAsString() + \" containing row \" +\n Bytes.toStringBinary(row));\n }\n\n // Instantiate the location\n String hostname = Addressing.parseHostname(hostAndPort);\n int port = Addressing.parsePort(hostAndPort);\n location = new HRegionLocation(regionInfo, hostname, port);\n cacheLocation(tableName, location);\n return location;\n } catch (TableNotFoundException e) {\n // if we got this error, probably means the table just plain doesn't\n // exist. rethrow the error immediately. this should always be coming\n // from the HTable constructor.\n throw e;\n } catch (IOException e) {\n if (e instanceof RemoteException) {\n e = RemoteExceptionHandler.decodeRemoteException((RemoteException) e);\n }\n if (tries < numRetries - 1) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"locateRegionInMeta parentTable=\" +\n Bytes.toString(parentTable) + \", metaLocation=\" +\n ((metaLocation == null)? \"null\": \"{\" + metaLocation + \"}\") +\n \", attempt=\" + tries + \" of \" +\n this.numRetries + \" failed; retrying after sleep of \" +\n ConnectionUtils.getPauseTime(this.pause, tries) + \" because: \" + e.getMessage());\n }\n } else {\n throw e;\n }\n // Only relocate the parent region if necessary\n if(!(e instanceof RegionOfflineException ||\n e instanceof NoServerForRegionException)) {\n relocateRegion(parentTable, metaKey);\n }\n }\n try{\n Thread.sleep(ConnectionUtils.getPauseTime(this.pause, tries));\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new IOException(\"Giving up trying to location region in \" +\n \"meta: thread is interrupted.\");\n }\n }\n }", "public void putMetaRegionOnline(MetaRegion metaRegion) {\n onlineMetaRegions.put(metaRegion.getStartKey(), metaRegion);\n }", "private void compareMap(Map newMap) {\r\n\t\t//compares the old Map with the new map to create EventMessages, so that the Player knows what's going on in the game\r\n\t\tArrayList<Region> regionsNew = newMap.getRegions();\r\n\t\tArrayList<Region> regionsOld = map.getRegions();\r\n\t\t\r\n\t\tfor (Region region : regionsNew) {\r\n\t\t\t\r\n\t\t\t//compare RessourceRegions\r\n\t\t\tif(region instanceof ResourceRegion)\r\n\t\t\t{\r\n\t\t\t\tResourceRegion resRegionNew = (ResourceRegion) region;\r\n\t\t\t\tint index = regionsNew.indexOf(region);\r\n\t\t\t\tResourceRegion resRegionOld = (ResourceRegion) regionsOld.get(index) ;\r\n\t\t\t\t\r\n\t\t\t\t//compare buyable status\r\n\t\t\t\tif (resRegionNew.resourceRegionStatus == ResourceRegionStatus.BUYABLE ) {\r\n\t\t\t\t\t//region steht zum verkauf\r\n\t\t\t\t\tevents.add(new EventMessage(\"Eine Region steht zum Verkauf\", resRegionNew.coords));\r\n\t\t\t\t}\r\n\t\t\t\t//compare owned status\r\n\t\t\t\tif (resRegionNew.resourceRegionStatus == ResourceRegionStatus.OWNED &&\r\n\t\t\t\t\t\tresRegionOld.resourceRegionStatus == ResourceRegionStatus.BUYABLE) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString message;\r\n\t\t\t\t\tif (resRegionNew.owner.equals(ownPlayer)) {\r\n\t\t\t\t\t\tmessage = \"Du hast die Auktion einer Region gewonnen!\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tResourceRelation resourceRelation = (ResourceRelation) company.getRegionRelation(resRegionNew.coords);\r\n\t\t\t\t\t\tif (resourceRelation.bid > 0) {\r\n\t\t\t\t\t\t\tmessage = \"Du hast die Auktion einer Region verloren!\";\r\n\t\t\t\t\t\t\t//Give money back\r\n\t\t\t\t\t\t\tcompany.setMoney(company.getMoney() + resourceRelation.bid);\r\n\t\t\t\t\t\t\tresourceRelation.bid = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tmessage = \"Ein anderer Spieler hat eine Region gekauft.\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tevents.add(new EventMessage(message , resRegionNew.coords));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//compare map related to own buildings\r\n\t\t\t\tif (ownPlayer.equals(resRegionNew.owner)) {\r\n\t\t\t\t\t//get new Mine\t\t\r\n\t\t\t\t\tif ( //Mine is new Status and Owned is old Status\r\n\t\t\t\t\t\t\t((resRegionNew.resourceRegionStatus == ResourceRegionStatus.MINE && \t\r\n\t\t\t\t\t\t\tresRegionOld.resourceRegionStatus == ResourceRegionStatus.OWNED) ||\r\n\t\t\t\t\t\t\t//Mine_PowerStation is new , Powerstation is old\r\n\t\t\t\t\t\t\t(resRegionNew.resourceRegionStatus == ResourceRegionStatus.MINE_POWERSTATION && \r\n\t\t\t\t\t\t\tresRegionOld.resourceRegionStatus == ResourceRegionStatus.POWERSTATION )))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben eine Mine gebaut\", resRegionNew.coords));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get new Powerstation\r\n\t\t\t\t\tif (\t//Powerstation is new Status and Owned is old Status\r\n\t\t\t\t\t\t\t((resRegionNew.resourceRegionStatus == ResourceRegionStatus.POWERSTATION && \t\r\n\t\t\t\t\t\t\tresRegionOld.resourceRegionStatus == ResourceRegionStatus.OWNED) ||\r\n\t\t\t\t\t\t\t//Mine_PowerStation is new , Mine is old\r\n\t\t\t\t\t\t\t(resRegionNew.resourceRegionStatus == ResourceRegionStatus.MINE_POWERSTATION && \r\n\t\t\t\t\t\t\tresRegionOld.resourceRegionStatus == ResourceRegionStatus.MINE )))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben ein Kraftwerk gebaut\", resRegionNew.coords));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get new Powerstation AND mine\r\n\t\t\t\t\tif ( \tresRegionNew.resourceRegionStatus == ResourceRegionStatus.MINE_POWERSTATION &&\r\n\t\t\t\t\t\t\tresRegionOld.resourceRegionStatus == ResourceRegionStatus.OWNED\t) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben eine Mine gebaut\", resRegionNew.coords));\r\n\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben ein Kraftwerk gebaut\", resRegionNew.coords));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (region instanceof CityRegion) {\r\n\t\t\t\t//get new and old city region\r\n\t\t\t\tContract contractOld=null;\r\n\t\t\t\tCityRegion cityRegionNew = (CityRegion) region;\r\n\t\t\t\tint index = regionsNew.indexOf(region);\r\n\t\t\t\tCityRegion cityRegionOld = (CityRegion) regionsOld.get(index);\r\n\t\t\t\t\r\n\t\t\t\t//get all contracts from each region\r\n\t\t\t\tArrayList<Contract> contractsNew = cityRegionNew.getContracts();\r\n\t\t\t\tArrayList<Contract> contractsOld = cityRegionOld.getContracts();\r\n\t\t\t\tfor (Contract contractNew : contractsNew) {\r\n\t\t\t\t\tif (contractNew.getPlayer().equals(ownPlayer)) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//get the old contract\r\n\t\t\t\t\t\tfor (Contract contract : contractsOld) {\r\n\t\t\t\t\t\t\tif(contract.getPlayer().equals(contractNew.getPlayer()))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcontractOld = contract;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//compare both contracts\r\n\t\t\t\t\t\tif (contractOld != null) {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (contractNew.amountCustomer>contractOld.amountCustomer) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben in \"+cityRegionNew.getCityName()+\" einige Kunden hinzugewonnen\", cityRegionNew.coords));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (contractNew.amountCustomer<contractOld.amountCustomer) {\r\n\t\t\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben in \"+cityRegionNew.getCityName()+\" einige Kunden verloren\", cityRegionNew.coords));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben in \"+cityRegionNew.getCityName()+\" neue Kunden hinzugewonnen\", cityRegionNew.coords));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcontractOld = null;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//check if there is an old contract , but not a new one\r\n\t\t\t\tboolean contractDeleted = true;\r\n\t\t\t\tfor (Contract contract : contractsOld) {\r\n\t\t\t\t\tfor (Contract contractNew : contractsNew) {\r\n\t\t\t\t\t\tif (contract.getPlayer().equals(contractNew.getPlayer())) {\r\n\t\t\t\t\t\t\tcontractDeleted = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (contractDeleted) {\r\n\t\t\t\t\t\tevents.add(new EventMessage(\"Wir haben in \"+cityRegionNew.getCityName()+\" alle Kunden verloren\", contract.coords));\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public MARegion createNextRegion() {\n\t\t// Creating a copy of the present region.\n\t\tMARegion newRegion = new MARegion(this);\n\t\tMACellState[][] newCellStates;\n\n\t\ttry {\n\n\t\t\t// Only for mobile Automata for tracking the activeCell\n\t\t\tif (newRegion.ruleName.compareTo(RuleNames.LOCKME) == 0) {\n\n\t\t\t\t// Calling helper method to get the active cell co-ordinates\n\t\t\t\tint[] newActivePos = nextActivePos();\n\n\t\t\t\t// Checking if the cell is locked or not\n\t\t\t\tif (newActivePos[0] == -1 && newActivePos[1] == -1) {\n\t\t\t\t\tfor (int i = 0; i < getRegionRows(); i++) {\n\t\t\t\t\t\tfor (int j = 0; j < getRegionColumns(); j++) {\n\n\t\t\t\t\t\t\tnewRegion.getCellAt(i, j).setState(this.getCellAt(i, j).getCellState()); // if locked\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// restore the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// previous\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// state\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnewRegion.setLocked(true); // if locked, set the locked attribute to make the simulation complete\n\t\t\t\t} else {\n\n\t\t\t\t\t// assigning new active cell position\n\t\t\t\t\tnewRegion.activeCellXPos = newActivePos[0];\n\t\t\t\t\tnewRegion.activeCellYPos = newActivePos[1];\n\n\t\t\t\t\tfor (int i = 0; i < getRegionRows(); i++) {\n\t\t\t\t\t\tfor (int j = 0; j < getRegionColumns(); j++) {\n\n\t\t\t\t\t\t\tif (i == newActivePos[0] && j == newActivePos[1]) {\n\t\t\t\t\t\t\t\tnewRegion.getCellAt(i, j).setState(MACellState.ALIVE); // only for active cell\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewRegion.getCellAt(i, j).setState(this.getCellAt(i, j).getCellState()); // restoring\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// previous\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// states\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for all\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// other\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// cells\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else { // For all rules except LOCKME\n\t\t\t\t// Calling nextCellStates using previousRegion Object to determine current\n\t\t\t\t// state.\n\t\t\t\tnewCellStates = nextCellStates();\n\n\t\t\t\t/*\n\t\t\t\t * Looping through each cell to determine the neighbors state and deciding the\n\t\t\t\t * cell's state based on the comboRules (except LOCKME)\n\t\t\t\t */\n\t\t\t\tfor (int i = 0; i < getRegionRows(); i++) {\n\t\t\t\t\tfor (int j = 0; j < getRegionColumns(); j++) {\n\t\t\t\t\t\tnewRegion.getCellAt(i, j).setState(newCellStates[i][j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.severe(\"Exception occured while creating next Region : \" + e.toString());\n\n\t\t}\n\n\t\treturn newRegion;\n\t}", "private Node scanTerritory(DistanceMap map, String desired, String supported) {\n Node node;\n for (String partition : PARTITION_TABLE.getRegionPartition(desired)) {\n node = map.get(partition, supported);\n if (node != null) {\n return node;\n }\n }\n \n for (String partition : PARTITION_TABLE.getRegionPartition(supported)) {\n node = map.get(desired, partition);\n if (node != null) {\n return node;\n }\n }\n \n return null;\n }", "Region splitFirst(int newSource, int newLen) {\n\t\treturn new Region(resultStart, newSource, newLen);\n\t}", "public Set<MetaRegion> getMetaRegionsForTable(byte [] tableName)\n throws NotAllMetaRegionsOnlineException {\n byte [] firstMetaRegion = null;\n Set<MetaRegion> metaRegions = new HashSet<MetaRegion>();\n if (Bytes.equals(tableName, HConstants.META_TABLE_NAME)) {\n if (rootRegionLocation.get() == null) {\n throw new NotAllMetaRegionsOnlineException(\n Bytes.toString(HConstants.ROOT_TABLE_NAME));\n }\n metaRegions.add(new MetaRegion(rootRegionLocation.get().getServerAddress(),\n HRegionInfo.ROOT_REGIONINFO));\n } else {\n if (!areAllMetaRegionsOnline()) {\n throw new NotAllMetaRegionsOnlineException();\n }\n synchronized (onlineMetaRegions) {\n if (onlineMetaRegions.size() == 1) {\n firstMetaRegion = onlineMetaRegions.firstKey();\n } else if (onlineMetaRegions.containsKey(tableName)) {\n firstMetaRegion = tableName;\n } else {\n firstMetaRegion = onlineMetaRegions.headMap(tableName).lastKey();\n }\n metaRegions.addAll(onlineMetaRegions.tailMap(firstMetaRegion).values());\n }\n }\n return metaRegions;\n }", "public boolean isMetaRegionOnline(byte [] startKey) {\n return onlineMetaRegions.containsKey(startKey);\n }", "void rs2_get_region_of_interest(PointerByReference sensor, IntByReference min_x, IntByReference min_y, IntByReference max_x, IntByReference max_y, PointerByReference error);", "CompletableFuture<HRegionLocation> getPreviousRegionLocation(TableName tableName,\n byte[] startRowOfCurrentRegion, long timeoutNs) {\n CompletableFuture<HRegionLocation> future = tableName.equals(META_TABLE_NAME)\n ? locateMetaRegion() : locatePreviousRegion(tableName, startRowOfCurrentRegion);\n return withTimeout(future, timeoutNs,\n () -> \"Timeout(\" + TimeUnit.NANOSECONDS.toMillis(timeoutNs)\n + \"ms) waiting for region location for \" + tableName + \", startRowOfCurrentRegion='\"\n + Bytes.toStringBinary(startRowOfCurrentRegion) + \"'\");\n }", "java.lang.String getNextHopRegion();", "public abstract RegionScanner getRegionScanner(final Scan scan, final RegionScanner s) throws Throwable;", "private void update() {\n int curRegionX = client.getRegionBaseX();\n int curRegionY = client.getRegionBaseY();\n if(lastRegionX != curRegionX || lastRegionY != curRegionY) {\n //Search for Altars:\n altars.clear();\n Landscape.accept(new LandscapeVisitor() {\n @Override\n public void acceptObject(RSEntityMarker marker) {\n int id = UID.getEntityID(marker.getUid());\n RSObjectDefinition def = client.getObjectDef(id);\n if(def == null || def.getName() == null) return;\n if(def.getName().equals(\"Altar\")) {\n altars.add(marker);\n }\n }\n });\n }\n }", "public void createRegion(HRegionInfo newRegion, HRegionInterface server,\n byte [] metaRegionName, List<HServerAddress> favoriteNodeList)\n throws IOException {\n // 2. Create the HRegion\n HRegion region = HRegion.createHRegion(newRegion, this.master.getRootDir(),\n master.getConfiguration());\n\n // 3. Insert into meta\n HRegionInfo info = region.getRegionInfo();\n byte [] regionName = region.getRegionName();\n\n Put put = new Put(regionName);\n // 3.1 Put the region info into meta table.\n put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,\n Writables.getBytes(info));\n \n // 3.2 Put the favorite nodes into meta.\n if (favoriteNodeList != null) {\n String favoredNodes = RegionPlacement.getFavoredNodes(favoriteNodeList);\n put.add(HConstants.CATALOG_FAMILY, HConstants.FAVOREDNODES_QUALIFIER,\n EnvironmentEdgeManager.currentTimeMillis(), favoredNodes.getBytes());\n LOG.info(\"Create the region \" + info.getRegionNameAsString() +\n \" with favored nodes \" + favoredNodes);\n }\n\n server.put(metaRegionName, put);\n\n // 4. Close the new region to flush it to disk. Close its log file too.\n region.close();\n region.getLog().closeAndDelete();\n \n // After all regions are created, the caller will schedule\n // the meta scanner to run immediately and assign out the\n // regions. \n }", "private Node _locate(Object key){\n\t\tint hashCode = key.hashCode();\r\n\t\tint bucketNum = hashCode % _numBuckets;\r\n\t\treturn _locate(key, bucketNum);\r\n\t}", "public void createRegion(HRegionInfo newRegion, HRegionInterface server,\n byte [] metaRegionName)\n throws IOException {\n createRegion(newRegion, server, metaRegionName, null);\n }", "private void findNewNearestPub() {\n \t\tevent.SetPubLocation(new PubLocation()/*new nearest found location*/);\n \t\tUpdateFromEvent();\n \t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
========== =====Static Functions===== ========== Gets the list of created characters. The returned array is sorted in descending order of the time and date at which the character was last used, such that the most recently used character is at the head of the array.
public static CharacterData[] getCharactersList() { IOUtil.createDir(Resources.DIR_CHARS); FileHandle[] characterDirs = Resources.DIR_CHARS.list(); List<CharacterData> characters = new ArrayList<>(characterDirs.length); // Cycle over all the folders in the characters directory and determine // their validity. for(FileHandle charDir : characterDirs) { CharacterData character = new CharacterData(charDir.name()); try { character.load(); characters.add(character); } catch(IOException e) { Log.get().postSevere("Could not load character data for character \"" + charDir.name() + "\"!"); } } // Now, we convert the List to a conventional array CharacterData[] characterArr = characters.toArray(new CharacterData[0]); // Sort the characters using Java's built-in Comparable interface Arrays.sort(characterArr); return characterArr; }
[ "public static char[] createArray() {\n // Declare an array of characters and create it\n char[] chars = new char[100];\n\n // Create lowercase letters randomly and assign them to the array\n for (int i = 0; i < chars.length; i++) {\n chars[i] = RandomCharacter.getRandomLowerCaseLetter();\n }\n\n // Return the array\n return chars;\n }", "private char[] createRandomCharacters()\n\t{\n\t\tRandom r = new Random();\n\t\tchar[] buf = new char[numberOfCharacters];\n\t\tfor (int i = 0; i < buf.length; i++) \n\t\t{\n\t\t\tbuf[i] = allowedCharacters.charAt(r.nextInt(allowedCharacters.length()));\n\t\t}\n\t\treturn buf;\n\t}", "public StringList createSorted() {\n StringList list = this.duplicate();\n list.sort();\n return list;\n }", "public static JwComparator<AcGlobalDevice> getCreatedUtcTsComparator()\n {\n return AcGlobalDeviceTools.instance.getCreatedUtcTsComparator();\n }", "public Character[] getCharacters() {\n return chars.toArray(new Character[0]);\n }", "private String[] sortedChars(String[] words){\n\t\tString[] sortedChar = new String[words.length];\n\t\t\n\t\tfor(int i=0; i<sortedChar.length; i++){\n\t\t\tsortedChar[i] = sortedWord(words[i]);\n\t\t}\n\t\t\n\t\treturn sortedChar;\n\t}", "String getListChars() throws Exception;", "public GreekCharacter[] getGreekChar() {\n GreekCharacter[] gc = new GreekCharacter[9];\n Collections.shuffle(greekChars);\n\n for(int i= 0; i < 9; i++){\n gc[i] = greekChars.get(i);\n }\n return gc;\n }", "private JSONObject getExistingCharacters() {\n JSONArray charArray = userAcc.getCharArray();\n JSONObject returnChar = new JSONObject();\n\n Log.i(\"Get existing characters\", charArray.toString());\n\n try {\n int i;\n for (i = 0; i < charArray.length(); i++) {\n JSONObject charObject = charArray.getJSONObject(i);\n String charName = charObject.keys().next();\n returnChar.put(charName, charObject.get(charName));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return returnChar;\n }", "public static char[] sortChars(char[] chars) {\n\t\tfor (int i = 0; i < chars.length; i++) {\n\t\t\tfor (int j = 0; j < chars.length - i - 1; j++) {\n\t\t\t\tif (chars[j] > chars[j + 1]) {\n\t\t\t\t\tchar temp = chars[j];\n\t\t\t\t\tchars[j] = chars[j + 1];\n\t\t\t\t\tchars[j + 1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chars;\n\t}", "public char[] getCharacters() {\n return characters;\n }", "public String[] getEncryptionCharacterOrderSet() {\n // printable 94 characters\n String ch[]=new String[94];\n int index=0;\n \n // first add the digits \n ch[0]=\"|)|\";\n ch[1]=\"|!|\";\n ch[2]=\"|@|\";\n ch[3]=\"|#|\";\n ch[4]=\"|~|\";\n ch[5]=\"|%|\";\n ch[6]=\"|^|\";\n ch[7]=\"|&|\";\n ch[8]=\"|*|\";\n ch[9]=\"|(|\";\n index=10;\n \n // now add the characters before the digits\n for(int i=33;i<=47;i++) {\n ch[index]=Character.toString((char)i);\n index++;\n }\n \n // add all other characters after digit 9\n for(int i=58;i<=126;i++) {\n ch[index]=Character.toString((char)i); \n index++;\n }\n return ch; \n \n }", "public static SortedSet<String> findMainCharacters(){\n\t\tif (!occ2characters.isEmpty()){\n\t\t\tSortedSet<String> mainCharacters = new TreeSet<String>();\n\t\t\t// The last key represents the highest Integer value in the keyset.\n\t\t\t// The main characters are the characters who appear most frequently. \n\t\t\tmainCharacters = occ2characters.get(occ2characters.lastKey()); \n\t\t\tSet<Integer> otherOccs = occ2characters.keySet();\n\t\t\totherOccs.remove(occ2characters.lastKey());\n\t\t\treturn mainCharacters;\n\t\t}\n\t\treturn null;\n\t}", "public static String[] generateRegularAlphabet()\n {\n String[] regularAlphabet = new String[26];\n for(int index = 0; index<regularAlphabet.length; index++)\n {\n regularAlphabet[index] = (char)(index+65) + \"\";\n }\n return regularAlphabet;\n }", "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "public String[] getDecryptionCharacterOrderSet() {\n // printable 94 characters\n String ch[]=new String[94];\n int index=0;\n \n // first add the digits \n for(int i=48;i<=57;i++) {\n ch[index]=Character.toString((char)i);\n index++;\n }\n \n // now add the characters before the digits\n for(int i=33;i<=47;i++) {\n ch[index]=Character.toString((char)i);\n index++;\n }\n \n // add all other characters after digit 9\n for(int i=58;i<=126;i++) {\n ch[index]=Character.toString((char)i); \n index++;\n }\n return ch; \n \n }", "public RaceContestant[] sortByTimeTaken() {\n ArrayList<RaceContestant> finishedAL = new ArrayList();\n\n Iterator<RaceContestant> iter = mIDCarnival.values().iterator();\n while (iter.hasNext()) {\n RaceContestant contestant = iter.next();\n if (contestant.getRaceStatus().equals(RaceStatus.FINISHED)) {\n finishedAL.add(new RaceContestant(contestant));\n }\n }\n\n RaceContestant[] finishedArray = finishedAL.toArray(new RaceContestant[finishedAL.size()]);\n\n SortOrder order = new SortOrder();\n Arrays.sort(finishedArray, order);\n return finishedArray;\n }", "private String[] createNamesArray(){\n\t\t//TODO just test data\n\t\t/*\n\t\tfor(int i=0; i<20; i++){\n\t\t\tReplayData rd = new ReplayData(\"Game \" + i);\n\t\t\ttotalData.replays.add(rd);\n\t\t}*/\n\t\tString[] gameNames = new String[totalData.replays.size()];\n\t\tfor(int i =0; i<totalData.replays.size(); i++){\n\t\t\tgameNames[i] = totalData.replays.get(i).getName() + \" @ \" + totalData.replays.get(i).getDate();\n\t\t}\n\t\treturn gameNames;\n\t}", "public Set<Character> alphabetOut() {\n\n Set<Character> alphabetSortie = new HashSet<>();\n\n for (Set<Transition> transitionSet : this.transitions.values()) {\n for (Transition t : transitionSet) {\n alphabetSortie.add(t.getSortie());\n }\n }\n return alphabetSortie;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The private DNS name.
public String getPrivateDnsName() { return this.privateDnsName; }
[ "public String dnsName() {\n // because getHost returns \"null\" for wildcard endpoints\n return url.getAuthority().replaceAll(\":.*\", \"\");\n }", "public String getPrivateDomainName() {\n return this.privateDomainName;\n }", "public String privateDnsZone() {\n return this.privateDnsZone;\n }", "java.lang.String getDns();", "public String getDNSName() {\n return this.dNSName;\n }", "public String internalDnsNameLabel() {\n return this.internalDnsNameLabel;\n }", "public PrivateDnsNameConfiguration getPrivateDnsNameConfiguration() {\n return this.privateDnsNameConfiguration;\n }", "public String getDnsSuffix() {\n return dnsSuffix;\n }", "java.lang.String getUserDN();", "public List<String> getPrivateDnsNames() {\n return getInstances(Running).stream().map(Instance::getPrivateDnsName).collect(Collectors.toList());\n }", "public String getDN() {\n\t\treturn url.getDN();\n }", "String getPdpName();", "public String privateFqdn() {\n return this.privateFqdn;\n }", "public final String getDN()\n {\n return dn;\n }", "String primaryPrivateIP();", "public String internalDomainNameSuffix() {\n return this.internalDomainNameSuffix;\n }", "public static String internalDnsSuffix(SystemName system) {\n String suffix = dnsSuffix(system);\n if (system.isPublic()) {\n // Certificate provider requires special approval for three-level DNS names, e.g. foo.vespa-app.cloud.\n // To avoid this in public we always add an extra level.\n return \".internal\" + suffix;\n }\n return suffix;\n }", "OctetString getSecurityName();", "public String getCdnname() {\r\n return cdnname;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
lncli: `getnodeinfo` GetNodeInfo returns the latest advertised, aggregated, and authenticated channel information for the specified node identified by its public key.
public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.NodeInfo> getNodeInfo( lnrpc.Rpc.NodeInfoRequest request) { return futureUnaryCall( getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request); }
[ "ClusterNodeInfoDTO getNodeInfo(Long organizationId, Long clusterId, String nodeName);", "cn.wsds.gamemaster.pb.Proto.NodeInfo getNodeinfo(int index);", "public com.google.protobuf.ByteString\n getNodeinfoBytes() {\n java.lang.Object ref = nodeinfo_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n nodeinfo_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void getNodeInfo(lnrpc.Rpc.NodeInfoRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.NodeInfo> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request, responseObserver);\n }", "cn.wsds.gamemaster.pb.Proto.NodeInfoOrBuilder getNodeinfoOrBuilder(\n int index);", "com.google.protobuf.ByteString\n getNodeinfoBytes();", "@Override\n public NodeInfo getNodeInfo() {\n NodeInfo nodeInfo = new NodeInfo(this.nodeProbe.isGossipRunning(), this.nodeProbe.isThriftServerRunning(),\n this.nodeProbe.isNativeTransportRunning(), this.nodeProbe.getUptime(),\n this.nodeProbe.getExceptionCount());\n return nodeInfo;\n }", "NodeInformation getNodeInformation();", "java.util.List<cn.wsds.gamemaster.pb.Proto.NodeInfo> \n getNodeinfoList();", "java.lang.String getNodeinfo();", "String getNodeMetadataValue(int node, String key);", "public interface NodeInfoProvider {\n\n Set<KeyAddress> getUIssuerKeys();\n String getUIssuerName();\n int getMinPayment(String extendedType);\n\n @Deprecated\n double getRate(String extendedType);\n\n BigDecimal getServiceRate(String extendedType);\n Collection<KeyAddress> getAdditionalKeysAddressesToSignWith(String extendedType);\n\n @Deprecated\n Collection<PublicKey> getAdditionalKeysToSignWith(String extendedType);\n }", "protected static String listNodeInfo(CS400Graph<Integer>.Vertex node) {\r\n\t\t\tString listAll = \"\"; //begins with empty string\r\n\t\t\t\r\n\t\t\tlistAll = listAll + (\"Computer Name: \" + node.data + \"\\n\\tOutgoing Connections:\"); //adds information about the computer name and prefaces the connections to be listed\r\n\t\t\tString before = listAll; //used for comparison below\r\n\t\t\t\r\n\t\t\tfor (CS400Graph<Integer>.Edge e : node.edgesLeaving) { //for all outgoing connections, list them and their ping\r\n\t\t\t\tlistAll = listAll + (\" (Name: \" + e.target.data + \", Ping: \" + e.weight + \" ms)\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (listAll.equals(before)) { //if the string hasn't been changed (no outgoing connections found), specify that none were found\r\n\t\t\t\tlistAll = listAll + \" NONE\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn listAll; //returns the string\r\n\t}", "public static native long NodeInfo_get_announcement_info(long this_ptr);", "@Path(\"/api/nodeInfo/{clusterId}\")\n\t@GET\n\t@Transactional(rollbackFor = {ValidationException.class, ClusterNotFoundException.class, BaseException.class })\n\t@ApiOperation(value = \"Get the node details for the cluster\", notes = \"User can get the node details for the cluster under his organizarion. User with role Customer Admin or \"\n\t\t\t+ \"Customer User is allowed\", response = ResponseDTO.class)\n\t@ApiResponses({ @ApiResponse(code = 200, message = \"Cluster along with node details have been fetched\") })\n\t@RequestMapping(value = \"/api/nodeInfo/{clusterId}\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasAnyAuthority('Customer User','Customer Admin')\")\n\tpublic ResponseDTO getNodeInfo(\n\t\t\t@ApiParam(name = \"Cluster id\", value = \"The id of the cluster whose details needs to be fetched\", required = true) @PathVariable(\"clusterId\") String clusterId)\n\t\t\t\t\tthrows ValidationException,BaseException {\n\t\tlogger.debug(\"ClusterController.getNodeInfo()\");\n\t\t\n\t\tif(StringUtils.isEmpty(clusterId) && !StringUtils.isNumeric(clusterId)) throw new ValidationException(\"Invalid cluster ID\");\n\t\t\n\t\t\n\t\tString loggedInCustomerId = getLoggedInUserCustomerID(SecurityContextHolder.getContext().getAuthentication());\n\t\t\n\t\tif(!isAccessAllowedforCluster(clusterId,loggedInCustomerId)){\n\t\t\tlogger.debug(\"Customer {} not assossiated with cluster {}\",loggedInCustomerId,clusterId);\n\t\t\tthrow new NotAuthorizeException(\"User not authorized to access given cluster \");\n\t\t}\n\t\t\n\t\tint clusterIds = Integer.parseInt(clusterId);\n\t\t\n\t\tString message = null;\n\t\tString statusCode = HttpStatus.OK.toString();\n\t\tResponseDTO response = null;\n\t\t\n\t\tClusterDTO clusterDTO = new ClusterDTO();\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tCluster clusterEntity = clusterService.findById(clusterIds);\n\n\t\t\tif (clusterEntity != null) {\n\t\t\t\tclusterDTO.setId(String.valueOf(clusterEntity.getId()));\n\t\t\t\tclusterDTO.setIpAddress(clusterEntity.getIpAddress());\n\t\t\t\tclusterDTO.setName(clusterEntity.getName());\n\t\t\t\tclusterDTO.setNfsDetails(clusterEntity.getNfsDetails());\n\t\t\t\tclusterDTO.setSerialNumber(clusterEntity.getSerialNumber());\n\t\t\t\tclusterDTO.setUpgradeOnBoot(clusterEntity.getUpgradeOnBoot());\n\t\t\t\tList<Node> nodeList = nodeService.findAllNodesByCluster(clusterEntity);\n\t\t\t\tif (nodeList != null && !nodeList.isEmpty()) {\n\t\t\t\t\tfor (Node node : nodeList) {\n\t\t\t\t\t\tNodeDTO nodeDTO = new NodeDTO();\n\t\t\t\t\t\tclusterDTO.addNodeDTO(convertNodeToNodeDTO(node, nodeDTO, clusterEntity));\n\t\t\t\t\t\tmessage = environment.getProperty(\"node.all.details\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmessage = environment.getProperty(\"cluster.not.found\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t response = new ResponseDTO();\n\t\t\tresponse.setMessage(environment.getProperty(\"cluster.clusterid.notfound\"));\n\t\t\treturn response;\n\t\t\t\n\t\t}\n\t\tlogger.debug(\"ClusterController.getNodeInfo()\");\n\t\t response = new ResponseDTO(message, Integer.parseInt(statusCode));\n\t\tresponse.setData(clusterDTO);\n\t\treturn response;\n\n\t}", "GraphTransferInfo.NodeInfo getNodeInfo(int index);", "public DefaultMutableTreeNode getInfoNode() {\r\n return this.informationNode;\r\n }", "@Nullable\n public ClusterNodeInfoDocument getClusterNodeInfo(final int clusterId) {\n // Fetch all documents.\n return store.find(CLUSTER_NODES, String.valueOf(clusterId));\n }", "public Node getNodeCurrent(final long processInstanceId);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a database, if it has been modified since a specific DateTime
public org.openntf.red.Database getDatabaseIfModified(String server, String dbfile, lotus.domino.DateTime modifiedsince);
[ "public org.openntf.red.Database getDatabaseIfModified(String server, String dbfile, Date modifiedsince);", "private static boolean isLastUpdateAtLeastThisOld(final Context context, final long time) {\n final long now = System.currentTimeMillis();\n final long lastUpdate = MetadataDbHelper.getOldestUpdateTime(context);\n PrivateLog.log(\"Last update was \" + lastUpdate);\n return lastUpdate + time < now;\n }", "io.bloombox.schema.temporal.Instant getModified();", "long getLastModifyTime();", "public Session[] findWhereDateModifiedEquals(Date dateModified) throws SessionDaoException;", "public long getLastModified();", "Date getLastUpdated();", "public java.sql.Timestamp getModified() {\n return modified;\n }", "public static long getLastDatabaseChangeTimeStamp() {\r\n \t\treturn DatabaseIntegrityManager.lastChangeTimeStampInMillis;\r\n \t}", "long getLastPersistenceTime();", "io.bloombox.schema.temporal.Instant getLastUpdated();", "public Date getLastModifiedDate();", "Date getLastModified(DatasetItem dataset);", "public Date getLastModifyTime() {\n return lastModifyTime;\n }", "public DocumentCollection getModifiedDocuments(final java.util.Date since);", "public Cursor getRecordsAfter(long timestamp) {\n String selection = WeightDBContract.WeightEntry.COLUMN_NAME_TIME + \" >= ?\";\n String[] selectionArgs = { String.valueOf(timestamp) };\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n\n Cursor cursor = db.query(\n WeightDBContract.WeightEntry.TABLE_NAME,\n WEIGHT_PROJECTION, selection, selectionArgs, null, null, DESC_SORT_ORDER\n );\n\n return cursor;\n\n\n }", "int getUpdatedSince();", "public boolean isLogdateModified() {\n return logdate_is_modified; \n }", "public Date getModified()\n {\n return this.modified;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by collins on 6/16/17. interface onpetselectedlistener
public interface OnPetSelectedListener { public void onPetSelected(Integer position, ArrayList<Pet> pets, String source); }
[ "private void itemSelected() {\n\t\titemList.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> {\n\t\t\tif (newValue != null) {\n\t\t\t\t// newValue is just a String here. Its the name of the item;\n\t\t\t\tap.getChildren().clear();\n\t\t\t\tchosenItem = loadItems.getItem(newValue); // takes the newValue and find the item with that name;\n\t\t\t\tPane pane = itemDisplay.itemDisplayPane(chosenItem, cart);\n\t\t\t\tap.getChildren().add(pane);\n\n\t\t\t} else {\n\t\t\t\t// nada\n\t\t\t}\n\t\t});\n\t}", "void onMemeSelected(Meme meme);", "void onAgentSelected(int agentPosition);", "@Override\n public void onEpgItemSelected(int channelPosition, int programPosition) {\n }", "@Override\n public void onSelected(@Nullable Sticker sticker) {\n }", "private void selectWeapon(MouseEvent mouseEvent){\n ImageView selectedView = (ImageView)mouseEvent.getSource();\n selectedView.setScaleX(0.75);\n selectedView.setScaleY(0.75);\n int selectedIndex = this.getChildren().indexOf(selectedView);\n eventUpdater.sendWeapon(weapons.get(selectedIndex));\n }", "void onPickup(Player player);", "public void characterSelected(CharacterSelectionEvent e);", "public interface OnPuntuarSelectedListener {\n public void onPuntuarSelected();\n }", "public interface ListListener {\n\t/*\n\t * Called by soundfun.ui when a different element\n\t * has been selected. This also is called if no\n\t * element was previously selected and is now selected.\n\t */\n\tpublic void selected(String action);\n}", "void onPetLoaded(Pet pet);", "void onChoiceChanged(int position, boolean selected);", "@FXML\n\tpublic void setSelectedItem(MouseEvent event) {\n\t\ttry {\n\t\t\tString s=inventoryList.getSelectionModel().getSelectedItem();\t// Get selected item\n\t\t\tItem i=Item.getItem(ItemList, s);\n\t\t\titemselect.setText(s);\t// Set selected item information\n\t\t\tif(i.getStat().equals(\"HP\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Health\");\n\t\t\telse if(i.getStat().equals(\"DMG\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Damage\");\n\t\t\telse\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Evasion\");\n\t\t} catch(Exception e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "protected void fireSelected() {\n\t\tfor(PinListener listener : pinListeners)\n\t\t\tlistener.eventSelected();\n\t}", "public void getSelected() {\r\n\t\tFoodMenuListFragment frag = new FoodMenuListFragment();\r\n\t\tfor (int i = 0; i < frag.getFoodData().size(); i++) {\r\n\t\t\tif (frag.getFoodData().get(i).isSelected()) {\r\n\t\t\t\tLog.e(\"Selected\", frag.getFoodData().get(i).getName());\r\n\t\t\t\tFoodItem sel = new FoodItem(frag.getFoodData().get(i));\r\n\t\t\t\tfrag.getSelectedFoodData().add(sel);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < frag.getSelectedFoodData().size(); i++) {\r\n\t\t\tfrag.getSelectedFoodData().get(i).setSelected(false);\r\n\t\t}\r\n\t\tmWrapper.changeFragment(new DiningOutFragment(),\r\n\t\t\t\tnew DiningOutListListener(mWrapper));\r\n\t}", "public void onDrugSelected(int atPotision, String drugsName){\r\n if(atPotision!=0){\r\n Drug selectedDrug = db.getSingleDrug(drugsName, \"Pediatrics\");\r\n editTextDrugMg.setText(selectedDrug.get_mg());\r\n editTextDrugMl.setText(selectedDrug.get_ml());\r\n calculate_total_medication(dosage, drugMg, drugMl);\r\n }\r\n }", "@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\tPlayer p = (Player)tableSelectionField.getSelectionModel().getSelectedItem();\n\t\t\t\tpName.setText(p.getName() + \", \" + p.getPos());\n\t\t\t\tStyle.setTextStyle(pName, 45);\n\t\t\t\t\n\t\t\t\tpPrice.setText(\"\\u20ac\" + \" \" + p.getPri());\n\t\t\t\tStyle.setTextStyle(pPrice, 45);\n\t\t\t\t\n\t\t\t\tplayerSelect = p;\n\t\t\t}", "void onSelectionChange(int selectedPosition);", "protected void onSelectedByViewPager() {\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private Constructor for GetMessages that takes a Queue, a marker, a limit, the matchHidden flag, the detail, and a wait time as arguments.
private GetMessages(Queue queue, String marker, Long limit, Boolean matchHidden, String detail, Long wait) { this.queue = queue; this.marker = marker; this.limit = limit; this.matchHidden = matchHidden; this.detail = detail; this.wait = wait; }
[ "public GetMessages(Queue queue) {\n this.queue = queue;\n this.marker = null;\n this.limit = null;\n this.matchHidden = null;\n this.detail = null;\n this.wait = null;\n }", "public GetMessages withLimit(long limit) {\n return new GetMessages(queue, marker, limit, matchHidden, detail, wait);\n }", "public GetMessages withWait(long wait) {\n return new GetMessages(queue, marker, limit, matchHidden, detail, wait);\n }", "public GetMessages withMarker(String marker) {\n return new GetMessages(queue, marker, limit, matchHidden, detail, wait);\n }", "List<InboundMessage> readMessages(String queueName, int timeout);", "public GetMessages withDetail(String detail) {\n return new GetMessages(queue, marker, limit, matchHidden, detail, wait);\n }", "private void receive() {\n\t\tMQGetMessageOptions gmo = new MQGetMessageOptions();\n\t\tif (keepMessages) {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t| MQConstants.MQGMO_BROWSE_FIRST;\n\t\t} else {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2;\n\t\t\tif (syncPoint) {\n\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t}\n\t\t}\n\t\tgmo.matchOptions = MQConstants.MQMO_NONE;\n\t\tgmo.waitInterval = this.waitInterval;\n\n\t\ttry {\n\t\t\tint lastSeqNo = 0;\n\t\t\tlong lastTs = 0;\n\t\t\tint messagecounter = 0;\n\t\t\twhile (true) {\n\t\t\t\tif (!(qmgr.isConnected())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\tif (!(queue.isOpen())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\thaltFileExists();\n\t\t\t\tif (haltStatus) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t} else {\n\t\t\t\t\treadQueue = true;\n\t\t\t\t}\n\t\t\t\tint queueNotInhibited = queue.getInhibitGet();\n\t\t\t\tif (queueNotInhibited == MQConstants.MQQA_GET_INHIBITED) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t}\n\t\t\t\tproduceCounts();\n\t\t\t\tif (readQueue) {\n\t\t\t\t\tqueueDepth = queue.getCurrentDepth();\n\t\t\t\t\tif (queueDepth != 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trcvMessage = new MQMessage();\n\t\t\t\t\t\t\tif (mqccsid != 0) {\n\t\t\t\t\t\t\t\trcvMessage.characterSet = mqccsid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqueue.get(rcvMessage, gmo);\n\t\t\t\t\t\t\trecordCountsRcvd++;\n\t\t\t\t\t\t\tstrLen = rcvMessage.getMessageLength();\n\t\t\t\t\t\t\tstrData = new byte[strLen];\n\t\t\t\t\t\t\trcvMessage.readFully(strData);\n\t\t\t\t\t\t\tmessagePutMs = rcvMessage.putDateTime.getTimeInMillis();\n\t\t\t\t\t\t\tseqNo = rcvMessage.messageSequenceNumber;\n\t\t\t\t\t\t\tif (lastTs == messagePutMs && seqNo == 1) {\n\t\t\t\t\t\t\t\tseqNo = lastSeqNo + seqNo;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmsgText = new String(strData);\n\t\t\t\t\t\t\tjsonOut = new JSONArray();\n\t\t\t\t\t\t\tjsonKey = new JSONObject();\n\t\t\t\t\t\t\tjsonValue = new JSONObject();\n\t\t\t\t\t\t\tjsonKey.put(\"key\", Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tjsonValue.put(\"value\", msgText);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgKey: \" + Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgValue: \" + msgText);\n\t\t\t\t\t\t\tjsonOut.put(jsonKey);\n\t\t\t\t\t\t\tjsonOut.put(jsonValue);\n\t\t\t\t\t\t\tmsgList.add(jsonOut.toString());\n\t\t\t\t\t\t\tlastTs = messagePutMs;\n\t\t\t\t\t\t\tlastSeqNo = seqNo;\n\t\t\t\t\t\t\tmessagecounter++;\n\t\t\t\t\t\t\t// move cursor to next message\n\t\t\t\t\t\t\tif (msgList.size() > maxUMsg / 2) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (msgList.size() > queueDepth) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (keepMessages) {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT | MQConstants.MQGMO_BROWSE_NEXT;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT;\n\t\t\t\t\t\t\t\tif (syncPoint) {\n\t\t\t\t\t\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (MQException e) {\n\t\t\t\t\t\t\tif (e.reasonCode == MQConstants.MQRC_NO_MSG_AVAILABLE) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else if (e.reasonCode == MQConstants.MQRC_SYNCPOINT_LIMIT_REACHED) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\tCalendar.getInstance().getTime() + \" - MQ Reason Code: \" + e.reasonCode);\n\t\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tSystem.out.println(Calendar.getInstance().getTime() + \" - Error: \" + ioe.getMessage());\n\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t}\n\t\t\t\t\tthreadWait();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Throwable t) {\n\t\t\t// restart if there is any other error\n\t\t\trestart(Calendar.getInstance().getTime() + \" - Error receiving data from Queue or QMGR\", t);\n\t\t}\n\n\t}", "public MsgQueueElement(String _sn, String _msg) {\r\nsn = _sn;\r\nmsg = _msg;\r\ntime = System.currentTimeMillis();\r\n}", "public LQT_Message_Queue() {\n\ta_list = new LinkedList<LQT_Message>();\n }", "@Override\n public synchronized QueueMessage pull(String queueName, long visibilityTimeout) {\n int startReadLocation = this.readQueueLocation;\n QueueMessage message = null;\n boolean search = true;\n\n while(search) {\n message = this.ringBufferQueue[startReadLocation];\n\n // If we have a message and it's not 'locked' thats who we want\n if(message != null && message.getTimeout() <= System.currentTimeMillis()) {\n message.setTimeout(System.currentTimeMillis() + visibilityTimeout);\n search = false;\n }\n // Wrap around search\n startReadLocation = this.incrementPosition(startReadLocation);\n\n // We have looked at every element found nothing to do\n if(startReadLocation == this.pushQueueLocation && search) {\n message = null;\n search = false;\n }\n }\n\n return message;\n }", "public MatchMessages() {\n messages = new ArrayList<>();\n }", "public ProducerMessages() {}", "public List<SmsMessage> getSmsMessagesForTimeout(Date cutoffTime);", "public ListQueue() {\n \n }", "public BlockingQueue() {\n }", "public AsyncQueueBroker(int capacity, int timeoutDuration)\n {\n super(capacity, timeoutDuration);\n queue = new ArrayBlockingQueue<V>(100);\n }", "private MessageQueue(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "List<Message> findMessagesByFilter(MessageFilter messageFilter, long limit);", "ReceiveQueue<T> receiveQueue();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field174' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField174() { field174 = null; fieldSetFlags()[174] = false; return this; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField146() {\n field146 = null;\n fieldSetFlags()[146] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField123() {\n field123 = null;\n fieldSetFlags()[123] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField121() {\n field121 = null;\n fieldSetFlags()[121] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField141() {\n field141 = null;\n fieldSetFlags()[141] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField213() {\n field213 = null;\n fieldSetFlags()[213] = false;\n return this;\n }", "private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tmCardNoValue2.setHint(\"-\");\r\n\t\tmCardNoValue3.setText(\"\");\r\n\t\tmCardNoValue3.setHint(\"-\");\r\n\t\tmCardNoValue4.setText(\"\");\r\n\t\tmCardNoValue4.setHint(\"-\");\r\n\t\tmZipCodeValue.setText(\"\");\r\n\t\tmZipCodeValue.setHint(\"Zipcode\");\r\n\t\tmCVVNoValue.setText(\"\");\r\n\t\tmCVVNoValue.setHint(\"CVV\");\r\n\t}", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField976() {\n field976 = null;\n fieldSetFlags()[976] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField987() {\n field987 = null;\n fieldSetFlags()[987] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField142() {\n field142 = null;\n fieldSetFlags()[142] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField124() {\n field124 = null;\n fieldSetFlags()[124] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField543() {\n field543 = null;\n fieldSetFlags()[543] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField776() {\n field776 = null;\n fieldSetFlags()[776] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField164() {\n field164 = null;\n fieldSetFlags()[164] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField158() {\n field158 = null;\n fieldSetFlags()[158] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField116() {\n field116 = null;\n fieldSetFlags()[116] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField994() {\n field994 = null;\n fieldSetFlags()[994] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField34() {\n field34 = null;\n fieldSetFlags()[34] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField563() {\n field563 = null;\n fieldSetFlags()[563] = false;\n return this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleNestedModel" $ANTLR start "entryRuleUnorderedDatatype" PsiInternalExUnorderedGroupsTestLanguage.g:1626:1: entryRuleUnorderedDatatype returns [Boolean current=false] : iv_ruleUnorderedDatatype= ruleUnorderedDatatype EOF ;
public final Boolean entryRuleUnorderedDatatype() throws RecognitionException { Boolean current = false; Boolean iv_ruleUnorderedDatatype = null; try { // PsiInternalExUnorderedGroupsTestLanguage.g:1626:59: (iv_ruleUnorderedDatatype= ruleUnorderedDatatype EOF ) // PsiInternalExUnorderedGroupsTestLanguage.g:1627:2: iv_ruleUnorderedDatatype= ruleUnorderedDatatype EOF { markComposite(elementTypeProvider.getUnorderedDatatypeElementType()); pushFollow(FollowSets000.FOLLOW_1); iv_ruleUnorderedDatatype=ruleUnorderedDatatype(); state._fsp--; current =iv_ruleUnorderedDatatype; match(input,EOF,FollowSets000.FOLLOW_2); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return current; }
[ "public final Boolean entryRuleNestedModel() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleNestedModel = null;\n\n\n try {\n // PsiInternalExUnorderedGroupsTestLanguage.g:1531:53: (iv_ruleNestedModel= ruleNestedModel EOF )\n // PsiInternalExUnorderedGroupsTestLanguage.g:1532:2: iv_ruleNestedModel= ruleNestedModel EOF\n {\n markComposite(elementTypeProvider.getNestedModelElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleNestedModel=ruleNestedModel();\n\n state._fsp--;\n\n current =iv_ruleNestedModel; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }", "public final Boolean entryRuleDatatype2() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleDatatype2 = null;\n\n\n try {\n // PsiInternalFormatterTestLanguage.g:1144:51: (iv_ruleDatatype2= ruleDatatype2 EOF )\n // PsiInternalFormatterTestLanguage.g:1145:2: iv_ruleDatatype2= ruleDatatype2 EOF\n {\n markComposite(elementTypeProvider.getDatatype2ElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleDatatype2=ruleDatatype2();\n\n state._fsp--;\n\n current =iv_ruleDatatype2; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }", "public final Boolean entryRuleDatatype2() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleDatatype2 = null;\n\n\n try {\n // PsiInternalUnassignedTextTestLanguage.g:334:51: (iv_ruleDatatype2= ruleDatatype2 EOF )\n // PsiInternalUnassignedTextTestLanguage.g:335:2: iv_ruleDatatype2= ruleDatatype2 EOF\n {\n markComposite(elementTypeProvider.getDatatype2ElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleDatatype2=ruleDatatype2();\n\n state._fsp--;\n\n current =iv_ruleDatatype2; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }", "public final Boolean entryRuleDatatypeRule() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleDatatypeRule = null;\n\n\n try {\n // PsiInternalUnassignedTextTestLanguage.g:252:54: (iv_ruleDatatypeRule= ruleDatatypeRule EOF )\n // PsiInternalUnassignedTextTestLanguage.g:253:2: iv_ruleDatatypeRule= ruleDatatypeRule EOF\n {\n markComposite(elementTypeProvider.getDatatypeRuleElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleDatatypeRule=ruleDatatypeRule();\n\n state._fsp--;\n\n current =iv_ruleDatatypeRule; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }", "public final Boolean entryRuleDatatype() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleDatatype = null;\n\n\n try {\n // PsiInternalUnassignedTextTestLanguage.g:297:50: (iv_ruleDatatype= ruleDatatype EOF )\n // PsiInternalUnassignedTextTestLanguage.g:298:2: iv_ruleDatatype= ruleDatatype EOF\n {\n markComposite(elementTypeProvider.getDatatypeElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleDatatype=ruleDatatype();\n\n state._fsp--;\n\n current =iv_ruleDatatype; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }", "public final Boolean entryRuleDatatypes() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleDatatypes = null;\n\n\n try {\n // PsiInternalFormatterTestLanguage.g:1182:51: (iv_ruleDatatypes= ruleDatatypes EOF )\n // PsiInternalFormatterTestLanguage.g:1183:2: iv_ruleDatatypes= ruleDatatypes EOF\n {\n markComposite(elementTypeProvider.getDatatypesElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleDatatypes=ruleDatatypes();\n\n state._fsp--;\n\n current =iv_ruleDatatypes; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }", "public final void rule__EDataTypeBody__UnorderedGroup_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:20869:1: ( rule__EDataTypeBody__UnorderedGroup_1__Impl ( rule__EDataTypeBody__UnorderedGroup_1__1 )? )\n // InternalAADMParser.g:20870:2: rule__EDataTypeBody__UnorderedGroup_1__Impl ( rule__EDataTypeBody__UnorderedGroup_1__1 )?\n {\n pushFollow(FOLLOW_69);\n rule__EDataTypeBody__UnorderedGroup_1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:20871:2: ( rule__EDataTypeBody__UnorderedGroup_1__1 )?\n int alt82=2;\n int LA82_0 = input.LA(1);\n\n if ( LA82_0 == Derived_from && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 0) ) {\n alt82=1;\n }\n else if ( LA82_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 1) ) {\n alt82=1;\n }\n else if ( LA82_0 == Constraints && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 2) ) {\n alt82=1;\n }\n else if ( LA82_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 3) ) {\n alt82=1;\n }\n switch (alt82) {\n case 1 :\n // InternalAADMParser.g:20871:2: rule__EDataTypeBody__UnorderedGroup_1__1\n {\n pushFollow(FOLLOW_2);\n rule__EDataTypeBody__UnorderedGroup_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__EDataTypeBody__UnorderedGroup_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:20881:1: ( rule__EDataTypeBody__UnorderedGroup_1__Impl ( rule__EDataTypeBody__UnorderedGroup_1__2 )? )\n // InternalAADMParser.g:20882:2: rule__EDataTypeBody__UnorderedGroup_1__Impl ( rule__EDataTypeBody__UnorderedGroup_1__2 )?\n {\n pushFollow(FOLLOW_69);\n rule__EDataTypeBody__UnorderedGroup_1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:20883:2: ( rule__EDataTypeBody__UnorderedGroup_1__2 )?\n int alt83=2;\n int LA83_0 = input.LA(1);\n\n if ( LA83_0 == Derived_from && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 0) ) {\n alt83=1;\n }\n else if ( LA83_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 1) ) {\n alt83=1;\n }\n else if ( LA83_0 == Constraints && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 2) ) {\n alt83=1;\n }\n else if ( LA83_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 3) ) {\n alt83=1;\n }\n switch (alt83) {\n case 1 :\n // InternalAADMParser.g:20883:2: rule__EDataTypeBody__UnorderedGroup_1__2\n {\n pushFollow(FOLLOW_2);\n rule__EDataTypeBody__UnorderedGroup_1__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__EDataTypeBody__UnorderedGroup_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:20893:1: ( rule__EDataTypeBody__UnorderedGroup_1__Impl ( rule__EDataTypeBody__UnorderedGroup_1__3 )? )\n // InternalAADMParser.g:20894:2: rule__EDataTypeBody__UnorderedGroup_1__Impl ( rule__EDataTypeBody__UnorderedGroup_1__3 )?\n {\n pushFollow(FOLLOW_69);\n rule__EDataTypeBody__UnorderedGroup_1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:20895:2: ( rule__EDataTypeBody__UnorderedGroup_1__3 )?\n int alt84=2;\n int LA84_0 = input.LA(1);\n\n if ( LA84_0 == Derived_from && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 0) ) {\n alt84=1;\n }\n else if ( LA84_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 1) ) {\n alt84=1;\n }\n else if ( LA84_0 == Constraints && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 2) ) {\n alt84=1;\n }\n else if ( LA84_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getEDataTypeBodyAccess().getUnorderedGroup_1(), 3) ) {\n alt84=1;\n }\n switch (alt84) {\n case 1 :\n // InternalAADMParser.g:20895:2: rule__EDataTypeBody__UnorderedGroup_1__3\n {\n pushFollow(FOLLOW_2);\n rule__EDataTypeBody__UnorderedGroup_1__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__AADM_Model__UnorderedGroup__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:20338:1: ( rule__AADM_Model__UnorderedGroup__Impl ( rule__AADM_Model__UnorderedGroup__3 )? )\n // InternalAADMParser.g:20339:2: rule__AADM_Model__UnorderedGroup__Impl ( rule__AADM_Model__UnorderedGroup__3 )?\n {\n pushFollow(FOLLOW_66);\n rule__AADM_Model__UnorderedGroup__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:20340:2: ( rule__AADM_Model__UnorderedGroup__3 )?\n int alt64=2;\n int LA64_0 = input.LA(1);\n\n if ( LA64_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getAADM_ModelAccess().getUnorderedGroup(), 0) ) {\n alt64=1;\n }\n else if ( LA64_0 == Module && getUnorderedGroupHelper().canSelect(grammarAccess.getAADM_ModelAccess().getUnorderedGroup(), 1) ) {\n alt64=1;\n }\n else if ( LA64_0 == Import && getUnorderedGroupHelper().canSelect(grammarAccess.getAADM_ModelAccess().getUnorderedGroup(), 2) ) {\n alt64=1;\n }\n else if ( LA64_0 == Inputs && getUnorderedGroupHelper().canSelect(grammarAccess.getAADM_ModelAccess().getUnorderedGroup(), 3) ) {\n alt64=1;\n }\n else if ( LA64_0 == Node_templates && getUnorderedGroupHelper().canSelect(grammarAccess.getAADM_ModelAccess().getUnorderedGroup(), 4) ) {\n alt64=1;\n }\n else if ( LA64_0 == Policies && getUnorderedGroupHelper().canSelect(grammarAccess.getAADM_ModelAccess().getUnorderedGroup(), 5) ) {\n alt64=1;\n }\n else if ( LA64_0 == Outputs && getUnorderedGroupHelper().canSelect(grammarAccess.getAADM_ModelAccess().getUnorderedGroup(), 6) ) {\n alt64=1;\n }\n switch (alt64) {\n case 1 :\n // InternalAADMParser.g:20340:2: rule__AADM_Model__UnorderedGroup__3\n {\n pushFollow(FOLLOW_2);\n rule__AADM_Model__UnorderedGroup__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__ENodeTypeBody__UnorderedGroup_1__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:22102:1: ( rule__ENodeTypeBody__UnorderedGroup_1__Impl ( rule__ENodeTypeBody__UnorderedGroup_1__4 )? )\n // InternalAADMParser.g:22103:2: rule__ENodeTypeBody__UnorderedGroup_1__Impl ( rule__ENodeTypeBody__UnorderedGroup_1__4 )?\n {\n pushFollow(FOLLOW_78);\n rule__ENodeTypeBody__UnorderedGroup_1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:22104:2: ( rule__ENodeTypeBody__UnorderedGroup_1__4 )?\n int alt124=2;\n int LA124_0 = input.LA(1);\n\n if ( LA124_0 == Derived_from && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 0) ) {\n alt124=1;\n }\n else if ( LA124_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 1) ) {\n alt124=1;\n }\n else if ( LA124_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 2) ) {\n alt124=1;\n }\n else if ( LA124_0 == Attributes && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 3) ) {\n alt124=1;\n }\n else if ( LA124_0 == Interfaces && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 4) ) {\n alt124=1;\n }\n else if ( LA124_0 == Capabilities && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 5) ) {\n alt124=1;\n }\n else if ( LA124_0 == Requirements && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 6) ) {\n alt124=1;\n }\n switch (alt124) {\n case 1 :\n // InternalAADMParser.g:22104:2: rule__ENodeTypeBody__UnorderedGroup_1__4\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTypeBody__UnorderedGroup_1__4();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__ENodeTypeBody__UnorderedGroup_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:22066:1: ( rule__ENodeTypeBody__UnorderedGroup_1__Impl ( rule__ENodeTypeBody__UnorderedGroup_1__1 )? )\n // InternalAADMParser.g:22067:2: rule__ENodeTypeBody__UnorderedGroup_1__Impl ( rule__ENodeTypeBody__UnorderedGroup_1__1 )?\n {\n pushFollow(FOLLOW_78);\n rule__ENodeTypeBody__UnorderedGroup_1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:22068:2: ( rule__ENodeTypeBody__UnorderedGroup_1__1 )?\n int alt121=2;\n int LA121_0 = input.LA(1);\n\n if ( LA121_0 == Derived_from && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 0) ) {\n alt121=1;\n }\n else if ( LA121_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 1) ) {\n alt121=1;\n }\n else if ( LA121_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 2) ) {\n alt121=1;\n }\n else if ( LA121_0 == Attributes && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 3) ) {\n alt121=1;\n }\n else if ( LA121_0 == Interfaces && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 4) ) {\n alt121=1;\n }\n else if ( LA121_0 == Capabilities && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 5) ) {\n alt121=1;\n }\n else if ( LA121_0 == Requirements && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 6) ) {\n alt121=1;\n }\n switch (alt121) {\n case 1 :\n // InternalAADMParser.g:22068:2: rule__ENodeTypeBody__UnorderedGroup_1__1\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTypeBody__UnorderedGroup_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__ENodeTypeBody__UnorderedGroup_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:22078:1: ( rule__ENodeTypeBody__UnorderedGroup_1__Impl ( rule__ENodeTypeBody__UnorderedGroup_1__2 )? )\n // InternalAADMParser.g:22079:2: rule__ENodeTypeBody__UnorderedGroup_1__Impl ( rule__ENodeTypeBody__UnorderedGroup_1__2 )?\n {\n pushFollow(FOLLOW_78);\n rule__ENodeTypeBody__UnorderedGroup_1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:22080:2: ( rule__ENodeTypeBody__UnorderedGroup_1__2 )?\n int alt122=2;\n int LA122_0 = input.LA(1);\n\n if ( LA122_0 == Derived_from && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 0) ) {\n alt122=1;\n }\n else if ( LA122_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 1) ) {\n alt122=1;\n }\n else if ( LA122_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 2) ) {\n alt122=1;\n }\n else if ( LA122_0 == Attributes && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 3) ) {\n alt122=1;\n }\n else if ( LA122_0 == Interfaces && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 4) ) {\n alt122=1;\n }\n else if ( LA122_0 == Capabilities && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 5) ) {\n alt122=1;\n }\n else if ( LA122_0 == Requirements && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 6) ) {\n alt122=1;\n }\n switch (alt122) {\n case 1 :\n // InternalAADMParser.g:22080:2: rule__ENodeTypeBody__UnorderedGroup_1__2\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTypeBody__UnorderedGroup_1__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__ENodeTypeBody__UnorderedGroup_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\tgetUnorderedGroupHelper().enter(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1());\n \t\n try {\n // InternalAADMParser.g:21933:1: ( ( rule__ENodeTypeBody__UnorderedGroup_1__0 )? )\n // InternalAADMParser.g:21934:2: ( rule__ENodeTypeBody__UnorderedGroup_1__0 )?\n {\n // InternalAADMParser.g:21934:2: ( rule__ENodeTypeBody__UnorderedGroup_1__0 )?\n int alt119=2;\n int LA119_0 = input.LA(1);\n\n if ( LA119_0 == Derived_from && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 0) ) {\n alt119=1;\n }\n else if ( LA119_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 1) ) {\n alt119=1;\n }\n else if ( LA119_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 2) ) {\n alt119=1;\n }\n else if ( LA119_0 == Attributes && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 3) ) {\n alt119=1;\n }\n else if ( LA119_0 == Interfaces && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 4) ) {\n alt119=1;\n }\n else if ( LA119_0 == Capabilities && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 5) ) {\n alt119=1;\n }\n else if ( LA119_0 == Requirements && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1(), 6) ) {\n alt119=1;\n }\n switch (alt119) {\n case 1 :\n // InternalAADMParser.g:21934:2: rule__ENodeTypeBody__UnorderedGroup_1__0\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTypeBody__UnorderedGroup_1__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \tgetUnorderedGroupHelper().leave(grammarAccess.getENodeTypeBodyAccess().getUnorderedGroup_1());\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ENodeTemplateBody__UnorderedGroup__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:20556:1: ( rule__ENodeTemplateBody__UnorderedGroup__Impl ( rule__ENodeTemplateBody__UnorderedGroup__3 )? )\n // InternalAADMParser.g:20557:2: rule__ENodeTemplateBody__UnorderedGroup__Impl ( rule__ENodeTemplateBody__UnorderedGroup__3 )?\n {\n pushFollow(FOLLOW_67);\n rule__ENodeTemplateBody__UnorderedGroup__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:20558:2: ( rule__ENodeTemplateBody__UnorderedGroup__3 )?\n int alt71=2;\n int LA71_0 = input.LA(1);\n\n if ( LA71_0 == Type && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 0) ) {\n alt71=1;\n }\n else if ( LA71_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 1) ) {\n alt71=1;\n }\n else if ( LA71_0 == Optimization && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 2) ) {\n alt71=1;\n }\n else if ( LA71_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 3) ) {\n alt71=1;\n }\n else if ( LA71_0 == Attributes && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 4) ) {\n alt71=1;\n }\n else if ( LA71_0 == Requirements && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 5) ) {\n alt71=1;\n }\n else if ( LA71_0 == Capabilities && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 6) ) {\n alt71=1;\n }\n switch (alt71) {\n case 1 :\n // InternalAADMParser.g:20558:2: rule__ENodeTemplateBody__UnorderedGroup__3\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTemplateBody__UnorderedGroup__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__EPropertyDefinitionBody__UnorderedGroup__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:22499:1: ( rule__EPropertyDefinitionBody__UnorderedGroup__Impl ( rule__EPropertyDefinitionBody__UnorderedGroup__3 )? )\n // InternalAADMParser.g:22500:2: rule__EPropertyDefinitionBody__UnorderedGroup__Impl ( rule__EPropertyDefinitionBody__UnorderedGroup__3 )?\n {\n pushFollow(FOLLOW_80);\n rule__EPropertyDefinitionBody__UnorderedGroup__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:22501:2: ( rule__EPropertyDefinitionBody__UnorderedGroup__3 )?\n int alt137=2;\n int LA137_0 = input.LA(1);\n\n if ( LA137_0 == Type && getUnorderedGroupHelper().canSelect(grammarAccess.getEPropertyDefinitionBodyAccess().getUnorderedGroup(), 0) ) {\n alt137=1;\n }\n else if ( LA137_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getEPropertyDefinitionBodyAccess().getUnorderedGroup(), 1) ) {\n alt137=1;\n }\n else if ( LA137_0 == Required && getUnorderedGroupHelper().canSelect(grammarAccess.getEPropertyDefinitionBodyAccess().getUnorderedGroup(), 2) ) {\n alt137=1;\n }\n else if ( LA137_0 == Default && getUnorderedGroupHelper().canSelect(grammarAccess.getEPropertyDefinitionBodyAccess().getUnorderedGroup(), 3) ) {\n alt137=1;\n }\n else if ( LA137_0 == Status && getUnorderedGroupHelper().canSelect(grammarAccess.getEPropertyDefinitionBodyAccess().getUnorderedGroup(), 4) ) {\n alt137=1;\n }\n else if ( LA137_0 == Constraints && getUnorderedGroupHelper().canSelect(grammarAccess.getEPropertyDefinitionBodyAccess().getUnorderedGroup(), 5) ) {\n alt137=1;\n }\n else if ( LA137_0 == Entry_schema && getUnorderedGroupHelper().canSelect(grammarAccess.getEPropertyDefinitionBodyAccess().getUnorderedGroup(), 6) ) {\n alt137=1;\n }\n switch (alt137) {\n case 1 :\n // InternalAADMParser.g:22501:2: rule__EPropertyDefinitionBody__UnorderedGroup__3\n {\n pushFollow(FOLLOW_2);\n rule__EPropertyDefinitionBody__UnorderedGroup__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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 Boolean entryRuleDatatype3() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleDatatype3 = null;\n\n\n try {\n // PsiInternalFormatterTestLanguage.g:1163:51: (iv_ruleDatatype3= ruleDatatype3 EOF )\n // PsiInternalFormatterTestLanguage.g:1164:2: iv_ruleDatatype3= ruleDatatype3 EOF\n {\n markComposite(elementTypeProvider.getDatatype3ElementType()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleDatatype3=ruleDatatype3();\n\n state._fsp--;\n\n current =iv_ruleDatatype3; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }", "public final void rule__ENodeTemplateBody__UnorderedGroup__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:20568:1: ( rule__ENodeTemplateBody__UnorderedGroup__Impl ( rule__ENodeTemplateBody__UnorderedGroup__4 )? )\n // InternalAADMParser.g:20569:2: rule__ENodeTemplateBody__UnorderedGroup__Impl ( rule__ENodeTemplateBody__UnorderedGroup__4 )?\n {\n pushFollow(FOLLOW_67);\n rule__ENodeTemplateBody__UnorderedGroup__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:20570:2: ( rule__ENodeTemplateBody__UnorderedGroup__4 )?\n int alt72=2;\n int LA72_0 = input.LA(1);\n\n if ( LA72_0 == Type && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 0) ) {\n alt72=1;\n }\n else if ( LA72_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 1) ) {\n alt72=1;\n }\n else if ( LA72_0 == Optimization && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 2) ) {\n alt72=1;\n }\n else if ( LA72_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 3) ) {\n alt72=1;\n }\n else if ( LA72_0 == Attributes && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 4) ) {\n alt72=1;\n }\n else if ( LA72_0 == Requirements && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 5) ) {\n alt72=1;\n }\n else if ( LA72_0 == Capabilities && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 6) ) {\n alt72=1;\n }\n switch (alt72) {\n case 1 :\n // InternalAADMParser.g:20570:2: rule__ENodeTemplateBody__UnorderedGroup__4\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTemplateBody__UnorderedGroup__4();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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__ENodeTemplateBody__UnorderedGroup__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:20532:1: ( rule__ENodeTemplateBody__UnorderedGroup__Impl ( rule__ENodeTemplateBody__UnorderedGroup__1 )? )\n // InternalAADMParser.g:20533:2: rule__ENodeTemplateBody__UnorderedGroup__Impl ( rule__ENodeTemplateBody__UnorderedGroup__1 )?\n {\n pushFollow(FOLLOW_67);\n rule__ENodeTemplateBody__UnorderedGroup__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n // InternalAADMParser.g:20534:2: ( rule__ENodeTemplateBody__UnorderedGroup__1 )?\n int alt69=2;\n int LA69_0 = input.LA(1);\n\n if ( LA69_0 == Type && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 0) ) {\n alt69=1;\n }\n else if ( LA69_0 == Description && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 1) ) {\n alt69=1;\n }\n else if ( LA69_0 == Optimization && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 2) ) {\n alt69=1;\n }\n else if ( LA69_0 == Properties && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 3) ) {\n alt69=1;\n }\n else if ( LA69_0 == Attributes && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 4) ) {\n alt69=1;\n }\n else if ( LA69_0 == Requirements && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 5) ) {\n alt69=1;\n }\n else if ( LA69_0 == Capabilities && getUnorderedGroupHelper().canSelect(grammarAccess.getENodeTemplateBodyAccess().getUnorderedGroup(), 6) ) {\n alt69=1;\n }\n switch (alt69) {\n case 1 :\n // InternalAADMParser.g:20534:2: rule__ENodeTemplateBody__UnorderedGroup__1\n {\n pushFollow(FOLLOW_2);\n rule__ENodeTemplateBody__UnorderedGroup__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\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 }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "prog" $ANTLR start "q" C:\\Users\\Cavicchio\\workspace\\InterDepAdjStructure\\newgrammar\\JCB_tree.g:116:1: q : INT ;
public final void q() throws RecognitionException { Token INT1=null; try { // C:\\Users\\Cavicchio\\workspace\\InterDepAdjStructure\\newgrammar\\JCB_tree.g:116:2: ( INT ) // C:\\Users\\Cavicchio\\workspace\\InterDepAdjStructure\\newgrammar\\JCB_tree.g:116:4: INT { INT1=(Token)match(input,INT,FOLLOW_INT_in_q98); if (displayProductions == true) { System.out.println("Production: q: INT --> q = " + (INT1!=null?INT1.getText():null)); } // Maximum allowable non-preemptive region. int Q = Integer.parseInt((INT1!=null?INT1.getText():null)); problem.setQValue(Q); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { // do for sure before leaving } return ; }
[ "public final void mQ() throws RecognitionException {\n try {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:410:11: ( ( 'q' | 'Q' ) )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:410:12: ( 'q' | 'Q' )\n {\n if ( input.LA(1)=='Q'||input.LA(1)=='q' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public final void mQ() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:543:11: ( ( 'q' | 'Q' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:543:13: ( 'q' | 'Q' )\n {\n if ( input.LA(1)=='Q'||input.LA(1)=='q' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public final void mQ() throws RecognitionException {\n try {\n // Z:\\\\Compiler\\\\CIP\\\\Aufgabe 3\\\\Sebastian\\\\AST_Symbolraetsel.g:61:12: ( 'Q' )\n // Z:\\\\Compiler\\\\CIP\\\\Aufgabe 3\\\\Sebastian\\\\AST_Symbolraetsel.g:61:14: 'Q'\n {\n match('Q'); \n\n }\n\n\n }\n finally {\n \t// do for sure before leaving\n }\n }", "public final void mQ() throws RecognitionException {\r\n try {\r\n // F:\\\\workspace\\\\PossDB\\\\Grammers\\\\CreateTable.g:153:11: ( 'Q' | 'q' )\r\n // F:\\\\workspace\\\\PossDB\\\\Grammers\\\\CreateTable.g:\r\n {\r\n if ( input.LA(1)=='Q'||input.LA(1)=='q' ) {\r\n input.consume();\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public final void mQ() throws RecognitionException {\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/compactcat/parser/CompactCatDictionary.g:309:11: ( ( 'q' | 'Q' ) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/compactcat/parser/CompactCatDictionary.g:309:12: ( 'q' | 'Q' )\n {\n if ( input.LA(1)=='Q'||input.LA(1)=='q' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "protected void visit_Q(ITreeNode node)\n {\n // You should *not* place your code right here. \n // Instead, you should override this method via a subclass.\n visitUnknown(node); // Default Behavior\n }", "String query_grammar () throws BaseException;", "public interface QuotedL1Node {\n\n}", "int query(/*int cn, int l, int r, int ql, int qr*/){\n return tree[1];\n }", "String query_grammar (SharkTransaction t) throws BaseException;", "public interface QueryTerm extends QueryNode\n{\n}", "@Test \r\n\tpublic void testQParse() throws ParseError, IOException {\n\t\t\r\n\r\n\r\n\t}", "public void setQ(java.lang.Integer value) {\n this.q = value;\n }", "public void setQ(int q) {\n this.q = q;\n }", "public final QueryParser.query_return query() throws RecognitionException {\n QueryParser.query_return retval = new QueryParser.query_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token EOF2=null;\n QueryParser.statement_return statement1 =null;\n\n\n Object EOF2_tree=null;\n RewriteRuleTokenStream stream_EOF=new RewriteRuleTokenStream(adaptor,\"token EOF\");\n RewriteRuleSubtreeStream stream_statement=new RewriteRuleSubtreeStream(adaptor,\"rule statement\");\n try {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:147:7: ( ( statement )* EOF -> ^( QUERY ( statement )* ) )\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:147:9: ( statement )* EOF\n {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:147:9: ( statement )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( (LA1_0==COGROUP||LA1_0==CROSS||LA1_0==DEFINE||LA1_0==DISTINCT||LA1_0==FILTER||LA1_0==FOREACH||LA1_0==GROUP||LA1_0==IDENTIFIER_L||LA1_0==IMPORT||LA1_0==JOIN||LA1_0==LEFT_PAREN||(LA1_0 >= LIMIT && LA1_0 <= LOAD)||LA1_0==MAPREDUCE||LA1_0==ORDER||(LA1_0 >= SAMPLE && LA1_0 <= SEMI_COLON)||LA1_0==SPLIT||(LA1_0 >= STORE && LA1_0 <= STREAM)||LA1_0==UNION) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:147:9: statement\n \t {\n \t pushFollow(FOLLOW_statement_in_query356);\n \t statement1=statement();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_statement.add(statement1.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n\n EOF2=(Token)match(input,EOF,FOLLOW_EOF_in_query359); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_EOF.add(EOF2);\n\n\n // AST REWRITE\n // elements: statement\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 148:6: -> ^( QUERY ( statement )* )\n {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:148:9: ^( QUERY ( statement )* )\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot(\n (Object)adaptor.create(QUERY, \"QUERY\")\n , root_1);\n\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:148:18: ( statement )*\n while ( stream_statement.hasNext() ) {\n adaptor.addChild(root_1, stream_statement.nextTree());\n\n }\n stream_statement.reset();\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n\n retval.tree = root_0;\n }\n\n }\n\n retval.stop = input.LT(-1);\n\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public BHTree(Quadrant q) {\n this.quadrant = q;\n }", "public interface StatementNode extends ASTnode {\n\n}", "public IntegerResultNode() {\n\n }", "public ASTLhs(int id)\n {\n super(id);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.cosmos.base.query.v1beta1.PageRequest pagination = 1;
cosmos.base.query.v1beta1.Pagination.PageRequest getPagination();
[ "cosmos.base.query.v1beta1.PageRequest getPagination();", "cosmos.base.query.v1beta1.PageResponse getPagination();", "cosmos.base.query.v1beta1.Pagination.PageResponse getPagination();", "cosmos.base.query.v1beta1.PageResponseOrBuilder getPaginationOrBuilder();", "sawtooth.sdk.protobuf.ClientPagingResponse getPaging();", "Page<HrDocumentRequest> getPendingDocumentRequests(Pageable pageRequest);", "CertificateRequestQueryResponseApiModel queryRequests(Integer pageSize, CertificateRequestQueryRequestApiModel body);", "void setPageSize(DriveRequest<?> request, Integer pageSize);", "sawtooth.sdk.protobuf.ClientPagingResponseOrBuilder getPagingOrBuilder();", "Page<EndpointSyncDTO> findAll(Pageable pageable);", "void findWithPagination(Pagination<Activity, Assignment> pagination);", "List<Activity> findAllPageable(int page, int size);", "void findWithPagination(Pagination<Task, Project> pagination);", "public interface Pagination<M, R> extends PageSupport<R> {\n\n /**\n * @param skip skip results\n * @param limit number of items to select (to select all set value less or equal 0)\n * @return list of selected entities or empty list (if range not exist)\n */\n @Query(\"select from ${M}\")\n List<R> getAll(@Skip int skip, @Limit int limit);\n\n /**\n * @return number of records\n */\n @Query(\"select count(@rid) from ${M}\")\n int getCount();\n}", "Page<AppCustomerBasic> findAllByUsersex(Long activity, Pageable pageable);", "Page<TipoPonto> BuscarTodosPaginavel(PageRequest pageRequest);", "Page<HrDocumentRequest> getApprovedDocumentRequests(Pageable pageRequest);", "public Long getPagingRequest() {\r\n return pagingRequest;\r\n }", "List<T> that(Query query, int pageSize, int page);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pause all currently running calls.
boolean pauseAllCalls();
[ "public void pauseAllCalls();", "public void pausedAllObjects();", "void pauseAll() throws SchedulerException;", "void systemPauseThreads() {\n myHiddenPause = true;\n pauseThreads();\n }", "synchronized void userPauseThreads() {\n myGamePause = true;\n pauseThreads();\n }", "public synchronized void pause () {\r\n if (!paused) {\r\n end = System.currentTimeMillis();\r\n paused = true;\r\n }\r\n }", "synchronized void pause() {\n\t\tpaused = true;\n\t}", "public void pause()\n {\n paused = true;\n }", "void pauseAllJobs() throws SchedulerException;", "public void togglePause() {\n\t\tif (running) \n\t\t\tpause();\n\t\telse\n\t\t\tresume();\n\t}", "public void pause() {\n timelines.forEach(Timeline::pause);\n }", "public void requestPause();", "public void pause() {\n this.keyToSounds.forEach((o, sounds) -> {\n sounds.forEach((s, sound) -> sound.pause());\n });\n }", "public void unPause() { running = true; }", "public void suspend() throws AlreadyPausedException;", "public void paused() {\n LOGGER.info(\"Paused\");\n }", "public void pause() {\n cancelCallback();\n mStartTimeMillis *= -1;\n }", "public void pause() {\n if (!isPaused())\n pauseTime = getClockMiliseconds();\n }", "public static void pauseGame() {\r\n\t\tfor (MovingUnit mu : _players) {\r\n\t\t\t((WinningInterface) mu).pauseUnit();\r\n\t\t}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies the accuracy of DirectProjectMetadataKeyAudit entity mapping by doing persist, find, merge, refresh and delete on the entity.
@Test public void testDirectProjectMetadataKeyAudit_Delete() throws Exception { et.begin(); // Create and persist DirectProjectMetadataKeyAudit defined = getDirectProjectMetadataKeyAudit(); em.persist(defined); // flush the change to DB em.flush(); et.commit(); // Retrieve it DirectProjectMetadataKeyAudit found = em.find(DirectProjectMetadataKeyAudit.class, defined.getId()); assertNotNull("DirectProjectMetadataKeyAudit persistence.", found); assertDirectProjectMetadataKeyAudit(defined, found); // delete et.begin(); em.remove(defined); et.commit(); DirectProjectMetadataKeyAudit deleted = em.find(DirectProjectMetadataKeyAudit.class, found.getId()); assertNull("DirectProjectMetadataKeyAudit entity is not removed.", deleted); }
[ "@Test\n public void testDirectProjectMetadataKeyAudit_Update() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataKeyAudit defined = getDirectProjectMetadataKeyAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n et.begin();\n\n // Retrieve it\n DirectProjectMetadataKeyAudit found = em.find(DirectProjectMetadataKeyAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataKeyAudit persistence.\", found);\n\n assertDirectProjectMetadataKeyAudit(defined, found);\n\n // update it\n defined.setName(\"new_name\");\n em.merge(defined);\n\n // Commit the transaction\n et.commit();\n\n et.begin();\n\n // Refresh\n em.refresh(found);\n\n // Verify the update\n assertDirectProjectMetadataKeyAudit(defined, found);\n et.commit();\n }", "@Test\n public void testDirectProjectMetadataKeyAudit_Create() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataKeyAudit defined = getDirectProjectMetadataKeyAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadataKeyAudit found = em.find(DirectProjectMetadataKeyAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataKeyAudit persistence.\", found);\n\n assertDirectProjectMetadataKeyAudit(defined, found);\n }", "@Test\n public void testDirectProjectMetadataAudit_Update() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataAudit defined = getDirectProjectMetadataAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n et.begin();\n\n // Retrieve it\n DirectProjectMetadataAudit found = em.find(DirectProjectMetadataAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataAudit persistence.\", found);\n\n assertDirectProjectMetadataAudit(defined, found);\n\n // update it\n defined.setMetadataValue(\"new_metadata\");\n em.merge(defined);\n\n // Commit the transaction\n et.commit();\n\n et.begin();\n\n // Refresh\n em.refresh(found);\n\n // Verify the update\n assertDirectProjectMetadataAudit(defined, found);\n\n et.commit();\n }", "@Test\n public void testDirectProjectMetadataKey_Update() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataKey defined = getDirectProjectMetadataKey();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n et.begin();\n\n // Retrieve it\n DirectProjectMetadataKey found = em.find(DirectProjectMetadataKey.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataKey persistence.\", found);\n\n assertDirectProjectMetadataKey(defined, found);\n\n // update it\n defined.setDescription(\"new_description\");\n em.merge(defined);\n\n // Commit the transaction\n et.commit();\n\n et.begin();\n\n // Refresh\n em.refresh(found);\n\n // Verify the update\n assertDirectProjectMetadataKey(defined, found);\n et.commit();\n\n }", "@Test\n public void testDirectProjectMetadataAudit_Delete() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataAudit defined = getDirectProjectMetadataAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadataAudit found = em.find(DirectProjectMetadataAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataAudit persistence.\", found);\n assertDirectProjectMetadataAudit(defined, found);\n\n et.begin();\n // delete\n em.remove(defined);\n et.commit();\n\n DirectProjectMetadataAudit deleted = em.find(DirectProjectMetadataAudit.class, found.getId());\n assertNull(\"DirectProjectMetadataAudit entity is not removed.\", deleted);\n\n }", "@Test\n public void testDirectProjectMetadataKey_Delete() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataKey defined = getDirectProjectMetadataKey();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadataKey found = em.find(DirectProjectMetadataKey.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataKey persistence.\", found);\n\n assertDirectProjectMetadataKey(defined, found);\n\n // delete\n et.begin();\n em.remove(defined);\n et.commit();\n\n DirectProjectMetadataKey deleted = em.find(DirectProjectMetadataKey.class, found.getId());\n assertNull(\"DirectProjectMetadataKey entity is not removed.\", deleted);\n }", "@Test\n public void testDirectProjectMetadata_Update() throws Exception {\n et.begin();\n\n DirectProjectMetadata defined = getDirectProjectMetadata();\n\n // Create and persist\n DirectProjectMetadataKey mKey = defined.getProjectMetadataKey();\n em.persist(mKey);\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n et.begin();\n\n // Retrieve it\n DirectProjectMetadata found = em.find(DirectProjectMetadata.class, defined.getId());\n assertNotNull(\"DirectProjectMetadata persistence.\", found);\n\n assertDirectProjectMetadata(defined, found);\n\n // update it\n defined.setMetadataValue(\"new_metadata\");\n em.merge(defined);\n\n // Commit the transaction\n et.commit();\n\n et.begin();\n\n // Refresh\n em.refresh(found);\n\n // Verify the update\n assertDirectProjectMetadata(defined, found);\n et.commit();\n }", "@Test\n public void testDirectProjectMetadataAudit_Create() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataAudit defined = getDirectProjectMetadataAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadataAudit found = em.find(DirectProjectMetadataAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataAudit persistence.\", found);\n\n assertDirectProjectMetadataAudit(defined, found);\n }", "@Test\n public void testDirectProjectMetadataPredefinedValueAudit_Update() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataPredefinedValueAudit defined = getDirectProjectMetadataPredefinedValueAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n et.begin();\n\n // Retrieve it\n DirectProjectMetadataPredefinedValueAudit found =\n em.find(DirectProjectMetadataPredefinedValueAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataPredefinedValueAudit persistence.\", found);\n\n assertDirectProjectMetadataPredefinedValueAudit(defined, found);\n\n // update it\n defined.setPredefinedMetadataValue(\"new_metadata\");\n em.merge(defined);\n\n // Commit the transaction\n et.commit();\n\n et.begin();\n\n // Refresh\n em.refresh(found);\n\n // Verify the update\n assertDirectProjectMetadataPredefinedValueAudit(defined, found);\n et.commit();\n\n }", "@Test\n public void testDirectProjectMetadata_Delete() throws Exception {\n et.begin();\n\n DirectProjectMetadata defined = getDirectProjectMetadata();\n\n // Create and persist\n DirectProjectMetadataKey mKey = defined.getProjectMetadataKey();\n em.persist(mKey);\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadata found = em.find(DirectProjectMetadata.class, defined.getId());\n assertNotNull(\"DirectProjectMetadata persistence.\", found);\n\n assertDirectProjectMetadata(defined, found);\n\n // delete\n et.begin();\n em.remove(defined);\n et.commit();\n\n DirectProjectMetadata deleted = em.find(DirectProjectMetadata.class, found.getId());\n assertNull(\"DirectProjectMetadata entity is not removed.\", deleted);\n\n }", "@Test\n public void testDirectProjectMetadataKey_Create() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataKey defined = getDirectProjectMetadataKey();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadataKey found = em.find(DirectProjectMetadataKey.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataKey persistence.\", found);\n\n assertDirectProjectMetadataKey(defined, found);\n }", "@Test\n public void testDirectProjectMetadataPredefinedValueAudit_Delete() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataPredefinedValueAudit defined = getDirectProjectMetadataPredefinedValueAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadataPredefinedValueAudit found =\n em.find(DirectProjectMetadataPredefinedValueAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataPredefinedValueAudit persistence.\", found);\n\n assertDirectProjectMetadataPredefinedValueAudit(defined, found);\n\n // delete\n et.begin();\n em.remove(defined);\n et.commit();\n\n DirectProjectMetadataPredefinedValueAudit deleted =\n em.find(DirectProjectMetadataPredefinedValueAudit.class, found.getId());\n assertNull(\"DirectProjectMetadataPredefinedValueAudit entity is not removed.\", deleted);\n }", "protected abstract boolean checkMetadata (ScopedEntityMetadata metadata);", "@Test\n public void testDirectProjectMetadata_Create() throws Exception {\n et.begin();\n\n DirectProjectMetadata defined = getDirectProjectMetadata();\n\n // Create and persist\n DirectProjectMetadataKey mKey = defined.getProjectMetadataKey();\n em.persist(mKey);\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadata found = em.find(DirectProjectMetadata.class, defined.getId());\n assertNotNull(\"DirectProjectMetadata persistence.\", found);\n\n assertDirectProjectMetadata(defined, found);\n\n }", "@Test\n public void testDirectProjectMetadataPredefinedValue_Update() throws Exception {\n et.begin();\n\n DirectProjectMetadataKey metadataKey = getDirectProjectMetadataKey();\n DirectProjectMetadataPredefinedValue defined = metadataKey.getPredefinedValues().get(0);\n\n // Create and persist\n em.persist(metadataKey);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n et.begin();\n\n // Retrieve it\n DirectProjectMetadataPredefinedValue found =\n em.find(DirectProjectMetadataPredefinedValue.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataPredefinedValue persistence.\", found);\n\n assertDirectProjectMetadataPredefinedValue(defined, found);\n\n // update it\n defined.setPredefinedMetadataValue(\"new_metadata\");\n em.merge(defined);\n\n // Commit the transaction\n et.commit();\n\n et.begin();\n\n // Refresh\n em.refresh(found);\n\n // Verify the update\n assertDirectProjectMetadataPredefinedValue(defined, found);\n et.commit();\n\n }", "private static void assertDirectProjectMetadataKeyAudit(DirectProjectMetadataKeyAudit expected,\n DirectProjectMetadataKeyAudit actual) {\n if ((expected == null) || (actual == null)) {\n assertEquals(\"DirectProjectMetadataKeyAudit MissMatch.\", expected, actual);\n }\n\n assertEquals(\"DirectProjectMetadataKeyAudit's single MissMatch.\",\n expected.isSingle(), actual.isSingle());\n assertEquals(\"DirectProjectMetadataKeyAudit's actionDate MissMatch.\",\n convertDateToString(expected.getActionDate()), convertDateToString(actual.getActionDate()));\n assertEquals(\"DirectProjectMetadataKeyAudit's actionUserId MissMatch.\",\n expected.getActionUserId(), actual.getActionUserId());\n assertEquals(\"DirectProjectMetadataKeyAudit's auditActionTypeId MissMatch.\",\n expected.getAuditActionTypeId(), actual.getAuditActionTypeId());\n assertEquals(\"DirectProjectMetadataKeyAudit's clientId MissMatch.\",\n expected.getClientId(), actual.getClientId());\n assertEquals(\"DirectProjectMetadataKeyAudit's description MissMatch.\",\n expected.getDescription(), actual.getDescription());\n assertEquals(\"DirectProjectMetadataKeyAudit's grouping MissMatch.\",\n expected.getGrouping(), actual.getGrouping());\n assertEquals(\"DirectProjectMetadataKeyAudit's id MissMatch.\",\n expected.getId(), actual.getId());\n assertEquals(\"DirectProjectMetadataKeyAudit's name MissMatch.\",\n expected.getName(), actual.getName());\n assertEquals(\"DirectProjectMetadataKeyAudit's projectMetadataKeyId MissMatch.\",\n expected.getProjectMetadataKeyId(), actual.getProjectMetadataKeyId());\n }", "@Test\n public void testDirectProjectMetadataPredefinedValueAudit_Create() throws Exception {\n et.begin();\n\n // Create and persist\n DirectProjectMetadataPredefinedValueAudit defined = getDirectProjectMetadataPredefinedValueAudit();\n em.persist(defined);\n\n // flush the change to DB\n em.flush();\n et.commit();\n\n // Retrieve it\n DirectProjectMetadataPredefinedValueAudit found =\n em.find(DirectProjectMetadataPredefinedValueAudit.class, defined.getId());\n assertNotNull(\"DirectProjectMetadataPredefinedValueAudit persistence.\", found);\n\n assertDirectProjectMetadataPredefinedValueAudit(defined, found);\n\n }", "@Validate\n\tpublic void validateAllAuditTablesHaveAForeignKeyToRevisionTable() throws SQLException, DataSetException\n\t{\n\t\tfinal Set<String> auditTablesInDatabase = connectionProvider.getQueries().getListOfTablesWithForeignKeysToRevisionTable();\n\t\tfinal Set<String> auditTablesWithoutAForeignKey = new HashSet<>(auditTableInformationMap.keySet());\n\t\tauditTablesWithoutAForeignKey.removeAll(auditTablesInDatabase);\n\n\t\tif (!auditTablesWithoutAForeignKey.isEmpty())\n\t\t{\n\t\t\tthrow new ValidationException(\"The following audit tables were found without a foreign key to the revision table\" + auditTablesWithoutAForeignKey + \".\");\n\t\t}\n\t}", "protected void validateEntity() {\r\n super.validateEntity();\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds a hamiltonian path in a graph given it's adjacency matrix using greedy heuristic. Algorithm is described at slide 2526 of the project's presentation slides.
private static int[] greedyHamiltonianPath(int[][] graph){ int length = collection.length(); byte[] in = new byte[length], out = new byte[length]; ArrayList<int[]> sets = new ArrayList<int[]>(); ArrayList<int[]> vertices = new ArrayList<int[]>(); for(int i=0; i<length; i++){ sets.add(new int[] {i}); for(int j=0; j<length; j++){ if(i!=j){ vertices.add(new int[] {graph[i][j], i, j}); } } } vertices.sort(Comparator.comparing(a -> -a[0])); int[][] greedy_hamiltionian_path_vertice = new int[length-1][2]; int greedy_index = 0; for(int[] vertex:vertices){ int f = vertex[1]; int g = vertex[2]; if(in[g]==0 && out[f]==0){ int[] setF = findSet(sets, f); int[] setG = findSet(sets, g); if(!setF.equals(setG)){ greedy_hamiltionian_path_vertice[greedy_index] = new int[] {f, g}; greedy_index++; in[g]=1; out[f]=1; if(union(sets, setF, setG)==1){ break; } } } } // translate vertice list in a path int[] greedy_hamiltionian_path = new int[length]; // find starting point (the one that has no entry in 'in' but has one in 'out') for(int i=0; i<length; i++){ if(in[i]==0){ greedy_hamiltionian_path[0]=i; break; } } // then fill vector for(int i=1; i<length; i++){ for(int[] vertex : greedy_hamiltionian_path_vertice){ if(vertex[0]==greedy_hamiltionian_path[i-1]){ greedy_hamiltionian_path[i]=vertex[1]; break; } } } return greedy_hamiltionian_path; }
[ "private static LinkedList<SequenceGraph.Node> findHamiltonianPath(SequenceGraph graph) {\n\t\tSequenceGraph.Node root = graph.getRoot();\n\t\tHashSet<SequenceGraph.Node> visitedSet = new HashSet<>();\n\t\tLinkedList<SequenceGraph.Node> path = new LinkedList<>();\n\n\t\tif (root == null || !findHamiltonianPath(graph, root, visitedSet, path)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn path;\n\t}", "public void exerciseGraph(){\n\n Graph l = new Graph();\n\n l.addVertex(\"A\" );\n l.addVertex(\"B\" );\n l.addVertex(\"C\" );\n l.addVertex(\"D\" );\n l.addVertex(\"E\" );\n l.addVertex(\"F\" );\n l.addVertex(\"G\" );\n l.addVertex(\"H\" );\n l.addVertex(\"K\" );\n l.addVertex(\"M\" );\n\n l.addEdge(\"A\", \"B\" );\n l.addEdge(\"A\", \"C\" );\n l.addEdge(\"A\", \"D\" );\n l.addEdge(\"B\", \"C\" );\n l.addEdge(\"B\", \"F\" );\n l.addEdge(\"C\", \"D\" );\n l.addEdge(\"F\", \"K\" );\n l.addEdge(\"F\", \"E\" );\n l.addEdge(\"E\", \"G\" );\n l.addEdge(\"E\", \"H\" );\n l.addEdge(\"G\", \"M\" );\n l.addEdge(\"H\", \"M\" );\n\n l.BreadthFirstSearch(\"H\" );\n }", "public String[] getHamiltonianPath() {\r\n\t\tlong startTime = System.nanoTime();\r\n\t\tint n = graph.size();\r\n\t\tboolean[][] dp = new boolean[n][1<<n];\r\n\t\tboolean[][] adj = makeAdjacencyMatrix();\r\n\t\tString[] path = new String[n];\r\n\t\tArrayList<String> currentPath = new ArrayList<String>();\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tdp[i][1<<i] = true;\r\n\t\t}\r\n\t\tfor(int i = 0; i <(1<<n); i++) {\r\n\t\t\tfor(int j = 0; j < n; j++) {\r\n\t\t\t\tif((i & (1<<j)) != 0) {\r\n\t\t\t\t\tfor(int k = 0; k < n; k++) {\r\n\t\t\t\t\t\tif((j != k) && ((i & (1<<k)) != 0) && (adj[k][j]) && dp[k][i^(1<<j)]) {\r\n\t\t\t\t\t\t\tdp[j][i] = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tboolean flag = false;\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tif(dp[i][(1<<n)-1]) {\r\n\t\t\t\tflag = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag) {\r\n\t\t\tint i = (1<<n)-1;\r\n\t\t\twhile(i > 0) {\r\n\t\t\t\tfor(int k = 0; k < n; k++) {\r\n\t\t\t\t\tif(dp[k][i] == true && (i & (1<<k)) != 0) {\r\n\t\t\t\t\t\ti = (i)^(1<<k);\r\n\t\t\t\t\t\tcurrentPath.add(graph.get(k).get(0));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int l = 0; l < currentPath.size(); l++) {\r\n\t\t\t\tpath[currentPath.size()-(l+1)] = currentPath.get(l);\r\n\t\t\t}\r\n\t\t\tlong endTime = System.nanoTime();\r\n\t\t\tdouble time = (endTime-startTime)/1000000000.0;\r\n\t\t\tSystem.out.println(\"Took \"+(time) + \" secs\"); \r\n\t\t\treturn path;\r\n\t\t}\r\n\t\tlong endTime = System.nanoTime();\r\n\t\tdouble time = (endTime-startTime)/1000000000.0;\r\n\t\tSystem.out.println(\"Took \"+(time) + \" secs\"); \r\n\t\treturn path;\r\n\t}", "public java.util.List<Integer> getHamiltonianPath(V vertex);", "public Square[] buildPath(GameBoard board, Player player) {\n\n // flag to check if we hit a goal location\n boolean goalVertex = false;\n\n // Queue of vertices to be checked\n Queue<Vertex> q = new LinkedList<Vertex>();\n\n // set each vertex to have a distance of -1\n for ( int i = 0; i < graph.length; i++ )\n graph[i] = new Vertex(i,-1);\n\n // get the start location, i.e. the player's location\n Vertex start = \n squareToVertex(board.getPlayerLoc(player.getPlayerNo()));\n start.dist = 0;\n q.add(start);\n\n // while there are still vertices to check\n while ( !goalVertex ) {\n\n // get the vertex and remove it;\n // we don't want to look at it again\n Vertex v = q.remove();\n\n // check if this vertex is at a goal row\n switch ( player.getPlayerNo() ) {\n case 0: if ( v.graphLoc >= 72 ) \n goalVertex = true; break;\n case 1: if ( v.graphLoc <= 8 ) \n goalVertex = true; break;\n case 2: if ( (v.graphLoc+1) % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n case 3: if ( v.graphLoc % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n }\n\n // if we're at a goal vertex, we don't need to calculate\n // its neighboors\n if ( !goalVertex ) {\n\n // retrieve all reachable ajacencies\n Square[] adjacencies = reachableAdjacentSquares\n (board, vertexToSquare(v, board), player.getPlayerNo());\n\n // for each adjacency...\n for ( Square s : adjacencies ) {\n\n // convert to graph location\n Vertex adjacent = squareToVertex(s); \n\n // modify the vertex if it hasn't been modified\n if ( adjacent.dist < 0 ) {\n adjacent.dist = v.dist+1;\n adjacent.path = v;\n q.add(adjacent);\n }\n }\n\n }\n else\n return returnPath(v,board);\n \n }\n // should never get here\n return null;\n }", "public ShortestPathMatrix<V,E> allPairsShortestPaths();", "private static boolean findHamiltonianPath(SequenceGraph graph,\n\t SequenceGraph.Node current,\n\t Set<SequenceGraph.Node> visited,\n\t LinkedList<SequenceGraph.Node> path) {\n\t\tif (visited.contains(current)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Mark current Node\n\t\tpath.add(current);\n\t\tvisited.add(current);\n\n\t\t// Check path-terminating state\n\t\tif (current.getChildren().size() == 0) {\n\t\t\tif (path.size() == graph.size()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tpath.removeLast();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Recurse on children\n\t\tfor (SequenceGraph.Node child : current.getChildren()) {\n\t\t\tif (findHamiltonianPath(graph, child, visited, path)) {\n\t\t\t\t// Path found through child\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// No path through current node given current path\n\t\tpath.removeLast();\n\t\tvisited.remove(current);\n\n\t\treturn false;\n\t}", "public static void floydsAlgorithm(int[][] graph) {\n\t\t// Iterate through adjacency matrix\n\t\tfor (int a = 0; a < 5; a++) {\n\t\t\tfor (int b = 0; b < 5; b++) {\n\t\t\t\t// Ignore looping edges\n\t\t\t\tif (a != b) {\n\t\t\t\t\t// If there is a value\n\t\t\t\t\tif (graph[a][b] != Integer.MAX_VALUE) {\n\t\t\t\t\t\t// Run through values in column of row letter\n\t\t\t\t\t\tfor (int c = 0; c < 5; c++) {\n\t\t\t\t\t\t\t// Ignore looping edges\n\t\t\t\t\t\t\tif (c != a) {\n\t\t\t\t\t\t\t\t// If there is a value in the column\n\t\t\t\t\t\t\t\tif (graph[c][a] != Integer.MAX_VALUE) {\n\t\t\t\t\t\t\t\t\t// Compute path length\n\t\t\t\t\t\t\t\t\tint tempSum = graph[a][b] + graph[c][a];\n\t\t\t\t\t\t\t\t\t// Ignore looping edges\n\t\t\t\t\t\t\t\t\tif (c != b) {\n\t\t\t\t\t\t\t\t\t\t// If path length is INF, update path length and print graph\n\t\t\t\t\t\t\t\t\t\tif (graph[c][b] == Integer.MAX_VALUE) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tgraph[c][b] = tempSum;\n\t\t\t\t\t\t\t\t\t\t\t// Print graph after each update\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"All-pairs shortest paths are:\");\n\t\t\t\t\t\t\t\t\t\t\tdisplayGraph(graph);\n\t\t\t\t\t\t\t\t\t\t\t// Prompt user to continue\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Press enter to continue:\");\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t// If user hit enter\n\t\t\t\t\t\t\t\t\t\t\t\tif (input.read() == 13) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t// If path length is less than current, update path length and print graph\n\t\t\t\t\t\t\t\t\t\t\tif (tempSum < graph[c][b]) {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tgraph[c][b] = tempSum;\n\t\t\t\t\t\t\t\t\t\t\t\t// Print graph after each update\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"All-pairs shortest paths are:\");\n\t\t\t\t\t\t\t\t\t\t\t\tdisplayGraph(graph);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t// Prompt user to continue\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Press enter to continue:\");\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// If user hit enter\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (input.read() == 13) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t} // End double for loop\n\t}", "public static int[][] FindLongestPath(boolean[][] adjacencyMatrix) {\n\t\tint[] distances = new int[adjacencyMatrix.length];\n\t\tArrayList[] paths = new ArrayList[distances.length];\n\t\tdistances[0] = 0;\n\t\tpaths[0] = new ArrayList();\n\t\tArrayList Temp = new ArrayList();\n\t\tTemp.add(new Integer(0));\n\t\tpaths[0].add(Temp);\n\t\tfor (int i = 1; i < distances.length; ++i) {\n\t\t\tdistances[i] = Integer.MIN_VALUE;\n\t\t\tpaths[i] = new ArrayList();\n\t\t}\n\n\t\tfor (int CurrNode = 0; CurrNode < distances.length; ++CurrNode) {\n\t\t\tfor (int PrevNode = 0; PrevNode < CurrNode; ++PrevNode) {\n\t\t\t\tif (adjacencyMatrix[PrevNode][CurrNode]) {\n\t\t\t\t\tif (distances[PrevNode] + 1 > distances[CurrNode]) {\n\t\t\t\t\t\tdistances[CurrNode] = distances[PrevNode] + 1;\n\t\t\t\t\t\tpaths[CurrNode] = new ArrayList();\n\t\t\t\t\t\tfor (int i = 0; i < paths[PrevNode].size(); ++i) {\n\t\t\t\t\t\t\tTemp = AntibodyUtils\n\t\t\t\t\t\t\t\t\t.CopyIntArrayList((ArrayList) (paths[PrevNode]\n\t\t\t\t\t\t\t\t\t\t\t.get(i)));\n\t\t\t\t\t\t\tTemp.add(new Integer(CurrNode));\n\t\t\t\t\t\t\tpaths[CurrNode].add(Temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/**\n\t\t * Once we have computed the longest paths to each node, determine the\n\t\t * distance of the longest paths overall. maxNode is only one of several\n\t\t * nodes that could have a longest path from node 0.\n\t\t */\n\t\tint maxDist = 0;\n\t\tint maxNode = 0;\n\t\tfor (int i = 0; i < distances.length; ++i) {\n\t\t\tif (distances[i] >= maxDist) {\n\t\t\t\tmaxDist = distances[i];\n\t\t\t\tmaxNode = i;\n\t\t\t}\n\t\t}\n\n\t\tif (Debug && !Debug) {\n\t\t\tSystem.out.println(\"Distance to \" + (distances.length - 1) + \" = \"\n\t\t\t\t\t+ distances[distances.length - 1]);\n\n\t\t\tSystem.out.println(\"Longest path ends at node \" + maxNode\n\t\t\t\t\t+ \" at distance \" + maxDist);\n\n\t\t}\n\t\tint[][] finalPaths = new int[paths[maxNode].size()][maxDist + 1];\n\t\t/**\n\t\t * Determine the final paths, by converting the path[maxNode]. Keep in\n\t\t * mind that this is only 1 of several possible longest paths from node\n\t\t * 0 to maxNode, and only 1 of several nodes which may have a path from\n\t\t * node 0 of maxDist.\n\t\t */\n\t\tfor (int p = 0; p < paths[maxNode].size(); ++p) {\n\t\t\tArrayList CurrPath = (ArrayList) (paths[maxNode].get(p));\n\t\t\tfor (int i = 0; i < maxDist; ++i) {\n\t\t\t\tfinalPaths[p][i] = ((Integer) (CurrPath.get(i))).intValue();\n\n\t\t\t}\n\t\t\tfinalPaths[p][maxDist] = maxNode;\n\t\t}\n\t\treturn finalPaths;\n\n\t}", "public FloydWarshall(AdjMatrixEdgeWeightedDigraph G) {\n int V = G.V();\n distTo = new double[V][V];\n edgeTo = new DirectedEdge[V][V];\n\n // initialize distances to infinity\n for (int v = 0; v < V; v++) {\n for (int w = 0; w < V; w++) {\n distTo[v][w] = Double.POSITIVE_INFINITY;\n }\n }\n\n // initialize distances using edge-weighted digraph's\n for (int v = 0; v < G.V(); v++) {\n for (DirectedEdge e : G.adj(v)) {\n distTo[e.from()][e.to()] = e.weight();\n edgeTo[e.from()][e.to()] = e;\n }\n // in case of self-loops\n if (distTo[v][v] >= 0.0) {\n distTo[v][v] = 0.0;\n edgeTo[v][v] = null;\n }\n }\n\n // Floy-Warshall update\n for (int i = 0; i < V; i++) {\n // compute shortest paths using only 0, 1, ,,, i as intermediate vertices\n for (int v = 0; v < V; v++) {\n if (edgeTo[v][i] == null) {\n continue; // optimization\n }\n for (int w = 0; w < V; w++) {\n if (distTo[v][w] > distTo[v][i] + distTo[i][w]) {\n distTo[v][w] = distTo[v][i] + distTo[i][w];\n edgeTo[v][w] = edgeTo[i][w];\n }\n }\n // check for negative cycle\n if (distTo[v][v] < 0.0) {\n hasNegativeCycle = true;\n return;\n }\n }\n }\n assert check(G);\n }", "public static int shortestPath(String maze) {\n\t\tint roomCount = 0;\n\t\tArrayList<Integer> mazeIndexes = new ArrayList<Integer>();\n\n\t\t/*\n\t\t * Basically I'm going to start by changing all of the walls to 0 and assigning\n\t\t * non-wall spaces unique numbers. I'll keep track of how many non-wall spaces\n\t\t * are assigned to use as the size of the adjacency matrix. I could skip the\n\t\t * step of trimming the'maze' variable but it cleans up the code without costing\n\t\t * much time, which is acceptable here This makes it so our 'entrance' is always\n\t\t * '0' and our 'exit' is always roomCount-1\n\t\t */\n\t\tmaze = maze.replaceAll(\"\\n\", \"\");\n\t\tfor (String r : maze.split(\"\")) {\n\t\t\tif (r.contentEquals(\".\")) {\n\t\t\t\tmazeIndexes.add(roomCount);\n\t\t\t\troomCount++;\n\t\t\t} else {\n\t\t\t\tmazeIndexes.add(-1);\n\t\t\t}\n\t\t}\n\t\tif (roomCount == 1)\n\t\t\treturn 0;\n\n\t\t/*\n\t\t * Now I want to build an adjacency matrix. I'll do that by making an m by m\n\t\t * matrix where m is the current value for roomCount. Cell contents will be 1 if\n\t\t * the row index is adjacent to the column index\n\t\t */\n\t\tint[][] adjacencies = new int[roomCount][roomCount];\n\n\t\t// since adjacent is reflexive, I only have to check adjacency for neighbors\n\t\t// below it and immediately to its right\n\t\tint rowLength = (int) Math.sqrt(mazeIndexes.size());\n\t\tfor (int i = 0; i < roomCount - 1; i++) {\n\t\t\tint currentCellIndex = mazeIndexes.indexOf(i);\n\t\t\tint rightOneIndex = currentCellIndex + 1;\n\t\t\tint rightOneValue = rightOneIndex % rowLength != 0 ? mazeIndexes.get(rightOneIndex) : -1;\n\t\t\tif (rightOneValue > 0) {\n\t\t\t\tadjacencies[i][rightOneValue] = 1;\n\t\t\t\tadjacencies[rightOneValue][i] = 1;\n\t\t\t}\n\t\t\tint downOne = currentCellIndex + rowLength;\n\t\t\tif (downOne < mazeIndexes.size() && mazeIndexes.get(downOne) > 0) {\n\t\t\t\tadjacencies[i][mazeIndexes.get(downOne)] = 1;\n\t\t\t\tadjacencies[mazeIndexes.get(downOne)][i] = 1;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t/*\n\t\t * Expand shortest paths outwards from node one until a path to node roomCount is found,\n\t\t * or until no new paths are found\n\t\t */\n\t\tint counter = 0;\n\t\twhile (adjacencies[0][roomCount - 1] == 0 && counter < roomCount) {\n\t\t\t/*\n\t\t\t * If I let this run over every row it would calculate all of the shortest path lengths between\n\t\t\t * each pair of elements. As a side effect, it could speed up operations on row one in specific\n\t\t\t * cases, but it would need a stability check because some long paths could get recorded before\n\t\t\t * the shortest path is found. It would end up only being advantageous if all paths are required\n\t\t\t * so I'm only finding paths for row one\n\t\t\t */\n\t\t\tfor (int i = 1; i < roomCount; i++) {\n\t\t\t\t//Once an entry is found in the first row, we test the row for that entry\n\t\t\t\tint iEntry = adjacencies[0][i];\n\t\t\t\tif (iEntry != 0) {\n\t\t\t\t\t//Look in the row for the adjacent node and check for its adjacency. \n\t\t\t\t\tfor (int j = 1; j < roomCount; j++) {\n\t\t\t\t\t\tint jEntry = adjacencies[i][j];\n\t\t\t\t\t\t//For each adjacency in the new row, if the path to that entry through the row's node\n\t\t\t\t\t\t//is shorter than the current recorded path, update the path length\n\t\t\t\t\t\tif (jEntry != 0) {\n\t\t\t\t\t\t\tint newEntry = jEntry + iEntry;\n\t\t\t\t\t\t\tint oldEntry = adjacencies[0][j];\n\t\t\t\t\t\t\tadjacencies[0][j] = oldEntry < newEntry && oldEntry != 0 ? oldEntry : newEntry;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t\t//If the path length is recorded as less than 1 it was never updated, and '-1' should be returned instead of the path length\n\t\treturn (adjacencies[0][roomCount - 1] > 0 ? adjacencies[0][roomCount - 1] : -1);\n\t}", "private List<Pair<Integer, Integer>> getBestPath(Pair<Integer, Integer> curLocation, Pair<Integer, Integer> dest) {\n\t\tList<Pair<Integer, Integer>> path = new LinkedList<Pair<Integer, Integer>>();\n\t\t\n\t\t\n\t\tNode current = new Node(curLocation.getX(), curLocation.getY(), getHitProbability(curLocation.getX(), curLocation.getY()));\n\t\tNode target = new Node(dest.getX(), dest.getY(), getHitProbability(dest.getX(), dest.getY()));\n\t\tList<Node> openSet = new ArrayList<>();\n List<Node> closedSet = new ArrayList<>();\n \n \n while (true) {\n openSet.remove(current);\n List<Node> adjacent = getAdjacentNodes(current, closedSet, target);\n\n // Find the adjacent node with the lowest heuristic cost.\n for (Node neighbor : adjacent) {\n \tboolean inOpenset = false;\n \tList<Node> openSetCopy = new ArrayList<>(openSet);\n \tfor (Node node : openSetCopy) {\n \t\tif (neighbor.equals(node)) {\n \t\t\tinOpenset = true;\n \t\t\tif (neighbor.getAccumulatedCost() < node.getAccumulatedCost()) {\n \t\t\t\topenSet.remove(node);\n \t\t\t\topenSet.add(neighbor);\n \t\t\t}\n \t\t}\n \t}\n \t\n \tif (!inOpenset) {\n \t\topenSet.add(neighbor);\n \t}\n }\n\n // Exit search if done.\n if (openSet.isEmpty()) {\n System.out.printf(\"Target (%d, %d) is unreachable from position (%d, %d).\\n\",\n target.getX(), target.getY(), curLocation.getX(), curLocation.getY());\n return null;\n } else if (/*isAdjacent(current, target)*/ current.equals(target)) {\n break;\n }\n\n // This node has been explored now.\n closedSet.add(current);\n\n // Find the next open node with the lowest cost.\n Node next = openSet.get(0);\n for (Node node : openSet) {\n if (node.getCost(target) < next.getCost(target)) {\n next = node;\n }\n }\n// System.out.println(\"Moving to node: \" + current);\n current = next;\n }\n \n // Rebuild the path using the node parents\n path.add(new Pair<Integer, Integer>(curLocation.getX(), curLocation.getY()));\n while(current.getParent() != null) {\n \tcurrent = current.getParent();\n \tpath.add(0, new Pair<Integer, Integer>(current.getX(), current.getY()));\n }\n \n if (path.size() > 1) {\n \tpath.remove(0);\n }\n \n\t\treturn path;\n\t}", "public List<Tuple<Integer,Integer>> findShortestPath()\n\t \n\t {\n\t\t Tuple<Integer,Integer> currentPosition = findStartPosition(); \n\t\t if(visitedPaths ==null)\n\t\t {\n\t\t\t visitedPaths = new ArrayList<>();\n\t\t }\n\t\t//visitedPaths.add(currentPosition);\n\t\t Tuple<Integer,Integer> endPostion = findEndPosition(mapTable);\n\t\t \n\t\t MyEnum.Direction direction = MyEnum.Direction.right; \n\t\t //check what is in front of us and around us\n\t\t\n\t\twhile(currentPosition != endPostion )\n\t\t{\n\t\tInteger col =currentPosition.x;\n\t\tInteger row = currentPosition.y;\n\t\tif(col < maxColumn - 1 && (mapTable[row ][col + 1 ].equals(\".\") || mapTable[row ][col + 1 ].equals(\"E\")))\n\t\t {\n\t\t\t if(mapTable[row ][col + 1 ].equals(\"E\"))\n\t\t\t {\n\t\t\t \tcurrentPosition = endPostion;\n\t\t\t }\n\t\t\t else {\n\t\t\t \tdirection =MyEnum.Direction.right;\n\t\t\t\tcurrentPosition = nextPosition(currentPosition, direction);\n\t\t\t addToTravelledPath(currentPosition);\n\t\t\t\tmapTable[currentPosition.y][currentPosition.x]=\"\\\"\";\n\t\t\t\taddToVisitedPath(currentPosition);\n\t\t\t }\n\t\t\t\n\t\t }\n\t\t\n\t\t else if(row < maxRow -1 && (mapTable[row + 1][col].equals(\".\") || mapTable[row + 1][col].equals(\"E\")))\n\t\t {\n\t\t\t if(mapTable[row + 1][col].equals(\"E\"))\n\t\t\t {\n\t\t\t \tcurrentPosition = endPostion;\n\t\t\t }\n\t\t\t else {\n\t\t\t\tdirection =MyEnum.Direction.down;\n\t\t\t\tcurrentPosition = nextPosition(currentPosition, direction);\n\t\t\t addToTravelledPath(currentPosition);\n\t\t\t\tmapTable[currentPosition.y][currentPosition.x]=\"\\\"\";\n\t\t\t\taddToVisitedPath(currentPosition);\n\t\t\t }\n\t\t }\n\t\t else if(row > 0 && (mapTable[row -1][col].equals(\".\") || mapTable[row -1][col].equals(\"E\")))\n\t\t {\n\t\t\t if(mapTable[row -1][col].equals(\"E\"))\n\t\t\t {\n\t\t\t \tcurrentPosition = endPostion;\n\t\t\t }\n\t\t\t else {\n\t\t\t direction =MyEnum.Direction.up;\n\t\t\t currentPosition = nextPosition(currentPosition, direction);\n\t\t\t addToTravelledPath(currentPosition);\n\t\t\t\tmapTable[currentPosition.y][currentPosition.x]=\"\\\"\";\n\t\t\t\taddToVisitedPath(currentPosition);\n\t\t\t }\n\t\t }\n\t\t else if(col >0 && mapTable[row][col- 1 ].equals(\".\"))\n\t\t {\n\t\t\t if(mapTable[row ][col - 1 ].equals(\"E\"))\n\t\t\t {\n\t\t\t \tcurrentPosition = endPostion;\n\t\t\t }\n\t\t\t else {\n\t\t\t \tdirection =MyEnum.Direction.left;\n\t\t\t\tcurrentPosition = nextPosition(currentPosition, direction);\n\t\t\t addToTravelledPath(currentPosition);\n\t\t\t\tmapTable[currentPosition.y][currentPosition.x]=\"\\\"\";\n\t\t\t\taddToVisitedPath(currentPosition);\n\t\t\t }\n\t\t\t \n \t\t\t\t\n\t\t }\n\t\t \n\t\t \n\t\t else\n\t\t {\n\t\t\t noEnd =true;\n\t\t }\n\t\t\t\n\t\t\tif(noEnd)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//find the last visited node and check that does not have wall and start from there\n\t\t\t\tfor (Integer i = visitedPaths.size()-1; i >= 0 ; i--)\n\t\t\t\t{\n\t\t\t\t Tuple<Integer,Integer> temp\t=visitedPaths.get(i);\n\t\t\t\t if(temp.x < maxColumn -1 && mapTable[temp.y][temp.x + 1].equals(\".\"))\n\t\t\t\t {\n\t\t\t\t\t currentPosition = temp;\n\t\t\t\t\t //notvisitedPaths.add(temp);\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t else if(temp.y < maxRow - 1 && mapTable[temp.y + 1][temp.x ].equals(\".\"))\n\t\t\t\t {\n\t\t\t\t\t currentPosition =temp;// new Tuple<Integer,Integer>(temp.x, temp.y + 1);\n\t\t\t\t\t //notvisitedPaths.add(temp);\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t\t else if(temp.y > 0 && mapTable[temp.y - 1][temp.x].equals(\".\"))\n\t\t\t\t {\n\t\t\t\t\t currentPosition = temp;new Tuple<Integer,Integer>(temp.x , temp.y-1);\n\t\t\t\t\t //notvisitedPaths.add(temp);\n\t\t\t\t\t break;\n\t\t\t\t }\n\n\t\t\t\t travelPath.remove(temp);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnoEnd = false;\n\t\t\t}\n\t\t\t displayTableMap(mapTable);\n\t\t}\n\t\tfor(Tuple<Integer,Integer> item: travelPath)\n\t {\n\t\t\tmapTable[item.y][item.x]=\"*\";\n\t }\n\t\tdisplayTableMap(mapTable);\n\n\t\treturn travelPath;\n\t\t \n\t }", "Path generateShortestPath(Grid g);", "public int aStarManhattan()\r\n {\n PriorityQueue<Node> frontier = new PriorityQueue<>(adjacencyComparator);\r\n int ExpandedNodes = 0;\r\n Set<int[][]> visited = new HashSet<>();\r\n List<Node> solutionPath = new ArrayList<>();\r\n root.setaStarCost(Manhattan(root));\r\n frontier.add(root);\r\n //root.setCost(Manhattan(root));\r\n\r\n ExpandedNodes++;\r\n while (!frontier.isEmpty()) {\r\n Node currentNode = getmin(frontier);\r\n frontier.remove(currentNode);\r\n\r\n visited.add(currentNode.getPuzzle());\r\n System.out.println(currentNode.getaStarCost());\r\n\r\n\r\n if(currentNode.isGoal())\r\n {\r\n while(currentNode.getParent() != null)\r\n {\r\n solutionPath.add(currentNode);\r\n currentNode.print();\r\n System.out.println(\"-----------\");\r\n currentNode = currentNode.getParent();\r\n }\r\n System.out.println(\"Expanded Nodes: \" + ExpandedNodes);\r\n System.out.println(\"Search Depth: \" + solutionPath.size());\r\n System.out.println(\"Manhattan Cost: \" + Manhattan(currentNode));\r\n long endTime = System.nanoTime();\r\n long totalTime = endTime - startTime;\r\n System.out.println(\"Running time is: \" + totalTime/Math.pow(10, 9) + \"Seconds\");\r\n return solutionPath.size();\r\n }\r\n\r\n ExpandedNodes++;\r\n for(Node child : currentNode.getChildren()) {\r\n\r\n if (!Contains(visited, child) && !ContainsPQ(frontier, child)) {\r\n child.setaStarCost(Manhattan(child) + distanceFromRoot(child.getParent()) + 1);\r\n frontier.add(child);\r\n } else {\r\n decreaseKey(frontier, child);\r\n\r\n }\r\n\r\n }\r\n }\r\n return 0;\r\n }", "@Test\n public void AI_Jump_04_JH2_CH1_Ledge() {\n int[][] grid = {\n {1, 1, 1, 1, 1, 1},\n {1, 1, 1, 0, 0, 1},\n {1, 1, 1, 1, 1, 1},\n {1, 1, 1, 1, 1, 1},\n {1, 0, 1, 1, 1, 1},\n {0, 0, 1, 1, 1, 1}\n };\n\n pf = new Pathfinder(grid);\n pf.setFilter(false);\n List<Vector2f> path = pf.findPath(new Vector2f(0, 4), new Vector2f(4, 0), 3, 1, 1);\n\n List<Vector2f> correctPath = new ArrayList<>();\n correctPath.add(new Vector2f(0, 4));\n correctPath.add(new Vector2f(0, 3));\n correctPath.add(new Vector2f(1, 3));\n correctPath.add(new Vector2f(1, 2));\n correctPath.add(new Vector2f(2, 2));\n correctPath.add(new Vector2f(2, 1));\n correctPath.add(new Vector2f(2, 0));\n correctPath.add(new Vector2f(3, 0));\n correctPath.add(new Vector2f(4, 0));\n\n checkPath(path, correctPath);\n }", "private void findPath(){\n ArrayList<Tile> openTiles = new ArrayList<>();\n ArrayList<Tile> closedTiles = new ArrayList<>();\n\n currentTile.setParent(null); // In case there already was a parent before\n openTiles.add(currentTile);\n\n while(openTiles.size() > 0){ // Keep going\n currentTile = openTiles.get(0); // Reset to start\n\n for (Tile openTile : openTiles) { // Check through open tiles until finding best tile\n if (openTile.getFCost() < currentTile.getFCost() ||\n (openTile.getFCost() == currentTile.getFCost() && openTile.getH() < currentTile.getH())) {\n currentTile = openTile;\n }\n }\n\n openTiles.remove(currentTile);\n closedTiles.add(currentTile);\n\n for(Tile neighbor : tileController.getNeighbors(currentTile)){ // add neighbors and set info\n if(neighbor == null || neighbor.isWall() || closedTiles.contains(neighbor)){\n continue;\n }\n\n if(!openTiles.contains(neighbor)){ // Update costs, and set parent\n openTiles.add(neighbor);\n neighbor.updateH(target);\n neighbor.updateGCost(currentTile.getG() + 1);\n neighbor.setParent(currentTile);\n }else{ // Check if g cost is less now, if it is update parent and cost\n int newGCost = currentTile.getG() + 1;\n if (newGCost < neighbor.getG()) {\n neighbor.updateGCost(newGCost);\n neighbor.setParent(currentTile);\n }\n }\n if(neighbor.equals(target)){ // Found the end\n endTile = neighbor;\n currentTile = openTiles.get(0);\n return;\n }\n }\n }\n }", "public Map shortPath(int[][] weight, int start, int destination){\n\t\t\n\t\tint l = weight.length;//The number of router\n\t\tint l1 = l;\n\t\tboolean f = false;//judge if there is a node have been deleted\n\t\tint[] Path = new int[l];//store the cost of each road\n\t\tint[] visit = new int[l];//store whether this point is or not visited\n\t\tMap result = new HashMap();//store the return result\n\t\tinterfaceR = new String[l];\n\t\tshortPath = new String[l];\n\t\t\n\t\tfor(int i=0;i<l;i++){\n\t\t\tshortPath[i]=new String((start+1)+\"--->\"+(i+1));\n\t\t}\n\t\t\n\t\t//if there is a node deleted, so the l should minus 1\n\t\tfor(int i=0;i<l;i++){\t\t\t\n\t\t\t if(weight[i][i]==-1){\n\t\t\t\t f=true;\n\t\t\t\tif(start==i||destination==i){\n\t\t\t\t\t\n\t\t\t\t return null;\n\t\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(f){\n\t\t\tl=l-1;\n\t\t}\n\t\t\n\t\tPath[start] = 0;\n\t\tvisit[start] = 1;\n\t\t\n\t\tfor(int i = 1;i<l;i++){\n\t\t\t\n\t\t\tint k=-1;\n\t\t\tint dismin=99999;\n\t\t\tfor(int x=0;x<l1;x++){\n\t\t\t\tif(visit[x]==0&&(0 < weight[start][x]&& weight[start][x]< dismin)){\n\t\t\t\t\tdismin=weight[start][x];\n\t\t\t\t\tk=x;\n\t\t\t\t}\n\t\t\t}\n\t\t\tPath[k]=dismin;\n\t\t\tvisit[k]=1;\n\t\t\n\t\t//calculate the distance between start to unvisited point depend on k.\n for(int y=0;y<l1;y++){\n \t\n \tif(visit[y]==0&&weight[start][y]>0){//for those weight bigger than 0\n \t\tif(weight[start][k]+weight[k][y]<weight[start][y]&&weight[start][k]+weight[k][y]>weight[start][k]){\n \t\t\tweight[start][y]=weight[start][k]+weight[k][y];\n \t\t\tshortPath[y]=shortPath[k]+\"--->\"+(y+1);\n \t\t}\n \t}\n \t\n \tif(visit[y]==0&&weight[start][y]<0&&weight[start][k]+weight[k][y]>weight[start][k]){\n \t\tweight[start][y]=weight[start][k]+weight[k][y];\n \t\tshortPath[y]=shortPath[k]+\"--->\"+(y+1);\n \t}\n \t\n }//for\n\t\t\t\n\n\t\t}\n\t\t\n\n\t\tresult.put(1, shortPath[destination]);\n\t\tresult.put(2, String.valueOf(weight[start][destination]));\n\t\t\n\t\treturn result;\n\t}", "public void calculatePath () {\n int[][] grid = mMatrix.getMatrix();\n boolean isPathPossible = false;\n int lastValidColumnIndex = -1;\n\n if (grid.length == 0) {\n return;\n }\n\n for (int i = 0; i < grid[0].length; i++) {\n isPathPossible = false;\n for (int j = 0; j < grid.length; j++) {\n if (i != 0) {\n int minValueIndex = mMatrix.bestIndexToPickFromColumn(j, i);\n grid[j][i] += grid[minValueIndex][i-1];\n mMatrix.setMatrixTracker(j, i, minValueIndex);\n }\n\n if (grid[j][i] < 50) {\n lastValidColumnIndex = i;\n isPathPossible = true;\n }\n }\n if (!isPathPossible) {\n break;\n }\n }\n\n mMatrix.setLastValidColumnIndex(lastValidColumnIndex);\n mOutput.setPathPossible(isPathPossible);\n if (lastValidColumnIndex == -1)\n return;\n\n mOutput.setTotalCost(getTotalCost(grid));\n mOutput.setPath(getShortestPath(lastValidColumnIndex));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Looks up a monitored sensor by its emulatorfriendly name.
private MonitoredSensor getSensorByEFN(String name) { for (MonitoredSensor sensor : mSensors) { if (sensor.mEmulatorFriendlyName.contentEquals(name)) { return sensor; } } return null; }
[ "public Sensor getSensor(String uuid);", "Sensor getSensor();", "public static Sensor getSensor(String name) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "String findDeviceByName(String name) throws Exception;", "public static TypeSensor lookup(String name)\n\t{\n\t\tfor (TypeSensor t : TypeSensor.values())\n\t\t{\n\t\t\tif (name.equalsIgnoreCase(t.toString()))\n\t\t\t\treturn t;\n\t\t}\n\n\t\treturn TypeSensor.INVALID;\n\t}", "protected ColorSensor getColorSensor(String name) {\n try {\n return getHardwareMap().colorSensor.get(name);\n } catch (NullPointerException npe) {\n log(\"Error: could not find ColorSensor with name \" + name);\n return null;\n }\n }", "public Sensor getSensor(String sensor){\n\t\tif(hasSensor(sensor)){\n\t\t\treturn sensorMap.get(sensor);\n\t\t}else \n\t\t\treturn null;\n\t}", "public String getSensorName() {\r\n return sensorName;\r\n }", "public Sensor getSensor(String sensorName)\n\t{\n\t\tfor (Sensor sensor : this.sensors)\n\t\t{\n\t\t\tif (sensor.getName().equals(sensorName))\n\t\t\t{\n\t\t\t\treturn sensor;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static Sensor getSensor(String name, String address) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\tif (mSensors.get(x).mAddress.equals(address))\n\t\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String getSensorName(Device device, String valueKey)\n\t{\n\t\t// reflection black magic. TODO: remove direct references to the device\n\t\t// object and create a representative event payload instead.\n\t\tClass<?> implementedInterfaces[] = device.getClass().getInterfaces();\n\t\t\n\t\t// return the sensor name\n\t\treturn this.checkInterface(implementedInterfaces, valueKey);\n\t}", "public java.lang.String getSensor() {\n return sensor;\n }", "public java.lang.String getSensor() {\n return sensor;\n }", "DeviceSensor createDeviceSensor();", "ExternalSensor createExternalSensor();", "public void setSensor(java.lang.String value) {\n this.sensor = value;\n }", "String read() throws SensorException;", "PointerByReference rs2_query_sensors(Realsense2Library.rs2_device device, PointerByReference error);", "public Sensor findSensorByCode(String code) {\r\n\t\tboolean found = false;\r\n\t\tint i = 0;\r\n\t\tSensor sensor = null;\r\n\t\tif(sensors != null) {\r\n\t\t\twhile(i < sensors.size() && !found) {\r\n\t\t\t\tif(sensors.get(i).getCode().equalsIgnoreCase(code)) {\r\n\t\t\t\t\tsensor = sensors.get(i);\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t}\r\n\t\t\t\telse i++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sensor;\r\n\t\t\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the value associated with the column: finalstepflag
public boolean isFinalstepflag () { return finalstepflag; }
[ "public void setFinalstepflag (boolean finalstepflag) {\n\t\tthis.finalstepflag = finalstepflag;\n\t}", "public BooleanProperty step() {\n\t\treturn step;\n\t}", "public int getStep() {\r\n\t\t\treturn this.enabled;\r\n\t\t}", "public long getFinalValue() {\n\treturn finalValue;\n }", "int getLastStateChangeStepNumber();", "public Integer getIsfinish() {\n return isfinish;\n }", "int getStep();", "public int getColCurrentStep() {\n return colCurrentStep;\n }", "String getStep();", "public java.lang.Byte getCheckStep () {\n\t\treturn checkStep;\n\t}", "public E finishedState() {\r\n\t\treturn this.values[this.values.length - 1];\r\n\t}", "private int goalValue(int row, int col) {\n if (row + 1 != this.n || col + 1 != this.n) {\n return (n * row) + col + 1;\n }\n return 0;\n }", "public abstract int getLastCageCellValue(int row, int col);", "float getStepPhaseShiftIncrement();", "public Integer getStep() {\n return step;\n }", "public boolean getFinal() {\r\n\t\treturn this.myFinal;\r\n\t}", "public Integer getCorrectflag() {\n return correctflag;\n }", "boolean previousStep();", "public String getFinalTrackingState() {\n return this.finalTrackingState;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all child portlet categories for a parent category.
public Set<PortletCategory> getChildCategories(PortletCategory parent);
[ "public Set<PortletCategory> getAllChildCategories(\n\t\t\tPortletCategory parent);", "public Set<IPortletDefinition> getAllChildPortlets(\n\t\t\tPortletCategory parent);", "public Set<IPortletDefinition> getChildPortlets(PortletCategory parent);", "@SuppressWarnings(\"unchecked\")\r\n public List<BOCategory> findChildren(String parentCategory)\r\n {\r\n ProductcategoryVOA voa = new ProductcategoryVOA();\r\n Session session = voa.getSession();\r\n \r\n Criteria crit = session.createCriteria(Productcategory.class);\r\n crit.add(Expression.eq(\"Parentcategory\", parentCategory));\r\n \r\n List<BOCategory> categories = new ArrayList<BOCategory>();\r\n List tempCategories = crit.list();\r\n for (Iterator iter = tempCategories.iterator(); iter.hasNext();)\r\n {\r\n categories.add(new BOCategory((Productcategory)iter.next())); \r\n }\r\n \r\n return categories;\r\n }", "public List<Category> getCategoriesByParent(Category parent) {\n if (allCategories == null || sortedCategories == null) {\n buildCategories();\n }\n return sortedCategories.get(parent);\n }", "public List<ReportCategory> findAll(Long parentCategory) throws ReportCategoryDaoException;", "List<FlowCategory> getChildrenCategory(String parentKey)throws FlowCategoryException;", "@TransactionalReadOnly\n\tpublic List<ReportCategory> findAll(Long parentCategory) throws ReportCategoryDaoException\n\t{\n\t\ttry {\n\t\t\treturn getJdbcTemplate().query(QUERY_SELECT_PART_USERNAMED_BASED + \" AND o.parent_category_id = ? ORDER BY o.id\", this, ExtendedPermission.READ.getMask(), SessionManager.getCurrentUserName(), SessionManager.getCurrentUserName(), parentCategory);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new ReportCategoryDaoException(PropertyProvider.QUERY_FAILED_MESSAGE, e);\n\t\t}\n\n\t}", "public Collection<Category> getChildCategories(Category c) throws SQLException { \n HashSet<Category> cats = new HashSet<Category>();\n synchronized (loadCategChildrenByID) {\n loadCategChildrenByID.setInt(1, c.getID());\n ResultSet rs = loadCategChildrenByID.executeQuery();\n while(rs.next()) { \n int cid = rs.getInt(1);\n Category cat = getCategory(cid);\n cats.add(cat);\n }\n rs.close();\n }\n return cats;\n }", "public ArrayList<CategoryDetails> getChildCategoryCount() throws SQLException{\n\t\tArrayList<CategoryDetails> catDetails = new ArrayList<>();\n\t\tResultSet rs = stmt.executeQuery(\"Select c.title as Parent, \"\n\t\t\t\t+ \"count(ca.title) as Count_Child_Category \"\n\t\t\t\t+ \"from category c, category ca \"\n\t\t\t\t+ \"where c.id = ca.parentcategoryid \"\n\t\t\t\t+ \"group by parent \"\n\t\t\t\t+ \"order by parent;\");\n\t\t\n\t\twhile(rs.next()){\n\t\t\tCategoryDetails catDetail = new CategoryDetails(rs.getString(1), rs.getInt(2));\n\t\t\tcatDetails.add(catDetail);\n\t\t}\n\t\treturn catDetails;\n\t}", "Collection<Category> getSubCategories(Category category);", "Collection<Category> getCategories();", "List<Category> getSubCategories(long categoryUid);", "public Collection getCategories()\r\n throws DatabaseException {\r\n\r\n Connection connection = null;\r\n PreparedStatement statement = null;\r\n ResultSet resultSet = null;\r\n Collection retValue = new ArrayList();\r\n StringBuffer sql = new StringBuffer(512);\r\n sql.append(\"SELECT CategoryID, ParentCategoryID, CategoryName, CategoryDesc, CategoryCreationDate, CategoryModifiedDate, CategoryOrder, CategoryOption, CategoryStatus\");\r\n sql.append(\" FROM \" + TABLE_NAME);\r\n //sql.append(\" WHERE \"); // @TODO: uncomment as needed\r\n sql.append(\" ORDER BY CategoryOrder ASC \");\r\n try {\r\n connection = DBUtils.getConnection();\r\n statement = connection.prepareStatement(sql.toString());\r\n resultSet = statement.executeQuery();\r\n while (resultSet.next()) {\r\n CategoryBean bean = new CategoryBean();\r\n bean.setCategoryID(resultSet.getInt(\"CategoryID\"));\r\n bean.setParentCategoryID(resultSet.getInt(\"ParentCategoryID\"));\r\n bean.setCategoryName(resultSet.getString(\"CategoryName\"));\r\n bean.setCategoryDesc(resultSet.getString(\"CategoryDesc\"));\r\n bean.setCategoryCreationDate(resultSet.getTimestamp(\"CategoryCreationDate\"));\r\n bean.setCategoryModifiedDate(resultSet.getTimestamp(\"CategoryModifiedDate\"));\r\n bean.setCategoryOrder(resultSet.getInt(\"CategoryOrder\"));\r\n bean.setCategoryOption(resultSet.getInt(\"CategoryOption\"));\r\n bean.setCategoryStatus(resultSet.getInt(\"CategoryStatus\"));\r\n retValue.add(bean);\r\n }\r\n return retValue;\r\n } catch(SQLException sqle) {\r\n log.error(\"Sql Execution Error!\", sqle);\r\n throw new DatabaseException(\"Error executing SQL in CategoryDAOImplJDBC.getCategories.\");\r\n } finally {\r\n DBUtils.closeResultSet(resultSet);\r\n DBUtils.closeStatement(statement);\r\n DBUtils.closeConnection(connection);\r\n }\r\n }", "public List<Category> getAllCategories() {\n return Category.find.all();\n }", "public List<ResourceCategoryDTO> findChildrenByParentId(Long parentId) {\n log.debug(\"Request to get all ResourceCategories for parent is parentId\");\n return resourceCategoryRepository\n .selectList(new LambdaUpdateWrapper<ResourceCategory>().eq(ResourceCategory::getParentId, parentId))\n .stream()\n .map(\n resourceCategory -> {\n Binder.bindRelations(resourceCategory, new String[] { \"files\", \"children\", \"images\", \"parent\" });\n return resourceCategoryMapper.toDto(resourceCategory);\n }\n )\n .collect(Collectors.toList());\n }", "public List<Category> getParents() {\n\t\treturn parents;\n\t}", "@SuppressWarnings(\"unchecked\")\n public CategoryProperty[] getCategories() {\n if (categoryExist()) {\n ResourcePropertyGroup[] categories;\n try {\n categories = resource.getData().getPropertyGroup(\n new URI(PROPERTY_GROUP_URI_CATEGORIES));\n return (CategoryProperty[]) categories[0].getProperties()\n .toArray(new CategoryProperty[0]);\n } catch (URISyntaxException e) {\n cat.debug(\"Unable to get categories!\", e);\n }\n }\n return null;\n }", "public ArrayList<Category> getCategoryChildren(int id) {\n\n int curId = id;\n ArrayList<Category> chain = new ArrayList<Category>();\n Cursor c = database.query(MySQLiteHelper.TABLE_CATEGORIES,allCategoryColumns,MySQLiteHelper.COLUMN_CATEGORY_PARENT+\"=\"+curId,null,null,null,null);\n c.moveToFirst();\n while (!c.isAfterLast()) {\n chain.add(new Category(c.getInt(0), c.getInt(1), c.getString(2), c.getInt(3)>0));\n }\n c.close();\n\n return chain;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing that the BuySideComparator sorts from greater value to less value.
@Test public void buyingComparator() throws RemoteException { PriorityOrderBook.BuySideComparator comp = new PriorityOrderBook.BuySideComparator(); Order one = new Order(BUYER1, SECURITY, 1, 10.0, true , 1, clientHandler); Order two = new Order(BUYER2, SECURITY, 1, 10.0, true , 2, clientHandler); int equalButTimeWins = comp.compare(one, two); assertEquals(true, new Boolean(equalButTimeWins < 0 ) ); one = new Order(BUYER1, SECURITY, 1, 10.0, true , 1, clientHandler); two = new Order(BUYER2, SECURITY, 1, 9.0, true , 1, clientHandler); int greaterThan = comp.compare(one, two); //same time, highest value wins assertEquals(true, new Boolean(greaterThan < 0 ) ); one = new Order(BUYER1, SECURITY, 1, 9.0, true , 1, clientHandler); two = new Order(BUYER2, SECURITY, 1, 10.0, true , 1, clientHandler); int lessThan = comp.compare(one, two); //same time, highest value wins assertEquals(true, new Boolean(lessThan > 0 ) ); }
[ "@Test\n\tpublic void sellingComparator() throws RemoteException {\n\t\t//The \"cheapest\" sell order in value is the BEST candidate to get\n\t\t//a buyer, put it first in the pq.\n\t\tPriorityOrderBook.SellSideComparator comp = new PriorityOrderBook.SellSideComparator();\n\n\t\tOrder one = new Order(SELLER1, SECURITY, 1, 9.0,\n\t\t\t\tfalse , 1, clientHandler);\n\n\t\tOrder two = new Order(SELLER1, SECURITY, 1, 10.0,\n\t\t\t\tfalse , 1, clientHandler);\t\n\n\t\tint lessThan = comp.compare(one, two);\n\n\t\t//same time, lowest value goes first in the pq\n\t\tassertEquals(true, new Boolean(lessThan < 0 ) );\n\n\t\tone = new Order(SELLER1, SECURITY, 1, 10.0,\n\t\t\t\tfalse , 1, clientHandler);\n\n\t\ttwo = new Order(SELLER2, SECURITY, 1, 10.0,\n\t\t\t\tfalse , 2, clientHandler);\n\n\t\tint equalButTimeWins = comp.compare(one, two);\n\t\t//same value, earliest to arrive goes first in the pq\n\t\tassertEquals(true, new Boolean(equalButTimeWins < 0 ) );\n\n\n\t\tone = new Order(SELLER1, SECURITY, 1, 10.0,\n\t\t\t\tfalse , 1, clientHandler);\n\n\t\ttwo = new Order(SELLER1, SECURITY, 1, 9.0,\n\t\t\t\tfalse , 1, clientHandler);\t\n\n\t\tint greaterThan = comp.compare(one, two);\n\t\t//same time, lowest value wins\n\t\tassertEquals(true, new Boolean(greaterThan > 0 ) );\n\n\n\t}", "@Test\n public void testClickRateComparator() {\n ClickRateComparator comparator = new ClickRateComparator();\n Poll p1 = new Poll(\"poll 1\", \"some emoji\", new ArrayList<>(), new CategoryPoints(), \"some color\", \"some image url\", \"some creator id\");\n Poll p2 = new Poll(\"poll 2\", \"some emoji\", new ArrayList<>(), new CategoryPoints(), \"some color\", \"some image url\", \"some creator id\");\n\n // p1 and p2 both have starting click rate of 0\n assertEquals(comparator.compare(p1, p1), 0);\n assertEquals(comparator.compare(p1, p2), 0);\n\n p1.clicked();\n // p1 now has a click rate of 1\n assertEquals(comparator.compare(p1, p2), -1);\n\n p2.clicked();\n // p2 now has a click rate of 1\n assertEquals(comparator.compare(p1, p2), 0);\n\n p1.rendered();\n // p1 now has a click rate of 0.5\n assertEquals(comparator.compare(p1, p2), 1);\n }", "static Comparator<Price> leastToMostAggressiveComparatorFor(@Nonnull Side side) {\n return side == Side.BUY\n ? (a, b) -> a.compareTo(b, Side.BUY)\n : (a, b) -> a.compareTo(b, Side.SELL);\n }", "@Test\n public void testCreateComparatorByBalance() {\n System.out.println(\"createComparatorByName\");\n // in decreasing order\n boolean increasing = false;\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n BankAccount instance2 = new BankAccount(\"Nelly\", 199.99);\n int result = BankAccount.createComparatorByBalance(increasing).compare(instance, instance2);\n assertTrue(result > 0);\n int result2 = BankAccount.createComparatorByBalance(increasing).compare(instance2, instance);\n assertTrue(result2 < 0);\n // in increasing order\n increasing = true;\n int result3 = BankAccount.createComparatorByBalance(increasing).compare(instance2, instance);\n assertTrue(result3 > 0);\n }", "public boolean verifyProductByOrderHighToLowFilter(WebDriver driver) {\n\n\t\tString order = \"Sort by price: high to low\";\n\t\tList<String> productPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"original list :\"+productPriceList);\n\t\tshoppage.selectOrderOfProduct(driver, order);\n\n\t\tList<String> actualSortedPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"actual sorted high to low :\"+actualSortedPriceList);\n\t\tList<String> expectedSortedPriceList = productPriceList;\n\t\tCollections.sort(expectedSortedPriceList, Collections.reverseOrder());\n\t\tSystem.out.println(\"expected sorted high to low :\"+expectedSortedPriceList);\n\n\t\treturn expectedSortedPriceList.equals(actualSortedPriceList);\n\t}", "public boolean verifyProductByOrderLowToHighFilter(WebDriver driver) {\n\n\t\tString order = \"Sort by price: low to high\";\n\t\tList<String> productPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"original list :\"+productPriceList);\n\n\t\tshoppage.selectOrderOfProduct(driver, order);\n\n\t\tList<String> actualSortedPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"actual sorted high to low :\"+actualSortedPriceList);\n\t\tList<String> expectedSortedPriceList = productPriceList;\n\t\tCollections.sort(expectedSortedPriceList);\n\t\tSystem.out.println(\"expected sorted high to low :\"+expectedSortedPriceList);\n\n\t\treturn expectedSortedPriceList.equals(actualSortedPriceList);\n\t}", "public static Comparator<Price> mostToLeastAggressiveComparatorFor(@Nonnull Side side) {\n return side == Side.BUY\n ? (a, b) -> -a.compareTo(b, Side.BUY)\n : (a, b) -> -a.compareTo(b, Side.SELL);\n }", "@Test\r\n public void testCompare()\r\n {\r\n Product a = new Product(\"a\",1,false,false);\r\n Product b = new Product(\"b\",2,false,false);\r\n Product c = new Product(\"c\",3,false,false);\r\n Product d = new Product(\"d\",4,false,false);\r\n Product e = new Product(\"e\",5,false,false);\r\n Product f = new Product(\"f\",5,false,false);\r\n Product g = new Product(\"g\",2,false,false);\r\n \r\n System.out.println(\"Tests to see whether product one is heavier than product 2\");\r\n \r\n System.out.println(\"Product 1: \" +b.getWeight() + \" Product 2: \" + a.getWeight());\r\n \r\n Assert.assertEquals(-1,comparator.compare(b,a));\r\n \r\n System.out.println(\"Product 1: \" +c.getWeight() + \" Product 2: \" + b.getWeight());\r\n \r\n Assert.assertEquals(-1,comparator.compare(c,b));\r\n \r\n System.out.println(\"Tests 2 products of equal weight\");\r\n \r\n System.out.println(\"Product 1: \" +e.getWeight() + \" Product 2: \" + f.getWeight());\r\n \r\n \r\n Assert.assertEquals(-1,comparator.compare(e,f));\r\n \r\n System.out.println(\"Product 1: \" +g.getWeight() + \" Product 2: \" + b.getWeight());\r\n \r\n Assert.assertEquals(-1,comparator.compare(b,g));\r\n \r\n System.out.println(\"Testing with only 1 input\");\r\n \r\n Assert.assertEquals(-1,comparator.compare(a));\r\n Assert.assertEquals(-1,comparator.compare(b));\r\n Assert.assertEquals(-1,comparator.compare(c));\r\n Assert.assertEquals(-1,comparator.compare(d));\r\n }", "TestCase(BigDecimal weightLimit, List<Thing> things) {\n this(\n weightLimit,\n things.stream()\n .sorted(\n Comparator.comparing(Thing::getWeight)\n .thenComparing(Thing::getCost, Comparator.reverseOrder())\n ).collect(Collectors.toList()),\n BigDecimal.ZERO\n );\n }", "@Test\n\tpublic void testDescendingComparator() {\n\t\tList<MockWorker> mockWorkers = createMockWorkers(10);\n\t\tsetAscendingParallelWorkCapacity(mockWorkers);\n\t\tList<WorkerLoadSnapshot> snapshots = createSnapshots(mockWorkers);\n\t\tRandom rng = new Random(-1L);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.descendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t\tList<MockWorker> unorderedList = new ArrayList<>(mockWorkers);\n\t\tCollections.shuffle(snapshots);\n\t\tsetAscendingParallelWorkCapacity(unorderedList);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.descendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t}", "@Test\n public void testCreateComparatorByName() {\n System.out.println(\"createComparatorByName\");\n // in decreasing order\n boolean increasing = false;\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n BankAccount instance2 = new BankAccount(\"Nelly\", 199.99);\n int result = BankAccount.createComparatorByName(increasing).compare(instance, instance2);\n assertTrue(result > 0);\n int result2 = BankAccount.createComparatorByName(increasing).compare(instance2, instance);\n assertTrue(result2 < 0);\n // in increasing order\n increasing = true;\n int result3 = BankAccount.createComparatorByName(increasing).compare(instance2, instance);\n assertTrue(result3 > 0);\n }", "@Test\n\tpublic void testSortByBothInHand() {\n\n\t\tHandClass newHand = new HandClass();\n\t\t\n\t\tnewHand.accept(new CardClass(\"2\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"3\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"4\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"5\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"6\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"7\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"8\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"9\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"10\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"J\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"Q\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"K\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"A\", \"spade\"));\n\t\tnewHand.accept(new CardClass(\"2\", \"diamond\"));\n\t\t\n\t\tnewHand.sort(\"BYboth\");\n\n\t\tCard pulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"2\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"2\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"diamond\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"3\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"4\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"5\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"6\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"7\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"8\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"9\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"10\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"J\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"Q\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"K\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t\tpulled = newHand.pullCard();\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"A\", pulled.getRank().getName());\n\t\tassertEquals(\"Incorrect sorted card order in hand\", \"spade\", pulled.getSuit().getName());\n\t}", "public static void comparatorTest() {\n\t\t\n\t}", "public void sortByPrice() {\n\t}", "@Test\n public void compareFunctionalBigger() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p2);\n \n assertEquals(-1, a);\n\n }", "public PriceComparator()\n\t{\n\t\tascending=true;\n\t}", "public void sortByPrice()\n {\n Collections.sort(sortInfos,SortInfo.priceComparator);\n }", "private void sortConsumers(GameDataWrapper gameDataWrapper) {\n consumers.sort((lhs, rhs) -> {\n float lhsMultiplier = lhs.getDefinition().getValueMultiplier();\n float rhsMultiplier = rhs.getDefinition().getValueMultiplier();\n\n return Float.compare(rhsMultiplier, lhsMultiplier);\n });\n }", "@Test\n public void testRelevancyComparator() {\n // Create a user interested in sports, politics and funny\n List<String> userTags = new ArrayList<>();\n userTags.add(\"sports\");\n userTags.add(\"politics\");\n userTags.add(\"funny\");\n CategoryPoints userCatPts = new CategoryPoints(userTags);\n\n RelevancyComparator comparator = new RelevancyComparator(userCatPts);\n\n // Create a poll very very very related to the user\n Poll p1 = new Poll(\"poll 1\", \"some emoji\", new ArrayList<>(), userCatPts, \"some color\", \"some image url\", \"some creator id\");\n\n // Create a poll kind of related to the user\n List<String> p2Tags = new ArrayList<>();\n p2Tags.add(\"sports\");\n p2Tags.add(\"politics\");\n p2Tags.add(\"culture\");\n CategoryPoints p2CatPts = new CategoryPoints(p2Tags);\n Poll p2 = new Poll(\"poll 2\", \"some emoji\", new ArrayList<>(), p2CatPts, \"some color\", \"some image url\", \"some creator id\");\n\n // Create a poll not related to the user\n List<String> p3Tags = new ArrayList<>();\n p3Tags.add(\"culture\");\n p3Tags.add(\"entertainment\");\n p3Tags.add(\"food\");\n CategoryPoints p3CatPts = new CategoryPoints(p3Tags);\n Poll p3 = new Poll(\"poll 3\", \"some emoji\", new ArrayList<>(), p3CatPts, \"some color\", \"some image url\", \"some creator id\");\n\n // By relevancy, p1 > p2 > p3\n assertEquals(comparator.compare(p1, p1), 0);\n assertEquals(comparator.compare(p1, p2), -1);\n assertEquals(comparator.compare(p2, p3), -1);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the root of the JTree.
public DefaultMutableTreeNode getRoot() { return (DefaultMutableTreeNode) tree.getModel().getRoot(); }
[ "public Node get_root() {\r\n return get_root(false);\r\n }", "public RBNode getRoot() {\r\n return root;\r\n }", "public Node getRoot() {\r\n return root;\r\n }", "public BTreeNode getRoot(){\n return root;\n }", "public RBNode getRoot() {\n\t\tif (!this.root.equals(NULL)) {\n\t\t\treturn this.root;\n\t\t}\n\t\treturn null;\n\t}", "public BSTNode getRoot(){\n\t\tif (nelems==0){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\treturn root;\n\t\t}\n\t}", "public DialogueNode getRoot() {\n\t\treturn root;\n\t}", "public TL_Node getRoot(){return root;}", "public ExpressionNode getRoot()\n {\n return root;\n }", "public Object getRoot() { return root;}", "public VerticalNode getRoot() {\n return root;\n }", "public JTree getTree() {\n\t\treturn tree;\n\t}", "public JTree getTree() {\n return tree;\n }", "public javax.swing.JTree getJTree() {\n if (jTree == null) {\n jTree = new javax.swing.JTree();\n }\n\n return jTree;\n }", "public WAVLNode getRoot() // return the root of the tree\r\n {\r\n return root;\r\n }", "public Node<T> getRoot();", "public java.lang.String getRoot() {\n return root;\n }", "public IAVLNode getRoot()\r\n\t{\r\n\t\treturn this.root;\r\n\t}", "public JTree getTree() {\n return tree;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "References" element
void unsetReferences();
[ "void unsetReference();", "void unsetDocumentReference();", "void unsetRef();", "public void resetReferencedStates()\n {\n for(int id=0;id<this.slotsReferenced.size();id++)\n {\n this.slotsReferenced.set(id,ReferenceState.unchecked);\n }\n }", "private void clearEmptyReferences()\n {\n for(int i = 0; i < textComps.size(); i++)\n {\n WeakReference wr = (WeakReference)textComps.get(i);\n if(wr.get() == null)\n undoers.set(i, null);\n }\n\n for(Iterator it = textComps.iterator(); it.hasNext();)\n {\n WeakReference w = (WeakReference)it.next();\n if(w.get() == null)\n it.remove();\n }\n\n for(Iterator it = undoers.iterator(); it.hasNext();)\n {\n if(it.next() == null)\n it.remove();\n }\n }", "public void unsetPclRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(PCLREF$54);\r\n }\r\n }", "void unsetEftReferenceNumber();", "private void resetReferences() {\n \tif (typeSize > 1) {\n \t\thead = walkToNode(0);\n \ttail = walkToNode(typeSize-1);\n \t}\n \telse if (typeSize == 0 || size == 0) {\n \t\thead = null;\n \t\ttail = null;\n \t}\n \telse {\n \t\ttail = head;\n \t\thead = tail;\n \t}\n }", "private void removeCrossReference ()\n\t{\n\t\tif (crossReference != null)\n\t\t{\n\t\t\tcrossReferences.remove (crossReference);\n\t\t}\n\t}", "public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }", "void unsetGradeModelRefs();", "public void removeAllRuleRef()\r\n {\r\n getSemanticObject().removeProperty(swb_hasRuleRef);\r\n }", "public void unsetRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(ROADWAYREF$16);\r\n }\r\n }", "void unsetFurtherRelations();", "void unsetRelations();", "public void unsetIntersectingRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(INTERSECTINGROADWAYREF$20);\r\n }\r\n }", "void unsetRel();", "public void unsetReferenceQueryId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REFERENCEQUERYID$32, 0);\n }\n }", "public void removeAllRuleRef();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test if shuffle button state is restored on configuration changes UI interaction flow tested: 1. Start playing a music item 2. Expand panel 3. Click on shuffle button 4. Rotate device 5. Result: shuffle button state should be restored to state in step 2
@Test public void restoreShuffleButtonStateOnRotate() { expandPanel(); onView(withId(R.id.shuffle)).perform(click()); //Set state to shuffled rotateDevice(getActivityTestRule().getActivity()); //Using waitForView as we need to wait for the rotate to finish onView(isRoot()).perform(ViewActions.waitForView(R.id.shuffle, new ViewActions.CheckStatus() { @Override public boolean check(View v) { return ((HighlightButton) v).isHighlighted(); } }, 10000)); }
[ "@Test\n public void setShuffleButtonState() {\n expandPanel();\n\n onView(withId(R.id.shuffle)).perform(click()); //Set state to shuffled\n\n onView(withId(R.id.shuffle)).check(matches(withHighlightState(true)));\n }", "@Test\n public void restoreRepeatButtonStateOnRotate() {\n expandPanel();\n onView(withId(R.id.repeat)).perform(click());\n\n rotateDevice(getActivity());\n\n onView(isRoot()).perform(ViewActions.waitForView(R.id.repeat, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((RepeatModeButton) v).getMode() == RepeatModeButton.MODE.ONE;\n }\n }, 10000));\n }", "@Test\n public void panelButtonsShuffleTest() {\n expandPanel();\n\n onView(withId(R.id.shuffle)).perform(click());\n\n onView(isRoot()).perform(ViewActions.waitForView(R.id.shuffle, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((HighlightButton) v).isHighlighted();\n }\n }, 10000));\n }", "private void onShuffleChanged(boolean isShuffled) {\n if (isShuffled) {\n pageShuffleButton.setImageResource(R.drawable.ic_menu_sort_123);\n pageShuffleText.setText(R.string.viewer_order_123);\n } else {\n pageShuffleButton.setImageResource(R.drawable.ic_menu_sort_random);\n pageShuffleText.setText(R.string.viewer_order_shuffle);\n }\n }", "void toggleShuffle();", "@Test\n public void panelButtonsRepeatModes() {\n expandPanel();\n\n //Initial state should be OFF\n onView(isRoot()).perform(ViewActions.waitForView(R.id.repeat, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((RepeatModeButton) v).getMode() == RepeatModeButton.MODE.OFF;\n }\n }, 10000));\n\n // Test if repeat mode is set to ONE after first click\n onView(withId(R.id.repeat)).perform(click());\n onView(isRoot()).perform(ViewActions.waitForView(R.id.repeat, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((RepeatModeButton) v).getMode() == RepeatModeButton.MODE.ONE;\n }\n }, 10000));\n\n // Test if repeat mode is set to ALL after second click\n onView(withId(R.id.repeat)).perform(click());\n onView(isRoot()).perform(ViewActions.waitForView(R.id.repeat, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((RepeatModeButton) v).getMode() == RepeatModeButton.MODE.ALL;\n }\n }, 10000));\n\n\n // Test if repeat mode is set to OFF after third click\n onView(withId(R.id.repeat)).perform(click());\n onView(isRoot()).perform(ViewActions.waitForView(R.id.repeat, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((RepeatModeButton) v).getMode() == RepeatModeButton.MODE.OFF;\n }\n }, 10000));\n }", "public boolean shuffleNeeded();", "private void onShuffleClick() {\n hideMoreMenu();\n goToPage(1);\n viewModel.onShuffleClick();\n }", "public void shuffleClick(View v)\n {\n toggleShuffle();\n }", "@Test\r\n public void testEnableShufflePlayMode(){\r\n\r\n }", "private void shuffleButtons() {\n\tfor(int i = 0; i < size; i++) {\n\t for(int j = 0; j < size; j++) {\n\t\tbArray[i][j].setSelected(true);\n\t }\n\t}\n\tboolean[][] clicked = new boolean[size][size];\n\tint minClicks = rgen.nextInt(size*size) + 1;\n\tint clickCount = 0;\n\twhile(clickCount < minClicks) {\n\t int r = rgen.nextInt(size);\n\t int c = rgen.nextInt(size);\n\t if(!clicked[r][c]) {\n\t\tbArray[r][c].doClick();\n\t\tclickCount++;\n\t }\n\t}\n }", "boolean isShuffle();", "void setShuffle(boolean shuffle);", "@Test\n public void panelButtonsMusicTest() {\n onView(withId(R.id.next)).check(matches(isDisplayed()));\n onView(withId(R.id.previous)).check(matches(isDisplayed()));\n onView(withId(R.id.play)).check(matches(isDisplayed()));\n }", "public void setShuffle(boolean shuffle);", "public boolean getShuffleChoices();", "public void setShuffleChoices(boolean shuffleChoices);", "private void testVictory() {\n\tboolean result = true;\n\tfor(int i = 0; i < size; i++) {\n\t for(int j = 0; j < size; j++) {\n\t\tif(!bArray[i][j].isSelected()) {\n\t\t result = false;\n\t\t}\n\t }\n\t}\n\t// if result is still true, than all the \"lights\" are out\n\tif(result) {\n\t // alert the user, restart a new puzzle if wanted, else close the window\n\t int option = JOptionPane.showConfirmDialog(this, \"You solved it! Play again?\", \"Victory!\", JOptionPane.YES_NO_OPTION);\n\t if(option == JOptionPane.YES_OPTION) {\n\t\tshuffleButtons();\n\t } else {\n\t\tWindowEvent wev = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);\n\t\tToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(wev);\n\t }\n\t}\n\t\n }", "private void cycleShuffle() {\n\t\tif (mShuffleMode == SHUFFLE_NONE) {\n\t\t\tsetShuffleMode(SHUFFLE_NORMAL);\n\t\t\tif (mRepeatMode == REPEAT_CURRENT) {\n\t\t\t\tsetRepeatMode(REPEAT_ALL);\n\t\t\t}\n\t\t} else {\n\t\t\tsetShuffleMode(SHUFFLE_NONE);\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback for float value gauges
public void gauge(MetricGauge<Float> metric, float value);
[ "float getValue();", "public void gauge(MetricGauge<Double> metric, double value);", "private float applyBoundaries(double newValue, RealVector genome){\n\t\tif(newValue>genome.getMaxVal())\n\t\t\treturn genome.getMaxVal();\n\t\t\n\t\tif(newValue<genome.getMinVal())\n\t\t\treturn genome.getMinVal();\n\t\t\n\t\treturn (float)newValue;\n\t}", "float getVal();", "double getFloatValue();", "float getGt();", "public void onSelectionUpdate(float val, float maxval, float minval, ValueBar bar);", "float getG();", "@Override\n public void agg(Object newVal)\n {\n aggVal += (Double)newVal;\n firstTime = false;\n }", "public void customValueChanged( CoreParameter parameter, double value );", "float getG0();", "@Override\n public void agg(double newVal)\n {\n aggVal += newVal;\n firstTime = false;\n }", "float getFloatValue();", "public void aggregate(double value);", "@Override\r\n public void agg(double newVal)\n {\r\n valueSet.add(newVal);\r\n }", "public abstract MetricsRecordBuilder addGauge(String name, String description, float value);", "public void setVolum(float value) {\n this.volum = value;\n }", "protected abstract float calcSensorValue();", "double getBasedOnValue();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
double zero_count_float = 7;
public Builder setZeroCountFloat(double value) { zeroCountCase_ = 7; zeroCount_ = value; onChanged(); return this; }
[ "double getZeroCountFloat();", "@java.lang.Override\n public double getZeroCountFloat() {\n if (zeroCountCase_ == 7) {\n return (java.lang.Double) zeroCount_;\n }\n return 0D;\n }", "public double getZeroCountFloat() {\n if (zeroCountCase_ == 7) {\n return (java.lang.Double) zeroCount_;\n }\n return 0D;\n }", "@java.lang.Override\n public boolean hasZeroCountFloat() {\n return zeroCountCase_ == 7;\n }", "boolean hasZeroCountFloat();", "public double getCountFloat() {\n if (countCase_ == 2) {\n return (java.lang.Double) count_;\n }\n return 0D;\n }", "double getCountFloat();", "boolean hasCountFloat();", "double getUnused00();", "long getZeroCountInt();", "private void calculatefundamentalFreq() {\n\t\tint count;\n\t\tfloat f0 = 0;\n\t\tSystem.out.println(\"pitches\");\n\t\tSystem.out.println(pitches);\n\t\tfor(count = 0; count < pitches.size(); count++)\n\t\t{\n\t\t\tf0 += pitches.get(count);\n\t\t}\n\t\tif(count != 0)\n\t\t\tfundamentalFreq = f0 / count;\n\t\telse\n\t\t\tfundamentalFreq = 0;\n\t}", "public boolean hasCountFloat() {\n return countCase_ == 2;\n }", "double getFf();", "int getFrequency(float value);", "public final double getLogZero() {\n \treturn logZero;\n }", "double getUnused07();", "public double toDouble() { return 0; }", "double getZeroThreshold();", "float floatValue();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
koniec getElkaALFromLine === koniec sekcji z obrobka danych z lasera / Sekcja z obroka danych z Gazebo
private ArrayList<TXyz> getGazALFromLine(String[] aLinT, double aVerStep) //czytam 1linie danych z Gazebo { ArrayList<TXyz> lXyzAL = new ArrayList<TXyz>(); //1. Zamieniam String na double double[] lVarT = new double[aLinT.length]; for (int i=0; i<lVarT.length; i++) { try { lVarT[i] = Double.parseDouble(aLinT[i].replace(',', '.').trim()); } catch (NumberFormatException err) { showErr("Blad w konwersji typu"); return lXyzAL; } //koniec try-catch } //koniec for for (int i=0; i<lVarT.length; i++) { //caly plik if (lVarT[i]<= theMaxDist) { //Spr. czy nie jest poza zakresem // Dodaje pkt do listy z pktami lXyzAL.add(new TXyz(getXYZ(lVarT[i], theHorStep*i, aVerStep, false))); } else { //cz. za daleko theMaxDistCnt++; //zliczam ile poza zakresem } //koniec if-else } //koniec for i return lXyzAL; }
[ "public abstract java.lang.String getLinea_anterior();", "void readAlphabet(String line) {\n if (line != null) {\n _alphabet = new Alphabet(line.trim());\n } else {\n throw new EnigmaException(\"No alphabet line given\");\n }\n }", "HologramLine getHologramLine();", "private Alibi convertToAlibi(final String line) {\n String[] parts = line.split(Alibi.TO_STRING_SEPARATOR);\n if (parts.length != Alibi.NUMBER_OF_ATTRIBUTES) {\n return null;\n }\n return new Alibi(parts);\n }", "public void setAdrLinea(String adrLinea) {\n this.adrLinea = adrLinea;\n }", "public String handle(Automaton automaton, String line);", "private synchronized static SourceDataLine aquireLine()\n throws LineUnavailableException {\n SourceDataLine line;\n if (lines.size() > 0) {\n line = (SourceDataLine) lines.elementAt(0);\n lines.removeElementAt(0);\n } else {\n AudioFormat audioFormat = new AudioFormat(\n (float) 8000, // sample rate\n 8, //sampleSizeInBits\n 1, //number of channels\n true, //isSigned\n true //isBigEndian\n );\n \n Line.Info lineInfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n line = (SourceDataLine) getMixer().getLine(lineInfo);\n line.open();\n line.start();\n //System.out.println(\"aquireLine elapsed:\"+(System.currentTimeMillis() - start));\n }\n return line;\n }", "public static double measureAngle(OriLine l0, OriLine l1) {\n\t\tVector2d l0p0 = l0.getP0();\n\t\tVector2d l0p1 = l0.getP1();\n\t\tVector2d l1p0 = l1.getP0();\n\t\tVector2d l1p1 = l1.getP1();\n\n\t\tVector2d angleVertex;\n\t\tVector2d v0;\n\t\tVector2d v1;\n\t\t\n\t\tif (l0p0.x == l1p0.x && l0p0.y == l1p0.y) {\n\t\t\tangleVertex = l0p0;\n\t\t\tv0 = l0p1;\n\t\t\tv1 = l1p1;\n\t\t} else if (l0p0.x == l1p1.x && l0p0.y == l1p1.y) {\n\t\t\tangleVertex = l0p0;\n\t\t\tv0 = l0p1;\n\t\t\tv1 = l1p0;\n\t\t} else if (l0p1.x == l1p0.x && l0p1.y == l1p0.y) {\n\t\t\tangleVertex = l0p1;\n\t\t\tv0 = l0p0;\n\t\t\tv1 = l1p1;\n\t\t} else {\n\t\t\tangleVertex = l0p1;\n\t\t\tv0 = l0p0;\n\t\t\tv1 = l1p0;\n\t\t}\n\n\t\treturn measureAngle(angleVertex, v0, v1);\n\t}", "public static LinearEquation calculateAngleBisector(LinearEquation line1, LinearEquation line2) {\n double a1 = line1.a,\n b1 = line1.b,\n a2 = line2.a,\n b2 = line2.b,\n A1 = -a1,\n A2 = -a2,\n B12 = 1,\n C1 = -b1,\n C2 = -b2,\n R1 = Math.sqrt(A1 * A1 + 1),\n R2 = Math.sqrt(A2 * A2 + 1),\n A = A1 / R1 + A2 / R2,\n B = B12 / R1 + B12 / R2,\n C = C1 / R1 + C2 / R2,\n a = -A / B,\n b = -C / B;\n\n return new LinearEquation(a, b);\n }", "public LineaMetro getLinea() {\n\t\treturn linea;\n\t}", "public String getAdrLinea() {\n return adrLinea;\n }", "@Test\n public void testLCA(){\n LCADag lca = new LCADag(10);\n\n //--------2---5----7--\n //---0--1-------6----8\n //--------3---4-------\n lca.addEdge(0, 1);\n lca.addEdge(1, 2);\n lca.addEdge(1, 3);\n lca.addEdge(2, 5);\n lca.addEdge(3, 4);\n lca.addEdge(4, 6);\n lca.addEdge(5, 6);\n lca.addEdge(6, 8);\n lca.addEdge(5, 7);\n lca.addEdge(7, 8);\n lca.addEdge(8, 9);\n\n assertEquals(\"Finding LCA for 4 and 5\", 1, lca.findLCA(5, 4));\n assertEquals(\"Finding LCA for 7 and 8\", 7, lca.findLCA(8, 7));\n assertEquals(\"Finding LCA for 6 and 8\", 6, lca.findLCA(6, 8));\n assertEquals(\"Special case where both parameters are same vertex\", 2, lca.findLCA(2,2));\n }", "public IMURec(String line) {\n\t\tString[] s = line.split(\";\");\n\t\tt = Double.parseDouble(s[0]);\n\t\tax = Double.parseDouble(s[1]);\n\t\tay = Double.parseDouble(s[2]);\n\t\taz = Double.parseDouble(s[3]);\n\t\twx = Double.parseDouble(s[4]);\n\t\twy = Double.parseDouble(s[5]);\n\t\twz = Double.parseDouble(s[6]);\n\t}", "public void readArmies(){\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n vertices.get(Integer.parseInt(armyLine[1])-1).addArmies(Integer.parseInt(armyLine[2]));\n System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n // Read countries armies for AI agents\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n allSCountries.get(Integer.parseInt(armyLine[1])).setNumberArmies(Integer.parseInt(armyLine[2]));\n // System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n NState.globalState.allCountries=allSCountries;\n }", "public double getAcuteAngle( final LineXY line ) {\n\t\t// get the intersection point\n\t\tfinal PointXY p1 = PointXY.getIntersectionPoint( this, line );\n\t\tif( p1 == null ) {\n\t\t\tthrow new IllegalArgumentException( format( \"No intersection found\" ) );\n\t\t}\n\t\t\n\t\t// get the points of both lines\n\t\tfinal PointXY pa1 = this.getBeginPoint();\n\t\tfinal PointXY pa2 = this.getEndPoint();\n\t\tfinal PointXY pb1 = line.getBeginPoint();\n\t\tfinal PointXY pb2 = line.getEndPoint();\n\t\t\n\t\tfinal PointXY p2 = PointXY.getFarthestPoint( p1, pa1, pa2 );\n\t\tfinal PointXY p3 = PointXY.getFarthestPoint( p1, pb1, pb2 );\n\t\t\n\t\t// are both lines orthogonal?\n\t\tif( this.isOrthogonal() && line.isOrthogonal() ) {\n\t\t\treturn this.isParallelTo( line ) ? 0 : Math.PI;\n\t\t}\n\t\t\n\t\t// is the either line orthogonal?\n\t\telse if( this.isOrthogonal() || line.isOrthogonal() ) {\n\t\t\t// cos t = ( -a^2 + b^2 - c^2 ) / 2cb \n\t\t\tfinal double a = getDistance( p1, p2 );\n\t\t\tfinal double b = getDistance( p1, p3 );\n\t\t\tfinal double c = getDistance( p2, p3 );;\n\t\t\treturn acos( ( -pow(a, 2d) + pow(b, 2d) - pow(c, 2d) ) / ( 2d * c * b ) );\n\t\t}\n\t\t\n\t\t// both must be angular\n\t\telse {\n\t\t\t// tan t = ( m1 - m2 ) / ( 1 + m1 * m2 ); where m2 > m1\n\t\t\tdouble m1 = this.getSlope();\n\t\t\tdouble m2 = line.getSlope();\n\t\t\tif( m1 > m2 ) {\n\t\t\t\tfinal double mt = m1;\n\t\t\t\tm1 = m2;\n\t\t\t\tm2 = mt;\n\t\t\t}\n\t\t\t\n\t\t\t// compute the angle\n\t\t\treturn atan( ( m1 - m2 ) / ( 1 + m1 * m2 ) );\n\t\t}\n\t}", "private static synchronized boolean isAfsLfe(String thisLine) throws IcofException {\n\n String funcName = \"isAfsLfe(String)\";\n\n // The line being parsed should look like this:\n // AFS version: Base configuration afs3.6 2.64;Navinesh-ID71117-afs3.6-AIX-large\n\n boolean isLfe = false;\n int index = thisLine.indexOf(BASE_CONFIGURATION);\n if (index < 0) {\n throw new IcofException(CLASS_NAME\n ,funcName\n ,IcofException.SEVERE\n ,\"Unable to extract afs version from results: \"\n + thisLine\n ,\"\");\n\n }\n\n // Remove everything up to the version. Should end up with\n // 3.6 2.64;Navinesh-ID71117-afs3.6-AIX-large\n int startPos = index + BASE_CONFIGURATION.length();\n thisLine = thisLine.substring(startPos);\n thisLine = thisLine.trim();\n\n // Now extract the version number and sub version number\n // 3.6 and 2.64\n int firstSpace = thisLine.indexOf(\" \");\n String versionStr = thisLine.substring(0, firstSpace);\n double version = (new Double(versionStr)).doubleValue();\n// System.out.println(\"version: \" + version);\n if (version > MIN_LFE_AFS_VERSION) {\n isLfe = true;\n }\n else if (version == MIN_LFE_AFS_VERSION) {\n index = thisLine.indexOf(\";\");\n if (index >= 0) {\n thisLine = thisLine.substring(0, index);\n }\n String subversionStr = thisLine.substring(firstSpace);\n double subversion = (new Double(subversionStr)).doubleValue();\n// System.out.println(\"subversion: \" + subversion);\n if (subversion >= MIN_LFE_AFS_SUBVERSION) {\n isLfe = true;\n }\n }\n\n return isLfe;\n\n\n }", "private void initAudio() throws LineUnavailableException {\n af = getAudioFormat();\n DataLine.Info dli = new DataLine.Info(SourceDataLine.class, af);\n lineAvailable = AudioSystem.isLineSupported(dli);\n }", "public OMAbstractLine() {\n super();\n }", "public static final String getIATAAirlineCode(String code) throws IATAIncorrectLength{\n\t return getIATACode(code,AIRLINE_LENGTH);\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds byte array for DatagramPacket.
private byte[] buildBytes() { byte[] message = new byte[4 + 2 + 2 + 1 + data.getLength()]; System.arraycopy(id.getBytes(), 0, message, 0, 4); System.arraycopy(sq.getBytes(), 0, message, 4, 2); System.arraycopy(ack.getBytes(), 0, message, 6, 2); message[8] = flag.getBytes(); System.arraycopy(data.getBytes(), 0, message, 9, data.getBytes().length); return message; }
[ "private static byte[] makePacket(byte pkID, byte[] data){\n //Logger.log(\"Length of data:\"+data.length);\n ByteBuffer packetFactory = ByteBuffer.allocate(5+data.length);\n packetFactory.put(pkID);\n packetFactory.putInt((int)(data.length));\n packetFactory.put(data);\n return byteBuffer2byte(packetFactory);\n }", "public abstract DatagramPacket buildPacket();", "public byte[] getPacket() {\r\n\t\tByteBuffer buf = ByteBuffer.allocate(4 + 4 + 2 + key.length() + 4 + data.length);\r\n\t\t\r\n\t\tbuf.putInt(4 + 2 + key.length() + 4 + data.length);\r\n\t\t\r\n\t\tbyte[] hold = new byte[4];\r\n\t\tbuf.put(hold);\r\n\t\tbuf.putShort((short) key.length());\r\n\t\tbuf.put(key.getBytes());\r\n\t\tbuf.put(checksum);\r\n\t\tbuf.put(data);\r\n\t\t\r\n\t\treturn buf.array();\r\n\t}", "public DatagramPacket toDatagramPacket() {\n\t\treturn new DatagramPacket(contentArr, contentArr.length, targetAddr);// initialize that packet\n\t}", "public byte[] pack() {\n\t\tByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\t\tbyteStream.write(this.dest);\n\t\tbyteStream.write(this.src);\n\t\tbyteStream.write(this.ttl);\n\t\tbyteStream.write(this.protocol);\n\t\tbyteStream.write(this.payload.length + Packet.HEADER_SIZE);\n\n\t\tbyte[] seqByteArray = (BigInteger.valueOf(this.seq)).toByteArray();\n\t\tint paddingLength = 4 - seqByteArray.length;\n\t\tfor(int i = 0; i < paddingLength; i++) {\n\t\t\tbyteStream.write(0);\n\t\t}\n\n\t\tbyteStream.write(seqByteArray, 0, Math.min(seqByteArray.length, 4));\n\n\t\tbyteStream.write(this.payload, 0, this.payload.length);\n\n\t\treturn byteStream.toByteArray();\n }", "private byte[][] buildDataPackets(int nextSeqNum, byte[] rawData) {\n int curSeqNum = nextSeqNum;\n int currentDataLoc = 0;\n byte[][] returnArray;\n int numRawPackets;\n int toCopy;\n\n // Figure out how many packets we'll need total\n numRawPackets = rawData.length / UDPTransportLayer.RAW_DATA_SIZE;\n if ((rawData.length % UDPTransportLayer.RAW_DATA_SIZE) > 0) \n numRawPackets++;\n\n // Build the return array\n returnArray = new byte[numRawPackets][UDPTransportLayer.PACKET_SIZE];\n\n // Now start building packets\n for(int i=0; i<numRawPackets; i++, currentDataLoc += UDPTransportLayer.RAW_DATA_SIZE) {\n\n // Write out message header\n writeByte (returnArray[i], 0, UDPTransportLayer.MESSAGE_TYPE_DATA);\n writeInt (returnArray[i], 1, curSeqNum);\n writeShort(returnArray[i], 5, i);\n writeShort(returnArray[i], 7, numRawPackets);\n writeShort(returnArray[i], 9, rawData.length);\n curSeqNum++;\n\n // Fill the rest of this packet with data\n toCopy = UDPTransportLayer.PACKET_SIZE - 11;\n if (toCopy > (rawData.length - currentDataLoc))\n\ttoCopy = rawData.length - currentDataLoc;\n System.arraycopy(rawData, currentDataLoc, returnArray[i], 11, toCopy);\n }\n\n // Finally, return the array of packets to the caller\n return returnArray;\n }", "public static byte[] createPacket(byte[] data) {\r\n byte[] header = createHeader(seqNo);\r\n byte[] packet = new byte[data.length + header.length]; // data + header\r\n System.arraycopy(header, 0, packet, 0, header.length);\r\n System.arraycopy(data, 0, packet, header.length, data.length);\r\n seqNo = seqNo + 1;\r\n return packet;\r\n }", "public byte[] pack() {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\n IOHelper.writeInt(this.type.ordinal(), byteStream);\n IOHelper.writeInt(this.senderID, byteStream);\n\n try{\n if(this.message == null)\n IOHelper.writeByteArray(new byte[0], byteStream);\n else\n IOHelper.writeByteArray(this.message.pack(), byteStream);\n \n }catch(Exception e){\n System.err.println(\"ControlPacket: Can't write byte array via IOHelper\");\n e.printStackTrace();\n }\n \n return byteStream.toByteArray();\n }", "public byte[] getBytes()\r\n {\r\n\r\n byte[] tmp = new byte[this.getSize()];\r\n\r\n ByteBuffer buff = ByteBuffer.wrap(tmp);\r\n\r\n // byteorder ala protocoll\r\n buff.putShort(this.sessionId);\r\n buff.put(this.packageId);\r\n buff.put(StartPackage.marker.getBytes());\r\n buff.putLong(this.fileLength);\r\n buff.putShort(this.fileNameLength);\r\n buff.put(this.fileName);\r\n buff.putInt(this.checksumValue);\r\n\r\n System.out.println(buff.array().length);\r\n return buff.array();\r\n\r\n }", "private byte[] getAsArray() {\n\t\tbyte[] array = new byte[count*UDPSplitterSender.SIZE];\n\t\tSet<Integer> ids = packets.keySet();\n\t\tArrayList<Integer> list = new ArrayList<Integer>(ids);\n\t\tCollections.sort(list);\n\t\tfor(Integer id: list){\n\t\t\tSystem.arraycopy(packets.get(id), 0, array, id*UDPSplitterSender.SIZE, UDPSplitterSender.SIZE);\n\t\t}\n\t\treturn array;\n\t}", "public byte[] getMsgData() {\n if (length > 0) //check to see if the length has been calculated.\n return msgData; //return the packet if it is valid.\n else\n return new byte[] {0x0,0x0}; //return an valid data array that is blank.\n }", "public byte[] getDatagramFragment() {\n\t\tbyte[] datagram=new byte[icmp_body.length-4];\n\t\tSystem.arraycopy(icmp_body,4,datagram,0,datagram.length);\n\t\treturn datagram;\n\t\t\n\t}", "public static byte[] packMessage(byte command, byte serialNo, byte[] data){\n throw new NotImplementedException();\n// GregorianCalendar timestamp = new GregorianCalendar();\n//\n// byte[] packet = new byte[10 + data.length];\n// packet[COMMAND] = command;\n// packet[DIRECTION] = 1;\n// packet[SIZE] = (byte) data.length;\n// packet[SERIAL_NO] = serialNo;\n//\n// packet[YEAR] = (byte) (timestamp.get(Calendar.YEAR) - 2000);\n// packet[MONTH] = (byte) timestamp.get(Calendar.MONTH);\n// packet[DAY] = (byte) timestamp.get(Calendar.DAY_OF_MONTH);\n// packet[HOUR] = (byte) timestamp.get(Calendar.HOUR_OF_DAY);\n// packet[MINUTE] = (byte) timestamp.get(Calendar.MINUTE);\n// packet[SECOND] = (byte) timestamp.get(Calendar.SECOND);\n//\n// // TODO: Concatnate data array with packet at the end\n//// packet[DATA_START] = data;\n//\n// return packet;\n }", "protected byte[] pack() {\t\n\t\ttry {\n\t\t\tByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\t\t\tDataOutputStream out = new DataOutputStream(byteStream);\n\t\t\tout.writeByte(dest);\n\t\t\tout.writeByte(src);\n\t\t\tout.writeByte(protocol);\n\t\t\tout.writeByte(flags);\n\t\t\tout.writeInt(payload.length);\n\n\t\t\tout.write(payload, 0, payload.length);\n\t\t\t\n\t\t\tout.flush();\n\t\t\treturn byteStream.toByteArray();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public byte[] toByteArray() {\n int byteLength = bitLength / 8;\n byte[] res = new byte[byteLength];\n byte[] array = value.toByteArray();\n int arrayStart = array.length > byteLength ? array.length - byteLength : 0;\n int resStart = array.length > byteLength ? 0 : byteLength - array.length;\n int len = Math.min(byteLength, array.length);\n System.arraycopy(array, arrayStart, res, resStart, len);\n return res;\n }", "private static byte[] receiveUDPPacket() throws IOException {\n byte[] result = new byte[64];\n DatagramPacket dp = new DatagramPacket(result, result.length);\n udpSocket.receive(dp);\n return result;\n }", "@Override\r\n\tpublic byte[] getBytes() {\r\n\t\tByteBuffer buf = ByteBuffer.allocate(8);\r\n\t\tbuf.putInt(this.depositId);\r\n\t\tbuf.putInt(this.depositExpectationId);\r\n\t\treturn buf.array();\r\n\t}", "byte[] toByte(Packet packet) throws IOException;", "private byte [] encodePacket(MqttPubAckControlPacket packet) {\n byte [] buffer = null;\n \ttry(ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\n \n // Set packet identifier\n encodePacketIdentifier(byteArrayOutputStream, packet);\n\n buffer = byteArrayOutputStream.toByteArray();\n } catch(Exception e) {\n e.printStackTrace();\n }\n return buffer;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Let us know the daemon is connected
protected void onDaemonConnected() { if (DBG) Slog.d(TAG, "onConnected"); mConnectedSignal.countDown(); }
[ "boolean isDaemon();", "public boolean isAlive () {\n return (daemon != null) && daemon.isAlive();\n }", "@Override\n public boolean isConnected() {\n boolean result = false;\n synchronized (CONN_SYNC) {\n result = ((system != null) && system.isConnected());\n }\n return result;\n }", "public abstract boolean isConnected();", "@Override\n public boolean isConnected() {\n return device != null;\n }", "@Override\n\tpublic boolean isConnected() {\n\t\treturn mRunning && mTraceValid;\n\t}", "public boolean isConnected() {\n\t\tif (deviceStatus == 1) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasDisconnect();", "private void setupDymonSocket()\n{\n if (openDymonSocket()) return;\n\n if (!startDymon()) {\n System.err.println(\"DYMONREMOTE: Can't start DYMON service\");\n System.exit(1);\n }\n\n for (int i = 0; i < 1000; ++i) {\n if (openDymonSocket()) return;\n try {\n\t Thread.sleep(1000);\n }\n catch (InterruptedException _e) { }\n }\n\n System.err.println(\"DYMONREMOTE: Problem connecting to DYMON service\");\n System.exit(1);\n}", "public static boolean isConnected() { return irc != null && irc.isConnected(); }", "public boolean isRunning() {\r\n \t\treturn connectionThread.isAlive();\r\n \t}", "public boolean isServiceConnected() {\r\n return serviceConnected;\r\n }", "static boolean isConnected() {\n return session.contains(\"username\");\n }", "private boolean isHIDGametelConnected() {\r\n return true;\r\n }", "void onConnected();", "public boolean isConnected() {\n return _socketChannel.isConnected() && _connectionThread != null && _connectionThread.isAlive();\n }", "public boolean isConnected() {\n // should be called to check whether server is working before this class is used\n return this.connected;\n }", "public boolean checkPlayerIsConnected() {\n synchronized (startupLock) {\n if (alive && !playerConnected) {\n try {\n startupLock.wait();\n } catch (InterruptedException e) {\n log.error(e);\n }\n }\n return alive && playerConnected;\n }\n }", "public boolean isAlive() {\n return !socket.isClosed() && !socket.isInputShutdown() && !socket.isOutputShutdown();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'glosses' field.
public java.util.List<java.lang.CharSequence> getGlosses() { return glosses; }
[ "public java.util.List<java.lang.CharSequence> getGlosses() {\n return glosses;\n }", "public boolean hasGlosses() {\n return fieldSetFlags()[2];\n }", "public Term.Builder setGlosses(java.util.List<java.lang.CharSequence> value) {\n validate(fields()[2], value);\n this.glosses = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public void setGlosses(java.util.List<java.lang.CharSequence> value) {\n this.glosses = value;\n }", "int getLoses() {return _loses;}", "public Integer getcGly() {\n return cGly;\n }", "public int getSTOPG() {\n return stopg;\n }", "public double GetGloss()\r\n\t{\r\n\t\treturn gloss;\r\n\t}", "public double getTipGreske() {\n return tipGreske;\n }", "public double getG(){\n\t\treturn this.g;\n\t}", "public int getLoses(){\n\t\treturn board.getLoses();\n\t}", "public boolean getGlitter() { return glitter; }", "public BigDecimal getGongshicdbl() {\r\n return gongshicdbl;\r\n }", "public Float getGwsalary() {\n return gwsalary;\n }", "public double getGnpOld() {\n\n return gnpOld;\n }", "public double getMaxGs()\n {\n return this.max_gs;\n }", "public double getLoseProb() {\n return loseProb;\n }", "public int getLosingLeaves() {\n return losingLeaves;\n }", "public Integer getGroupGly() {\n return groupGly;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when book is returned, sets current holder and due date to null.
@Override public void returned() { setCurrentHolder(null); setDueDate(null); }
[ "@Override\n public void checkout(String bookHolder, String dueDate) {\n setCurrentHolder(bookHolder);\n setDueDate(dueDate);\n }", "void returnBook(){\n currentBorrowerId = NEGATIVE_NUMBER ;\n }", "public void returnBook()\r\n\t{\r\n\t\tborrowerCardBarCode = null;\r\n\t}", "public void checkOutBook(String date) {\n\n\t\tthis.bookStatus.avail = false;\n\t\tthis.bookStatus.returnDate = date;\n\n\t}", "public void setDueDate(Date due)\n {\n if (this.rented)\n this.due = due;\n }", "public void setUnpaid() {\n //make the bill unpaid by setting it to null\n this.paidDate = null;\n }", "public void setDueDate(Date d){dueDate = d;}", "private void selectBook() {\n\t\t// Get field borID selected\n\t\tString borID = view.getTblBoth()\n\t\t\t\t.getValueAt(view.getTblBoth().getSelectedRow(), 0).toString();\n\t\t// Get field bookID selected\n\t\tString bookID = view.getTblBoth()\n\t\t\t\t.getValueAt(view.getTblBoth().getSelectedRow(), 2).toString();\n\t\t// If this book is'n selected\n\t\tif (set.add(borID + Messages.getString(\"CheckInController.21\") + bookID)) { //$NON-NLS-1$\n\t\t\t// Set all check-in information\n\t\t\tcheckin = map.get(borID\n\t\t\t\t\t+ Messages.getString(\"CheckInController.22\") + bookID); //$NON-NLS-1$\n\t\t\t// Set issue date\n\t\t\tview.getTxtIssueDate().setDate(\n\t\t\t\t\tnew java.util.Date(checkin.getIssueDate()));\n\t\t\t// Create a new vector to add checkin info from checkin object\n\t\t\tvt = new Vector<Object>();\n\t\t\tvt.add(checkin.getBorID());\n\t\t\tvt.add(checkin.getBookID());\n\t\t\tvt.add(checkin.getCallNumber());\n\t\t\tvt.add(checkin.getTitle());\n\t\t\t// Calculate Borrow information\n\t\t\tint DueDay = (int) ((checkin.getDueDate() - checkin.getIssueDate()) / (24 * 60 * 60 * 1000));\n\t\t\tint DayBor = (int) (view.getTxtReturnDate().getDate().getTime() - checkin\n\t\t\t\t\t.getIssueDate()) / (24 * 60 * 60 * 1000);\n\t\t\t// If day borrow is great than due day, set it default due day\n\t\t\tif (DayBor > DueDay) {\n\t\t\t\tDayBor = DueDay;\n\t\t\t}\n\t\t\tint DayLate = (int) (view.getTxtReturnDate().getDate().getTime() - checkin\n\t\t\t\t\t.getDueDate()) / (24 * 60 * 60 * 1000);\n\t\t\tfloat BorrowFee = DayBor * borFee;\n\t\t\tfloat Fine = 0;\n\t\t\tvt.add(DayBor + Messages.getString(\"Slash\") + BorrowFee); //$NON-NLS-1$\n\t\t\tif (DayLate > 0) {\n\t\t\t\tFine = DayLate * lateFee;\n\t\t\t\tvt.add(DayLate + Messages.getString(\"Slash\") + Fine); //$NON-NLS-1$\n\t\t\t} else {\n\t\t\t\tvt.add(0 + Messages.getString(\"Slash\") + 0); //$NON-NLS-1$\n\t\t\t}\n\t\t\tvt.add(BorrowFee + Fine);\n\t\t\tinModel.addRow(vt);\n\t\t}\n\n\t}", "public void nearestDeadlineBook (Book book) {\r\n\t\t\r\n\t\tList<Date> dates = new ArrayList<Date>();\r\n\t\t\r\n\t\tList<BookCopy> bookCopies = bookCopyDao.findBookCopyByBook_Id(book.getId());\r\n\t\t\r\n\t\tfor (BookCopy bookCopy : bookCopies) {\r\n\t\t\tList<Borrowing> borrowings = borrowingDao.findByBookCopyAndStates(bookCopy, Arrays.asList(State.EnCours, State.Renouvele, State.EnRetard));\r\n\t\t\tif(borrowings.size() > 0) {\r\n\t\t\t\tBorrowing borrowing = borrowings.get(0);\r\n\t\t\t\tdates.add(borrowing.getDeadline());\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(dates);\r\n\t\t\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\r\n\t\tif (dates.size() > 0) {\r\n\t\t\tDate nearestDeadline = dates.get(0);\r\n\t\t\t\r\n\t\t\tbook.setNearestDeadline(dateFormat.format(nearestDeadline));\r\n\t\t} else {\r\n\t\t\tLocalDate ld = LocalDate.of( 2001 , 01 , 01 ) ;\r\n\t\t\tbook.setNearestDeadline(dateFormat.format(java.sql.Date.valueOf(ld)));\r\n\t\t}\r\n\t}", "public void setBookintDate(Date bookintDate ){\n\tthis.bookingDate = bookintDate;\n}", "public void dontCompleteBooking(){\r\n\t\ttempBookings.clear();\r\n\t}", "@Override\r\n\tpublic void checkOut(String borrower, String date) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public void setBorrowDate(Calendar toSetBorrowDate) {\r\n\r\n\t\tborrowDate = toSetBorrowDate;\r\n\t}", "public void setDueDate(String dueDate) {\n }", "@Override\n\tpublic BorrowNote__ takeOndeskBook(Integer readerId, Integer bookEntityId)\n\t\t\tthrows Exception {\n\t\tReader reader = readerDao.getReader(readerId);\n\t\tif (reader == null) {\n\t\t\tthrow new InvalidReaderException(readerId);\n\t\t}\n\t\t// Validate this Book Entity\n\t\tBookEntity bookEntity = bookEntityDao.getBookEntity(bookEntityId);\n\t\tif (bookEntity == null) {\n\t\t\tthrow new InvalidBookEntityException(bookEntityId);\n\t\t}\n\t\t// Check if the reader reserves this book\n\t\tBook book = (Book) bookEntity.getBook();\n\t\tReserveNote reserveNote = reserveNoteDao.findReserveNote(reader, book, ReserveStatus.ONDESK);\n\t\tif (reserveNote == null) {\n\t\t\tthrow new ReserveMismatchException(book.getIsbn());\n\t\t}\n\t\t\n\t\t/**\n\t\t * Process the taking\n\t\t * \n\t\t * 1. Update Reverse record\n\t\t */\n\t\treserveNote.setStatus(ReserveStatus.CLOSED);\n\t\t\n\t\t/**\n\t\t * 2. Update Book\n\t\t */\n\t\tbook.setReserveQty(book.getReserveQty()-1);\n\t\tbook.setOndeskQty(book.getOndeskQty()-1);\n\t\t/**\n\t\t * Set book to reserveNote is critical because the original reserveNote.book \n\t\t * is just extracted from the database and not the book updated by the above code.\n\t\t */\n\t\treserveNote.setBook(book);\n\n\t\t/**\n\t\t * 3. Update Reader\n\t\t */\n\t\treader = (Reader) reserveNote.getReader();\n\t\treader.setReserveQty(reader.getReserveQty()-1);\n\t\t/**/\n\t\tfor (BookEntity be : book.getEntities()) {\n\t\t\tif (be.isBorrowed() && be.getBorrowNote().getReader().getId() == reader.getId()) {\n\t\t\t\tbe.getBorrowNote().setReader(reader);\n\t\t\t}\n\t\t}\n\t\t/**/\n\t\t\n\t\t\n\t\treaderDao.updateReader(reader);\n\t\treserveNoteDao.updateReserveNote(reserveNote);\n\n\t\t/**\n\t\t * 4. BORROW\n\t\t */\n\t\tBorrowNote borrowNote = this.borrowBook(reader, bookEntity); \n\t\t\n\t\tBorrowNote__ returnBorrowNote = borrowNote.toBorrowNote__FromService();\n\n\t\tif (returnBorrowNote == null) throw new NullPointerException(\"returnBorrowNote\");\n\t\t\n\t\treturn returnBorrowNote;\n\t}", "public Date getBookintDate()\n{\n\treturn bookingDate;\n}", "@Test\n public void testSetBorrowDate() {\n System.out.println(\"setBorrowDate\");\n Date d = null;\n BorrowableItem instance = new BorrowableItem();\n instance.setBorrowDate(d);\n \n assertEquals(instance.getBorrowDate(), d);\n \n Date d2 = new Date();\n \n instance.setBorrowDate(d2);\n assertEquals(instance.getBorrowDate(), d2);\n }", "void unsetIssuingDate();", "public CirculatingBook(String writer, String name, String isbn,\n String callnum) {\n super(writer, name, isbn, callnum);\n\n currentHolder = null;\n dueDate = null;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the logsAgent property: The logsAgent property.
public DatadogHostMetadata withLogsAgent(DatadogLogsAgent logsAgent) { this.logsAgent = logsAgent; return this; }
[ "public DatadogLogsAgent logsAgent() {\n return this.logsAgent;\n }", "public void setAgent(Agent agent) {\n\t\tthis.agent = agent;\n\t}", "public void setLogFile(String logFile) {\n agentConfig.setLogFile(logFile);\n logConfigChanged();\n }", "public void setAgent(IAgent agent);", "public void setAgent(Integer agent) {\r\n this.agent = agent;\r\n }", "public abstract void setAgentDestination(Agent agent);", "public void setAgentEventListener(AgentEventListener ael) {\r\n agentEventListener = ael;\r\n }", "T setJavaAgents(JavaAgent... javaAgents);", "T setJavaAgents(List<JavaAgent> javaAgents);", "void setLogTracer(LogTracer log);", "public void setLogService(LogService logService) {\r\n this.logService = logService;\r\n }", "void log(int agentId, String msg);", "public void setLogLevel(String logLevel) {\n agentConfig.setLogLevel(logLevel);\n logConfigChanged();\n }", "public void setAgentSales(String agentSales) {\r\n\t\tthis.agentSales = agentSales;\r\n\t}", "public synchronized static void setLogManager(LogManager manager) {\n DefensiveTools.checkNull(manager, \"manager\");\n\n logManager = manager;\n }", "public void setLogger(Logger log){\n this.log = log;\n }", "public void setAgent(int i, Agent a) { scenario.team.agents.set(i, a); }", "public static void setLoggingWantEnemy(boolean loggingWantEnemy) {\n Constants.loggingWantEnemy = loggingWantEnemy;\n }", "public LoggingAgent() {\n\t\tsuper();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A factory for storage.
public interface StorageFactory { /** * Creates a storage of specified size. * * @param begin the begin index of storage. * @param size the storage size. * @return the created storage. * @throws MemoryException error to create a new storage. */ Storage create(int begin, int size) throws MemoryException; }
[ "protected Storage newStorage()\n\t{\n\t\treturn new DbStorage(this);\n\t}", "void create(Storage<?> storage);", "Store createStore();", "public static Storage getInstance() {\n if (instance == null) {\n instance = new Storage();\n }\n return instance;\n }", "private StorageFile initializeStorage() throws StorageFile.InvalidStorageFilePathException {\n return new StorageFile();\n }", "StoragePoint createStoragePoint();", "public Storage() {\n\n }", "protected abstract S mkStore();", "boolean createStorage();", "public Storage() {\n file = new File(DEFAULT_STORAGE_FILEPATH);\n }", "public static IItemStore establishItemStore()\n {\n File pathStore = new File(DEFALUT_STORE_PATH);\n\n IItemStore store = null;\n\n // if the path store does not exist\n\n if (!pathStore.exists())\n {\n if (!pathStore.mkdir())\n {\n log\n .error(\"unable to create storage directory: \" + pathStore +\n \"\\nUsing memory store which will NOT perminently store your items.\");\n\n store = new TestStore();\n }\n else\n store = new FileStore(pathStore.toString());\n }\n else if (!pathStore.isDirectory())\n {\n log.error(\"path store is not a directory: \" + pathStore +\n \"\\nUsing memory store which will NOT perminently store your items.\");\n\n store = new TestStore();\n }\n else\n store = new FileStore(pathStore.toString());\n\n return store;\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 interface Storage<T> {\n\n /**\n * Saves a data object in the store.\n *\n * @param data the object to be saved\n */\n public void save(T data);\n\n /**\n * Loads the data object stored in this store. This can return null.\n *\n * @return the stored data object.\n */\n public T load();\n\n /**\n * removes all data associated with this store.\n * A typical subsequent call of {@link #load()} should return null, although this behavior\n * is not necessary.\n */\n public void clear();\n\n /**\n * @return returns true if the stored object is null, false otherwise\n */\n public boolean isStored();\n}", "protected DissertationStorage newDissertationStorage()\n\t{\n\t\treturn new DbCachedDissertationStorage(new DissertationStorageUser());\n\t}", "protected final Storage getStorage() {\n return Storages.getStorage(getCacheDirPath());\n }", "public Storage() {\n\t\tstorageReader = new StorageReader();\n\t\tstorageWriter = new StorageWriter();\n\t\tdirectoryManager = new DirectoryManager();\n\n\t\tFile loadedDirectory = storageReader.loadDirectoryConfigFile(FILENAME_DIRCONFIG);\n\t\tif (loadedDirectory != null) {\n\t\t\tif (directoryManager.createDirectory(loadedDirectory) == true) {\n\t\t\t\tdirectory = loadedDirectory;\n\t\t\t\tSystem.out.println(\"{Storage} Directory loaded | \" + directory.getAbsolutePath());\n\t\t\t} else { //loaded directory was invalid or could not be created\n\t\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t\t}\n\t\t} else { //directory config file was not found\n\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t}\n\t}", "public DataStorage getDataStorage();", "public static Storage createStorage(String domain) throws CMException {\n return new StorageImpl(CMFactory.getCommunicator(domain));\n }", "public Storage() {\n dataDirectory = System.getProperty(BASE_DIRECTORY) + FOLDER_NAME;\n filePath = dataDirectory + FILE_NAME;\n ui = new Ui();\n createFile();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the NIO buffer object in this J3DBuffer to the specified object.
public void setBuffer(Buffer buffer) { Type bType = Type.NULL; boolean direct = false; ByteOrder order = ByteOrder.BIG_ENDIAN; if (buffer == null) { bType = Type.NULL; } else if (buffer instanceof ByteBuffer) { bType = Type.BYTE; direct = ((ByteBuffer)buffer).isDirect(); order = ((ByteBuffer)buffer).order(); } else if (buffer instanceof CharBuffer) { bType = Type.CHAR; direct = ((CharBuffer)buffer).isDirect(); order = ((CharBuffer)buffer).order(); } else if (buffer instanceof ShortBuffer) { bType = Type.SHORT; direct = ((ShortBuffer)buffer).isDirect(); order = ((ShortBuffer)buffer).order(); } else if (buffer instanceof IntBuffer) { bType = Type.INT; direct = ((IntBuffer)buffer).isDirect(); order = ((IntBuffer)buffer).order(); } else if (buffer instanceof LongBuffer) { bType = Type.LONG; direct = ((LongBuffer)buffer).isDirect(); order = ((LongBuffer)buffer).order(); } else if (buffer instanceof FloatBuffer) { bType = Type.FLOAT; direct = ((FloatBuffer)buffer).isDirect(); order = ((FloatBuffer)buffer).order(); } else if (buffer instanceof DoubleBuffer) { bType = Type.DOUBLE; direct = ((DoubleBuffer)buffer).isDirect(); order = ((DoubleBuffer)buffer).order(); } else { bType = Type.UNKNOWN; } // Verify that the buffer is direct and has the correct byte order if (buffer != null) { if (!direct) { throw new IllegalArgumentException(J3dI18N.getString("J3DBuffer1")); } if (order != ByteOrder.nativeOrder()) { throw new IllegalArgumentException(J3dI18N.getString("J3DBuffer2")); } } bufferType = bType; originalBuffer = buffer; // Make a read-only view of the buffer if the type is one // of the internally supported types: byte, float, or double switch (bufferType) { case BYTE: ByteBuffer byteBuffer = ((ByteBuffer)buffer).asReadOnlyBuffer(); byteBuffer.rewind(); readonlyBuffer = byteBuffer; break; case FLOAT: FloatBuffer floatBuffer = ((FloatBuffer)buffer).asReadOnlyBuffer(); floatBuffer.rewind(); readonlyBuffer = floatBuffer; break; case DOUBLE: DoubleBuffer doubleBuffer = ((DoubleBuffer)buffer).asReadOnlyBuffer(); doubleBuffer.rewind(); readonlyBuffer = doubleBuffer; break; default: readonlyBuffer = null; } }
[ "public J3DBuffer(Buffer buffer) {\n\tsetBuffer(buffer);\n }", "public void setBuffer(ByteBuffer buf);", "public void setObject_to(CPointer<BlenderObject> object_to) throws IOException\n\t{\n\t\tlong __address = ((object_to == null) ? 0 : object_to.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 216, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 184, __address);\n\t\t}\n\t}", "public void setBuffer(final byte[] buffer) {\n this.buffer = buffer;\n }", "public CopyBuffer setBuffer(GeglBuffer value)\n {\n\t\n m_Buffer = value;\n setProperty(\"buffer\", value);\n return this;\n }", "public void set(int index, NioImageBuffer image) {\n\n \tthrow new UnsupportedOperationException();\n /*\n checkForLiveOrCompiled();\n // For NioImageBuffer the width and height checking is done in the retained.\n ((ImageComponent3DRetained)this.retained).set(index, image);\n */\n }", "public PlainNioObject(final SocketChannel channel, final JPPFBuffer buf) {\n this(channel, new MultipleBuffersLocation(buf));\n }", "public J3DBuffer() {\n\tthis(null);\n }", "public void setBuffer()\n {\n // todo: make this abstract\n throw new IllegalArgumentException(\"The ID3v24FrameBody.setBuffer() method should be abstract and never called directly.\");\n }", "public void setDataBuffer(byte[] buffer) {\r\n\t\tthis.mBuffer = buffer;\r\n\t}", "public static void setInBuffer(Vector3f vector, FloatBuffer buf, int index) {\r\n if (buf == null) {\r\n return;\r\n }\r\n if (vector == null) {\r\n buf.put(index * 3, 0);\r\n buf.put((index * 3) + 1, 0);\r\n buf.put((index * 3) + 2, 0);\r\n } else {\r\n buf.put(index * 3, vector.x);\r\n buf.put((index * 3) + 1, vector.y);\r\n buf.put((index * 3) + 2, vector.z);\r\n }\r\n }", "public abstract void setBufferMode(int mode);", "public void setObject (Object object)\n {\n _object = object;\n }", "synchronized void setBuffer(byte[] buffer)\n {\n this.buffer = buffer;\n notifyAll();\n }", "public void setMap_object(CPointer<BlenderObject> map_object) throws IOException\n\t{\n\t\tlong __address = ((map_object == null) ? 0 : map_object.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 128, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 104, __address);\n\t\t}\n\t}", "public void setByteBufferCache(IByteBufferCache bufCache)\n {\n if (this.bufCache != null && this.bufCache != bufCache) {\n LOG.error(\"Resetting EventFactory buffer cache from \" +\n this.bufCache + \" to \" + bufCache);\n }\n\n this.bufCache = bufCache;\n }", "private void serializeObject(final Object object, final StringBuffer buffer)\n {\n serializeObject(object, buffer, true);\n }", "void setObject(Object val);", "public abstract void setDataElements(int x, int y, Object obj, DataBuffer data);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para obtener el dia de fin
public String getDiaFin() { return diaFin; }
[ "Date getDateFin();", "public static int diasParaFecha(Date fechafin) {\n try {\n System.out.println(\"Fecha = \" + fechafin + \" / \");\n GregorianCalendar fin = new GregorianCalendar();\n fin.setTime(fechafin);\n System.out.println(\"fin=\" + CalendarToString(fin, \"dd/MM/yyyy\"));\n GregorianCalendar hoy = new GregorianCalendar();\n System.out.println(\"hoy=\" + CalendarToString(hoy, \"dd/MM/yyyy\"));\n\n if (fin.get(Calendar.YEAR) == hoy.get(Calendar.YEAR)) {\n System.out.println(\"Valor de Resta simple: \"\n + String.valueOf(fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR)));\n return fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR);\n } else {\n int diasAnyo = hoy.isLeapYear(hoy.get(Calendar.YEAR)) ? 366\n : 365;\n int rangoAnyos = fin.get(Calendar.YEAR)\n - hoy.get(Calendar.YEAR);\n int rango = (rangoAnyos * diasAnyo)\n + (fin.get(Calendar.DAY_OF_YEAR) - hoy\n .get(Calendar.DAY_OF_YEAR));\n System.out.println(\"dias restantes: \" + rango);\n return rango;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return 0;\n }", "public Date getDatanascita_intestatario();", "public abstract java.lang.String getFecha_inicio();", "XMLGregorianCalendar getDateFinEmploi();", "public Date getDateFin() {\r\n\t\treturn dateFin;\r\n\t}", "private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos et est OK.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Le compte est actif.\");\r\n\t\t}\r\n\t}", "public double viewDays() {\n\n TextView id = (TextView) findViewById(R.id.oo);\n String ID = id.getText().toString();\n\n Cursor res = InputDB.AllEnd(ID);\n if (res.getCount() == 0) {\n\n double days = 0;\n return days;\n }else{\n\n String today = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.getDefault()).format(new Date());\n String end = InputDB.End(ID);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.yyyy\");\n Date Today = null;\n Date End = null;\n try {\n Today = sdf.parse(today);\n End = sdf.parse(end);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return (double) (End.getTime() - Today.getTime()) / (24 * 60 * 60 * 1000) + 1;\n }\n }", "long getDate();", "XMLGregorianCalendar getDateFinTraitement();", "public void avanzarFecha()\n {\n day.incrementaValorAlmacenado();\n if(day.getValorAlmacenado() == 1){\n month.incrementaValorAlmacenado();\n if(month.getValorAlmacenado() == 1){\n year.incrementaValorAlmacenado();\n } \n }\n }", "public int getFechaInicio() {\n return fechaInicio;\n }", "public long getDateDebutChrono ()\n {\n return mDateDebutChrono ;\n }", "public static String DiaActual(){\n java.util.Date fecha = new Date();\n int dia = fecha.getDay();\n String myDia=null;\n switch (dia){\n case 1:\n myDia=\"LUNES\";\n break;\n case 2:\n myDia=\"MARTES\";\n break;\n case 3:\n myDia=\"MIERCOLES\";\n break;\n case 4:\n myDia=\"JUEVES\";\n break;\n case 5:\n myDia=\"VIERNES\";\n break;\n case 6:\n myDia=\"SABADO\";\n break;\n case 7:\n myDia=\"DOMINGO\";\n break; \n }\n return myDia;\n }", "public java.lang.Integer getDia_inicial();", "int getDongtaiTodayCnt();", "public String getDateFinStr() {\n\t\tif (dateFin != null)\n\t\t\treturn sdf.format(dateFin);\n\t\telse\n\t\t\treturn \"\";\n\t}", "public Date getDateFinContrat() {\r\n return dateFinContrat;\r\n }", "public int getFECHAFORMALIZ() {\n return fechaformaliz;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The greedy leaderDuck eat all the food
public void feedTheDucks(float foodLevel) { leaderDuck.foodLevel += foodLevel; // And doesn't give other ducks anything...! :"{ }
[ "private void eat()\n {\n if(player.getFood() > 0)\n {\n player.removeFood(1);\n player.addEnergy(100);\n System.out.println(\"You take some time to eat and rest\");\n System.out.println(\"You now have \" + (player.getEnergy()) + (\" energy and \") + (player.getFood()) + (\" food\"));\n }\n else\n {\n System.out.println(\"You dont have any food!\");\n }\n }", "public static void newFood() {\r\n start:\r\n while (true) {\r\n foodX = random.nextInt(width);\r\n foodY = random.nextInt(height);\r\n\r\n for (Corner c : snake) {\r\n if (c.x == foodX && c.y == foodY) {\r\n continue start;\r\n }\r\n }\r\n\r\n if (hardMode) {\r\n score++;\r\n speed++;\r\n } else {\r\n score++;\r\n }\r\n\r\n break;\r\n }\r\n }", "protected void pickupFood() {\r\n\t\tif(this.food > 0){\r\n\t\t\tthis.food--;\r\n\t\t}\r\n\t}", "@Override\n public void eatFood(String foodName) {\n String[] foodAvail = new String[4];\n Random random = new Random();\n foodAvail[0] = \"grain\";\n foodAvail[1] = \"meat\";\n foodAvail[2] = \"bugs\";\n foodAvail[3] = \"fish\";\n String foodPicked = \"grain\";\n while(foodPicked == \"grain\"){\n foodPicked = foodAvail[random.nextInt(3)];\n }\n //Eat food once not grain\n super.eatFood(foodPicked);\n }", "public void eat() {\n\t\tif (super.getHungerLevel() > 0 && super.getToiletDesire() < 90) {\n\t\t\tchooseMeal();\n\t\t\tsuper.eat();\n\t\t}else if (this.toiletDesire >= 90) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"\\nVotre tamagotchi a trop envie d'aller au toilet pour manger il risque de se faire dessus\\n\");\n\t\t} else {\n\t\t\tSystem.out.println(\"\\nVotre tamagotchi n'a pas faim vous ne pouvez pas le nourrir\\n\");\n\t\t}\n\t\t\n\t}", "public void foodPhase(){\n\t\tsupplies.eatFood(people.getLiving());\n\t\tsupplies.forage(people.getLiving());\n\t\tsupplies.getForaged();\n\t}", "public boolean eatIfPossible(IGame game) {\n IItem edible = game.getMap().find(game.getLocation(), getFoodPreference());\n if (edible != null) {\n int eaten = edible.handleDamage(game, this, 5);\n food += eaten;\n System.out.println(\"found \" + edible.getName() + \" !\" + \"\\n\"\n + \"ate \" + edible.getName() + \" worth \" + eaten + \"!\" + \"\\n\");\n game.displayMessage(\n getName() + \" eats \" + edible.getArticle() + \" \"\n + edible.getName());\n return true;\n }\n return false;\n }", "protected void findFood(){\n List<Plant> plants = getSimulator().getPlants();\n Iterator<Plant> it = plants.iterator();\n while(it.hasNext()) {\n Object plant = it.next();\n if(plant instanceof Grass){\n Plant p = (Plant) plant;\n if(p.isAlive()) { \n p.setDead();\n setFoodLevel(getFoodLevel() + p.getFoodValue());\n return;\n } \n } \n }\n return;\n }", "public void actGetFoodFromFridge() {\n\t\tArrayList<Integer> foodOptions = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < Food.getNumberOfFoods(); i++) {\n\t\t\tif (foodInventory[i] > 0) {\n\t\t\t\tfoodOptions.add(i);\n\t\t\t}\n\t\t}\n\t\tif (foodOptions.size() > 0) {\n\t\t\tstate = State.goingToGetFoodFromFridge;\n\t\t\tthis.actVisitLoc(locFridgeAccess, minutesToGetFoodFromFridge);\n\t\t\tint randomNumber = (int)Math.floor(Math.random()*foodOptions.size());\n\t\t\tindexFoodToCook = foodOptions.get(randomNumber);\n\t\t\tfoodInventory[indexFoodToCook]--;\n\t\t\tAlertLog.getInstance().logMessage(AlertTag.APT_RESIDENT, getAgentName(), \"Getting food \" + Food.getFood(indexFoodToCook) + \" from fridge\");\n\t\t}\n\t\telse {\n\t\t\t// We are not able to cook anything, so make sure that the Renter doesn't try again\n\t\t\tminutesToEat = 0;\n\t\t}\n\t}", "public void eat(Food food) {\n\t\tfood.getEaten();\n\t\tfoodLevel = food.getFoodValue();\n\t}", "public boolean eat(String food) {\n\t\tif (isHungry) {\n\t\t\tif (food.equals(\"Poop\")){\n\t\t\t\tSystem.out.println(\"FUCK YOU I AM NOT EATING SHIT\");\n\t\t\t\tmoral--;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (!food.equals(prevFood)) {\n\t\t\t\t\t// don't use food != prevFood which compares addresses\n\t\t\t\t\tSystem.out.println(\"Yummy!\");\n\t\t\t\t\tprevFood = food;\n\t\t\t\t\tisHungry = false;\n\t\t\t\t\tmoral++;\n\t\t\t\t\tcount = 0;\n\t\t\t\t\tplayCount = 0;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"FUCK YOU I am not eating the same thing again!\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Thank you. But I am not hungry.\");\n\t\t\treturn false;\n\t\t}\n\t}", "public void onDefeat(Player winner, Player loser) {}", "public void eat(Food food) {\n nutritionConsumed += food.getNutritionalValue();\n }", "public void addDefeat() {\r\n\t\tthis.matchesPlayed++;\r\n\t\tthis.matchesLost++;\r\n\t\tthis.points += sport.getPointsPerDefeat(); \r\n\t}", "public void eat()\r\n {\r\n Actor pizzatoeat = getOneObjectAtOffset(10, 10, Pizza.class);\r\n if(pizzatoeat != null) {\r\n getWorld().removeObject(pizzatoeat);\r\n setImage(eat_pizza);\r\n Greenfoot.delay(6);\r\n setImage(eat_pizza2);\r\n Greenfoot.delay(4);\r\n setImage(cat_sit);\r\n \r\n CatWorld world = (CatWorld)getWorld();\r\n world.getScore().addScore(10);\r\n }\r\n }", "public void eatAlive()\n\t{\n\t\tif ((veges.get(0).getDead() )|| (veges.get(1).getDead())) // If either vegetable is dead will no longer eat anything \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (veges.get(0).getCanibalPoints() > veges.get(1).getCanibalPoints())\n\t\t{\n\t\t\tveges.get(1).setEaten(true);\n\t\t\tveges.get(1).setDead(true);\n\t\t\t\n\t\t\tveges.get(0).setFoodLevel(100); // Once it eats a vegetable the canibal will get full water and food & continue to grow\n\t\t\tveges.get(0).setWaterLevel(100);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tveges.get(0).setEaten(true);\n\t\t\tveges.get(0).setDead(true);\n\t\t\t\n\t\t\tveges.get(1).setFoodLevel(100); // Once it eats a vegetable the canibal will get full water and food & continue to grow\n\t\t\tveges.get(1).setWaterLevel(100);\n\t\t}\n\t}", "static void flee()\n\t{\n\t\tint dmgRoll = rand.nextInt(3);\n\t\t\n\t\tSystem.out.println(\"\\n⨔╍╍╍╍╍💨 FLEE💨╍╍╍╍╍⨔\");\n\t\t\n\t\tif (dmgRoll == 0)\n\t\t{\n\t\t\tSystem.out.printf(\"As you turn to run, the %s hits you in the back.\\n\", name);\n\t\t\tSystem.out.printf(\"You take %d damage.\\n\", ead);\n\t\t\thp -= ead;\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"You make it out safely.\");\n\t\t}\n\t}", "public void feedAnimals(){\n\t\tfor(Animal animal : animals)\n\t\t\tif(availableFood >= Math.min(animal.getMealAmount(), (100-animal.getEnergy()))) \n\t\t\t// no penalty if student uses: if(availableFood >= animal.getMealAmount())\n\t\t\t\tavailableFood -= animal.eat();\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Not enough food for your animals! You need to collect more food items.\");\n\t}", "public void processFood(){\n\t\tif(ateFood()){\n\t\t\tsnake.addBlock();\n\t\t\tthis.food = new Food(getRandomPosition());\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset the explosions list, when the player has been destroyed or the level is over
public void resetExplosions(){ explosionList = new Vector<ExplosionData>(); }
[ "private void updateExplosions() {\r\n\t\tfor (int i = 0; i < explosions.size(); i++) {\r\n\t\t\tExplosion e = explosions.get(i);\r\n\t\t\tif (e.isVisible()) {\r\n\t\t\t\te.move();\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\texplosions.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void reset() {\n levelScoresPlayer1.clear();\n levelScoresPlayer2.clear();\n lives = 3;\n }", "public void dropExplosives() {\n // Updates the time elapsed for each of the explosives\n for (int i=0; i<this.explosives.size(); i++) {\n Explosive dormantExplosive = this.explosives.get(i);\n dormantExplosive.increaseTime();\n }\n // If the Airplane has reached the end, doesn't detect any enemies\n // Isn't deleted straight away as it needs to wait for explosives to detonate\n if (super.outOfBounds()) {return;}\n this.timeElapsedDrop += ShadowDefend.getTimescale()/FPS;\n //Adds a new explosive\n if (this.timeElapsedDrop >= this.dropTime) {\n this.timeElapsedDrop = 0;\n Explosive newExplosive = new Explosive(super.getCenter());\n // Centers the explosive at the airplane's current position\n newExplosive.centerRectAt(super.getCenter());\n this.explosives.add(newExplosive);\n // Generates a new drop time in range\n this.dropTime = generateDropTime();\n this.numDropped++;\n }\n\n }", "private void tickExplosions() {\n ArrayList<Explosion> remove = new ArrayList<>();\n\n for (Explosion e : this.explosions) {\n e.tick();\n if (e.getTimer() <= 0) {\n remove.add(e);\n }\n }\n\n removeExplosions(remove);\n }", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }", "public void resurrect() {\n\t\tresetHp();\n\t}", "public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}", "public void resetPlayers() {\n Player curPlayer;\n for(int i = 0; i < players.size(); i++){\n curPlayer = players.peek();\n curPlayer.resetRole();\n curPlayer.setLocation(board.getSet(\"trailer\"));\n curPlayer.setAreaData(curPlayer.getLocation().getArea());\n view.setDie(curPlayer);\n players.add(players.remove());\n }\n\n }", "public void decLives()\n\t{\n\t\tlives--;\n\t\tshipSpawned = false;\t\n\t\tif(lives <= 0)\n\t\t{\n\t\t\tSystem.out.println(\"Game over\");\n\t\t\tif(isSound() && !isPaused())\n\t\t\t\tdeath.play();\n\t\t\tsetGameOver(true);\n\t\t\tnotifyObservers();\n\t\t\treturn;\n\t\t}\n\t\tthis.addPlayerShip();\n\t}", "public void resetLives(){\n lives = 3;\n }", "public void Destroy () {\n //Remove stepListener and update variables\n getWorld().removeStepListener(this);\n enemyList[iPos][jPos] = null;\n p.setEnemiesList(enemyList);\n w.setEnemiesLeft(w.getEnemiesLeft() - 1);\n\n //BUG FIX: Last enemy before the boss\n if (w.getLevel() == 4 && w.getEnemiesLeft() == 0 && isShooting) bullet.Destruct();\n\n //Spawn portal if no enemies remain or boss on last level\n if (w.getEnemiesLeft() == 0) {\n if (w.getLevel() < 4) {\n w.setLevelCompleted(true);\n if (w.getLevel() < 3) w.setPortal(new Portal(getWorld(), w.getLevel()));\n else if (w.getLevel() == 3) w.setPortal(new Portal(getWorld(), w.getLevel()));\n } else if (w.getLevel() == 4) {\n p.setEnemyBoss(new EnemyBoss(getWorld(), p,32));\n LevelManager.getGame().getControlPanel().BossDisplay();\n }\n }\n\n //Destroy the body\n destroy();\n\n //Award score for defeating an enemy\n if (enemyType == 1.1f) Player.setScore(Player.getScore() + 100);\n else if (enemyType == 1.2f) Player.setScore(Player.getScore() + 200);\n else if (enemyType == 1.3f) Player.setScore(Player.getScore() + 300);\n else if (enemyType == 2.1f) Player.setScore(Player.getScore() + 200);\n else if (enemyType == 2.2f) Player.setScore(Player.getScore() + 300);\n else if (enemyType == 2.3f) Player.setScore(Player.getScore() + 400);\n else if (enemyType == 3.1f) Player.setScore(Player.getScore() + 300);\n else if (enemyType == 3.2f) Player.setScore(Player.getScore() + 400);\n else if (enemyType == 3.3f) Player.setScore(Player.getScore() + 500);\n\n //By chance drop a pickup\n int rand = (int)(Math.random() * 10) + 1;\n if (rand == 9) new UpScore(getWorld());\n else if (rand >= 3 && rand <= 8) new UpCoin(getWorld());\n\n //Play explosion animation\n new EnemyExplode(this, 2);\n\n //Debug outputs\n System.out.println(\"Enemy: (\"+iPos+\", \"+jPos+\") has been destroyed!\");\n System.out.println(\"There are \" + w.getEnemiesLeft()+\" enemies left\");\n System.out.println(\"Score: \" + Player.getScore());\n }", "public ArrayList<Explosion> getExplosions() {\n return this.explosions;\n }", "void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}", "public void resetDeaths()\n {\n \tstats.put(deathsKey, 0);\n }", "public void clearEnemyHills() {\n\t\tenemyHills.clear();\n\t}", "public void resetHealth(){\n curHp = healthPoint;\n }", "public void clearEnemies(){\n\t\tfor (int index = 0; index < object.size(); index++){\r\n\t\t\tGameObject tempObject = object.get(index); \r\n\t\t\tif (tempObject.getID() == ID.HUD){\r\n\t\t\t\tremoveObject(object.get(index));\r\n\t\t\t\tobject.clear();\r\n\t\t\t}\r\n\t\t\tif (tempObject.getID() == ID.Player){\r\n\t\t\t\tobject.clear();\r\n\t\t\t\tif(Game.gameState != Game.STATE.End){\r\n\t\t\t\t\taddObject(new Player((int)tempObject.getX(), (int)tempObject.getY(), ID.Player, this));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void playerLosesLife() {\n\t\tplayerStats.loseLife();\n\t\tif (playerStats.canContinue()) {\n\t\t\tinit.resetBoard();\n\t\t} else {\n\t\t\tinit.gameOver();\n\t\t}\n\t}", "public void changeLevel(List<Enemy> enemies, int levelCount){\n Image gameLevel;\n if(levelCount == 1) {\n gameLevel = new Image(Content.loadImage(\"Background/level-1.png\"));\n imageView.setImage(gameLevel);\n }else if(levelCount == 2){\n gameLevel = new Image(Content.loadImage(\"Background/level-2.png\"));\n for(Enemy enemy: enemies){\n Explosion explosion = new Explosion(Main.getGame().getExplosionView(), new Vector2D(enemy.getPosition().getX(), enemy.getPosition().getY()), new Rectangle(0,0));\n Main.getGame().getExplosions().add(explosion);\n enemy.setAlive(false);\n }\n imageView.setImage(gameLevel);\n Main.getGame().getSoundManager().playSound(\"next-level.wav\");\n }else if(levelCount == 3){\n gameLevel = new Image(Content.loadImage(\"Background/level-3.png\"));\n for(Enemy enemy: enemies){\n Explosion explosion = new Explosion(Main.getGame().getExplosionView(), new Vector2D(enemy.getPosition().getX(), enemy.getPosition().getY()), new Rectangle(0,0));\n Main.getGame().getExplosions().add(explosion);\n enemy.setAlive(false);\n }\n imageView.setImage(gameLevel);\n Main.getGame().getSoundManager().playSound(\"next-level.wav\");\n }else if(levelCount == 4){\n gameLevel = new Image(Content.loadImage(\"Background/level-4.png\"));\n for(Enemy enemy: enemies){\n Explosion explosion = new Explosion(Main.getGame().getExplosionView(), new Vector2D(enemy.getPosition().getX(), enemy.getPosition().getY()), new Rectangle(0,0));\n Main.getGame().getExplosions().add(explosion);\n enemy.setAlive(false);\n }\n imageView.setImage(gameLevel);\n Main.getGame().getSoundManager().playSound(\"next-level.wav\");\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This strips _design from the document id
public String getViewDocumentId() { String id = getId(); int pos = id.lastIndexOf("/"); if (pos == -1) { return id; } else { return id.substring(pos+1); } }
[ "java.lang.String getDocumentId();", "public String documentIdentifier();", "public String getDocId(){\n\t\treturn this.id;\n\t}", "static String composeDocumentId(String groupUuid) {\n\t\tObjects.requireNonNull(groupUuid, \"A groupUuid must be provided.\");\n\t\treturn groupUuid;\n\t}", "public void setIdDocument(String idDocument) {\n this.idDocument = UUID.fromString(idDocument);\n }", "public String getDocId() {\n return docId;\n }", "public String getDocumentId() {\n \t\treturn documentId;\n \t}", "public DocumentSchema.Builder clearDocID() {\n fieldSetFlags()[0] = false;\n return this;\n }", "public java.lang.String getDocId() {\n return docId;\n }", "private void parseDocumentID(){\n NodeList presentationDocumentList = xmlDocument.getElementsByTagName(\"document\");\n\n if ( presentationDocumentList.getLength() != 0) {\n //There is only one (root) element \"document\", hence choose the first indexed node.\n Node presentationDocumentNode = presentationDocumentList.item(0);\n\n //Save the attribute of the document node\n String attrubuteDocumentIdValue = presentationDocumentNode.getAttributes().item(0).getNodeValue();\n if(attrubuteDocumentIdValue != null) {\n myPresentation.setDocumentID(attrubuteDocumentIdValue);\n }\n } else {\n logger.warn(\"No document tag found\");\n faultsDetected.add(\"No document tag found\");\n }\n }", "public long getDesignId() {\n return designId;\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public void setDesignId(long value) {\n this.designId = value;\n }", "public static String fmtSqlIdentifier(String toClean) {\n\t\tString regex = \"[^0-9a-zA-Z_]+\";\n\t\tString ret = toClean.replaceAll(regex, \"_\");\n\t\tif(ret.length() > 50)\n\t\t\tret = ret.substring(0, 50);\n\t\treturn ret;\n\t}", "public String getDesignSingleId() {\n return designSingleId;\n }", "public String getDocumentNo();", "private int generateDocID() {\n\t\treturn lastDocID++;\n\t}", "public long getDocId() {\n return docId;\n }", "String getATDocCodeID();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mark this Offset as using the ULEB128 encoding.
public void setUsesUleb128() { if (useUleb128) { throw new Error("Offset is already marked as using ULEB128!"); } useUleb128 = true; }
[ "public void setField128(java.lang.CharSequence value) {\n this.field128 = value;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField128(java.lang.CharSequence value) {\n validate(fields()[128], value);\n this.field128 = value;\n fieldSetFlags()[128] = true;\n return this; \n }", "public void setEncodingAlpha(boolean encodeAlpha);", "public abstract void setEncodedBy(TagContent encoder)\r\n\t\t\tthrows TagFormatException;", "public com.dj.model.avro.LargeObjectAvro.Builder setVar128(java.lang.Boolean value) {\n validate(fields()[129], value);\n this.var128 = value;\n fieldSetFlags()[129] = true;\n return this;\n }", "public Builder setAes128(\n com.google.cloud.video.livestream.v1.Encryption.Aes128Encryption value) {\n if (aes128Builder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n encryptionMode_ = value;\n onChanged();\n } else {\n aes128Builder_.setMessage(value);\n }\n encryptionModeCase_ = 4;\n return this;\n }", "public Builder setAes128(\n com.google.cloud.video.livestream.v1.Encryption.Aes128Encryption.Builder builderForValue) {\n if (aes128Builder_ == null) {\n encryptionMode_ = builderForValue.build();\n onChanged();\n } else {\n aes128Builder_.setMessage(builderForValue.build());\n }\n encryptionModeCase_ = 4;\n return this;\n }", "public void setVar128(java.lang.Boolean value) {\n this.var128 = value;\n }", "void writeDecimal128(String name, Decimal128 value);", "public void setEncodedBy( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), ENCODEDBY, value);\r\n\t}", "public Builder setOneof1281(int value) {\n hugeOneofCase_ = 1281;\n hugeOneof_ = value;\n onChanged();\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField128() {\n field128 = null;\n fieldSetFlags()[128] = false;\n return this;\n }", "void writeDecimal128(Decimal128 value);", "private Aes128Encryption(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protected void encodeBufferPrefix(OutputStream a) throws IOException {\n sequence = 0;\n super.encodeBufferPrefix(a);\n }", "private void setEncodingEnabled(boolean enabled) {\n stopSaving();\n\n if (mEncode != null) {\n mEncode.clearBuffer();\n }\n\n if (mEncodeTarget != null) {\n mEncodeTarget.setEnabled(enabled);\n }\n }", "public Add128(){\n key = new byte[128];\n Random rand = new Random();\n rand.nextBytes(key);\n }", "public BlobName setEncoded(Boolean encoded) {\n this.encoded = encoded;\n return this;\n }", "public java.lang.CharSequence getField128() {\n return field128;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Number of assets that failed the check
public void setFailedAssetCount(Long FailedAssetCount) { this.FailedAssetCount = FailedAssetCount; }
[ "public void setNumberOfFailedFiles(int value) {\n this.numberOfFailedFiles = value;\n }", "public void setFailedCount(int failedCount)\n {\n this.failedCount = failedCount;\n }", "public void setErrorcount(int value) {\n this.errorcount = value;\n }", "public void resetFailedCount() {\n this.failedCount = 0;\n }", "public void incrementFailedCount() {\n ++failedCount;\n }", "public void setErrorNumber(int i);", "void setNumberOfCavalry(int cavalery);", "public void setFailedCount(Integer failedCount) {\n this.failedCount = failedCount;\n }", "public void setScanFailedAssetCount(Long ScanFailedAssetCount) {\n this.ScanFailedAssetCount = ScanFailedAssetCount;\n }", "public Long getFailedAssetCount() {\n return this.FailedAssetCount;\n }", "public void setFailedCount(Integer failedCount) {\n\t\tthis.failedCount = failedCount;\n\t}", "private void setNumTests() {\r\n\t\tdo {\r\n\t\t\tCities.print(false, \"Number of tests\");\r\n\t\t\tsetNumTests(Integer.valueOf(scn.next()));\r\n\t\t} while (isOutLimit(getNumTests(), 10));\r\n\t}", "public static void resetErrorCount() {\n errorCount = 0;\n }", "public void setErrorCount(Integer errorCount) {\n this.errorCount = errorCount;\n }", "public void incrementErrorCount() {\n\t\terrorCount++;\n\t}", "public void setErrorCnt(Integer errorCnt) {\r\n this.errorCnt = errorCnt;\r\n }", "public void setNumTests(int i){\n if (i <= 0){\n throw new ArithmeticException(\"Number of random GAM tests must be at least 1.\");\n }\n\n numTests = i;\n }", "private void setTotalCarsMissed() {\n \ttotalCarsMissed = totalRegularMissed + totalReservationMissed;\n }", "public void setRepairAttemptCount(int value) {\n this.repairAttemptCount = value;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Customers that cannot rent
public int CustomerRentFalse() { int cannotRent = 0; for (int i = 0; i < customerArray.size(); i++) { customerArray.get(i); if (customerArray.get(i).getCanRent() == false) { cannotRent++; } } return cannotRent; }
[ "private boolean checkCustomerRents(String cust_id) {\n\t\t\n\t\tboolean limitRent = true;\n\t\t\n\t\ttry {\n\t\t\tString check_limit = \"SELECT cust_rents FROM customers WHERE cust_id = '\"+ cust_id +\"'\";\n\t\t\tResultSet rs_limit = stmt.executeQuery(check_limit);\n\t\t\tArrayList<String> result_limit = new ArrayList<>();\n\t\t\twhile(rs_limit.next()) {\n\t\t\t\tresult_limit.add(rs_limit.getString(\"cust_rents\"));\n\t\t\t}\n\t\t\t\n\t\t\tif(result_limit.get(0).equals(\"0\") || result_limit.get(0).equals(\"1\") || result_limit.get(0).equals(\"2\") || result_limit.get(0).equals(\"3\")) {\n\t\t\t\tint rent = Integer.parseInt(result_limit.get(0)) + 1;\n\t\t\t\tString set_rent = \"UPDATE customers SET cust_rents = '\"+ rent +\"' WHERE cust_id = '\"+ cust_id +\"'\";\n\t\t\t\tstmt.execute(set_rent);\n\t\t\t\tlimitRent = true;\n\t\t\t}else {\n\t\t\t\tlimitRent = false;\n\t\t\t}\n\t\t\t\n\t\t}catch( SQLException se) {\n\t\t\tSystem.out.println(\"SQL Exception:\");\n\t\t\t\n\t\t\t// Loop through the SQL Exceptions\n while( se != null ){\n System.out.println( \"State : \" + se.getSQLState() ) ;\n System.out.println( \"Message: \" + se.getMessage() ) ;\n System.out.println( \"Error : \" + se.getErrorCode() ) ;\n\n se = se.getNextException() ;\n }\n\t\t}catch( Exception e ){\n System.out.println( e ) ;\n\t\t}\n\t\t\n\t\tif(limitRent) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public int CustomerRentTrue() {\n int canRent = 0;\n\n for (int i = 0; i < customerArray.size(); i++) {\n customerArray.get(i);\n\n if (customerArray.get(i).getCanRent() == true) {\n canRent++;\n }\n }\n return canRent;\n }", "public void removeBrokeCustomers() {\n\n\t\tIterator cIterator = customers.iterator();\n\n\t\twhile(cIterator.hasNext())\n\t\t\t{\n\n\t\t\t\tCustomer c= (Customer)cIterator.next();\n\t\t\t\tif(c.getMoney()<10)\n\n\t\t\t\t\t//customers.remove(c);\n\t\t\t\t\tcIterator.remove();\n\t\t\t}\n\n\t}", "public PreferredCustomer() \n\t{\n\t\tsuper();\n\t\tcustomerPurchase = 0; \n\t}", "@Override\n\tpublic void notifyCustomer() {\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"Customer Credit has been Charged more than $400\", \"Warning\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t}", "private void customerIsLeavingWithoutEating(MyCustomer mc) {\n\t\thost.customerIsLeavingWithoutEating(mc.c, mc.table);\n\t\tcustomers.remove(mc);\n\t}", "@Test\n public void testInvalidCustomer(){\n when(customers.size()).thenReturn(4);\n when(cats.size()).thenReturn(4);\n when(cats.get(anyInt())).thenReturn(testCat);\n when(testCat.isAvailable()).thenReturn(false);\n when(customers.get(anyInt())).thenReturn(testCustomer);\n // Tests renting to customer 5 (dne)\n when(ioc.getInt()).thenReturn(5);\n rac.rent();\n // Verifies that the system never even inquires about any cats\n verify(cats, never()).get(anyInt());\n }", "public void customerLeaves(Customer cust);", "private void customerIsLeaving(MyCustomer mc) {\n\t\tprint(\"Customer \" + mc.c + \" has left.\");\n\t\tmc.s = CustomerState.Left;\n\t\thost.tableIsFree(mc.table);\n\t}", "Boolean getRequireNonResident();", "boolean isNilCustomer();", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "RegCustomer() {\r\n\t\tsuper();\r\n\t\tiCC = new DiscountType1(); \r\n\t\t\r\n\t}", "public List<Booking> pastTrips(Customer customer);", "public void blacklistCustomer(Customer c, ParkingLot p)\r\n {\r\n c.addBlackListLot(p);\r\n }", "public void confirmAddCustomer() {\n\t\tcustomerListViewPanel.setEnabled(true);\n\t\tCustomerViewModel vm = customerFormFrame.getCustomer();\n\t\tif (vm == null) {\n\t\t\treturn;\n\t\t}\n\t\tString type = \"\";\n\t\ttry {\n\t\t\tif (vm.customerId == -1) {\n\t\t\t\ttype = \"Add\";\n\t\t\t\tdb.insertCustomer(vm);\n\t\t\t} else {\n\t\t\t\ttype = \"Update\";\n\t\t\t\tdb.updateCustomer(vm);\n\t\t\t}\n\t\t\tJOptionPane.showMessageDialog(customerFormFrame, type + \" customer succeeded!\");\n\t\t\tcustomerFormFrame.setVisible(false);\n\t\t\tmodel.setData(getCustomersFromDB());\n\t\t} catch (SQLException e) {\n\t\t\tJOptionPane.showMessageDialog(customerFormFrame, \"Error: \" + e.getMessage(), type + \" failed!\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "@Test\n\tvoid cannotPurchase() {\n\t\ttestCrew.setMoney(0);\n\t\titemList.get(0).purchase(testCrew);\n\t\tassertEquals(testCrew.getMoney(), 0);\n\t\tassertTrue(testCrew.getMedicalItems().isEmpty());\n\t}", "private void goRentConfirmation(Rent[] rent) {\n if (checkPromoCode() && newUser) {\n rentCharge = 0;\n } else {\n switch (numberOfMovies) {\n case 1:\n rentCharge = (float) 2.99;\n break;\n case 2:\n rentCharge = (float) 5.98;\n break;\n case 3:\n rentCharge = (float) 8.97;\n break;\n case 4:\n rentCharge = (float) 11.96;\n break;\n }\n }\n RentConfirmation rentConfirmation;\n rentConfirmation = new RentConfirmation(rent[0], rentCharge);\n this.view.dispose();\n rentConfirmation.setVisible(true);\n }", "public static boolean tryCatRental() {\n\n\t\t// find the user inputted customer id\n\t\tint id = getCustomerId();\n\t\tif(id == -1) { // escape phrase was entered\n\t\t\treturn false;\n\t\t}\n\t\tif(id == 0) { // bad input\n\t\t\twhile(id == 0) { // loop until quit or valid customer id is entered\n\t\t\t\tid = getCustomerId();\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t* find the user inputted cat to rent (if available)\n\t\t* uses the customer id to find their name \n\t\t*/\n\t\tint catId = getCatRental(customers.get(id).getName());\n\t\tif(catId == -1) { // escape phrase was entered\n\t\t\treturn false;\n\t\t}\n\t\tif(catId == 0) { // invalid cat id or cat is already rented\n\t\t\twhile(catId == 0) { // loop until quit or successful cat rental\n\t\t\t\tcatId = getCatRental(customers.get(id).getName());\n\t\t\t}\n\t\t}\n\n\t\treturn false; // cat rental is succesful, so return to break input loop\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getName method, of class BankAccount.
@Test public void testGetName() { System.out.println("getName"); BankAccount instance = new BankAccount("Kelly", 99.99); String expResult = "Kelly"; String result = instance.getName(); assertEquals(expResult, result); }
[ "java.lang.String getBankName();", "@Test\r\n public void getNameTest()\r\n {\r\n Assert.assertEquals(stub.getName(), NAME);\r\n }", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Bank instance = null;\n String expResult = \"\";\n String result = instance.getName();\n assertEquals(result, expResult);\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\tpublic void getNamePickUpCustomerTest() {\n\t\tString actual = \"Oroku Saki\";\n\t\tassertEquals(actual, pickUpCustomer.getName());\n\t}", "@Test\r\n\tpublic void getName() {\r\n\t\tassertEquals(\"Name was intialized as 'test'\", \"test\", testObj.getName());\r\n\t}", "@Test\n\tpublic void testPetWhenGetNameNala() {\n\t\tPet pet = new Pet(\"Nala\", \"roar\");\t\t\n\t\tString expect = \"Nala\";\n\t\tString result = pet.getPetName();\t\t\n\t\tassertEquals(expect, result);\t\t\n\t}", "@Test\n public void testGetName() {\n System.out.println(\"getName\");\n String result = instance.getName();\n assertEquals(\"name1.bib\", result);\n }", "@Test\r\n public void testGetName() {\r\n System.out.println(\"getName\");\r\n OBJSalesInvoiceQO instance = null;\r\n String expResult = \"\";\r\n String result = instance.getName();\r\n assertEquals(result, expResult);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void testGetName() {\n assertEquals(\"Failed to get the name correctly.\", \"name\", objectNode.getName());\n }", "public void testGetNameAccuracy() {\n assertEquals(\"getName method is wrong.\", \"scorecard\", scorecard.getName());\n }", "public void testGetName() {\n System.out.println(\"getName\");\n Student instance = null;\n String expResult = \"\";\n String result = instance.getName();\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 getName() {\n Assert.assertEquals(whitebear.getName(), \"whitebear\");\n }", "@Test\n\tpublic void testPetWhenGetNameBolt() {\n\t\tPet pet = new Pet(\"Bolt\", \"owloo\");\t\t\n\t\tString expect = \"Bolt\";\n\t\tString result = pet.getPetName();\t\t\n\t\tassertEquals(expect, result);\t\n\t}", "@Test\n void CreditCardContainsOwnerName() {\n assertEquals (this.testCustomer.getName(), this.testCard.getOwnerName() );\n }", "@Test\n public void accountNameTest() {\n // TODO: test accountName\n }", "@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"Yina\";\n Account instance = new Account(\"Piper\", 10.0);\n instance.setName(name);\n String expResult = \"Yina\";\n String result = instance.getName();\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 }", "public void testGetName ()\n\t{\n\t\tassertEquals(logInfo.getName(), \"logInfo_Name\");\n\t}", "@Override\n\tpublic java.lang.String getBank_name() {\n\t\treturn _ext_information.getBank_name();\n\t}", "public void testGetName() {\n System.out.println(\"getName\");\n Module instance = new Module(\"testModule\", 1001);\n String expResult = \"testModule\";\n String result = instance.getName();\n assertEquals(expResult, result);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the enhancedData value for this DoExpressCheckoutPaymentRequestDetailsType.
public eBLBaseComponents.apis.ebay.EnhancedDataType getEnhancedData() { return enhancedData; }
[ "public ExtendedData getExtendedData() {\n\t\treturn extendedData;\n\t}", "public eBLBaseComponents.apis.ebay.PaymentDetailsType[] getPaymentDetails() {\r\n return paymentDetails;\r\n }", "public java.lang.String getEnhancedDataEnabled() {\r\n return enhancedDataEnabled;\r\n }", "public com.ipcommerce.schemas.CWS.v2_0.Transactions.PersonalInfo getAdditionalBillingData() {\n return additionalBillingData;\n }", "public ae.etisalat.www.Middleware.INCommunicationManagement.GetRechargeDetailsRequest_xsd.GetRechargeDetailsRequestDataHeaderAddtionalInfo[] getAddtionalInfo() {\n return addtionalInfo;\n }", "public String getPaymentData() {\n return paymentData;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return serializedPaymentDetails_;\n }", "public java.lang.String getExtendedPaymentCode() {\r\n return extendedPaymentCode;\r\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSerializedPaymentDetails() {\n return instance.getSerializedPaymentDetails();\n }", "public byte[] getDEAL_TRANS_DETAILS()\r\n {\r\n\treturn DEAL_TRANS_DETAILS;\r\n }", "public com.ccic.gwservice.car.fgcpiprecisequote.ExtendInfoDTO[] getExtendInfo() {\r\n return extendInfo;\r\n }", "public java.lang.Object getBillToAdditionalAddressInformation() {\n return billToAdditionalAddressInformation;\n }", "public void setEnhancedData(eBLBaseComponents.apis.ebay.EnhancedDataType enhancedData) {\r\n this.enhancedData = enhancedData;\r\n }", "public com.fedex.ws.packagemovementinformationservice.v5.PostalCodeServiceAreaDescription getExpressDescription() {\n return expressDescription;\n }", "public java.lang.Object getAdditionalAddressInformation() {\n return additionalAddressInformation;\n }", "com.google.protobuf.ByteString getSerializedPaymentDetails();", "@java.lang.Override\n public com.google.protobuf.ByteString getMerchantData() {\n return instance.getMerchantData();\n }", "public com.ctrip.flight.intl.agg.flighttypes.v3.KeyValuePairType getExtraMarketingInfo(int index) {\n return extraMarketingInfo_.get(index);\n }", "public SellingManagerProductDetailsType getReturnedSellingManagerProductDetails()\n {\n return this.returnedSellingManagerProductDetails;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read the status of the signing basket Returns the status of a signing basket object.
@GET @Path("/v1/signing-baskets/{basketId}/status") @Produces({ "application/json", "application/problem+json" }) @Operation(summary = "Read the status of the signing basket") @Tags(value = { @Tag(name = "Signing Baskets (SBS)"), @Tag(name = "Common Services"), }) @APIResponses(value = { @APIResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SigningBasketStatusResponse200.class))), @APIResponse(responseCode = "400", description = "Bad Request", content = @Content(schema = @Schema(implementation = Error400NGSBS.class))), @APIResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(implementation = Error401NGSBS.class))), @APIResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(implementation = Error403NGSBS.class))), @APIResponse(responseCode = "404", description = "Not found", content = @Content(schema = @Schema(implementation = Error404NGSBS.class))), @APIResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(schema = @Schema(implementation = Error405NGSBS.class))), @APIResponse(responseCode = "406", description = "Not Acceptable"), @APIResponse(responseCode = "408", description = "Request Timeout"), @APIResponse(responseCode = "409", description = "Conflict", content = @Content(schema = @Schema(implementation = Error409NGSBS.class))), @APIResponse(responseCode = "415", description = "Unsupported Media Type"), @APIResponse(responseCode = "429", description = "Too Many Requests"), @APIResponse(responseCode = "500", description = "Internal Server Error"), @APIResponse(responseCode = "503", description = "Service Unavailable") }) public SigningBasketStatusResponse200 getSigningBasketStatus(@PathParam("basketId") String basketId, @HeaderParam("X-Request-ID") UUID xRequestID, @HeaderParam("Digest") String digest, @HeaderParam("Signature") String signature, @HeaderParam("TPP-Signature-Certificate") byte[] tpPSignatureCertificate, @HeaderParam("PSU-ID") String PSU_ID, @HeaderParam("PSU-ID-Type") String psUIDType, @HeaderParam("PSU-Corporate-ID") String psUCorporateID, @HeaderParam("PSU-Corporate-ID-Type") String psUCorporateIDType, @HeaderParam("PSU-IP-Address") String psUIPAddress, @HeaderParam("PSU-IP-Port") String psUIPPort, @HeaderParam("PSU-Accept") String psUAccept, @HeaderParam("PSU-Accept-Charset") String psUAcceptCharset, @HeaderParam("PSU-Accept-Encoding") String psUAcceptEncoding, @HeaderParam("PSU-Accept-Language") String psUAcceptLanguage, @HeaderParam("PSU-User-Agent") String psUUserAgent, @HeaderParam("PSU-Http-Method") String psUHttpMethod, @HeaderParam("PSU-Device-ID") UUID psUDeviceID, @HeaderParam("PSU-Geo-Location") String psUGeoLocation);
[ "public Byte getSaleStatus() {\n\t\treturn saleStatus;\n\t}", "@Override\n\tpublic long getStatus() {\n\t\treturn _buySellProducts.getStatus();\n\t}", "public java.lang.Object getStatus() {\n return status;\n }", "@Override\n public com.gensym.util.Symbol getItemStatus() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.ITEM_STATUS_);\n return (com.gensym.util.Symbol)retnValue;\n }", "String getTransactionStatus();", "java.lang.String getBagstatus();", "public java.lang.String getStatus_tosell() {\n return status_tosell;\n }", "public TransactionStatus getStatus() {\n return status;\n }", "public Integer getUserpayStatus() {\n return userpayStatus;\n }", "public java.lang.String getStatus_tobuy() {\n return status_tobuy;\n }", "public MarketStatus getStatus(){\n return status;\n }", "public BatchStatus getBatchStatus();", "public Integer getSaleStatus() {\n return saleStatus;\n }", "public Byte getAuditStatus() {\n return auditStatus;\n }", "public Integer getBookStatus() {\n return bookStatus;\n }", "public String getSALES_STATUS()\r\n {\r\n\treturn SALES_STATUS;\r\n }", "public Basket getBasket() {\n\t\treturn theBasket;\n\t}", "@Override\n\tpublic java.lang.String getStatus() {\n\t\treturn _bookOrder.getStatus();\n\t}", "public String getREVERSAL_STATUS()\r\n {\r\n\treturn REVERSAL_STATUS;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleXIfExpression" $ANTLR start "ruleXIfExpression" ../com.euclideanspace.pbase/srcgen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3903:1: ruleXIfExpression returns [EObject current=null] : ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) ;
public final EObject ruleXIfExpression() throws RecognitionException { EObject current = null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_4=null; Token otherlv_6=null; EObject lv_if_3_0 = null; EObject lv_then_5_0 = null; EObject lv_else_7_0 = null; enterRule(); HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_SL_COMMENT", "RULE_WS"); try { // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3907:28: ( ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3908:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) { // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3908:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3908:2: () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? { // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3908:2: () // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3909:5: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getXIfExpressionAccess().getXIfExpressionAction_0(), current); } } otherlv_1=(Token)match(input,71,FOLLOW_71_in_ruleXIfExpression8774); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_1, grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); } otherlv_2=(Token)match(input,30,FOLLOW_30_in_ruleXIfExpression8786); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_2, grammarAccess.getXIfExpressionAccess().getLeftParenthesisKeyword_2()); } // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3922:1: ( (lv_if_3_0= ruleXExpression ) ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3923:1: (lv_if_3_0= ruleXExpression ) { // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3923:1: (lv_if_3_0= ruleXExpression ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3924:3: lv_if_3_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_0()); } pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression8807); lv_if_3_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXIfExpressionRule()); } set( current, "if", lv_if_3_0, "XExpression"); afterParserOrEnumRuleCall(); } } } otherlv_4=(Token)match(input,31,FOLLOW_31_in_ruleXIfExpression8819); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_4, grammarAccess.getXIfExpressionAccess().getRightParenthesisKeyword_4()); } // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3944:1: ( (lv_then_5_0= ruleXExpression ) ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3945:1: (lv_then_5_0= ruleXExpression ) { // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3945:1: (lv_then_5_0= ruleXExpression ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3946:3: lv_then_5_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXIfExpressionAccess().getThenXExpressionParserRuleCall_5_0()); } pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression8840); lv_then_5_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXIfExpressionRule()); } set( current, "then", lv_then_5_0, "XExpression"); afterParserOrEnumRuleCall(); } } } // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3962:2: ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? int alt81=2; int LA81_0 = input.LA(1); if ( (LA81_0==72) ) { int LA81_1 = input.LA(2); if ( (synpred27_InternalTutorial()) ) { alt81=1; } } switch (alt81) { case 1 : // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3962:3: ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) { // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3962:3: ( ( 'else' )=>otherlv_6= 'else' ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3962:4: ( 'else' )=>otherlv_6= 'else' { otherlv_6=(Token)match(input,72,FOLLOW_72_in_ruleXIfExpression8861); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_6, grammarAccess.getXIfExpressionAccess().getElseKeyword_6_0()); } } // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3967:2: ( (lv_else_7_0= ruleXExpression ) ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3968:1: (lv_else_7_0= ruleXExpression ) { // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3968:1: (lv_else_7_0= ruleXExpression ) // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3969:3: lv_else_7_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXIfExpressionAccess().getElseXExpressionParserRuleCall_6_1_0()); } pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression8883); lv_else_7_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXIfExpressionRule()); } set( current, "else", lv_else_7_0, "XExpression"); afterParserOrEnumRuleCall(); } } } } break; } } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { myHiddenTokenState.restore(); } return current; }
[ "public final EObject ruleXIfExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token otherlv_2=null;\n Token otherlv_4=null;\n Token otherlv_6=null;\n EObject lv_if_3_0 = null;\n\n EObject lv_then_5_0 = null;\n\n EObject lv_else_7_0 = null;\n\n\n enterRule(); \n \n try {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2741:28: ( ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2742:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2742:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2742:2: () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2742:2: ()\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2743:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getXIfExpressionAccess().getXIfExpressionAction_0(),\n current);\n \n }\n\n }\n\n otherlv_1=(Token)match(input,58,FOLLOW_58_in_ruleXIfExpression6843); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getXIfExpressionAccess().getIfKeyword_1());\n \n }\n otherlv_2=(Token)match(input,50,FOLLOW_50_in_ruleXIfExpression6855); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getXIfExpressionAccess().getLeftParenthesisKeyword_2());\n \n }\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2756:1: ( (lv_if_3_0= ruleXExpression ) )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2757:1: (lv_if_3_0= ruleXExpression )\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2757:1: (lv_if_3_0= ruleXExpression )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2758:3: lv_if_3_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_0()); \n \t \n }\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression6876);\n lv_if_3_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"if\",\n \t\tlv_if_3_0, \n \t\t\"XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,51,FOLLOW_51_in_ruleXIfExpression6888); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_4, grammarAccess.getXIfExpressionAccess().getRightParenthesisKeyword_4());\n \n }\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2778:1: ( (lv_then_5_0= ruleXExpression ) )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2779:1: (lv_then_5_0= ruleXExpression )\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2779:1: (lv_then_5_0= ruleXExpression )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2780:3: lv_then_5_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getThenXExpressionParserRuleCall_5_0()); \n \t \n }\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression6909);\n lv_then_5_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"then\",\n \t\tlv_then_5_0, \n \t\t\"XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2796:2: ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\n int alt49=2;\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==59) ) {\n int LA49_1 = input.LA(2);\n\n if ( (synpred25_InternalScripting()) ) {\n alt49=1;\n }\n }\n switch (alt49) {\n case 1 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2796:3: ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) )\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2796:3: ( ( 'else' )=>otherlv_6= 'else' )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2796:4: ( 'else' )=>otherlv_6= 'else'\n {\n otherlv_6=(Token)match(input,59,FOLLOW_59_in_ruleXIfExpression6930); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getXIfExpressionAccess().getElseKeyword_6_0());\n \n }\n\n }\n\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2801:2: ( (lv_else_7_0= ruleXExpression ) )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2802:1: (lv_else_7_0= ruleXExpression )\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2802:1: (lv_else_7_0= ruleXExpression )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2803:3: lv_else_7_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getElseXExpressionParserRuleCall_6_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression6952);\n lv_else_7_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"else\",\n \t\tlv_else_7_0, \n \t\t\"XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject ruleXIfExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token otherlv_2=null;\n Token otherlv_4=null;\n Token otherlv_6=null;\n EObject lv_if_3_0 = null;\n\n EObject lv_then_5_0 = null;\n\n EObject lv_else_7_0 = null;\n\n\n enterRule(); \n \n try {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4447:28: ( ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4448:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4448:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4448:2: () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4448:2: ()\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4449:2: \n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getXIfExpressionAccess().getXIfExpressionAction_0(),\n current);\n \n }\n\n }\n\n otherlv_1=(Token)match(input,25,FOLLOW_25_in_ruleXIfExpression10102); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getXIfExpressionAccess().getIfKeyword_1());\n \n }\n otherlv_2=(Token)match(input,27,FOLLOW_27_in_ruleXIfExpression10114); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getXIfExpressionAccess().getLeftParenthesisKeyword_2());\n \n }\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4465:1: ( (lv_if_3_0= ruleXExpression ) )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4466:1: (lv_if_3_0= ruleXExpression )\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4466:1: (lv_if_3_0= ruleXExpression )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4467:3: lv_if_3_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_0()); \n \t \n }\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression10135);\n lv_if_3_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"if\",\n \t\tlv_if_3_0, \n \t\t\"XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,28,FOLLOW_28_in_ruleXIfExpression10147); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_4, grammarAccess.getXIfExpressionAccess().getRightParenthesisKeyword_4());\n \n }\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4487:1: ( (lv_then_5_0= ruleXExpression ) )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4488:1: (lv_then_5_0= ruleXExpression )\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4488:1: (lv_then_5_0= ruleXExpression )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4489:3: lv_then_5_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getThenXExpressionParserRuleCall_5_0()); \n \t \n }\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression10168);\n lv_then_5_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"then\",\n \t\tlv_then_5_0, \n \t\t\"XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4505:2: ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\n int alt76=2;\n int LA76_0 = input.LA(1);\n\n if ( (LA76_0==72) ) {\n int LA76_1 = input.LA(2);\n\n if ( (synpred149_InternalTupi()) ) {\n alt76=1;\n }\n }\n switch (alt76) {\n case 1 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4505:3: ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) )\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4505:3: ( ( 'else' )=>otherlv_6= 'else' )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4505:4: ( 'else' )=>otherlv_6= 'else'\n {\n otherlv_6=(Token)match(input,72,FOLLOW_72_in_ruleXIfExpression10189); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getXIfExpressionAccess().getElseKeyword_6_0());\n \n }\n\n }\n\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4510:2: ( (lv_else_7_0= ruleXExpression ) )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4511:1: (lv_else_7_0= ruleXExpression )\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4511:1: (lv_else_7_0= ruleXExpression )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4512:3: lv_else_7_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getElseXExpressionParserRuleCall_6_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression10211);\n lv_else_7_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"else\",\n \t\tlv_else_7_0, \n \t\t\"XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject ruleXIfExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_2=null;\r\n Token otherlv_4=null;\r\n Token otherlv_6=null;\r\n EObject lv_if_3_0 = null;\r\n\r\n EObject lv_then_5_0 = null;\r\n\r\n EObject lv_else_7_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2509:28: ( ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2510:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\r\n {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2510:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2510:2: () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\r\n {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2510:2: ()\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2511:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getXIfExpressionAccess().getXIfExpressionAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,47,FOLLOW_47_in_ruleXIfExpression6058); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getXIfExpressionAccess().getIfKeyword_1());\r\n \r\n }\r\n otherlv_2=(Token)match(input,16,FOLLOW_16_in_ruleXIfExpression6070); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_2, grammarAccess.getXIfExpressionAccess().getLeftParenthesisKeyword_2());\r\n \r\n }\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2524:1: ( (lv_if_3_0= ruleXExpression ) )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2525:1: (lv_if_3_0= ruleXExpression )\r\n {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2525:1: (lv_if_3_0= ruleXExpression )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2526:3: lv_if_3_0= ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression6091);\r\n lv_if_3_0=ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getXIfExpressionRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"if\",\r\n \t\tlv_if_3_0, \r\n \t\t\"XExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_4=(Token)match(input,18,FOLLOW_18_in_ruleXIfExpression6103); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_4, grammarAccess.getXIfExpressionAccess().getRightParenthesisKeyword_4());\r\n \r\n }\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2546:1: ( (lv_then_5_0= ruleXExpression ) )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2547:1: (lv_then_5_0= ruleXExpression )\r\n {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2547:1: (lv_then_5_0= ruleXExpression )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2548:3: lv_then_5_0= ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getThenXExpressionParserRuleCall_5_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression6124);\r\n lv_then_5_0=ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getXIfExpressionRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"then\",\r\n \t\tlv_then_5_0, \r\n \t\t\"XExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2564:2: ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\r\n int alt40=2;\r\n int LA40_0 = input.LA(1);\r\n\r\n if ( (LA40_0==48) ) {\r\n int LA40_1 = input.LA(2);\r\n\r\n if ( (synpred18_InternalCheckCfg()) ) {\r\n alt40=1;\r\n }\r\n }\r\n switch (alt40) {\r\n case 1 :\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2564:3: ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2564:3: ( ( 'else' )=>otherlv_6= 'else' )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2564:4: ( 'else' )=>otherlv_6= 'else'\r\n {\r\n otherlv_6=(Token)match(input,48,FOLLOW_48_in_ruleXIfExpression6145); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_6, grammarAccess.getXIfExpressionAccess().getElseKeyword_6_0());\r\n \r\n }\r\n\r\n }\r\n\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2569:2: ( (lv_else_7_0= ruleXExpression ) )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2570:1: (lv_else_7_0= ruleXExpression )\r\n {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2570:1: (lv_else_7_0= ruleXExpression )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2571:3: lv_else_7_0= ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getElseXExpressionParserRuleCall_6_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleXExpression_in_ruleXIfExpression6167);\r\n lv_else_7_0=ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getXIfExpressionRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"else\",\r\n \t\tlv_else_7_0, \r\n \t\t\"XExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject entryRuleXIfExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXIfExpression = null;\n\n\n \n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\n try {\n // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3892:2: (iv_ruleXIfExpression= ruleXIfExpression EOF )\n // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3893:2: iv_ruleXIfExpression= ruleXIfExpression EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXIfExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression8714);\n iv_ruleXIfExpression=ruleXIfExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXIfExpression; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression8724); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n\n \tmyHiddenTokenState.restore();\n\n }\n return current;\n }", "public final EObject ruleXIfExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token otherlv_2=null;\n Token otherlv_4=null;\n Token otherlv_6=null;\n EObject lv_if_3_0 = null;\n\n EObject lv_then_5_0 = null;\n\n EObject lv_else_7_0 = null;\n\n\n enterRule(); \n \n try {\n // InternalDsl.g:6314:28: ( ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? ) )\n // InternalDsl.g:6315:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\n {\n // InternalDsl.g:6315:1: ( () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )? )\n // InternalDsl.g:6315:2: () otherlv_1= 'if' otherlv_2= '(' ( (lv_if_3_0= ruleXExpression ) ) otherlv_4= ')' ( (lv_then_5_0= ruleXExpression ) ) ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\n {\n // InternalDsl.g:6315:2: ()\n // InternalDsl.g:6316:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getXIfExpressionAccess().getXIfExpressionAction_0(),\n current);\n \n }\n\n }\n\n otherlv_1=(Token)match(input,96,FOLLOW_85); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getXIfExpressionAccess().getIfKeyword_1());\n \n }\n otherlv_2=(Token)match(input,30,FOLLOW_49); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getXIfExpressionAccess().getLeftParenthesisKeyword_2());\n \n }\n // InternalDsl.g:6329:1: ( (lv_if_3_0= ruleXExpression ) )\n // InternalDsl.g:6330:1: (lv_if_3_0= ruleXExpression )\n {\n // InternalDsl.g:6330:1: (lv_if_3_0= ruleXExpression )\n // InternalDsl.g:6331:3: lv_if_3_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_0()); \n \t \n }\n pushFollow(FOLLOW_32);\n lv_if_3_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"if\",\n \t\tlv_if_3_0, \n \t\t\"org.eclipse.xtext.xbase.Xbase.XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,31,FOLLOW_49); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_4, grammarAccess.getXIfExpressionAccess().getRightParenthesisKeyword_4());\n \n }\n // InternalDsl.g:6351:1: ( (lv_then_5_0= ruleXExpression ) )\n // InternalDsl.g:6352:1: (lv_then_5_0= ruleXExpression )\n {\n // InternalDsl.g:6352:1: (lv_then_5_0= ruleXExpression )\n // InternalDsl.g:6353:3: lv_then_5_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getThenXExpressionParserRuleCall_5_0()); \n \t \n }\n pushFollow(FOLLOW_86);\n lv_then_5_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"then\",\n \t\tlv_then_5_0, \n \t\t\"org.eclipse.xtext.xbase.Xbase.XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // InternalDsl.g:6369:2: ( ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) ) )?\n int alt100=2;\n int LA100_0 = input.LA(1);\n\n if ( (LA100_0==97) ) {\n int LA100_1 = input.LA(2);\n\n if ( (synpred39_InternalDsl()) ) {\n alt100=1;\n }\n }\n switch (alt100) {\n case 1 :\n // InternalDsl.g:6369:3: ( ( 'else' )=>otherlv_6= 'else' ) ( (lv_else_7_0= ruleXExpression ) )\n {\n // InternalDsl.g:6369:3: ( ( 'else' )=>otherlv_6= 'else' )\n // InternalDsl.g:6369:4: ( 'else' )=>otherlv_6= 'else'\n {\n otherlv_6=(Token)match(input,97,FOLLOW_49); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getXIfExpressionAccess().getElseKeyword_6_0());\n \n }\n\n }\n\n // InternalDsl.g:6374:2: ( (lv_else_7_0= ruleXExpression ) )\n // InternalDsl.g:6375:1: (lv_else_7_0= ruleXExpression )\n {\n // InternalDsl.g:6375:1: (lv_else_7_0= ruleXExpression )\n // InternalDsl.g:6376:3: lv_else_7_0= ruleXExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getXIfExpressionAccess().getElseXExpressionParserRuleCall_6_1_0()); \n \t \n }\n pushFollow(FOLLOW_2);\n lv_else_7_0=ruleXExpression();\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.getXIfExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"else\",\n \t\tlv_else_7_0, \n \t\t\"org.eclipse.xtext.xbase.Xbase.XExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject entryRuleXIfExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleXIfExpression = null;\r\n\r\n\r\n try {\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2498:2: (iv_ruleXIfExpression= ruleXIfExpression EOF )\r\n // ../com.avaloq.tools.dslsdk.checkcfg.core/src-gen/com/avaloq/tools/dslsdk/checkcfg/parser/antlr/internal/InternalCheckCfg.g:2499:2: iv_ruleXIfExpression= ruleXIfExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getXIfExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression6002);\r\n iv_ruleXIfExpression=ruleXIfExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleXIfExpression; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression6012); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject entryRuleXIfExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXIfExpression = null;\n\n\n try {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4436:2: (iv_ruleXIfExpression= ruleXIfExpression EOF )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:4437:2: iv_ruleXIfExpression= ruleXIfExpression EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXIfExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression10043);\n iv_ruleXIfExpression=ruleXIfExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXIfExpression; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression10053); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject entryRuleXIfExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXIfExpression = null;\n\n\n try {\n // InternalDsl.g:6303:2: (iv_ruleXIfExpression= ruleXIfExpression EOF )\n // InternalDsl.g:6304:2: iv_ruleXIfExpression= ruleXIfExpression EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXIfExpressionRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleXIfExpression=ruleXIfExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXIfExpression; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void entryRuleXIfExpression() throws RecognitionException {\n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1020:1: ( ruleXIfExpression EOF )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1021:1: ruleXIfExpression EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression2112);\n ruleXIfExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionRule()); \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression2119); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final void entryRuleXIfExpression() throws RecognitionException {\r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2646:1: ( ruleXIfExpression EOF )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2647:1: ruleXIfExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXIfExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression5595);\r\n ruleXIfExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXIfExpressionRule()); \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression5602); 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 }", "public final void entryRuleXIfExpression() throws RecognitionException {\r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1362:1: ( ruleXIfExpression EOF )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1363:1: ruleXIfExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXIfExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression2838);\r\n ruleXIfExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXIfExpressionRule()); \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression2845); 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 }", "public final void entryRuleXIfExpression() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1216:1: ( ruleXIfExpression EOF )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1217:1: ruleXIfExpression EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression2532);\n ruleXIfExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionRule()); \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression2539); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final void entryRuleXIfExpression() throws RecognitionException {\n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1132:1: ( ruleXIfExpression EOF )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1133:1: ruleXIfExpression EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression2352);\n ruleXIfExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionRule()); \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression2359); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final void entryRuleXIfExpression() throws RecognitionException {\n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:995:1: ( ruleXIfExpression EOF )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:996:1: ruleXIfExpression EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionRule()); \n }\n pushFollow(FOLLOW_ruleXIfExpression_in_entryRuleXIfExpression2054);\n ruleXIfExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionRule()); \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXIfExpression2061); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "XExpression getIf();", "public final void entryRuleXIfExpression() throws RecognitionException {\r\n try {\r\n // InternalDroneScript.g:1280:1: ( ruleXIfExpression EOF )\r\n // InternalDroneScript.g:1281:1: ruleXIfExpression EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXIfExpressionRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleXIfExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXIfExpressionRule()); \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 }", "public final void rule__XIfExpression__IfAssignment_3() 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:15968:1: ( ( ruleXExpression ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15969:1: ( ruleXExpression )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15969:1: ( ruleXExpression )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15970:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XIfExpression__IfAssignment_332139);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionAccess().getIfXExpressionParserRuleCall_3_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__XIfExpression__Group__1__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:8706:1: ( ( 'if' ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8707:1: ( 'if' )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8707:1: ( 'if' )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8708:1: 'if'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \n }\n match(input,61,FOLLOW_61_in_rule__XIfExpression__Group__1__Impl17807); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \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 }", "Expression getIf_expr();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the current value of the Axis_RightX
public double getRightXAxis() { return getRawAxis(Axis_RightX); }
[ "public double getAxisRightStickX() {\n\t\treturn joystick.getRawAxis(this.axisRSX);\n\t}", "public double getRightStickX() {\n return this.getRawAxis(4);\n }", "public double getOperatorRightXAxis() {\n return DriveUtils.deadbandExponential(testController.getRightStickX(), 1, .075);\n }", "public int getXPosRight() {\n return x_pos_right;\n }", "protected double getWindowRightX() {\n\t\treturn this.m_windowRightX;\n\t}", "public double getToolRightX()\n\t{\n\t\tdouble joy = toolStick.getRawAxis(JoyStickConstants.RIGHT_ANALOG_X);\n\t\tif (Math.abs(joy) < 0.10)\n\t\t\treturn 0.0;\n\t\telse\n\t\t\treturn joy;\n\t}", "public double getRightStickY() {\n return this.getRawAxis(5);\n }", "public double getRightTrigger() {\n return this.getRawAxis(3);\n }", "public double getRightPointX() {\n\t\tdouble rightX = x + (extent/2);\n\t\t\n\t\tif (!(Double.isFinite(rightX)))\n\t\t\treturn (Double) null;\n\t\t\n\t\treturn rightX;\n\t}", "public int getXRight() {\n return getXLeft() + getXLength();\n }", "public double getAxisRightStickY() {\n\t\treturn joystick.getRawAxis(this.axisRSY);\n\t}", "public double getRightTrigger() {\n\t\treturn getRawAxis(RIGHT_TRIGGER);\n\t}", "public int getXRightBound(){\n\t\treturn this.xRightBound;\n\t}", "public Point3D getRightAxis();", "public double getLeftYAxis() {\n\t\treturn getRawAxis(Axis_LeftY);\n\t}", "public double getRightYAxis() {\n\t\treturn getRawAxis(Axis_RightY);\n\t}", "public double getLeftXAxis() {\n\t\treturn getRawAxis(Axis_LeftX);\n\t}", "public double getRightJoystickHorizontal() {\n\t\treturn getRawAxis(RIGHT_STICK_HORIZONTAL);\n\t}", "public double getAxisLeftStickX() {\n\t\treturn joystick.getRawAxis(this.axisLSX);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of terms which were seperated by 'AND' in the userentry.
public static ArrayList<String> tokenizeBooleanAND(String sentence) { //This splits the query at 'AND' ArrayList<String> result = new ArrayList<>(Arrays.asList(sentence.split("AND"))); return format(result); }
[ "private Set<String> getQueryTerms() {\n Set<String> ans = new HashSet<>();\n for (Query q : queries) {\n ans.addAll(q.getFilter().terms());\n }\n return ans;\n }", "private List<ParseTree> separateAND(ParseTree t){\n List<ParseTree> nodes = new ArrayList<ParseTree>();\n List<ParseTree> aux = getNodes(t, RulesParser.RULE_conjuncion);\n List<ParseTree> factores = getNodes(t, RulesParser.RULE_factor); // factors enclosed in parentheses, such as ((1+2)+3)\n int count = 0;\n for (int i = 0; i < factores.size(); i++) {\n if (((RulesParser.FactorContext) factores.get(i)).PA() != null){\n count++;\n }\n }\n int params = Trees.findAllRuleNodes(t, RulesParser.RULE_parametros).size();\n params = aux.size() == params ? 0 : params;\n for (int i = 0; i < aux.size() - params - count; i++) {\n if (aux.get(i).getChild(i) instanceof RulesParser.ConjuncionContext){\n nodes.add(((RulesParser.ConjuncionContext) aux.get(i)).igualdad());\n } else{\n nodes.add(aux.get(i));\n }\n }\n Collections.reverse(nodes);\n return nodes;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"AND\";\n\t}", "public List<String> getTermsAndConditionsList() {\n List<WebElement> tAndCElementList = Driver.getWebDriver().findElements(By.cssSelector(\".help-content .a-list-item\"));\n List<String> tAndCList = new ArrayList<>(tAndCElementList.size());\n for (WebElement tAndCElement : tAndCElementList) {\n tAndCList.add(tAndCElement.getText());\n }\n return tAndCList;\n }", "Set<String> getTerms();", "public void splitQuery() {\n String[] subQueries;\n subQueries = originalQuery.split(\" \"); //Just split by spaces\n for (String term : subQueries) {\n searhTerm.add(term);\n }\n\n\n }", "private List<String> tokenize(String query) throws IOException {\n List<String> terms = new ArrayList<>();\n String[] rawQueryTerms = query.split(\"\\\\s+\");\n for (String rawQueryTerm : rawQueryTerms) {\n String[] tokens = QryParser.tokenizeString(rawQueryTerm);\n for (String token : tokens) {\n terms.add(token);\n }\n }\n return terms;\n }", "public List<String> testQuery(String terms, boolean andOperator) {\n\t\t\n\t\tString[] termsRequest = terms.split(\"\\\\s+\");\n\t\t\n\t\t\n\t\tList<String> resultIDs = new ArrayList<String>();\n\t\tCollection<Document> docs;\n\t\t\n\t\tif (andOperator){\n\t\t\tdocs = corpus.getDocumentsContainingAll(termsRequest);\n\t\t}else{\n\t\t\tdocs = corpus.getDocumentsContainingAny(termsRequest);\n\t\t}\n\t\t\n\t\tfor (Document doc : docs) {\n\t\t\tresultIDs.add(doc.getId());\n\t\t}\n\t\t\n\t\treturn resultIDs;\n\t}", "private Node processANDStatement() {\n\t\treturn constructMultipleExpressionsWithOperator(new ANDOperatorStrategy());\n\t}", "public String getAndOr();", "public String getTermsAndConditions() {\n return this.termsAndConditions;\n }", "public static List<SearchFilter> getUserFilterList(\n\t\t\tUserSearchTerms searchTerms) {\n\t\tfinal List<SearchFilter> filters = new ArrayList<SearchFilter>();\n\t\t\n//\t\tif (!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()) &&\n//\t\t\t\t!StringUtils.isNotBlank(searchTerms.getUid())) {\n//\t\t\treturn filters;\n//\t\t}\n\t\t/** Each search term that wishes to be a part of the basic keyword\n\t\t * search should check for false isAdvancedSearch() and then provide\n\t\t * a fall back to getKeywords() in the filter\n\t\t */\n\n\t\tif (Validator.isNotNull(searchTerms.getFirstName()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.givenName,\n\t\t\t\t\tsearchTerms.getFirstName() != null ?\n\t\t\t\t\t\t\tsearchTerms.getFirstName() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getLastName()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.sn,\n\t\t\t\t\tsearchTerms.getLastName() != null ?\n\t\t\t\t\t\t\tsearchTerms.getLastName() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getEmailAddress()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.mail,\n\t\t\t\t\tsearchTerms.getEmailAddress() != null ?\n\t\t\t\t\t\t\tsearchTerms.getEmailAddress() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\t\t\n\t\tif (Validator.isNotNull(searchTerms.getDomain()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.esuccMailPrimaryDomain,\n\t\t\t\t\tsearchTerms.getDomain() != null ?\n\t\t\t\t\t\t\tsearchTerms.getDomain() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\t\t\n\t\tif (Validator.isNotNull(searchTerms.getEsuccEntity()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.esuccEntity,\n\t\t\t\t\tsearchTerms.getEsuccEntity() != null ?\n\t\t\t\t\t\t\tsearchTerms.getEsuccEntity() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getUid())) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.uid,\n\t\t\t\t\tsearchTerms.getUid(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getUidNumber())) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.uidNumber,\n\t\t\t\t\tsearchTerms.getUidNumber(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\t\n\t\treturn filters;\n\t}", "@Override\n public HashMap<String, String> getFilterTerms() {\n HashMap<String, String> filterTerms = new HashMap<>();\n if (countryCheckBox.isSelected()) {\n filterTerms.put(\"Country\", countryField.getText());\n }\n if (cityCheckBox.isSelected()) {\n filterTerms.put(\"City\", cityField.getText());\n }\n return filterTerms;\n }", "@Override\n public String toString() {\n switch (this) {\n case AND:\n return \" && \";\n case OR:\n return \" || \";\n default:\n return \"\";\n }\n }", "Conjunction getFilterQuery();", "private List<String> extractUserNames(List<UserSearchInput> values)\n {\n List<String> result = new ArrayList<String>();\n if (values != null)\n {\n for (UserSearchInput value : values)\n {\n if (value.isUser()) {\n result.add(value.getValue());\n }\n }\n }\n return result;\n }", "public List<String> getTerms() {\r\n return Collections.unmodifiableList(terms);\r\n }", "private Set<String> term() {\n // 初始化空集合,与之后的求解结果求笛卡尔积\n Set<String> ret = new TreeSet<String>() {{\n add(\"\");\n }};\n // item 的开头是 { 或小写字母,只有符合时才继续匹配\n while (idx < expression.length() && (expression.charAt(idx) == '{' || Character.isLetter(expression.charAt(idx)))) {\n Set<String> sub = item();\n Set<String> tmp = new TreeSet<String>();\n for (String left : ret) {\n for (String right : sub) {\n tmp.add(left + right);\n }\n }\n ret = tmp;\n }\n return ret;\n }", "Transaction[] search(String username, String keywords, Filter filter);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge pre install xml into post install xml.
public static String mergePreInstallXMLIntoPostInstallXML(String preUpgradeConfigurationXmlPath, String postUpgradeConfigurationXmlPath, List<String> propertiesToMerge, List<String> propertiesToExclude) throws IOException, JDOMException { return mergeConfigurations(postUpgradeConfigurationXmlPath, preUpgradeConfigurationXmlPath, propertiesToMerge, propertiesToExclude, "OLD"); }
[ "public static String mergePostInstallXMLIntoPreInstallXML(String preUpgradeConfigurationXmlPath, String postUpgradeConfigurationXmlPath,\n\t\t\tList<String> propertiesToMerge, List<String> propertiesToExclude) throws IOException, JDOMException {\n\t\treturn mergeConfigurations(preUpgradeConfigurationXmlPath, postUpgradeConfigurationXmlPath, propertiesToMerge, propertiesToExclude, \"HDP\");\n\t}", "public void preInstallationOngoing() {\n InstallData data = InstallData.getInstance();\n \n if ( data.isInstallationMode()) {\n boolean makeRelocatableAdminFile = true;\n boolean removeDepends = true;\n helper.createAdminFile(makeRelocatableAdminFile, removeDepends);\n helper.createAdminFile(makeRelocatableAdminFile, ! removeDepends);\n helper.createAdminFile(! makeRelocatableAdminFile, removeDepends);\n helper.createAdminFile(! makeRelocatableAdminFile, ! removeDepends);\n }\n\n if ( data.isUserInstallation() ) {\n // LD_PRELOAD_32 needs to be set for user installation\n helper.setEnvironmentForUserInstall();\n // Solaris 10 needs to have local temp directory for pkgadd\n // createLocalTempDir();\n }\n }", "void installIfNeeded()\n throws Exception;", "@Override\n public void install() {\n }", "private void copyLibXml()\r\n {\n // copy over a lib to the webapp path that includes the required dependencies and ensure\r\n // the report loads by referencing those dependencies\r\n //\r\n\r\n try\r\n {\r\n backupLibXml();\r\n\r\n Files.copy(libXmlSource, libXmlDest, StandardCopyOption.REPLACE_EXISTING);\r\n }\r\n catch (IOException e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n }", "protected void installComponents() {\n\t}", "@Override\n public void execute()\n throws MojoExecutionException\n {\n try {\n init(false);\n getOutputDirectory().mkdir();\n final String folders = jmsPackage.replace(\".\", File.separator);\n final File srcFolder = new File(getOutputDirectory(), folders);\n srcFolder.mkdirs();\n\n final Application appl = Application.getApplicationFromSource(\n getVersionFile(),\n getClasspathElements(),\n getEFapsDir(),\n getOutputDirectory(),\n getIncludes(),\n getExcludes(),\n getTypeMapping());\n\n for (final Dependency dependency : appl.getDependencies()) {\n dependency.resolve();\n final Application dependApp = Application.getApplicationFromJarFile(\n dependency.getJarFile(), getClasspathElements());\n final List<InstallFile> files = dependApp.getInstall().getFiles();\n for (final InstallFile file : files) {\n if (file.getType() != null && file.getType().equals(FileType.XML)) {\n readFile(srcFolder, file);\n }\n }\n }\n\n final List<InstallFile> files = appl.getInstall().getFiles();\n for (final InstallFile file : files) {\n if (file.getType() != null && file.getType().equals(FileType.XML)) {\n readFile(srcFolder, file);\n }\n }\n project.addCompileSourceRoot(getOutputDirectory().getAbsolutePath());\n } catch (final Exception e) {\n throw new MojoExecutionException(\"Could not execute SourceInstall script\", e);\n }\n }", "protected void installComponents() {\n }", "protected void deployFromXML() {\r\n\r\n // TODO implement\r\n Iterator<URL> it = null; // xmlLocations.iterator();\r\n\r\n while (it.hasNext()) {\r\n URL fileURL = it.next();\r\n //String fileName = fileURL.getFile();\r\n InputStream fis = null;\r\n try {\r\n fis = fileURL.openStream();\r\n\r\n // this.xmlConfigurator.configure(fis, fileName);\r\n } catch (IOException e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n if (fis != null) {\r\n try {\r\n fis.close();\r\n } catch (IOException e) {\r\n // all ok, ignore this!\r\n }\r\n }\r\n }\r\n }\r\n }", "void onDefaultInstallmentSet();", "public void changeXMLFile() throws IOException {\n File orig = new File(RunnerClass.homedir + \"launch4j.xml\");\n File custom = new File(RunnerClass.homedir + \"launch4j2.xml\");\n BufferedReader br = new BufferedReader(new FileReader(orig));\n PrintWriter pw = new PrintWriter(new FileWriter(custom));\n int line = 0;\n String s;\n //Reads all lines, and replaces 5th line with new destination file\n while ((s = br.readLine()) != null) {\n line++;\n if (line == 5)\n pw.println(\" <outfile>\" + exeF.getCanonicalPath() + \"</outfile>\");\n else if(line == 18)\n pw.println(\" <minVersion>\"+ getFullVersion(RunnerClass.mf.generalOptionalPanel.javaVersion.getText().trim()) +\"</minVersion>\");\n else\n pw.println(s);\n }\n br.close();\n pw.close();\n //Deletes original file, renames temp to original\n RunnerClass.logger.info(\"del: \" + orig.delete());\n RunnerClass.logger.info(\"ren: \" + custom.renameTo(orig));\n }", "public void setAppxml(File descr) {\n deploymentDescriptor = descr;\n if (!deploymentDescriptor.exists()) {\n throw new BuildException(\"Deployment descriptor: \"\n + deploymentDescriptor\n + \" does not exist.\");\n }\n\n ZipFileSet fs = new ZipFileSet();\n fs.setFile(deploymentDescriptor);\n fs.setFullpath(\"META-INF/application.xml\");\n super.addFileset(fs);\n }", "@Override\n public void installCpp ()\n throws Exception\n {\n for (Package pkg : cReqs) {\n if (!pkg.isInstalled()) {\n pkg.install();\n }\n }\n }", "public void runReduceSuppXml(){\n String suppxml = \"../../mesh/supp2015.xml\";\n String reducedSuppXml= \"../../mesh/reduced_supp2015.xml\";\n try{\n reduceSuppXml(suppxml, reducedSuppXml);\n }catch(IOException e){e.printStackTrace();}\n }", "public void transformToSecondXml();", "public static void mergeXml(File temp) {\n\n try {\n DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = domFactory.newDocumentBuilder();\n Document doc = builder.parse(new File(\"src/main/resources/xml/scores.xml\"));\n Document doc1 = builder.parse(new File(\"src/main/resources/xml/temp.xml\"));\n\n NodeList nodes = doc.getElementsByTagName(\"Player\");\n\n NodeList nodes1 = doc1.getElementsByTagName(\"Player\");\n\n for (int i = 0; i < nodes1.getLength(); i = i + 1) {\n Node n = (Node) doc.importNode(nodes1.item(i), true);\n nodes.item(i).getParentNode().appendChild(n);\n }\n\n Transformer transformer = TransformerFactory.newInstance().newTransformer();\n\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n StreamResult result = new StreamResult(new StringWriter());\n DOMSource source = new DOMSource(doc);\n\n transformer.transform(source, result);\n Writer output = null;\n output = new BufferedWriter(new FileWriter(\"src/main/resources/xml/scores.xml\"));\n\n String xmlOutput = result.getWriter().toString();\n\n output.write(xmlOutput);\n output.close();\n logger.info(\"XML files merged\");\n } catch (ParserConfigurationException | SAXException | IOException | TransformerException ex) {\n Logger.getLogger(WriteXML.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void preArchive() {\n // update version number\n setVersionNumber(CURRENT_VERSION_NO);\n }", "public void installOldApk() {\n localApkFileName = OLD_MSAL_TEST_APP_APK;\n install();\n }", "protected abstract boolean bypassDuringInstall();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allows the admin to delete a fact.
@RequestMapping(value = "/deleteFact/{factId}", method = { RequestMethod.GET, RequestMethod.POST }) public void deleteFact(HttpServletRequest req, HttpServletResponse resp, @PathVariable Integer factId, Model model) throws IOException, ServletException { Fact fact = factDao.findFactById(factId); factDao.deleteFact(fact); }
[ "public void delete(Facture facture) throws DataAccessLayerException {\n super.delete(facture);\n }", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "public void delete() {\n\n\t\t\n\t\t// Log:\n\t\tSaga.info(\"Deleting \" + getId() + \"(\" + getName() + \") faction.\");\n\t\t\n\t\t// Remove all members:\n\t\tArrayList<String> playerNames = getMembers();\n\t\tfor (int i = 0; i < playerNames.size(); i++) {\n\t\t\tremoveMember(playerNames.get(i));\n\t\t}\n\t\t\n\t\t// Update faction manager:\n\t\tFactionManager.getFactionManager().removeFaction(this);\n\t\t\n\t\t// Save last time:\n\t\tsave();\n\t\t\n\t\t// Remove from disc:\n\t\tWriterReader.deleteFaction(getId().toString());\n\t\t\n\t\t\n\t}", "private void actionDelete() {\r\n showDeleteDialog();\r\n }", "public void deleteFuente(FnttFuente fuente)throws IdeamException;", "public void delete(EmergenciaCreditoFacturaRealizadaPk pk) throws EmergenciaCreditoFacturaRealizadaDaoException;", "public void delete(Todo todo);", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n String deleteOption,\n Context context);", "public String delete() {\r\n \tcm.detach(competency);\r\n saveMessage(getText(\"competency.deleted\"));\r\n\r\n return SUCCESS;\r\n }", "public void delete(FoliosFensPk pk) throws FoliosFensDaoException;", "public void deleteTriggered();", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "public void deleteQuestion(Question question);", "void deleteFlow(FlowEntity flow);", "public void delete(Perspective perspective) throws Exception;", "private Delete() {}", "public abstract void deleteSelectedEntity();", "@FXML\r\n\tprivate void deleteEmployee(ActionEvent event) {\r\n\t\teraseFieldsContent();\r\n\t\tEmployee e = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\tservice.deleteEmployee(e);\r\n\t\tlistaStaff.getItems().remove(e);\r\n\t\tbtDelete.setDisable(true);\r\n\t\tbtEditar.setDisable(true);\r\n\t\tupdateList();\r\n\t}", "public void deleteFood(Food food){\r\n foodList.removeFood(food);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the fecha pago.
public Date getFecha_pago() { return fecha_pago; }
[ "public java.util.Calendar getFechaPago() {\n return fechaPago;\n }", "@Override\n public java.util.Date getFecha() {\n return _partido.getFecha();\n }", "public java.util.Date getDataPagamento() {\r\n return dataPagamento;\r\n }", "public java.lang.String getHoraDePago() {\n return horaDePago;\n }", "public abstract java.lang.String getFecha_inicio();", "public Date getFecha_carga() {\n\t\treturn fecha_carga;\n\t}", "public Date getFechahoraentrada() {\n return fechahoraentrada;\n }", "public java.lang.String getFecha_dia() {\n return fecha_dia;\n }", "public int getFechaInicio() {\n return fechaInicio;\n }", "public Date getDatanascita_intestatario();", "public String getFechaCarga() {\r\n return fechaCarga;\r\n }", "public Date getFechaRegistro() {\r\n return fechaRegistro;\r\n }", "public abstract java.lang.String getFecha_termino();", "public Date getFechaconsulta() {\r\n return fechaconsulta;\r\n }", "public Date getFechaCorteDate() {\n return fechaCorteDate;\n }", "public java.lang.String getEntregaFecha() {\n return entregaFecha;\n }", "public Date getFechaInicioContrato() {\r\n\t\t\r\n\t\treturn (this.fechaInicioContrato);\r\n\t}", "public java.lang.String getFechaCreado() {\n return fechaCreado;\n }", "public Date getHoraInicio() {\r\n return horaInicio;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Xml code of the Alias portlet without XML heading
public String getXml( HttpServletRequest request ) throws SiteMessageException { // gets the portlet parent Portlet portlet = PortletHome.findByPrimaryKey( getAliasId( ) ); String strXmlAlias = portlet.getXml( request ); String strTagPortletName = "</" + TAG_PORTLET_NAME + ">"; int indexDeb = strXmlAlias.indexOf( strTagPortletName ); int indexFin = strXmlAlias.indexOf( "</" + TAG_PORTLET + ">" ); strXmlAlias = strXmlAlias.substring( indexDeb + strTagPortletName.length( ), indexFin ); StringBuffer buffXml = new StringBuffer( ); XmlUtil.beginElement( buffXml, TAG_PORTLET ); XmlUtil.addElement( buffXml, TAG_PORTLET_NAME, getName( ) ); buffXml.append( strXmlAlias ); XmlUtil.endElement( buffXml, TAG_PORTLET ); return buffXml.toString( ); }
[ "org.apache.xmlbeans.XmlString xgetProductCode();", "public java.lang.String getAlias()\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(ALIAS$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "org.apache.xmlbeans.XmlString xgetProductEan();", "public org.apache.xmlbeans.XmlString xgetAlias()\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(ALIAS$2, 0);\n return target;\n }\n }", "String getATDocCodeID();", "org.apache.xmlbeans.XmlInt xgetCode();", "org.apache.xmlbeans.XmlString xgetDomainCode();", "public String exportXML() {\n\n\t\tXStream xstream = new XStream(new DomDriver());\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\t\txstream.autodetectAnnotations(true);\n\t\t\n\t\tprocessAliases(xstream);\n\t\t\n\t\treturn xstream.toXML(this);\n\t}", "org.apache.xmlbeans.XmlString xgetProgram();", "java.lang.String getXdescelement3();", "String getOutputConnectorTag();", "org.apache.xmlbeans.XmlString xgetParameterCode();", "private String generateSequenceAlias() {\n return PantheraConstants.PANTHERA_PREFIX + getAliasNum();\n }", "public AliasPortlet( )\n {\n setPortletTypeId( AliasPortletHome.getInstance( ).getPortletTypeId( ) );\n }", "org.apache.xmlbeans.XmlString xgetDestinationStation();", "public String getXPageAlt();", "public String toXPDL() {\n\t\treturn \"\\t\\t\\t\\t<xpdl:Lane Id=\\\"\" + m_id + \"\\\" Name=\\\"\" + m_name + \"\\\"/>\";\n\t}", "public int getAliasId( )\n {\n return _nAliasId;\n }", "String getAlias();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Person'.
Person createPerson();
[ "public Person create() {\n\t\treturn personRepository.create();\n\t}", "private static Person genPerson(String fName, String lName, Integer age)\n {\n return new Person(fName, lName, age);\n }", "PersonInfo createPersonInfo();", "public static Person copyPerson(Person person){\r\n Person p = new Person(person.person, person.fitness);\r\n p.percentOfFitness = person.percentOfFitness;\r\n return p;\r\n }", "public Person() {\n }", "public Person () {\t\n\t}", "public static User createPerson() throws ParserConfigurationException, SAXException, IOException {\n User[] users = XMLReader.parsePersonXML();\n User user = users[0];\n calories = user.getCalories();\n diet = user.getDiet();\n quantity = user.getQuantityOfPeople();\n transport = user.getTransport();\n return user;\n }", "public People(People people){}", "private Person genPersonFromInput() {\n Person person = new Person();\n try {\n\n if (mIDView.getText().length() > 0) {\n person.id = Long.parseLong(mIDView.getText().toString());\n }\n\n person.lastName = mLastNameView.getText().toString();\n person.firstName = mFirstNameView.getText().toString();\n person.birthdate = mDateFmt.parse(mBirthdateView.getText().toString());\n person.sex = mSexView.getText().charAt(0);\n return person;\n }\n catch (Exception ex) {\n Log.e(TAG, \"Unable to generate person due to exception: \" + ex.getMessage());\n return null;\n }\n }", "public Person(String name){\n this.name = name;\n }", "public Participant registerNewPerson() {\n\t\tPerson newPerson = new Person();\n\t\tParticipant newParticipant = new Participant();\n\t\tnewParticipant.setPerson(newPerson);\n\t\ttry {\n\t\t\tEvent currentEvent = walkingDinnerController.getWalkingDinner().getCurrentEvent();\n\t\t\tcurrentEvent.setCurrentParticipant(newParticipant);\n\t\t\tcurrentEvent.getParticipants().add(newParticipant);\n\t\t\tcurrentEvent.getInvited().add(newParticipant);\n\t\t\treturn newParticipant;\n\t\t} catch (NullPointerException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public static void toPersonObject() {\n\t\t\n\t\t// queries \n\t\tString getPersonQuery = \"SELECT * FROM Persons\";\n\t\tString getEmailQuery = \"SELECT (email) FROM Emails e WHERE e.personID=?;\";\n\t\t\n\t\t// Create connection and prepare Sql statement \n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet personRs = null;\n\t\tResultSet emailRs = null;\n\n\t\t// result\n\t\tPerson p = null;\n\t\tAddress a = null;\n\t\tString personCode=null, lastName=null, firstName=null;\n\t\n\t\ttry {\t\n\t\t\tconn = ConnectionFactory.getOne();\n\t\t\tps = conn.prepareStatement(getPersonQuery);\n\t\t\tpersonRs = ps.executeQuery();\n\t\t\twhile(personRs.next()) {\n\t\t\t\tpersonCode = personRs.getString(\"personCode\");\n\t\t\t\tlastName = personRs.getString(\"lastName\");\n\t\t\t\tfirstName = personRs.getString(\"firstName\");\n\t\t\t\tint addressID = personRs.getInt(\"addressID\");\n\t\t\t\tint personID = personRs.getInt(\"id\");\n\t\t\t\t\n\t\t\t\ta = ProcessDatabase.toAddressObjectFromDB(addressID);\n\t\t\t\t// create a set to store email and deposite to create an object \n\t\t\t\tArrayList<String> emails = new ArrayList<String>();\n\t\t\t\tString email = null;\n\t\t\t\t//seperate query to get email Address \n\t\t\t\tps = conn.prepareStatement(getEmailQuery);\n\t\t\t\tps.setInt(1, personID);\n\t\t\t\temailRs = ps.executeQuery();\n\t\t\t\twhile(emailRs.next()) {\n\t\t\t\t\temail = emailRs.getString(\"email\");\n\t\t\t\t\temails.add(email);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//create a person Object \n\t\t\t\t//Person(String personCode, String lastName, String firstName, Address address, Set<String> emails)\n\t\t\t\tp = new Person(personCode,lastName,firstName,a,emails);\n\t\t\t\t\n\t\t\t\t//add to Person list \n\t\t\t\tDataConverter.getPersons().add(p);\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\t//log error to logger\n\t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\t}\n\t\t\n\t}", "public Person(String name) {\n this.name = name;\n }", "public Person(String name){\n\t\tthis.name = name ; \n\t}", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public static PersonMapper personMapper() {\n\tif (personMapper == null) {\n\t\tpersonMapper = new PersonMapper();\n\t}\n\treturn personMapper;\n}", "public Person(String name) {\n\t\tthis.name = name;\n\t}", "public Employee(Person person) {\n\t\tcurrentPerson = person; \n\t\temployeeFirstName = person.getFirstName();\n\t\temployeeLastName = person.getLastName();\n\t\temployeeID = person.getID();\n\t\temployeeSSN = person.getSSN();\n\t}", "public static Person createPerson(String name, String occupation) {\n switch (occupation.toLowerCase()) {\n case \"doctor\":\n return new Doctor(name);\n case \"professor\":\n return new Professor(name);\n case \"student\":\n return new Student(name);\n default:\n return null;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a value for a setting
public String getValue (String setting);
[ "Setting getSetting();", "String getSetting(String settingName);", "<S> S getSetting(Setting<S> setting, S defaultValue);", "String getSettingByKey(String key);", "public abstract Object getSetting(int key);", "public String getConfigValue(String setting) {\n switch (setting) {\n case SELECTED_SERVER_PROP:\n return selectedServer;\n case START_SERVICE_PROP:\n return START_SERVICE_VALUE;\n case STOP_SERVICE_PROP:\n return STOP_SERVICE_VALUE;\n case RESTART_SERVICE_PROP:\n return RESTART_SERVICE_VALUE;\n default:\n String returnValue;\n if ((returnValue = General.getConfigValue(selectedServer, setting)) != null) {\n return returnValue;\n } else if ((returnValue = Discovery.getConfigValue(selectedServer, setting)) != null) {\n return returnValue;\n } else if ((returnValue = Devices.getConfigValue(selectedServer, setting)) != null) {\n return returnValue;\n }\n }\n return null;\n }", "public String getSettingValue(String name) {\n return this.settings.get(name);\n }", "int setting() {\n return _setting;\n }", "public Setting getSetting(){\n\t\treturn setting;\n\t}", "public String getSettingValue(String key) {\n String value = null;\n if (settings.containsKey(key)) {\n value = settings.get(key);\n }\n if (value == null) {\n value = \"\";\n }\n return value;\n }", "String getSettingByKey(String key, String defaultValue);", "String getSettingByKey(HawkularUser user, String key, String defaultValue);", "java.lang.String getVal();", "public static ESettingValueType get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase INTEGER_VALUE: return INTEGER;\r\n\t\t\tcase STRING_VALUE: return STRING;\r\n\t\t\tcase DECIMAL_VALUE: return DECIMAL;\r\n\t\t\tcase SELECTION_VALUE: return SELECTION;\r\n\t\t\tcase BOOLEAN_VALUE: return BOOLEAN;\r\n\t\t\tcase URI_VALUE: return URI;\r\n\t\t\tcase DATETIME_VALUE: return DATETIME;\r\n\t\t\tcase DURATION_VALUE: return DURATION;\r\n\t\t\tcase TIME_VALUE: return TIME;\r\n\t\t\tcase DATE_VALUE: return DATE;\r\n\t\t\tcase MULTISELECTION_VALUE: return MULTISELECTION;\r\n\t\t\tcase FILE_VALUE: return FILE;\r\n\t\t\tcase FOLDER_VALUE: return FOLDER;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getSetting(String key) throws SQLException {\n\t\treturn db.selectItem(\"value\", \"settings\", \"`key`='\"+key+\"'\");\n\t}", "String getSettingByKey(HawkularUser user, String key);", "public String getConfig_value(){\r\n\t\treturn config_value ;\r\n\t}", "public SysConfigValue getSysConfigValue(final String valueId);", "public com.vmware.converter.AlarmSetting getSetting() {\r\n return setting;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column goods_transition.number_of_package
public void setNumberOfPackage(Integer numberOfPackage) { this.numberOfPackage = numberOfPackage; }
[ "@Property(\"numOfClassesInPackage\")\r\n public abstract void setNumOfClassesInPackage(int numOfClassesInPackage);", "public void setNumberOfPackageUnit(String numberOfPackageUnit) {\r\n this.numberOfPackageUnit = numberOfPackageUnit;\r\n }", "public Integer getNumberOfPackage() {\r\n return numberOfPackage;\r\n }", "public void setRemainNumberOfPackage(Integer remainNumberOfPackage) {\r\n this.remainNumberOfPackage = remainNumberOfPackage;\r\n }", "void setTotalProductCount(int totalProductCount);", "public void setNumOfGoods(int numOfGoods) {\n this.numOfGoods = numOfGoods;\n }", "private void countPackageChidren(SoftwareUnitDB softUnit, boolean isDelete){\r\n\r\n\t\tif(softUnit == null)\r\n\t\t\treturn;\r\n\r\n\t\tif(softUnit.getType() == SoftwareUnitType.PACKAGE){\r\n\r\n\t\t\tInteger qtd = pkgChildren.get(softUnit.getId());\r\n\r\n\t\t\tif(isDelete){\r\n\r\n\t\t\t\tqtd--;\r\n\t\t\t\tpkgChildren.put(softUnit.getId(), qtd);\r\n\t\t\t\tif(qtd == 0)\r\n\t\t\t\t\tsnapshotUids.remove(softUnit.getUid());\r\n\r\n\t\t\t}else if(qtd != null)\r\n\t\t\t\tpkgChildren.put(softUnit.getId(), pkgChildren.get(softUnit.getId())+1);\r\n\t\t\telse\r\n\t\t\t\tpkgChildren.put(softUnit.getId(), 1);\r\n\r\n\t\t}\r\n\r\n\t}", "public void setCountGeneration(int newValue)\n {\n countGeneration = newValue;\n }", "public void setNpm( int pNpm )\r\n {\r\n ( (IntegerMetricBO) getMetrics().get( NPM ) ).setValue( new Integer( pNpm ) );\r\n }", "public void setCostume(int newCostumeNumber) {\n costumeNumber=newCostumeNumber;\n }", "public int getPackage_id() {\n return package_id;\n }", "public void setGoodsNum(Integer goodsNum) {\n this.goodsNum = goodsNum;\n }", "public void incrementNumOfClassesInPackage() {\r\n setNumOfClassesInPackage(getNumOfClassesInPackage() + 1);\r\n }", "public void setGetbackNumberOfPackage(Integer getbackNumberOfPackage) {\r\n this.getbackNumberOfPackage = getbackNumberOfPackage;\r\n }", "protected abstract void setChosenPackage(String chosenPackage);", "public String getNumberOfPackageUnit() {\r\n return numberOfPackageUnit;\r\n }", "public void setSequenceNumberForHibernate(INT sequenceNumber) {\n _sequenceNumber = sequenceNumber;\n }", "private void setBuyCount(int value) {\n \n buyCount_ = value;\n }", "void xsetTotalProductCount(org.apache.xmlbeans.XmlInt totalProductCount);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a note on the given location
private void addNote(Location loc, Player player) { Material soundMat = blockBySound.get(selectedSound); changeInArea(soundMat, loc); // Updates ingame board int c = columnNum(loc); int r = rowNum(loc); Note note = new Note(selectedSound, selectedPitch, selectedVolume); notes.get(c).set(r, note); // Updates the list playSoundAt(loc, player); }
[ "private void addNote() {\n if (checkNote()) {\n return;\n }\n\n Note note = new Note(noteTitle.getText(), noteBody.getText());\n\n notesToAdd.add(note);\n\n broadcast(\"Note successfully added!\");\n }", "public void addNote(){\n Note note = new Note(this.name, Main.getDataBase().getNextNoteID());\n\n this.notes.add(note);\n this.listView.getItems().add(0, note);\n // add to current NoteBox listView\n Main.getNoteBoxAreaObj().replaceListView(this.listView);\n Main.setMessage(\"New note added\", false);\n }", "public void addNote(Note note){\n \t\tnotes.add(note);\n \t}", "void addNote(NoteModel newNote);", "MusicPieceModel addNote(Note note);", "public void addNotes(String note){\n\t\tif (this.meetingNotes == null){\n\t\t\tthis.meetingNotes = note;\n\t\t} else {\n\t\t\tthis.meetingNotes += \", \" + note;\t\t\n\t\t}\n\t}", "void addLocation(String location);", "public void addNote(Note n){\n notes.add(n);\n }", "void add(Note note);", "public Note insertNote(Note note);", "void addNote(int duration, int octave, int beatNum, String pitch)\n throws IllegalArgumentException;", "public void addNote(Note note) {\n values = putValues(note);\n openDatabase();\n insert(MySQLiteOpenHelper.NOTE, null, values);\n insertToQueue(MySQLiteOpenHelper.QUEUE_REQUEST_TYPE_ADD, values);\n closeDatabase();\n MyLog.log(\"SQLiteManager: Note added. nid: \" + values.getAsString(MySQLiteOpenHelper.SQL_NOTE_ID));\n }", "public void addNoteFromFile(Note note){\n this.notes.add(note);\n this.listView.getItems().add(note);\n }", "public void add(StaffNote n) {\r\n notes.add(n);\r\n }", "public void labelNote(Note note) {\n _labeledNotes.add(note);\n revalidate();\n repaint();\n }", "public void noteLocation ()\r\n\t{\r\n\t\tm_commentPromptPanel.setVisible (!m_commentPromptPanel.isVisible ());\r\n\t\tif (m_commentPromptPanel.isVisible ())\r\n\t\t{\r\n\t\t\tm_commentPromptPanel.requestFocusInCommentField ();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.requestFocusOnCanvas ();\r\n\t\t}\r\n\t\tm_commentPromptPanel.notifyObservers (GeopodEventId.ADDNOTE_BUTTON_STATE_CHANGED);\r\n\t}", "@Test\n public void addNote() {\n this.sc1.addNote(p3);\n assertEquals(4, this.sc1.getNotes().size());\n assertEquals(\"E1 E2 F#3 F#3 \", this.sc1.toString());\n }", "private void note(String note) {\n env.getMessager().printMessage(Diagnostic.Kind.NOTE, note);\n }", "public void add(Location location)\n {\n LocationOverlayItem loi = new LocationOverlayItem(location);\n add(loi);\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the target space to which this card directs the player to go.
public Space getTarget() { return target; }
[ "public Node getTargetSpace()\n {\n return _targetSpace;\n }", "public double getTargetDistance ()\r\n {\r\n\treturn targetDistance;\r\n }", "int getTargetPos();", "public Movable getTarget() {\n\t\treturn target;\n\t}", "public int getTargetPos() {\n return targetPos_;\n }", "public int getTargetPos() {\n return targetPos_;\n }", "public int[] getTarget() {\n int[] wakaLocation = game.waka.getLocation();\n int wakaDirection = game.waka.getCurrentDirection();\n\n // get grid position two cells ahead of waka\n int[] twoAheadWaka = changePosition(wakaLocation[0], wakaLocation[1], 2*16, wakaDirection);\n int[] arbitraryChaserLocation = game.getAChaserLocation();\n // if a chaser has not existed, target waka\n if (arbitraryChaserLocation == null) {\n return wakaLocation;\n }\n\n // get vector length\n int xDiff = arbitraryChaserLocation[0] - twoAheadWaka[0];\n int yDiff = arbitraryChaserLocation[1] - twoAheadWaka[1];\n // double vector and get new target\n int[] target = {twoAheadWaka[0] - (2*xDiff), twoAheadWaka[1] - (2*yDiff)};\n return snapToMap(target);\n }", "public Position getTargetPosition() {\n\t\treturn targetPosition;\n\t}", "public int getTarget() {\n return target_;\n }", "double getDistanceToTarget();", "public Point getTarget() {\n\t\treturn _target;\n\t}", "private CGPoint getTargetAnchorForMargin(CGPoint targetPosition) {\n\t\tthis.findOppositePointOnCamera(targetPosition, this.currentOpposite);\n\t\treturn this.currentOpposite;\n\t}", "public Mob getTarget() {\r\n return target.get();\r\n }", "private Position target(Engine.Direction d) {\n switch(d) {\n case UP: return new Position(player.x, player.y + 1);\n case RIGHT: return new Position(player.x + 1, player.y);\n case DOWN: return new Position(player.x, player.y - 1);\n case LEFT: return new Position(player.x - 1, player.y);\n default: return player;\n }\n }", "int getTarget();", "public Space askWhichSpace() {\n\t\tdo{\n\t\t\thandlers.get(currentPlayer).send(\"Enter which space you want to go into [coinSpace / servantSpace / mixedSpace / privilegesSpace / councilPalace / productionSpace / harvestSpace]\");\n\t\t\tString chosenSpace = handlers.get(currentPlayer).receive();\n\t\t\t\n\t\t\tif(\"coinspace\".equalsIgnoreCase(chosenSpace)){\n\t\t\t\treturn gameModel.getGameBoard().getCoinSpace();\n\t\t\t}\n\t\t\tif(\"servantspace\".equalsIgnoreCase(chosenSpace)){\n\t\t\t\treturn gameModel.getGameBoard().getServantSpace();\n\t\t\t}\n\t\t\tif(\"mixedspace\".equalsIgnoreCase(chosenSpace)){\n\t\t\t\treturn gameModel.getGameBoard().getMixedSpace();\n\t\t\t}\n\t\t\tif(\"privilegesspace\".equalsIgnoreCase(chosenSpace)){\n\t\t\t\treturn gameModel.getGameBoard().getPrivilegesSpace();\n\t\t\t}\n\t\t\tif(\"councilpalace\".equalsIgnoreCase(chosenSpace)){\n\t\t\t\treturn gameModel.getGameBoard().getCouncilPalace();\n\t\t\t}\n\t\t\tif(\"productionspace\".equalsIgnoreCase(chosenSpace)){\n\t\t\t\treturn gameModel.getGameBoard().getProductionSpace();\n\t\t\t}\n\t\t\tif(\"harvestspace\".equalsIgnoreCase(chosenSpace)){\n\t\t\t\treturn gameModel.getGameBoard().getHarvestSpace();\n\t\t\t}\n\t\t\telse{\n\t\t\t\thandlers.get(currentPlayer).send(\"Not valid input!\");\n\t\t\t}\n\t\t}while(true);\n\t}", "public String getTargetBoard(){\r\n\t\treturn getString(KEY_TARGET_BOARD);\r\n\t}", "public Space getSpace() {\r\n\t\treturn this.space;\r\n\t}", "public int getTargetShard() {\n return targetShard;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
args = [sound] OR [x] [y] [z]
private boolean sound(CommandSender sender, String[] args) { if (args.length < 1 || args.length > 3) return false; if (args.length == 1) { //args = [sound] if (!sender.hasPermission("just.sound.play")) { sendNoPerm(sender); return true; } if (!isPlayer(sender)) { sender.sendMessage("Only players can do this!"); return true; } if (soundExist(sender, args[0])) ((Player) sender).getWorld().playSound( ((Player) sender).getLocation(), Sound.valueOf(args[0]), 10F, 1F); return true; } else if (args.length == 2) { //args = [sound] <player> if (!sender.hasPermission("just.sound.play.other") && !isCommandBlock(sender)) { sendNoPerm(sender); return true; } if (soundExist(sender, args[0])) getServer().getPlayer(args[1]).playSound( getServer().getPlayer(args[1]).getLocation(), Sound.valueOf(args[0]), 10F, 1F); return true; } else if (args.length == 3) { if (!sender.hasPermission("just.sound.play.other") && !isCommandBlock(sender)) { sendNoPerm(sender); return true; } if (soundExist(sender, args[0])) getServer().getPlayer(args[1]).playSound( getServer().getPlayer(args[1]).getLocation(), Sound.valueOf(args[0]), 10F, 1F); return true; } return false; }
[ "public abstract String play(SoundLibrary library, String... sound);", "public native static void setSoundEffect(Object oper1, java.util.List oper2);", "public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ);", "public static void main(String[] args) {\n double[] piano = StdAudio.read(\"piano.wav\");\n double[] beatbox = StdAudio.read(\"beatbox.wav\");\n double[] cow = StdAudio.read(\"cow.wav\");\n double[] singer = StdAudio.read(\"singer.wav\");\n double[] chimes = StdAudio.read(\"chimes.wav\");\n\n piano = AudioCollage.amplify(piano, 0.75);\n piano = AudioCollage.changeSpeed(piano, 0.9);\n beatbox = AudioCollage.reverse(beatbox);\n beatbox = AudioCollage.changeSpeed(beatbox, 0.25);\n singer = AudioCollage.amplify(singer, 0.5);\n singer = AudioCollage.changeSpeed(singer, 1.2);\n cow = AudioCollage.changeSpeed(cow, 3.5);\n double[] main = AudioCollage.mix(piano, chimes);\n main = AudioCollage.merge(main, AudioCollage.mix(beatbox, singer));\n main = AudioCollage.merge(main, cow);\n StdAudio.play(main);\n }", "private static Sound searchSound(String... soundKeys) {\n for (String soundKey : soundKeys) {\n // Maybe be a little bit trick, but its the fatest way of checking for equality\n try {\n return Sound.valueOf(soundKey);\n } catch (IllegalArgumentException ignored) {\n // Not catched\n }\n }\n\n return null;\n }", "abstract String getSound();", "public static void main(String[] args) throws IOException {\n InputStream mp3 = new FileInputStream(args[0]);\n\n List<byte[]> blocks = new ArrayList<byte[]>();\n SoundStreamHead head = MP3Helper.streamingBlocks(mp3, 30, blocks);\n\n Movie movie = new Movie();\n movie.setFrameRate(30);\n\n Frame f = movie.appendFrame();\n f.setSoundHeader(head);\n\n for (Iterator<byte[]> i = blocks.iterator(); i.hasNext();) {\n byte[] data = i.next();\n f.setSoundData(data);\n f = movie.appendFrame();\n }\n\n movie.write(args[1]);\n }", "String getSound(int index);", "String getSound(String name);", "public static void main(String args[]) throws Exception\r\n {\n File f=new File(\"song.mp3\");\r\n\r\n\r\n // Create a Player object that realizes the audio\r\n final Player p=Manager.createRealizedPlayer(f.toURI().toURL());\r\n\r\n\r\n // Start the music\r\n p.start();\r\n\r\n\r\n // Create a Scanner object for taking input from cmd\r\n Scanner s=new Scanner(System.in);\r\n\r\n\r\n // Read a line and store it in st\r\n String st=s.nextLine();\r\n\r\n\r\n // If user types 's', stop the audio\r\n if(st.equals(\"s\"))\r\n {\r\n p.stop();\r\n }\r\n }", "public void playSoundEffect(GameActionEvent event);", "private void hitsound(){\n if (soundEffects)\n hit.start();\n }", "public abstract void playAffirmativeSound();", "void playSound(@Nullable PlayerEntity player, BlockPos pos, SoundEvent soundIn, SoundCategory category, float volume, float pitch);", "public String getSound();", "public static void main(String[] args) throws InterruptedException {\n new Sound().play(\"C:\\\\Documents and Settings\\\\Rodrigo Kuroda\\\\Desktop\\\\vida.mid\");\n // new Sound().play(\"C:\\\\Documents and Settings\\\\Rodrigo Kuroda\\\\Desktop\\\\test.wav\");\n //new Sound().play(\"C:\\\\Documents and Settings\\\\Rodrigo Kuroda\\\\Desktop\\\\music2.mid\");\n //Sound.play(\"C:\\\\Documents and Settings\\\\Rodrigo Kuroda\\\\Desktop\\\\sms.mp3\");\n //System.out.println(Sound.getVolume());\n\n }", "@Test\r\n\tpublic void testPlayMultiplelayers(){\r\n\t\tarray = new byte[3][];\r\n\t\tarray[0] = singleNote;\r\n\t\tarray[1] = multiNotes;\r\n\t\tarray[2] = maximum1Layer;\r\n\t\tplayer.play(array); \r\n\t}", "@Test\r\n\tpublic void testPlayDifferentInstrument(){\r\n\t\tarray = new byte[1][];\r\n\t\tarray[0] = differentInstrument;\r\n\t\tplayer.play(array); \r\n\t}", "public abstract String getAttackSound();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The NDB ID that this entry replaced.
public StrColumn getReplacedEntryId() { return delegate.getColumn("replaced_entry_id", DelegatingStrColumn::new); }
[ "public Integer getnId() {\n return nId;\n }", "public Long getnId() {\n return nId;\n }", "public Integer getrId() {\n return rId;\n }", "java.lang.String getEntryId();", "public String getIdNumber() {\n return id_number;\n }", "public String getEntryID() {\r\n\r\n\t\treturn getStringProperty(\"EntryID\");\r\n\t}", "private long getIDnumber() {\n\t\treturn IDnumber;\n\t}", "public String getId() {\n\t\tif (entry != null)\n\t\t\treturn entry.getId();\n\t\telse {\n\t\t\t//FormatStatic.printXML((DomRepresentation)this.getRepresentation());\n\t\t\tElement idEl = (Element) doc.getElementsByTagNameNS(FormatStatic.ATOM_NAMESPACE, \"id\").item(0);\n\t\t\treturn idEl.getTextContent();\n\t\t}\n\t}", "java.lang.String getID();", "public int getID()\n\t{\n\t\treturn m_nNodeID;\n\t}", "public String getId_number() {\n\t\treturn id_number;\n\t}", "public String getIDNumber( ) {\n\t\treturn idNumber;\n\t}", "public String getUniqueId() {\n return getCurrentInstance().getViewRoot().createUniqueId();\n }", "public int getId() {\n return GATEID;\n }", "@Override\n\tpublic long getId() {\n\t\treturn _contentupdate.getId();\n\t}", "public StrColumn getDatabaseId() {\n return new DelegatingStrColumn(parentBlock.getColumn(\"database_related_database_id\"));\n }", "public String getID() {\n return id == null ? (id = toID(descriptor.getName())) : id;\n }", "public long getIdRef() {\n\t\treturn this.idRef;\n\t}", "@Override\n public Integer getUniqueIdentificator() {\n return id;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prompts user for a member number (Functionality shared with ProviderInterface)
private String promptForMemberNumber() { Scanner myObj = new Scanner(System.in); // Create a Scanner object System.out.print("Please enter the member number: "); String memberNumber = myObj.nextLine(); // Read user input // Format handling if (memberNumber.length() > 9) { System.out.println("Member number is too long!"); return promptForMemberNumber(); } else if (memberNumber.length() < 9) { System.out.println("Member number is too short!"); return promptForMemberNumber(); } else { for (int i = 0; i < 9; i++) { if (!(Character.isDigit(memberNumber.charAt(i)))) { System.out.println("Member number contains non numeric characters!"); return promptForMemberNumber(); } } } return memberNumber; }
[ "private String promptForProviderNumber() {\n\t\tScanner myObj = new Scanner(System.in); // Create a Scanner object\n\t\tSystem.out.print(\"Please enter the Provider Number: \");\n\t\tString providerNumber = myObj.nextLine(); // Read user input\n\n\t\t// Format handling\n\t\tif (providerNumber.length() > 9) {\n\t\t\tSystem.out.println(\"Provider Number is too long!\");\n\t\t\tpromptForProviderNumber();\n\t\t} else if (providerNumber.length() < 9) {\n\t\t\tSystem.out.println(\"Provider Number is too short!\");\n\t\t\tpromptForProviderNumber();\n\t\t} else {\n\t\t\tfor (int i = 0; i < 9; i++) {\n\t\t\t\tif (!(Character.isDigit(providerNumber.charAt(i)))) {\n\t\t\t\t\tSystem.out.println(\"Provider Number contains non numeric characters!\");\n\t\t\t\t\tpromptForProviderNumber();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn providerNumber;\n\t}", "private void updateMember() {\n\n\t\tString memberNumber = promptForMemberNumber();\n\t\tif (!verifyMember(memberNumber))\n\t\t\treturn;\n\t\tString memberName = promptForName();\n\t\tString memberStreetAddress = promptForStreetAddress();\n\t\tString memberCity = promptForCity();\n\t\tString memberState = promptForState();\n\t\tString memberZip = promptForZip();\n\n\t\tthis.operatorController.updateMember(memberNumber, memberName, memberStreetAddress, memberCity, memberState,\n\t\t\t\tmemberZip);\n\t}", "private void promptForTotalNumberPlayers(){\n theView.printToUser(\"How many players will be playing?\");\n try {\n //get the number of players from the user\n int tempTotalPlayers = Integer.parseInt(theModel.getUserInput());\n if(tempTotalPlayers > 1) {\n //set the total number of players in the model\n theModel.setNumberOfPlayers(tempTotalPlayers);\n }else{\n theView.printToUser(\"Please check entry and try again.\");\n promptForTotalNumberPlayers();\n }\n\n }catch(NumberFormatException e){\n //error parsing string to int, try again\n theView.printToUser(\"Please check entry and try again.\");\n promptForTotalNumberPlayers();\n }\n }", "String promptForCruiserNumber();", "private void promptForNumberOfTeams(){\n //ask for number of players\n theView.printToUser(\"How many teams need to be created?\");\n String tempStringTeams = theModel.getUserInput(); //store number of teams from user\n //send value to be verified\n if (theModel.validateTeams(tempStringTeams) && theModel.verifyInteger(tempStringTeams) > 1){\n //number of teams is valid, do nothing (number of teams has been set inside the model)\n }else{\n //invalid number of teams, try again\n theView.printToUser(\"Invalid number of teams, please try again.\");\n promptForNumberOfTeams();\n }\n }", "private static void vipMemberMenu(){\n Date newDate = new Date();\n Control.userlogins.get(userName).add(newDate);\n System.out.println(\"This is the vip member menu\");\n int selection = 0;\n while (selection != 7) {\n System.out.printf(\"%1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n\",\n \"Enter a number between 1 and 7 to select what you wish to do\",\n \"\",\n \"1: Edit account\",\n \"2: View login history\",\n \"3: View loan history\",\n \"4: Reserve stock item\",\n \"5: Search catalogue\",\n \"6: Return item\",\n \"7: Logout\",\n \"\");\n\n userInput = input.nextLine();\n selection = val.menuValidate(userInput);\n\n vipMemberChoice(selection);\n ser.Serialization();\n }\n\n }", "public void getNumberFromUser(){\r\n\t\tSystem.out.println(\"enter a value\");\r\n\t\tthis.numberOfPrimes = input.nextInt();\r\n\t\tthis.primes = new int[numberOfPrimes];\r\n\t}", "public Player promptForPlayer() {\n\n int playersNumber = 0;\n do {\n String playersNumberAsString = promptForInput(\"\\nChoose the player by entering his number: \");\n try {\n playersNumber = Integer.parseInt(playersNumberAsString);\n } catch (NumberFormatException nfe) {\n System.out.println(\"Please, enter a whole number!\");\n }\n // check if a number is within the proper range\n if (playersNumber <= 0 || playersNumber > mPlayers.getPlayers().size()) {\n System.out.printf(\"Please, enter a number within the range of 1 to %d.%n\", mPlayers.getPlayers().size());\n }\n } while (playersNumber <= 0 || playersNumber > mPlayers.getPlayers().size());\n\n\n return mPlayers.getPlayers().get(playersNumber - 1);\n }", "public void promptAttendeeID(){\n System.out.println(\"Please enter attendee ID\");\n }", "private void deleteMember()\r\n\t{\r\n\t\tui.message(\"\\tDelete a Member\\n\\n\");\r\n\t\t\r\n\t\t//get member number\r\n\t\tlong number = ui.promptForLong(\"Member number: \");\r\n\t\t\r\n\t\t//search for member in collection\r\n\t\tMember aMember = members.find(number);\r\n\t\t\r\n\t\tif (aMember != null)\r\n\t\t{\r\n\t\t\t//display member\r\n\t\t\tui.message(\"Current Member Details: \\n\" \r\n\t\t\t + aMember.toFormattedString() + \"\\n\" );\r\n\t\t\t \r\n\t\t\t//confirm deletion\r\n\t\t\tString answer = ui.promptForString\r\n\t\t\t (\"Are you sure you want to delete this member? (Y)es or (N)o: \");\r\n\t\t\tif (answer != null && answer.length() >= 1)\t\t\t\r\n\t\t\t\tif (Character.toUpperCase(answer.charAt(0)) == 'Y')\r\n\t\t\t\t{\r\n\t\t\t\t\t//delete member from collection\r\n\t\t\t\t\tmembers.delete(number);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//display acknowledgment\r\n\t\t\t\t\tui.message(\"The member has been deleted.\\n\");\r\n\t\t\t\t}\r\n\t\t\t\telse ui.message(\"The member has not been deleted.\\n\");\r\n\t\t\telse ui.message(\"The member has not been deleted.\\n\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tui.errorMessage(\"Member number \" + number + \" cannot be found.\\n\");\t\t\t\r\n\r\n\t}", "public void setMemberID(String memberID){ this.memberID=memberID; }", "public int inputNumber()\n {\n \tString input = JOptionPane.showInputDialog(thisSimulator.getFieldPanel(), \"Please enter player number\",\n\t\t\t\t\t\t \"Player Number\", JOptionPane.INFORMATION_MESSAGE);\n\n \t// a player's number can be 0, which means he doesn't have a number\n \tif(input == null)\n\t {\n\t\treturn(0);\n\t }\n\n \ttry\n\t {\n \t\tuserNumber = Integer.parseInt(input);\t\n\t }\n \tcatch(NumberFormatException e)\n\t {\n \t\tJOptionPane.showMessageDialog(thisSimulator.getFieldPanel(), \"You must enter an integer!\",\n\t\t\t\t\t \"Invalid Number Format\", JOptionPane.ERROR_MESSAGE);\n \t\tinputNumber();\n\t }\n\n \treturn(userNumber);\n }", "public void promptForRoomID(){\n System.out.println(\"Please enter roomID:\");\n }", "public void idInput()\n {\n idNumber = JOptionPane.showInputDialog(\"Your ID number must have 4 Integer Number.\\nEnter your ID number: \"); \n idNum = Integer.parseInt(idNumber); \n\n }", "private static void memberMenu(){\n Date newDate = new Date();\n Control.userlogins.get(userName).add(newDate);\n System.out.println(\"This is the member menu\");\n int selection = 0;\n while (selection != 7) {\n System.out.printf(\"%1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n %1s %n\",\n \"Enter a number between 1 and 7 to select what you wish to do\",\n \"\",\n \"1: Edit account\",\n \"2: View login history\",\n \"3: View loan history\",\n \"4: Reserve stock item\",\n \"5: Search catalogue\",\n \"6: Return item\",\n \"7: Logout\",\n \"\");\n\n userInput = input.nextLine();\n selection = val.menuValidate(userInput);\n\n memberChoice(selection);\n ser.Serialization();\n }\n }", "public void askForSpeaker(){\n System.out.println(\"Enter the speaker username\");\n }", "private void inputNum(Player player) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Игрок \" + player.getName() + \" выбирает число\");\n player.setNum(scanner.nextInt());\n }", "public int askHowManyUsers() {\r\n\t\tint userAmount = 0;\r\n\t\tboolean correctInput = false;\r\n\r\n\t\twhile (correctInput == false) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"How many players would like to participate in the game?\\nPlease type 1,2,3 or 4. If you type 1 a virtual user will automatically be created. Otherwise have fun playing with your human friends!\");\r\n\t\t\ttry {\r\n\t\t\t\tuserAmount = input.nextInt();\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tif (userAmount == 1 || userAmount == 2 || userAmount == 3 || userAmount == 4 || userAmount == 5) {\r\n\t\t\t\t\tcorrectInput = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (userAmount > 5) {\r\n\t\t\t\t\t\tSystem.out.println(\"Five players is the maximum!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (userAmount == 0) {\r\n\t\t\t\t\t\tSystem.out.println(\"At least one person should play!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\tSystem.out.println(\"Please type a number\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn userAmount;\r\n\t}", "String promptForSubmarineNumber();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'ALLOW_MTM_TO_RUN' field has been set.
public boolean hasALLOWMTMTORUN() { return fieldSetFlags()[11]; }
[ "public java.lang.CharSequence getALLOWMTMTORUN() {\n return ALLOW_MTM_TO_RUN;\n }", "public java.lang.CharSequence getALLOWMTMTORUN() {\n return ALLOW_MTM_TO_RUN;\n }", "public void setALLOWMTMTORUN(java.lang.CharSequence value) {\n this.ALLOW_MTM_TO_RUN = value;\n }", "public boolean isSetWm() {\n return this.wm != null;\n }", "public boolean checkRunCondition() {\n return getTime() < endTime || runningProcesses > 0;\n }", "public boolean hasValidToMillis() {\n return fieldSetFlags()[5];\n }", "public boolean isRunEnabled() {\n\t\treturn methods.settings.getSetting(173) == 1;\n\t}", "public boolean isSetM() {\n return this.m != null;\n }", "public boolean isSetUpdateTimeLimitMs() {\n return EncodingUtils.testBit(__isset_bitfield, __UPDATETIMELIMITMS_ISSET_ID);\n }", "public boolean isSetNextWorldModelTimeEstimateMs() {\n return EncodingUtils.testBit(__isset_bitfield, __NEXTWORLDMODELTIMEESTIMATEMS_ISSET_ID);\n }", "private boolean checkRunningMotors()\n {\n if (getOverrideValidation())\n {\n return true;\n }\n int num = 0;\n for (int x = 0; x < motorsRunning.length; ++x)\n {\n if (motorsRunning[x])\n {\n ++num;\n }\n }\n if (num > 2)\n {\n error(\"You may not run more than two motors at any given time!\", \"RXTXRobot\", \"checkRunningMotors\");\n return false;\n }\n return true;\n }", "public boolean hasValidFromMillis() {\n return fieldSetFlags()[4];\n }", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setALLOWMTMTORUN(java.lang.CharSequence value) {\n validate(fields()[11], value);\n this.ALLOW_MTM_TO_RUN = value;\n fieldSetFlags()[11] = true;\n return this;\n }", "public boolean isSetTimeUsedMs() {\n return EncodingUtils.testBit(__isset_bitfield, __TIMEUSEDMS_ISSET_ID);\n }", "public boolean checkValid() {\n\t\t// Check if the meld is too small\n\t\tif (meldTiles.size() < 3) {\n\t\t\treturn false;\n\t\t}\n\t\t// Check if it is either a valid group or run\n\t\telse if(!this.checkGroup() && !this.checkRun()){\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean canRun() {\n\t\treturn taskState == TaskState.SCHEDULED;\n\t}", "public boolean hasMTSYSTEM() {\n return fieldSetFlags()[7];\n }", "boolean isSetRunAs();", "public boolean isSetWallTimeLimit() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WALLTIMELIMIT_ISSET_ID);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets text in search bar without activating onTextChangeListener
public void setTextWithoutActivatingTextWatcher(String text) { searchEdit.removeTextChangedListener(this.textWatcher); searchEdit.setText(text); searchEdit.addTextChangedListener(this.textWatcher); }
[ "public void setTextOnSearchBar(String text) {\n elementControl.clear(searchBar);\n elementControl.setText(searchBar, text);\n }", "private void setSearchTxtListener() {\n mSearchTxt.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n mSearchBtn.setText(R.string.search);\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n if (TextUtils.isEmpty(mSearchTxt.getText()))\n mSearchBtn.setText(getString(R.string.around_me));\n }\n });\n }", "@Override\n public void onSearchTermChanged() {\n }", "@Override\n public void onSearchTermChanged(String term) {\n }", "@Override\n public void setResultsTextView(String text) {\n mSearchResultsTextView.setText(text);\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n // Called when the action bar search text has changed. Update\n // the search filter, and restart the loader to do a new query\n // with this filter.\n mCurFilter = !TextUtils.isEmpty(newText) ? newText : null;\n Log.d(tag,\"Restarting the loader\");\n getLoaderManager().restartLoader(0, null, this);\n return true;\n }", "public void setSearchText(String searchText) {\n this.searchText = searchText == null ? null : searchText.trim();\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n getCategoryName = searchBarCategory.getText();\n seeSearchCategory(getCategoryName);\n }", "private void setSearchPanel() {\n\t\tsearchET = (EditText) findViewById(R.id.searchET);\n\t\tImageButton searchBtn = (ImageButton) findViewById(R.id.searchBtn);\n\t\tsearchBtn.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n mAdapter.getFilter().filter(searchET.getText());\n }\n });\n\n\t\tsearchET.setOnEditorActionListener(new OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId,\n KeyEvent event) {\n boolean handled = false;\n if (actionId == EditorInfo.IME_ACTION_SEARCH) {\n mAdapter.getFilter().filter(searchET.getText());\n handled = true;\n }\n return handled;\n }\n });\n\n\t}", "protected void setSearchView() {\n if (getSearchViewClear() != null) {\n Dynamic.setTooltip(getSearchViewClear());\n\n getSearchViewClear().setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (getSearchViewEditText() != null) {\n getSearchViewEditText().getText().clear();\n }\n }\n });\n }\n\n if (getSearchViewEditText() != null) {\n getSearchViewEditText().addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) { }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setSearchViewClearButton();\n }\n\n @Override\n public void afterTextChanged(Editable s) { }\n });\n }\n\n setSearchViewClearButton();\n }", "private void initSearchBar(View root){\n initNameList();\n\n autoCompleteTextView = root.findViewById(R.id.autoCompleteTextView);\n ArrayAdapter<String> recipeAdapter = new ArrayAdapter<>(getContext(),\n android.R.layout.simple_list_item_1, recipeNameList);\n autoCompleteTextView.setAdapter(recipeAdapter);\n\n autoCompleteTextView.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n updateRecipeList(s.toString());\n System.out.println(\"onTextChanged\");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n updateRecipeList(s.toString());\n System.out.println(\"afterTextChanged\");\n }\n });\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n if (collapsingSearchView) {\n collapsingSearchView = false;\n return true;\n }\n\n if (newText.isEmpty()) {\n Utils.removeSettingsValue(key);\n\n searchTermOrCvID = null;\n searchView.setSubmitButtonEnabled(false);\n } else {\n\n searchTermOrCvID = newText;\n searchView.setSubmitButtonEnabled(true);\n }\n\n return true;\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n List<String> suggest = new ArrayList<>();\n for (String search : suggestList) {\n if (search.toLowerCase().contains(searchBar.getText().toLowerCase()))\n suggest.add(search);\n }\n searchBar.setLastSuggestions(suggest);\n }", "public void acceptSearchText() {\n // Accepting search text is only possible if currently searching through\n // commands alone. Once command has been accepted, cannot accept arguments\n // because these will be replaced by custom values from the user.\n if (inputPredictor.isCommandFound) {\n return;\n }\n\n String newText = leftText.getText() + rightText.getText() + searchText.getText();\n leftText.setText(newText);\n rightText.setText(\"\");\n // Empty searchText since it has been with normalText.\n searchText.setText(\"\");\n\n // Reset internal search parameters since the search will now move onto\n // searching for arguments for the input command.\n inputPredictor.reset();\n\n // This will now search for the possible arguments for the currently accepted\n // full command.\n String searchResultText = inputPredictor.getPrediction(newText, 0);\n searchText.setText(searchResultText);\n\n // Update inputField\n textFlow.getChildren().setAll(leftText, caretText, rightText, searchText);\n }", "private void initSearchBar(View root){\n initNameList();\n\n autoCompleteTextView = root.findViewById(R.id.autoCompleteTextView);\n ArrayAdapter<String> ingredientAdapter = new ArrayAdapter<>(getContext(),\n android.R.layout.simple_list_item_1, ingredientNameList);\n autoCompleteTextView.setAdapter(ingredientAdapter);\n\n autoCompleteTextView.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n updateIngredientList(s.toString());\n System.out.println(\"onTextChanged\");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n updateIngredientList(s.toString());\n System.out.println(\"afterTextChanged\");\n }\n });\n }", "void setKeywordSearch();", "public final void setSearchInput(MatTextBox textBox) {\n\t\tsearchInput = textBox;\n\t}", "void setEditListener() {\n binding.editSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if (actionId == EditorInfo.IME_ACTION_SEARCH) {\n onSearchPerformed(binding.editSearch.getText().toString());\n return true;\n }\n return false;\n }\n });\n binding.editSearch.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(@NonNull CharSequence s, int start, int before, int count) {\n //perform search operation\n // mAdapter.updateSearchData(filter(list_data, s.toString()));\n binding.setVariable(BR.isTyping, s.length() > 0);\n if (TextUtils.isEmpty(s)) {\n contentListViewModel.disposeDisposable();\n mAdapter.updateSearchData(new ArrayList<>());\n expandAnimation(0);\n } else {\n contentListViewModel.searchTagList(s.toString().replaceAll(\"#\", \"\").toLowerCase());\n }\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n }", "private void setWatcher(EditText searchInput){\n searchInput.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n updateAdapter(s.toString());\n }\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the value of the database column jia_order_cupboarddetailtb.modify_user
public String getModifyUser() { return modifyUser; }
[ "public Integer getModifyUser() {\n return modifyUser;\n }", "public Integer getModifyUserNo() {\n return modifyUserNo;\n }", "public String getModifyUserId() {\n return modifyUserId;\n }", "public java.lang.Integer getModifyuserno () {\n\t\treturn modifyuserno;\n\t}", "public Short getModifyUserIdentity() {\n return modifyUserIdentity;\n }", "public Long getModifieduser() {\n return modifieduser;\n }", "public Long getSdetBuserModify() {\n\t return sdetBuserModify;\n\t }", "public Integer getModifiedUser() {\n\t\treturn modifiedUser;\n\t}", "public String getModifyUserCode() {\n\t\treturn modifyUserCode;\n\t}", "public String getUserEdit() {\r\n\t\treturn userEdit;\r\n\t}", "@Override\n\tpublic long getModifieduser() {\n\t\treturn _ext_information.getModifieduser();\n\t}", "@Override\n\tpublic java.lang.String getModificationUser() {\n\t\treturn _formItem.getModificationUser();\n\t}", "public Long getModifiedUser() {\n\t\treturn modifiedUser;\n\t}", "public int getModifiedUserId() {\n return modifiedUserId;\n }", "public T getModifierUser() {\n return this.modifierUser;\n }", "public Long getModifyby() {\n return modifyby;\n }", "public Integer getModifiedUserId() {\n return this.modifiedUserId;\n }", "public Long getSeriBuserModify() {\n return seriBuserModify;\n }", "public String getDataUpdateUser() {\n return dataUpdateUser;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the fedora server URL being used by this client instance.
public String getServerUrl() { return this.fedoraBaseUrl; }
[ "public String getServerURI() {\n return settings.getString(\"server_url\", DEFAULT_SERVER_URL);\n }", "public String getServerUrl() {\n return props.getProperty(\"url\");\n }", "public String getZookeeperUrl() {\n return zookeeper.getHost() + \":\" + zookeeper.getPort();\n }", "private URL getRemoteServerURL() {\n String remoteServer;\n URL server;\n\n try {\n if (System.getProperty(\"remoteUrl\") != null) {\n remoteServer = System.getProperty(\"remoteUrl\");\n } else {\n remoteServer = System.getenv(\"remoteUrl\");\n }\n } catch (NullPointerException e) {\n throw new IllegalArgumentException(\"Missing remote driver url, check pom file\");\n } catch (IllegalArgumentException e) {\n throw new IllegalArgumentException(\"URL can't be blank check pom file\");\n }\n\n try {\n server = new URL(remoteServer);\n } catch (MalformedURLException e) {\n throw new IllegalArgumentException(\"Malformed remote driver url check pom file for correct url\");\n }\n\n return server;\n }", "public String getURL() {\r\n String url = ConfigContext.getCurrentContextConfig().getProperty(\"oleExposedWebService.url\");\r\n return url;\r\n }", "public String getServerRelativeUrl() {\n return serverRelativeUrl;\n }", "public String getFullUrl() {\n return host + (port < 0 ? \"\" : \":\" + port);\n }", "public String getURL() {\n return properties.getProperty(\"url\" + properties.getProperty(\"currentDataBase\"));\n }", "public static String getBaseURL()\r\n {\r\n String savedUrl = P.getChoreoServicesUrl();\r\n return savedUrl.length() > 0 ? savedUrl : Config.DEFAULT_SERVER_URL;\r\n }", "public String getServerAddress()\n\t{\n\t\tString strServerAddress = null;\n\t\tPath confPath = getConfigurationHome().resolve(\"cm-client.conf\");\n\t\tstrServerAddress = CMConfigurator.getConfiguration(confPath.toString(), \"SERVER_ADDR\");\n\t\treturn strServerAddress;\n\t}", "public static String getFsnetUrl() {\n return fsneturl;\n }", "public String getAddress() {\n final DevMachineServer server = getServer(Constants.WSAGENT_REFERENCE);\n return server.getProtocol() + \"://\" + server.getAddress();\n }", "public String getConfigURL() {\n return properties.getProperty(\"URL\");\r\n }", "protected abstract String getSolrServerURI();", "public String notebookServerEndpoint() {\n return this.innerProperties() == null ? null : this.innerProperties().notebookServerEndpoint();\n }", "public static String getURL() {\n\t return getURL(BackOfficeGlobals.ENV.NIS_USE_HTTPS, BackOfficeGlobals.ENV.NIS_HOST, BackOfficeGlobals.ENV.NIS_PORT);\n\t}", "@Override\n public URI getAddress() {\n if (server == null) {\n try {\n server = createImpositions().impose(() -> {\n RatpackServer server = createServer();\n server.start();\n return server;\n });\n } catch (Exception e) {\n throw uncheck(e);\n }\n }\n\n URI address;\n try {\n address = new URI(server.getScheme() + \"://\" + server.getBindHost() + \":\" + server.getBindPort() + \"/\");\n } catch (URISyntaxException e) {\n throw uncheck(e);\n }\n\n return address;\n }", "public String getSolrServerURL()\n {\n return solrServerURL;\n }", "public String getBaseUrl() {\n StringBuffer buf = new StringBuffer();\n buf.append(getScheme());\n buf.append(\"://\");\n buf.append(getServerName());\n if ((isSecure() && getServerPort() != 443) ||\n getServerPort() != 80) {\n buf.append(\":\");\n buf.append(getServerPort());\n }\n return buf.toString();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the size of the attachment content.
public int getSize() throws SOAPException { if (dataHandler == null) { return 0; // no attachment } else { ByteArrayOutputStream perm = new ByteArrayOutputStream(); try { dataHandler.writeTo(perm); } catch (IOException e) { throw new NestedSOAPException(NestedSOAPException.MIME_PART_PROBLEM,e); //e.printStackTrace(); //return -1; } return perm.size(); } }
[ "public Long contentSize() {\n return this.contentSize;\n }", "@Schema(description = \"The size of the attachment.\")\r\n\r\n\t@Valid\r\n\r\n\tpublic Quantity getSize() {\r\n\t\treturn size;\r\n\t}", "public long getContentLength() {\n\t\tString lengthString = this.get(\"content-length\");\n\t\tif (\"\".equals(lengthString))\n\t\t\treturn 0;\n\n\t\ttry {\n\t\t\tlong length = Long.parseLong(lengthString);\n\t\t\treturn length;\n\t\t} catch (Exception e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public int getContentLength() {\n return this.contentLength;\n }", "public Integer getContentsize() {\n return contentsize;\n }", "public long contentLen() {\n String value = getFirst(\"Content-Length\");\n if (value == null) {\n return -1;\n }\n return Long.parseLong(value);\n }", "public long getSize() {\n return this.fileItem.getSize();\n }", "public Long contentLength() {\n return this.contentLength;\n }", "public long getFileSize() {\n Http.MultipartFormData.FilePart oldPart = this.getAttachmentFileItem();\n if (oldPart == null) {\n throw new RuntimeException(\"The image you are trying to resize is empty.\");\n }\n File currentFile = (File) this.getAttachmentFileItem().getFile();\n if (currentFile == null || currentFile.length() == 0) {\n throw new RuntimeException(\"The image file you are trying to resize is empty or null\");\n }\n return currentFile.length();\n }", "public int getContentLength() {\r\n if (!connected)\r\n return -1;\r\n\r\n return (int) zipEntry.getSize();\r\n }", "public long getContentLength() {\n\t\tLong contentLength = (Long) metadata.get(Headers.CONTENT_LENGTH);\n\n\t\tif (contentLength == null)\n\t\t\treturn 0;\n\t\treturn contentLength.longValue();\n\t}", "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "public String getSize() {\n return fullPhoto.getSize();\n }", "public Long getContentClaimFileSizeBytes() {\n return contentClaimFileSizeBytes;\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "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 }", "@ZAttr(id=807)\n public long getMailContentMaxSize() {\n return getLongAttr(Provisioning.A_zimbraMailContentMaxSize, 10240000L);\n }", "public long getMessageLength() {\n return _content != null ? _content.capacity() : 0;\n }", "public java.lang.String getFileSize() {\n synchronized (monitor()) {\n check_orphaned();\n\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue) get_store()\n .find_element_user(FILESIZE$2,\n 0);\n\n if (target == null) {\n return null;\n }\n\n return target.getStringValue();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }