query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
/ Drier program to test above methods
public static void main(String[] args) { FindPositionFromLast llist = new FindPositionFromLast(); llist.push(20); llist.push(4); llist.push(15); llist.push(35); llist.printList(); llist.printNthFromLast(3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "private void test() {\n\n\t}", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private test5() {\r\n\t\r\n\t}", "public static void main(String [] args) {\r\n\t\ttestOne(); //adds items to WH; tests getNumItems method & toString method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestTwo(); //tests getItem(String) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestThree(); //test getItem(Item) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFour(); //tests total cost method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFive(); //this will test the getRefrigeratedItems method\r\n\t\tSystem.out.print(\"\\n\"); \r\n\t\ttestSix(); //tests getTotalCostRefrigerated method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestSeven(); //tests remove method\r\n\t}", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public static void main (String[] args){\n\t\tincPieceCountTest();\n\t\tdecPieceCountTest();\n\t\tsetPieceTest();\n\t\tmoveTest();\n\t\tanyMoveTest();\n\t\tgetPiecesTest();\n\t\tsetPieceTest2();\n\t}", "@Override\n public void runTest() {\n }", "public void test5() {\n\t\t\n\t}", "public static void main(String arg[]) {\n System.out.println(\"testGuset(): \" + testGuset());\n System.out.println(\"testServingQueue(): \" + testServingQueue());\n System.out.println(\"testDessertSolvers(): \" + testDessertSolvers());\n testCapicity();\n }", "public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}", "@Test\n public void testDAM30601001() {\n testDAM30102001();\n }", "@Test\n public void testDAM30402001() {\n testDAM30101001();\n }", "public static void main(String[] args) {\n\t\ttestStreamMapReduce();\r\n\t\t//testMethodReference();\r\n\t}", "public static void main(String args[]) {\n\t\tSystem.out.println(\"\\r\\ngetGameSituationTest()\");\n\t\tgetGameSituationTest();\n\n\t\tSystem.out.println(\"\\r\\nstateCheckerboardConvertionTest()\");\n\t\tstateCheckerboardConvertionTest();\n\n\t\tSystem.out.println(\"\\r\\ngetValidActionsTest()\");\n\t\tgetValidActionsTest();\n\t}", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "public void TestMain(){\n SampleStatements();\n TestMyPow();\n }", "public static void main(String[] args) {\n\t\tDifferentMethods di = new DifferentMethods();\r\n\t\tdi.ReadNumber();\r\n\t\tint isEven = di.Verify();\r\n\t di.Print(isEven);\r\n\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n\n\t\t testDistance();\n\n\t\t //functionFitting();\n\t\t //testFunction();\n\t}", "public static void main(String[] args) {\n System.out.println(testLibraryParseCardBarCode());\n System.out.println(testLibraryParseRunLibrarianCheckoutBookCommand());\n System.out.println(testLibraryParseRunSubscriberReturnBookCommand());\n System.out.println(testparseBookId());\n System.out.println(testparseRunSubscriberCheckoutBookCommand());\n }", "public static void main(String[] args) {\n\t\t\n\t\tglobalTest();\n//\t\ttimeTest();\n//\t\ttestPrefixSearch();\n//\t\ttestSearch();\n//\t\ttestPrediction();\n//\t\ttestTrieSearch();\n//\t\ttestRebuid();\n//\t\ttest13();\n//\t\ttest14();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t testMid();\n\t\t testCircular();\n\t\n\t}", "public static void main (String[] args) {\n \n doTest (\"hello\");\n doTest (\"query\");\n doTest (\"Mississippi\");\n doTest (\"elephant\");\n doTest (\"Qatar\");\n System.out.println();\n \n }", "@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}", "@Test\n public void testDAM30903001() {\n testDAM30802001();\n }", "static void testCaculator(){\n }", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main(String[] args) {\n testFactorial();\n testFibonacci();\n testMissing();\n testPrime();\n\n\n }", "public void testBidu(){\n\t}", "@Override\n\tpublic void test() {\n\t\t\n\t}", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }", "public static void main(String[] args) throws Exception {\n yeepayCallBack();\n// refund();\n// URLConnectionTool.readContentFromPost(\"http://117.78.45.101:8083/pay/lycheepay/reconfileDownload\",\"startDate=20170210&endDate=20170224\",\"60000\",\"60000\");\n// testWhiteListUpload();\n// testWhiteListOneQuery();\n// testWhiteListBatcheQuery();\n// onePayRequest();\n// callBack();\n// onePayCheckBookQuery();\n// payWithRouter();\n// batchPayRequest();\n// batchPayStatQuery();\n// batchPayDetailQuery();\n }", "public static void main(String... args) throws Exception {\n //testHelloWorld();\n //testExchange();\n //testParentChild();\n //testLinking();\n //testListener();\n //testParse(\"1\");\n //testOuterInner();\n //testResourceARM();\n //testExecuteAround();\n testExecuteAroundARM();\n }", "public void test() {\n\t}", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String args[]){\n Register reg1 = new Register();\n Register reg2 = new Register();\n\n //check add transaction function\n reg1.AddTansaction(10.21);\n reg1.printDivider();\n\n //check other member functions\n reg2.AddTansaction(20.21);\n reg2.AddTansaction(-10.01);\n reg2.getTransac();\n reg2.printDivider();\n\n //check static function\n reg2.getNum();\n reg2.resetRegister();\n reg2.getNum();\n reg2.getTransac();\n\n }", "public void mainTest()\n {\n \tprintSimilarRatingsByYearAfterAndMinutes();\n }", "public static void main(String[] args) {\n\t\t \n\t\tResult result1 = JUnitCore.runClasses(TestUnitForCreate.class);\n\t for (Failure failure : result1.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result1.wasSuccessful());\n\n\t Result result2 = JUnitCore.runClasses(TestUnitForReadByCalimNumber.class);\n\t for (Failure failure : result2.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result2.wasSuccessful());\n\t \n\t Result result3 = JUnitCore.runClasses(TestUnitForReadByLossDate.class);\n\t for (Failure failure : result3.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result3.wasSuccessful());\n\t \n\t\tResult result4 = JUnitCore.runClasses(TestUnitForUpdate.class);\n\t\tfor (Failure failure : result4.getFailures()) {\n\t\t\tSystem.out.println(failure.toString());\n\t\t}\n\t\tSystem.out.println(result4.wasSuccessful());\n\t \n\t Result result5 = JUnitCore.runClasses(TestUnitForReadVehicle.class);\n\t for (Failure failure : result5.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result5.wasSuccessful());\n \n\t Result result6 = JUnitCore.runClasses(TestUnitForDelete.class);\n\t for (Failure failure : result6.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result6.wasSuccessful());\n\t \n\t}", "public static void main(String[] args) {\n\t\t\n\t\ttestQuery();\n\t\t//testInsert();\n\t\t\n\t}", "public void mo38850q() {\n }", "public static void main(String[] args) {\n ListTest lt = new ListTest();\n lt.testAdd();\n// lt.testGet();\n lt.testIterator();\n lt.testListContains();\n }", "public static void main(String[] arg) {\n testSingleLowRate();\n testSingleHighRate();\n testMarriedLowRate();\n testMarriedHighRate();\n System.out.println(doesPass ? \"PASS\" : \"FAIL\");\n }", "@Test\n public void test() throws Exception {\n// diversifiedRankingxPM2()\n diversifiedRankingxQuAD();\n }", "public static void main(String[] args) {\n\t\ttest4();\n//\t\ttest7();\n//\t\ttest8();\n//\t\ttest9();\n//\t\ttest10();\n//\t\ttest11();\n//\t\t test13() ;\n\t}", "@Test\n public void testDAM31501001() {\n //\n testDAM30201001();\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n drunkardTest(TEST_STEP_TIMES_1, TEST_STEP_SIZE_1);\n drunkardTest(TEST_STEP_TIMES_2, TEST_STEP_SIZE_2);\n\t}", "public static void main(String[] args) {\n inOrbitDestinationControllerTest();\n// inOrbitReplayControllerTest();\n\n }", "public static void main(String[] args) {\r\n\t\t// test method\r\n\t\tNewFeatures newFeatures = new NewFeatures();\r\n\t\tnewFeatures.testingArrayList();\r\n\t\tnewFeatures.testingTryCatch();\r\n\t\tnewFeatures.testingNumericValues();\r\n\t\tnewFeatures.testingSwitchWithStringStatemant();\r\n\r\n\t}", "public void testGetInsDyn() {\n }", "public static void main(String[] args) throws InterruptedException {\n signin();\n\n\n //test case 4\n searchProduct();\n //test case 5:\n //searchInvalidProduct();\n\n }", "void mo63094q();", "public static void main(String[] args) {\n\t\tdebutTest();\n\t\t\tinstancePerson();\n\t\t\tmodifier1Personne();\n\t\t\t//modifier2Personne();\n\t\t\n\t\tfinTest();\n\t}", "@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}", "public static void main(String[] args) {\n\t\tReception reception = new Reception();\n\t\treception.setBilling(billing);\n\t\treception.setBioChemLab(bioChemLab);\n\t\treception.setPathLab(pathLab);\n\t\tbioChemLab.setDispatch(dispatch);\n\t\tpathLab.setDispatch(dispatch);\n\t\t// read in the input for test requests, and send to Reception (addRequest)\n\t\tScanner input = new Scanner(System.in);\n\t\tString str = input.nextLine();\n\t\tint n = Integer.parseInt(str);\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tString s = input.nextLine();\n\t\t\treception.addRequest(s,Integer.toString(i + 1));\n\t\t}\n\n\t\tSystem.out.printf(\"Total billed: %d\\n\", Lab4B.getBilling().getTotal());\n\t\t// get all bills from Billing and print out the total for the day\n\n\t\tArrayList<String> reports = Lab4B.getDispatch().getAllResults();\n\t\tSystem.out.println(\"Reports:\");\n\t\tfor (int i = 0; i < reports.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(reports.get(i));\n\t\t}\n\t\t// get all reports from Dispatch and print out one line at a time\n\t\t// Each line will have: Patient ID, Test ID, result string\n\t\tSystem.out.println(\"Total tests:\");\n\t\tSystem.out.printf(\"BioChem: %d\\n\", Lab4B.getBioChemLab().getSize());\n\t\tSystem.out.printf(\"Path: %d\\n\", Lab4B.getPathLab().getSize());\n\t\t// get list of tests from each lab, and print out total tests per lab\n\n\t}", "protected TestBench() {}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}", "public static void main(String args[]) {\n\t\ttestFindStop();\n\t\ttestFindGene() ;\n\t\ttestAllGenes();\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n CashRegister.main(args);\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 trimsBidAndAsk() {\n }", "public void testPerformance() {\n \t}", "public static void main(String[] args)\r\n\t{\n\t\tMyStringBuilder msb;\r\n\t\tStringBuilder sb;\r\n\t\tString s;\r\n\t\t//Loop iterating 3 times testing each method for all types one by one\r\n\t\tfor(int i = 0; i < 3; i++)\r\n\t\t{\r\n\t\t\t//Initialize variables\r\n\t\t\tmsb = new MyStringBuilder(\"\");\r\n\t\t\tsb = new StringBuilder(\"\");\r\n\t\t\ts = new String(\"\");\r\n\t\t\t//Test fill, delete, and insert with each iteration of the loop respectively\r\n\t\t\tswitch(i)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tfill(msb, args[0]);\r\n\t\t\t\t\tfill(sb, args[0]);\r\n\t\t\t\t\tfill(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdelete(msb, args[0]);\r\n\t\t\t\t\tdelete(sb, args[0]);\r\n\t\t\t\t\tdelete(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tinsert(msb, args[0]);\r\n\t\t\t\t\tinsert(sb, args[0]);\r\n\t\t\t\t\tinsert(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "public static void main(String[] args) {\n MallardDuck duck = new MallardDuck();\n\n WildTurkey turkey = new WildTurkey();\n Duck turkeyAdapter = new TurkeyAdapter(turkey);\n\n System.out.println(\"Turkey:\");\n turkey.gobble();\n turkey.fly();\n\n System.out.println(\"\\nDuck:\");\n testDuck(duck);\n\n System.out.println(\"\\nTurkeyAdapter:\");\n testDuck(turkeyAdapter);\n }", "public static void main(java.lang.String[] args){\r\n\tFireDangerCal test=new FireDangerCal();\r\n\ttest.get_InputValues();\r\n\ttest.get_TableValues();\r\n\ttest.get_UserInput();\r\n\ttest.getDanger();\r\n\ttest.output_UpdatedData();\r\n\t\r\n}", "public static void main(String[] args){\n\t\ttest1();\r\n\t}", "public void testLizard(){\n }", "@Test\n public void solve1() {\n }", "@Test\n public void testDAM30103001() {\n // settings as done for testDAM30102001 are identical\n testDAM30102001();\n }", "@Test\n public void testGetThisProgramRecord() {\n System.out.println(\"getThisProgramRecord\");\n String programName = \"TestProgram\";\n String programDS = \"This is a test program\";\n PicardCommandLine instance = new PicardCommandLineImpl();\n String [] args = {};\n instance.instanceMain(args);\n SAMProgramRecord result = instance.getThisProgramRecord(programName, programDS);\n assertEquals(result.getProgramGroupId(), programName);\n assertEquals(result.getProgramName(), programName);\n assertEquals(result.getProgramVersion(), PicardCommandLine.version);\n assertEquals(result.getAttribute(\"DS\"), programDS);\n }", "public static void main(String[] args) \r\n\t{\r\n\t\tShouldGetSize();\r\n\t\tShouldFindIfContains();\r\n\t\tShouldFindRange();\r\n\t}", "public static void run()\n {\n String[] testInput = FileIO.readAsStrings(\"2020/src/day17/Day17TestInput.txt\");\n String[] realInput = FileIO.readAsStrings(\"2020/src/day17/Day17Input.txt\");\n\n Test.assertEqual(\"Day 17 - Part A - Test input\", partA(testInput), 112);\n Test.assertEqual(\"Day 17 - Part A - Challenge input\", partA(realInput), 384);\n Test.assertEqual(\"Day 17 - Part B - Test input\", partB(testInput), 848);\n Test.assertEqual(\"Day 17 - Part B - Challenge input\", partB(realInput), 2012);\n }", "public static void main (String args[]) {\n\t\tteste01();\n\t\tteste02();\n\t\tteste03();\n\t\t//teste04();\n\t}", "public static void main(String[] args) {\n\t\ttest1();\r\n\t\ttest2();\r\n\t\t\r\n\t}", "@Test\n\tpublic void test_001() {\n\t\tfinal String EXPECTED_RESPONSE = \"{\\\"hello\\\": \\\"world\\\"}\";\n\t\tJdProgramRequestParms.put(\"U$FUNZ\", new StringValue(\"URL\"));\n\t\tJdProgramRequestParms.put(\"U$METO\", new StringValue(\"HTTP\"));\n\t\tJdProgramRequestParms.put(\"U$SVARSK\", new StringValue(\"http://www.mocky.io/v2/5185415ba171ea3a00704eed\"));\n\n\t\tList<Value> responseParms = JdProgram.execute(javaSystemInterface, JdProgramRequestParms);\n\t\tassertTrue(responseParms.get(2).asString().getValue().equals(EXPECTED_RESPONSE));\n\t}", "public static void doTestCase1() {\n\tRide millennium = new Ride(\"Millennium\", 6, 4.25f);\n\tRide mcCormick = new Ride(\"McCormick Place\", 5, 3.1f);\n\tRide kensington = new Ride(\"Kensington\", 4, 2.0f);\n\tRide homewood = new Ride(\"Homewood\", 2, 0);\n\tRide roosevelt = new Ride(\"Roosevelt Rd.\", 7, 4.9f);\n\t//Make a place where tickets are sold, specifiying the\n\t//number of available passes\n\tTicketBooth booth1 = new TicketBooth(4);\n\t// Make some people by specifying their height and their\n\t//money amounts\n\tPerson billy = new Person(4.9f, 10.00f);\n\tPerson donna = new Person(3.0f, 5.00f);\n\tPerson fredy = new Person(6.0f, 0.00f);\n\tPerson harry = new Person(4.8f, 78.50f);\n\tPerson jenny = new Person(2.0f, 1.00f);\n\tPerson larry = new Person(4.0f, 50.00f);\n\t//simulate a person's interactions\n\tSystem.out.println(\"Billy is a \" + billy);\n\tif (billy.buyTickets(20, booth1))\n\t\tSystem.out.println(\"Billy just bought 20 tickets.\");\n\telse\n\t\tSystem.out.println(\"Billy did not have enough money to buy 20 tickets.\");\n\tSystem.out.println(\"Billy is going on the Millennium and Roosevelt Rd....\");\n\tbilly.getOn(millennium);\n\tbilly.getOn(roosevelt);\n\tSystem.out.println(\"Billy is now a \" + billy);\n\tSystem.out.println();\n\tSystem.out.println(\"Donna is a \" + donna);\n\tif (donna.buyPass(booth1))\n\t\tSystem.out.println(\"Donna just bought a pass.\");\n\telse\n\t\tSystem.out.println(\"Donna did not have enough money to buy a pass.\");\n\tif (donna.buyTickets(6, booth1))\n\t\tSystem.out.println(\"Donna just bought 6 tickets.\");\n\telse\n\t\tSystem.out.println(\"Donna did not have enough money to buy 6 tickets.\");\n\tSystem.out.println(\"Donna is going on the McCormick Place and Merry Go Round...\");\n\tdonna.getOn(mcCormick);\n\tdonna.getOn(homewood);\n\tSystem.out.println(\"Donna is now a \" + donna);\n\tSystem.out.println();\n\tSystem.out.println(\"Fredy is a \" + fredy);\n\tif (fredy.buyTickets(5, booth1))\n\t\tSystem.out.println(\"Fredy just bought 5 tickets.\");\n\telse\n\t\tSystem.out.println(\"Fredy did not have enough money to buy 5 tickets.\");\n\tSystem.out.println(\"Fredy is going on the Merry Go Round...\");\n\tfredy.getOn(homewood);\n\tSystem.out.println(\"Fredy is now a \" + fredy);\n\tSystem.out.println();\n\tSystem.out.println(\"Harry is a \" + harry);\n\tif (harry.buyTickets(10, booth1))\n\t\tSystem.out.println(\"Harry just bought 10 tickets.\");\n\telse\n\t\tSystem.out.println(\"Harry did not have enough money to buy 10 tickets.\");\n\tif (harry.buyPass(booth1))\n\t\tSystem.out.println(\"Harry just bought a pass.\");\n\telse\n\t\tSystem.out.println(\"Harry did not have enough money to buy a pass.\");\n\tSystem.out.println(\"Harry is going on the Millennium twice and the Roosevelt Rd. Once...\");\n\tharry.getOn(millennium);\n\tharry.getOn(roosevelt);\n\tharry.getOn(millennium);\n\tSystem.out.println(\"Harry is now a \" + harry);\n\tSystem.out.println();\n\tSystem.out.println(\"Larry is a \" + larry);\n\tif (larry.buyTickets(15, booth1))\n\t\tSystem.out.println(\"Larry just bought 15 tickets.\");\n\telse\n\t\tSystem.out.println(\"Larry did not have enough money to buy 15 tickets.\");\n\tSystem.out.println(\"Larry is going on the Roosevelt Rd., Millennium and Merry Go Round...\");\n\tlarry.getOn(roosevelt);\n\tlarry.getOn(millennium);\n\tlarry.getOn(homewood);\n\tSystem.out.println(\"Larry is now a \" + larry);\n\tSystem.out.println();\n\tSystem.out.println(\"Ticket Booth 1 made $\" + booth1.getMoneyMade());\n\tSystem.out.println(\"Ticket Booth 1 has \" + booth1.getAvailablePasses()+\" passes left.\");\n\tSystem.out.println(millennium + \" and had \" + millennium.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(mcCormick + \" and had \" + mcCormick.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(kensington + \" and had \" + kensington.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(homewood + \" and had \" + homewood.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(roosevelt + \" and had \" + roosevelt.getNumberOfRiders() + \" riders.\");\n\t}", "public abstract int simulate();", "public static void main(String[] args) {\n\t\ttest1();\n\t\ttest2();\n\t\tdivision();\n\t\tdivision_nullexception();\n\t\n\t}", "public void testMain(Object[] args) \n\t{\n\t\t//----------------------------------------------------------------------\n\t\t// Verify SUCCESS of Journey\n\t\t// Grab Inspection Details and Report\n\t\t//----------------------------------------------------------------------\n\t\ttry {\t\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\thtml_thankYou().waitForExistence(20.0, 0.25);\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\tString sPaymentSuccess_Text = (String)html_thankYou().getProperty(\".text\");\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\tSystem.out.println(\" PAYMENT SUCCESS * * * \"+sPaymentSuccess_Text+\"* * * \");\n\t\t\tlogTestResult(\" PAYMENT SUCCESS * * * \"+sPaymentSuccess_Text+\"* * * \", true);\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t} catch (Exception e) {\t\t\t\n\t\t\tlogTestResult(\" There Is A Problem WIth The CONFIRMATION Page - Quote Text Is NULL, Payment Gateway Issue or The Page Structure Changed?\", false);\t\t\n\t\t}\n\t\t//----------------------------------------------------------------------\t\n\t\tSystem.out.println(\"Test Journey Completed\");\n\t\tSystem.out.println(\"---------------------------------------------------\");\n\t\tiE().close();\n\t\t//stop();\n\t\t//----------------------------------------------------------------------\t\n\t}", "public void testaReclamacao() {\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public static void main(String args[]){\n\t\tTestingUtils.runTests();\n\t\t\n\t}", "public void testOperation();", "@Test\n public void testDAM31102001() {\n testDAM31001001();\n }", "public void testRunning()\n\t\t{\n\t\t\tInvestigate._invData.clearStores();\n\n\t\t\tfinal WorldLocation topLeft = SupportTesting.createLocation(0, 10000);\n\t\t\ttopLeft.setDepth(-1000);\n\t\t\tfinal WorldLocation bottomRight = SupportTesting.createLocation(10000, 0);\n\t\t\tbottomRight.setDepth(1000);\n\t\t\tfinal WorldArea theArea = new WorldArea(topLeft, bottomRight);\n\t\t\tfinal RectangleWander heloWander = new RectangleWander(theArea,\n\t\t\t\t\t\"rect wander\");\n\t\t\theloWander.setSpeed(new WorldSpeed(20, WorldSpeed.Kts));\n\t\t\tfinal RectangleWander fishWander = new RectangleWander(theArea,\n\t\t\t\t\t\"rect wander 2\");\n\n\t\t\tRandomGenerator.seed(12);\n\n\t\t\tWaterfall searchPattern = new Waterfall();\n\t\t\tsearchPattern.setName(\"Searching\");\n\n\t\t\tTargetType theTarget = new TargetType(Category.Force.RED);\n\t\t\tInvestigate investigate = new Investigate(\"investigating red targets\",\n\t\t\t\t\ttheTarget, DetectionEvent.IDENTIFIED, null);\n\t\t\tsearchPattern.insertAtHead(investigate);\n\t\t\tsearchPattern.insertAtFoot(heloWander);\n\n\t\t\tfinal Status heloStat = new Status(1, 0);\n\t\t\theloStat.setLocation(SupportTesting.createLocation(2000, 4000));\n\t\t\theloStat.getLocation().setDepth(-200);\n\t\t\theloStat.setCourse(270);\n\t\t\theloStat.setSpeed(new WorldSpeed(100, WorldSpeed.Kts));\n\n\t\t\tfinal Status fisherStat = new Status(1, 0);\n\t\t\tfisherStat.setLocation(SupportTesting.createLocation(4000, 2000));\n\t\t\tfisherStat.setCourse(155);\n\t\t\tfisherStat.setSpeed(new WorldSpeed(12, WorldSpeed.Kts));\n\n\t\t\tfinal DemandedStatus dem = null;\n\n\t\t\tfinal SimpleDemandedStatus ds = (SimpleDemandedStatus) heloWander.decide(\n\t\t\t\t\theloStat, null, dem, null, null, 100);\n\n\t\t\tassertNotNull(\"dem returned\", ds);\n\n\t\t\t// ok. the radar first\n\t\t\tASSET.Models.Sensor.Lookup.RadarLookupSensor radar = new RadarLookupSensor(\n\t\t\t\t\t12, \"radar\", 0.04, 11000, 1.2, 0, new Duration(0, Duration.SECONDS),\n\t\t\t\t\t0, new Duration(0, Duration.SECONDS), 9200);\n\n\t\t\tASSET.Models.Sensor.Lookup.OpticLookupSensor optic = new OpticLookupSensor(\n\t\t\t\t\t333, \"optic\", 0.05, 10000, 1.05, 0.8, new Duration(20,\n\t\t\t\t\t\t\tDuration.SECONDS), 0.2, new Duration(30, Duration.SECONDS));\n\n\t\t\tHelo helo = new Helo(23);\n\t\t\thelo.setName(\"Merlin\");\n\t\t\thelo.setCategory(new Category(Category.Force.BLUE,\n\t\t\t\t\tCategory.Environment.AIRBORNE, Category.Type.HELO));\n\t\t\thelo.setStatus(heloStat);\n\t\t\thelo.setDecisionModel(searchPattern);\n\t\t\thelo.setMovementChars(HeloMovementCharacteristics.getSampleChars());\n\t\t\thelo.getSensorFit().add(radar);\n\t\t\thelo.getSensorFit().add(optic);\n\n\t\t\tSurface fisher2 = new Surface(25);\n\t\t\tfisher2.setName(\"Fisher2\");\n\t\t\tfisher2.setCategory(new Category(Category.Force.RED,\n\t\t\t\t\tCategory.Environment.SURFACE, Category.Type.FISHING_VESSEL));\n\t\t\tfisher2.setStatus(fisherStat);\n\t\t\tfisher2.setDecisionModel(fishWander);\n\t\t\tfisher2.setMovementChars(SurfaceMovementCharacteristics.getSampleChars());\n\n\t\t\tCoreScenario cs = new CoreScenario();\n\t\t\tcs.setScenarioStepTime(5000);\n\t\t\tcs.addParticipant(helo.getId(), helo);\n\t\t\tcs.addParticipant(fisher2.getId(), fisher2);\n\n\t\t\t// ok. just do a couple of steps, to check how things pan out.\n\t\t\tcs.step();\n\n\t\t\tSystem.out.println(\"started at:\" + cs.getTime());\n\n\t\t\tDebriefReplayObserver dro = new DebriefReplayObserver(\"./test_reports/\",\n\t\t\t\t\t\"investigate_search.rep\", false, true, true, null, \"plotter\", true);\n\t\t\tTrackPlotObserver tpo = new TrackPlotObserver(\"./test_reports/\", 300,\n\t\t\t\t\t300, \"investigate_search.png\", null, false, true, false, \"tester\",\n\t\t\t\t\ttrue);\n\t\t\tdro.setup(cs);\n\t\t\ttpo.setup(cs);\n\t\t\t//\n\t\t\tdro.outputThisArea(theArea);\n\n\t\t\tInvestigateStore theStore = Investigate._invData.firstStore();\n\n\t\t\t// now run through to completion\n\t\t\tint counter = 0;\n\t\t\twhile ((cs.getTime() < 12000000)\n\t\t\t\t\t&& (theStore.getCurrentTarget(23) == null))\n\t\t\t{\n\t\t\t\tcs.step();\n\t\t\t\tcounter++;\n\t\t\t}\n\n\t\t\t// so, we should have found our tartget\n\t\t\tassertNotNull(\"found target\", theStore.getCurrentTarget(23));\n\n\t\t\t// ok. we've found it. check that we do transition to detected\n\t\t\tcounter = 0;\n\t\t\twhile ((counter++ < 100) && (theStore.getCurrentTarget(23) != null))\n\t\t\t{\n\t\t\t\tcs.step();\n\t\t\t}\n\n\t\t\tdro.tearDown(cs);\n\t\t\ttpo.tearDown(cs);\n\n\t\t\t// so, we should have cleared our tartget\n\t\t\tassertNull(\"found target\", theStore.getCurrentTarget(23));\n\t\t\tassertEquals(\"remembered contact\", 1, theStore.countDoneTargets());\n\n\t\t}", "@Override\n public void test() {\n \n }", "public static void main(String[] args)\r\t{", "protected void runTest() {\n\t\trunTest(getIterations());\n\t}", "public static void main(String[] args) {\n\t\trun();\n\t\t//runTest();\n\n\t}", "@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }", "private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }", "static void executeTest() {\n int[] param1 = { // Checkpoint 1\n 12, 11, 10, -1, -15,};\n boolean[] expect = { // Checkpoint 2\n true, false,true, false, true,}; \n System.out.printf(\"課題番号:%s, 学籍番号:%s, 氏名:%s\\n\",\n question, gakuban, yourname);\n int passed = 0;\n for (int i = 0; i < param1.length; i++) {\n String info1 = \"\", info2 = \"\";\n Exception ex = null;\n boolean returned = false; //3\n try {\n returned = isDivable(param1[i]); //4\n if (expect[i] == (returned)) { //5\n info1 = \"OK\";\n passed++;\n } else {\n info1 = \"NG\";\n info2 = String.format(\" <= SHOULD BE %s\", expect[i]);\n }\n } catch (Exception e) {\n info1 = \"NG\";\n info2 = \"EXCEPTION!!\";\n ex = e;\n } finally {\n String line = String.format(\"*** Test#%d %s %s(%s) => \",\n i + 1, info1, method, param1[i]);\n if (ex == null) {\n System.out.println(line + returned + info2);\n } else {\n System.out.println(line + info2);\n ex.printStackTrace();\n return;\n }\n }\n }\n System.out.printf(\"Summary: %s,%s,%s,%d/%d\\n\",\n question, gakuban, yourname, passed, param1.length);\n }", "@Test\n void test() {\n Game g = init(\"gen_2p_02\");\n List<Player> players = g.getData().getPlayers();\n wrappedIllegalCommand(g, players.get(0), \"tool 6\");\n wrappedLegalCommand(g, players.get(0), \"pick 1\");\n assertTrue(g.isUndoAvailable());\n wrappedLegalCommand(g, players.get(0), \"tool 6\");\n assertFalse(g.isUndoAvailable());\n lightestShade(g, players);\n notLightestShade(g, players);\n }", "public static void main(String[] args){\n DVD newDVDRelease = new DVD(\"DVD\", \"Next Gen New Release\", 64.5);\n CD newCDRelease = new CD(\"CD\", \"High Storage Discs\", 100);\n\n // TODO: Call each CD and DVD method to verify that they work as expected.\n\n System.out.println(\"The new DVD products spin at a rate of \"+newDVDRelease.spinDisc()+\" rpm.\");\n System.out.println(\"The new CD products spin at a rate of \"+newCDRelease.spinDisc()+\" rpm.\");\n\n }", "public static void main(String[] args) {\n\t\tTestingPerformanceCalculator obj= new TestingPerformanceCalculator(\"./data/gitInfoNew.txt\", \"data/Results/FinalResultSidTest1.txt\");\n\t\t//Read Gold set\n\t\tobj.goldStMap=obj.LoadGoldSet();\n\t\t//MiscUtility.showResult(10, obj.goldStMap);\n\t\t//Resd output file/ test result file\n\t\tobj.finalResult=obj.LoadTestingResult();\n\t\t//MiscUtility.showResult(20, obj.finalResult);\n\t\t\n\t\t\n\t\t//Create a ranked list\n\t\t//obj.produceRankedResult(10);\n\t\tArrayList<String> rankedFinalTestingResult=obj.produceRankedResult(10);\n\t\tContentWriter.writeContent(\"./data/testing1RankedResult.txt\", rankedFinalTestingResult);\n\t\t//call another class BLPerformanceCalc to compute\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n ArrayClone();\n //ArrayToString();\n //ArrayReverse();\n\n //ForToForeach();\n //SaveOurRAM();\n\n //Homework_Example_1();\n //Homework_Example_2();\n }" ]
[ "0.6914165", "0.6751041", "0.6576718", "0.6512964", "0.6507995", "0.6476427", "0.64026314", "0.6401518", "0.6371898", "0.634977", "0.63359654", "0.63356155", "0.63342166", "0.63334143", "0.6293413", "0.6253303", "0.6245121", "0.62349015", "0.62198895", "0.62103224", "0.6206163", "0.62057287", "0.6201698", "0.61999404", "0.6187562", "0.61851585", "0.61824846", "0.61815804", "0.6170599", "0.6170157", "0.6162261", "0.6152436", "0.6147477", "0.613202", "0.6125326", "0.6107682", "0.6105556", "0.6101903", "0.60995877", "0.6080576", "0.6077423", "0.6071492", "0.60673934", "0.60643363", "0.60603416", "0.60572344", "0.60550964", "0.60490584", "0.6042975", "0.604124", "0.603915", "0.6036518", "0.603576", "0.6032831", "0.6016428", "0.60162896", "0.6004086", "0.5998494", "0.59977883", "0.5997242", "0.59945685", "0.59734416", "0.5969996", "0.5964757", "0.59600556", "0.5957611", "0.5956097", "0.5951769", "0.595034", "0.59459096", "0.594106", "0.59405047", "0.5938608", "0.59372646", "0.5936991", "0.59349364", "0.59299225", "0.5925789", "0.5924246", "0.59197885", "0.5919375", "0.591792", "0.59165615", "0.59134966", "0.5910475", "0.5910462", "0.59082115", "0.59081584", "0.59078413", "0.5903617", "0.5902519", "0.5901511", "0.5899326", "0.58964527", "0.589579", "0.58937377", "0.5890526", "0.5885872", "0.58775944", "0.58770907", "0.58753335" ]
0.0
-1
/ first agent is assigned to first team (of size kMin). for agents in rsdOrder: if current agent is on a team (e.g., first agent): if the team is not full: the agent picks its favorite remaining agent to join the team. if current agent is not on a team (e.g., second agent if not picked by first): the agent either joins a team that has some agent already but is not full, or joins the first (smallest) remaining empty team and simultaneously picks its favorite remaining player to join too. how an agent not on a team decides what to do: value of joining a team with an agent already, that is not full: sum of team's current players + ( empty spots 1) mean value of remaining players value of joining first empty team and picking an agent, if any: value of favorite remaining agent + (final team size 2) mean value of remaining agents excluding the favorite
public static SimpleSearchResult eachDraftCaptainsChoiceAllocation( final List<Agent> agents, final int kMax, final List<Integer> rsdOrder ) { final int minimumAgents = 4; assert agents != null && agents.size() >= minimumAgents; final int n = agents.size(); assert kMax <= n; // time the duration of the search to the millisecond final long searchStartMillis = new Date().getTime(); final List<Integer> finalTeamSizes = RsdUtil.getOptimalTeamSizeList(agents.size(), kMax); // make it so first agent to pick has the smaller team size, etc. Collections.reverse(finalTeamSizes); assert finalTeamSizes.get(0) <= finalTeamSizes.get(finalTeamSizes.size() - 1); // each list holds the indexes of agents on 1 team. final List<List<Integer>> teams = new ArrayList<List<Integer>>(); // add 1 empty list for each team. for (int i = 0; i < finalTeamSizes.size(); i++) { teams.add(new ArrayList<Integer>()); } // add first agent in RSD order to first team. teams.get(0).add(rsdOrder.get(0)); // process each agent in turn, starting with the first in RSD order for (int i = 0; i < rsdOrder.size(); i++) { final int currentAgentIndex = rsdOrder.get(i); final Agent currentAgent = agents.get(currentAgentIndex); if (EachDraftHelper.isAgentTaken(teams, currentAgentIndex)) { // agent is already on a team // (either first agent, or already chosen). final int teamIndex = EachDraftHelper.getTeamIndex(teams, currentAgentIndex); final int maxSizeForTeam = finalTeamSizes.get(teamIndex); if (teams.get(teamIndex).size() < maxSizeForTeam) { // the team has room to add an agent. final List<UUID> idsHighToLowValue = currentAgent.getAgentIdsHighValueToLow(); for (final UUID id: idsHighToLowValue) { if (!EachDraftHelper.isAgentTaken(teams, agents, id)) { final int indexToChoose = EachDraftHelper.getAgentIndexById(agents, id); teams.get(teamIndex).add(indexToChoose); break; } } } } else { // agent is not on a team. // add self to favorite other team that has room final int favoriteTeamIndex = getFavoriteTeamIndexWithSpace( teams, finalTeamSizes, agents, currentAgent ); teams.get(favoriteTeamIndex).add(currentAgentIndex); if (teams.get(favoriteTeamIndex).size() == 1) { // added self to empty team. // if there is still room, may pick favorite remaining // agent to join. if (finalTeamSizes.get(favoriteTeamIndex) > 1) { // there is room to add an agent final List<UUID> idsHighToLowValue = currentAgent.getAgentIdsHighValueToLow(); for (final UUID id: idsHighToLowValue) { if ( !EachDraftHelper.isAgentTaken(teams, agents, id) ) { final int indexToChoose = EachDraftHelper.getAgentIndexById( agents, id ); teams.get(favoriteTeamIndex).add(indexToChoose); break; } } } } } } if (MipGenerator.DEBUGGING) { int totalAgents = 0; for (final List<Integer> team: teams) { totalAgents += team.size(); } if (totalAgents != agents.size()) { throw new IllegalStateException(); } } final List<List<Integer>> allocation = RandomAllocation.getAllocationFromLists( agents.size(), teams ); final int kMin = finalTeamSizes.get(0); final long searchDurationMillis = new Date().getTime() - searchStartMillis; final double similarity = PreferenceAnalyzer.getMeanPairwiseCosineSimilarity(agents); return new SimpleSearchResult( allocation, kMin, kMax, agents, rsdOrder, searchDurationMillis, null, similarity ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int getFavoriteTeamIndexWithSpace(\n final List<List<Integer>> teams,\n final List<Integer> finalTeamSizes,\n final List<Agent> agents,\n final Agent selfAgent\n ) {\n // find mean value of other agents not yet on a team.\n double untakenOtherAgentsValue = 0.0;\n int untakenOtherAgentCount = 0;\n for (int i = 0; i < agents.size(); i++) {\n // don't count the self agent when evaluating\n // the mean value of other remaining agents.\n if (agents.get(i).equals(selfAgent)) {\n continue;\n }\n if (!EachDraftHelper.isAgentTaken(teams, i)) {\n final UUID currentAgentId = agents.get(i).getUuid();\n untakenOtherAgentsValue += \n selfAgent.getValueByUUID(currentAgentId);\n untakenOtherAgentCount++;\n }\n }\n \n double meanValueOtherRemainingAgents = 0.0;\n if (untakenOtherAgentCount > 0) {\n meanValueOtherRemainingAgents =\n untakenOtherAgentsValue / untakenOtherAgentCount;\n }\n\n double maxTeamValue = -1.0;\n int bestTeamIndex = -1;\n for (int i = 0; i < teams.size(); i++) {\n final List<Integer> currentTeam = teams.get(i);\n final int currentTeamMaxSize = finalTeamSizes.get(i);\n \n // don't consider teams that are already full.\n if (currentTeam.size() == currentTeamMaxSize) {\n continue;\n }\n \n double currentTeamValue = 0.0;\n if (currentTeam.isEmpty()) {\n // team is empty.\n // you'd pick your favorite agent to join if there is room, \n // so add its value if the team has space.\n // then add \"final team size - 2\" * \n // mean value of remaining agents\n // excluding the favorite.\n if (currentTeamMaxSize > 1) {\n // there is room to pick favorite agent to join\n final List<UUID> idsHighToLowValue = \n selfAgent.getAgentIdsHighValueToLow();\n UUID favoriteUUID = null;\n for (final UUID id: idsHighToLowValue) {\n if (!EachDraftHelper.isAgentTaken(teams, agents, id)) {\n favoriteUUID = id;\n break;\n }\n }\n if (favoriteUUID != null) {\n // some other agent is left besides self\n final double favoriteRemainingValue = \n selfAgent.getValueByUUID(favoriteUUID);\n currentTeamValue += favoriteRemainingValue;\n assert untakenOtherAgentCount > 0;\n double meanValueRemainingWithoutFavorite = 0.0;\n if (untakenOtherAgentCount > 1) {\n meanValueRemainingWithoutFavorite = \n (untakenOtherAgentsValue \n - favoriteRemainingValue) \n / (untakenOtherAgentCount - 1.0);\n }\n final int extraSpaces = currentTeamMaxSize - 2;\n currentTeamValue += \n meanValueRemainingWithoutFavorite * extraSpaces;\n } \n }\n } else {\n // team already has an agent.\n // sum values of current agents,\n // then add (spaces - 1) * mean value of remaining agents.\n for (final Integer playerIndex: currentTeam) {\n final UUID playerUUID = agents.get(playerIndex).getUuid();\n final double playerValue = \n selfAgent.getValueByUUID(playerUUID);\n currentTeamValue += playerValue;\n }\n \n if (currentTeam.size() + 1 < currentTeamMaxSize) {\n // team has room for another \n // agent besides self agent. \n final int extraSpaces = \n currentTeamMaxSize - (1 + currentTeam.size());\n currentTeamValue += \n extraSpaces * meanValueOtherRemainingAgents;\n }\n }\n\n \n if (currentTeamValue > maxTeamValue) {\n maxTeamValue = currentTeamValue;\n bestTeamIndex = i;\n }\n \n // only allowed to join the first empty team, not some other\n // empty team which may have more spaces.\n if (currentTeam.isEmpty()) {\n break;\n }\n }\n \n assert bestTeamIndex != -1;\n return bestTeamIndex;\n }", "public static int estimateVehicles( int adj[][]) {\n\t\tHashMap<Integer,Integer> hp=new HashMap<Integer,Integer>();\n\t\tfor(int i=143;i<233;i++) {\n\t\t\tint tem=gr.dijkstra(adj, 233,i );\n\t\t\thp.put(i, tem);\n\t\t}\n\t\t//System.out.println(\"HP: \"+hp);\n\t\tHashMap<Integer,Integer>sort = hp.entrySet().stream().sorted(Map.Entry.comparingByValue())\n\t .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\n\t\tint noOfVehicles=1;\n\t\t//System.out.println(\"SORT: \"+sort);\n\t\tcost=0;\n\t\tfor(int i: sort.keySet()) {\n\t\tif(flag1==0) {\n\t\t\tscr=233;\n\t\t\tdes=i;\n\t\t\ttime=gr.dijkstra(adj, scr, des);\n\t\t\tcost=cost+time;\n\t\t\tscr=des;\n\t\t\tflag1=1;\n\t\t\tcontinue;\n\t\t}\n\t\telse {\n\t\t\tdes=i;\n\t\t\ttime=gr.dijkstra(adj, scr, des);\n\t\t\tint t=gr.dijkstra(adj, des, 233);\n\t\t\tcost=cost+time+t;\n\t\t\t//System.out.println(\"cost flag1: \"+cost);\n\t\t\tif(cost>=480) {\n\t\t\t\tscr=233;\n\t\t\t\tdes=i;\n\t\t\t\tnoOfVehicles++;\n\t\t\t\tcost=0;\n\t\t\t\t//System.out.println(\"scr: \"+scr+\" des: \"+des);\n\t\t\t\t//System.out.println(\"noOfVehicles: \"+noOfVehicles);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcost=cost-t;\n\t\t\tscr=des;\n\t\t\t\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"noOfVehicles: \"+noOfVehicles);\n\t\treturn noOfVehicles;\n\t}", "public void testSendToTeams() throws Exception{\n\n // Sort order:\n // Primary Sort = number of solved problems (high to low)\n // Secondary Sort = score (low to high)\n // Tertiary Sort = earliest submittal of last submission (low to high)\n // Forth Sort = teamName (low to high)\n // Fifth Sort = clientId (low to high)\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,5,A,12,No\",\n \"6,5,A,12,Yes\", \n\n // t5 solves A, 32 pts = 20 + 12\n \n \"7,6,A,12,No,Yes\",\n \"8,6,A,12,Yes,No\",\n \n // t6 does not solve, 0 solve, 0 pts\n\n \"15,5,B,21,No\",\n \"16,5,B,22,Yes,No\", \n \n // t5 does solve B, but not sent to team/used 0 pts 0 solved\n \n \"25,6,B,21,No,No\",\n \"26,6,B,22,Yes,Yes\",\n \n // t6 solves B, 22 pts because No at 21 is NOT counted.\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n // rank, team, solved, pts\n \"1,team6,1,22\",\n \"2,team5,1,32\",\n \"3,team1,0,0\",\n \"3,team2,0,0\",\n \"3,team3,0,0\",\n \"3,team4,0,0\",\n };\n \n scoreboardTest (6, runsData, rankData, true);\n }", "public void makeFirstRound() {\n Strategy tactics = null;\n ArrayList<Producer> auxProducerList = new ArrayList<>(listOfProducers.getList());\n for (Distributor dst : listOfDistributors.getList()) {\n if (dst.getSubscribedproducers().isEmpty()) {\n int auxNeededPower = dst.getEnergyNeededKW();\n if (dst.getProducerStrategy().equals(\"GREEN\")) {\n tactics = new GreenStrategy();\n } else if (dst.getProducerStrategy().equals(\"PRICE\")) {\n tactics = new PriceStrategy();\n } else if (dst.getProducerStrategy().equals(\"QUANTITY\")) {\n tactics = new QuantityStrategy();\n }\n tactics.sorter(auxProducerList);\n for (Producer p : auxProducerList) {\n if (!(p.getMaxDistributors() == p.getCurrDistributors())) {\n dst.addSubscribedproducer(p);\n p.addDistIDs(dst.getId());\n p.addObserver(dst);\n p.setCurrDistributors(p.getCurrDistributors() + 1);\n auxNeededPower -= p.getEnergyPerDistributor();\n if (auxNeededPower < 0) {\n break;\n }\n }\n }\n }\n }\n\n Distributor bestDist = listOfDistributors.getBestDistinRound();\n\n for (Consumer auxcons : listOfConsumers.getList()) {\n auxcons.setBudget(auxcons.getInitialBudget() + auxcons.getMonthlyIncome());\n auxcons.setIdofDist(bestDist.getId());\n auxcons.setMonthstoPay(bestDist.getContractLength());\n auxcons.setToPay(bestDist.getContractPrice());\n bestDist.addSubscribedconsumer(auxcons);\n if (auxcons.getBudget() >= auxcons.getToPay()) {\n auxcons.addtoBudget(-auxcons.getToPay());\n auxcons.reduceMonths();\n bestDist.addBudget(auxcons.getToPay());\n } else {\n auxcons.setDuepayment(auxcons.getToPay());\n auxcons.reduceMonths();\n }\n if (auxcons.getMonthstoPay() == 0) {\n auxcons.setIdofDist(-1);\n }\n }\n\n for (Distributor d : listOfDistributors.getList()) {\n if (d.isBankrupt()) {\n continue;\n }\n d.reduceBudget();\n if (d.getBudget() < 0) {\n d.setBankrupt(true);\n }\n }\n }", "@Override\r\n public double calculateBestQuality() {\r\n int numClasses = parentClassDist.size();\r\n \r\n //Sort the mean distance orderline\r\n Collections.sort(meanDistOrderLine);\r\n \r\n //Find approximate minimum orderline objects\r\n OrderLineObj min = new OrderLineObj(-1.0, 0.0);\r\n for(Double d : parentClassDist.keySet()){\r\n int unassignedObjs = parentClassDist.get(d) - orderLineClassDist.get(d);\r\n double distMin = (sums[d.intValue()] + (unassignedObjs * minDistance)) / parentClassDist.get(d);\r\n if(min.getDistance() == -1.0 || distMin < min.getDistance()){\r\n min.setDistance(distMin);\r\n min.setClassVal(d);\r\n }\r\n }\r\n \r\n //Find approximate maximum orderline objects\r\n OrderLineObj max = new OrderLineObj(-1.0, 0.0);\r\n for(Double d : parentClassDist.keySet()){\r\n int unassignedObjs = parentClassDist.get(d) - orderLineClassDist.get(d);\r\n double distMax = (sums[d.intValue()] + (unassignedObjs * maxDistance)) / parentClassDist.get(d); \r\n if(d != min.getClassVal() && (max.getDistance() == -1.0 || distMax > max.getDistance())){\r\n max.setDistance(distMax);\r\n max.setClassVal(d);\r\n }\r\n }\r\n \r\n //Adjust running sums\r\n double increment = (max.getDistance() - min.getDistance()) / (numClasses-1);\r\n int multiplyer = 1;\r\n for (OrderLineObj currentObj : meanDistOrderLine) {\r\n double thisDist;\r\n int unassignedObjs = parentClassDist.get(currentObj.getClassVal()) - orderLineClassDist.get(currentObj.getClassVal());\r\n \r\n if(currentObj.getClassVal() == min.getClassVal()){\r\n thisDist = minDistance;\r\n }else if(currentObj.getClassVal() == max.getClassVal()){\r\n thisDist = maxDistance;\r\n }else{\r\n thisDist = minDistance + (increment * multiplyer);\r\n multiplyer++; \r\n }\r\n sums[(int)currentObj.getClassVal()] += thisDist * unassignedObjs;\r\n sumOfSquares[(int)currentObj.getClassVal()] += thisDist * thisDist * unassignedObjs;\r\n sumsSquared[(int)currentObj.getClassVal()] = sums[(int)currentObj.getClassVal()] * sums[(int)currentObj.getClassVal()];\r\n }\r\n \r\n double ssTotal;\r\n double part1 = 0;\r\n double part2 = 0;\r\n\r\n for (int i = 0; i < numClasses; i++) {\r\n part1 += sumOfSquares[i];\r\n part2 += sums[i];\r\n }\r\n\r\n part2 *= part2;\r\n part2 /= numInstances;\r\n ssTotal = part1 - part2;\r\n\r\n double ssAmoung;\r\n part1 = 0;\r\n part2 = 0;\r\n for (int i = 0; i < numClasses; i++) {\r\n part1 += (double) sumsSquared[i] / parentClassDist.get((double) i);//.data[i].size();\r\n part2 += sums[i];\r\n }\r\n ssAmoung = part1 - (part2 * part2) / numInstances;\r\n double ssWithin = ssTotal - ssAmoung;\r\n\r\n int dfAmoung = numClasses - 1;\r\n int dfWithin = numInstances - numClasses;\r\n\r\n double msAmoung = ssAmoung / dfAmoung;\r\n double msWithin = ssWithin / dfWithin;\r\n\r\n double f = msAmoung / msWithin;\r\n \r\n //Reset running sums\r\n multiplyer = 1;\r\n for (OrderLineObj currentObj : meanDistOrderLine) {\r\n double thisDist;\r\n int unassignedObjs = parentClassDist.get(currentObj.getClassVal()) - orderLineClassDist.get(currentObj.getClassVal());\r\n \r\n if(currentObj.getClassVal() == min.getClassVal()){\r\n thisDist = minDistance;\r\n }else if(currentObj.getClassVal() == max.getClassVal()){\r\n thisDist = maxDistance;\r\n }else{\r\n thisDist = minDistance + (increment * multiplyer);\r\n multiplyer++; \r\n }\r\n sums[(int)currentObj.getClassVal()] -= thisDist * unassignedObjs;\r\n sumOfSquares[(int)currentObj.getClassVal()] -= thisDist * thisDist * unassignedObjs;\r\n sumsSquared[(int)currentObj.getClassVal()] = sums[(int)currentObj.getClassVal()] * sums[(int)currentObj.getClassVal()];\r\n }\r\n \r\n return Double.isNaN(f) ? 0.0 : f;\r\n }", "@Override\n public SearchBasedAgentState execute(SearchBasedAgentState s) {\n EstadoDrone agState = (EstadoDrone) s;\n if(agState.getposicion()[0]==2 && (1000-agState.getenergiaUsada()>=CostoBajar)){\n \tagState.incrementarEnergiaUsada(CostoBajar);\n \tagState.irNivelMedio();\n \treturn agState;\n }\n if(agState.getposicion()[0]==0 && (1000-agState.getenergiaUsada()>=CostoSubir)){\n \tint idCuadrante=agState.getposicion()[1];\n \tint idSubcuadrante=agState.getposicion()[2];\n \tint[] esqIdentificadas = agState.getlistaEsquinasIdentificadas(); \n \t\n \t\tArrayList<Esquina> esquinas = agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(idSubcuadrante-1).getlistaEsquinas();\n \t\tfor(Esquina esquina : esquinas){\n \t\t\tif(esqIdentificadas[esquina.getidEsquina()]==0) return null;\n \t\t}\n \tagState.incrementarEnergiaUsada(CostoSubir);\n \tagState.irNivelMedio();\n \treturn agState;\n }\n return null;\n }", "public LinkedList<Task> dispenseTaskForAgent(Agent agent)\n \t{\n \t\tArrayList<Goal> openGoals = new ArrayList<Goal>();\n \t\tfor (Goal goal : goalsByColor.get(agent.color.ordinal())) {\n \t\t\tif (goal.reserved || goal.completed()) continue;\n \t\t\topenGoals.add(goal);\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t// Give all openGoals a rating\n \t\t// factors:\n \t\t// few edges is good (disconnects less)\n \t\t// for all (nodes with 1 edge) we pick the fastest to complete from agent.. also have to pick box...\n \t\t// with >1 edge we have to check if we disconnect anything important\n \t\t\n \t\t// Try to find goal nodes with only 1 edge. These always have priority over nodes with more edges\n \t\tArrayList<GoalNode> desiredGoalNodes = new ArrayList<GoalNode>();\n \t\tfor (Goal goal : openGoals) {\n \t\t\tGoalNode gn = (GoalNode)goal.node;\n \t\t\tif (gn.neighbors.size() == 1) desiredGoalNodes.add(gn);\n \t\t}\n \t\t\n \t\t// If we don't find any one edged goal nodes, we try to find ones that do not disconnect vital parts\n \t\tif (desiredGoalNodes.size() == 0)\n \t\t{\n \t\t\tfor (Goal goal : openGoals)\n \t\t\t{\n \t\t\t\tGoalNode gn = (GoalNode)goal.node;\n \t\t\t\t\n \t\t\t\t// BFS for all new graphs created by taking away goal.\n \t\t\t\t// Usually a fast solution, but in graphs with _many_ nodes can be bad\n \t\t\t\tQueue<Node> queue = new LinkedList<Node>();\n \t\t\t\tHashSet<Node> allVisited = new HashSet<Node>(); allVisited.add(gn); // we don't want to traverse through original node\n \t\t\t\tArrayList<HashSet<Node>> graphs = new ArrayList<HashSet<Node>>();\n \t\t\t\t\n \t\t\t\tIterator<Node> iterator = gn.neighbors.iterator();\n \t\t\t\t\n \t\t\t\twhile (allVisited.size() != graph.size())\n \t\t\t\t{\n \t\t\t\t\tNode next = iterator.next();\n \t\t\t\t\tif (allVisited.contains(next)) continue;\n \t\t\t\t\tallVisited.add(next);\n \t\t\t\t\tqueue.add(next);\n \t\t\t\t\t\n \t\t\t\t\tHashSet<Node> visited = new HashSet<Node>();\n \t\t\t\t\tgraphs.add(visited);\n \t\t\t\t\t\n \t\t\t\t\twhile (queue.size() > 0) {\n \t\t\t\t\t\tNode n = queue.poll();\n \t\t\t\t\t\tfor (Node neighbor : n.neighbors) {\n \t\t\t\t\t\t\tif (!allVisited.contains(neighbor)) {\n \t\t\t\t\t\t\t\tallVisited.add(neighbor);\n \t\t\t\t\t\t\t\tvisited.add(neighbor);\n \t\t\t\t\t\t\t\tqueue.add(neighbor);\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\t\n \t\t\t\t// if, at this point, the first BFS found all nodes, then this is a good goal as it doesn't disconnect\n \t\t\t\tif (graphs.get(0).size() == graph.size()-1) {\n \t\t\t\t\tdesiredGoalNodes.add(gn);\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t\n \t\t\t\t// 'graphs' now contains 2-4 sets of nodes, all disconnected from each other by the goal\n \t\t\t\t\n \t\t\t\t// Gather data from new graphs // also agents?\n \t\t\t\tArrayList<HashSet<Goal>> incompleteGoalsInGraphs = new ArrayList<HashSet<Goal>>();\n \t\t\t\tArrayList<HashSet<Box>> unusedBoxesInGraphs = new ArrayList<HashSet<Box>>();\n \t\t\t\tfor (HashSet<Node> graph : graphs)\n \t\t\t\t{\n \t\t\t\t\tHashSet<Goal> goalInGraph = new HashSet<Goal>();\n \t\t\t\t\tHashSet<Box> boxInGraph = new HashSet<Box>();\n \t\t\t\t\tincompleteGoalsInGraphs.add(goalInGraph);\n \t\t\t\t\tunusedBoxesInGraphs.add(boxInGraph);\n \t\t\t\t\t\n \t\t\t\t\tfor (Node node : graph) {\n \t\t\t\t\t\tif (node instanceof GoalNode) {\n \t\t\t\t\t\t\tGoalNode goalNode = (GoalNode)node;\n \t\t\t\t\t\t\tif (!goalNode.goal.completed()) {\n \t\t\t\t\t\t\t\tboxInGraph.addAll(boxesByNode.get(goalNode));\n \t\t\t\t\t\t\t\tgoalInGraph.add(goalNode.goal);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t} else { // AreaNode\n \t\t\t\t\t\t\tboxInGraph.addAll(boxesByNode.get(node));\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tint graphsWithGoals = 0;\n \t\t\t\tint indexOfMainGraph = -1; // the graph we don't 'close'\n \t\t\t\tfor (int i=0; i<incompleteGoalsInGraphs.size(); i++) {\n \t\t\t\t\tHashSet<Goal> igig = incompleteGoalsInGraphs.get(i);\n \t\t\t\t\tif (igig.size() > 0) {\n \t\t\t\t\t\tgraphsWithGoals++;\n \t\t\t\t\t\tindexOfMainGraph = i;\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (graphsWithGoals <= 1) {\n \t\t\t\t\tdesiredGoalNodes.add(gn); // how do we signal what nodes/graph we need the agent to end at?\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// TODO check that the 'main graph' has all the boxes it needs.\n \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\t// Estimate how fast/hard they are to solve by agent\n \t\tif (desiredGoalNodes.size() == 0)\n \t\t{\n \t\t\t// use AStar...\n \t\t}\n \t\t\n \t\t// Return task\n \t\tif (desiredGoalNodes.size() == 0) {\n \t\t\tTask task = new WaitTask(5);\n \t\t\tLinkedList<Task> taskQueue = new LinkedList<Task>();\n \t\t\ttaskQueue.add(task);\n \t\t\treturn taskQueue;\n \t\t} else {\n \t\t\t//return new TaskMove() + TaskDock()\n \t\t}\n \t\t\n \t\t//Task test = new TaskWait(5);\n \t\treturn null;\n \t}", "private boolean findNextAvailableAgent(ArrayList<IAgent> arrayList) {\n\n for (IAgent agent : arrayList) {\n try {\n if (agent.checkIfOnSpawn()) {\n return false;\n }\n } catch (RemoteException e) {\n return false;\n }\n }\n\n for (IAgent agent : arrayList) {\n try {\n if (arrayList.size() < Integer.parseInt(String.valueOf(dialog.getCountAgents().getSelectedItem()))) {\n if (iPlayerList.get(agent.getName()).getPoints() >= agentsValue) {\n for (int[] spawn : playingField.getSpawnFields()) {\n if (playingField.requestField(spawn[0], spawn[1])) {\n IAgent newAgent = new AgentImpl(agent.getName(), agent.getStrategy(), playingField);\n newAgent.setColor(agent.getColor());\n newAgent.setPosx(spawn[0]);\n newAgent.setPosy(spawn[1]);\n newAgent.setCapacity(Integer.parseInt(dialog.getCapacityField().getText()));\n newAgent.getRememberField().setiPlayerList(playingField.getiPlayerList());\n playingField.setOccupancy(spawn[0], spawn[1], newAgent);\n ArrayList<IAgent> templist = new ArrayList<>();\n for (IAgent list : playersAgentsMap.get(agent.getName())) {\n templist.add(list);\n }\n templist.add(newAgent);\n playersAgentsMap.put(agent.getName(), templist);\n iPlayerList.get(agent.getName()).setPoints(iPlayerList.get(agent.getName()).getPoints() - agentsValue);\n return true;\n }\n\n }\n\n }\n }\n } catch (RemoteException e) {\n System.out.println(e.getMessage());\n return false;\n }\n }\n return false;\n\n }", "@Override\n\tpublic Agent selectNextAgent(int ts){\n\n\t\tLinkedList<Agent> list;\n\t\tLinkedList<Agent> yours = null;\n\t\tLinkedList<Agent> others = null;\n\t\tlist=this.carlos.network.availableAgentsInTS;\n\n\t\tif(this.targetValue == 1){\n\t\t\tyours = this.carlos.network.availablePosAgentsInTS;\n\t\t\tothers = this.carlos.network.availableNegAgentsInTS; \n\t\t}\n\t\telse if(this.targetValue == -1){\n\t\t\tothers = this.carlos.network.availablePosAgentsInTS;\n\t\t\tyours = this.carlos.network.availableNegAgentsInTS; \n\t\t}\n\t\t\n\t\t//safe yours\n\t\tfor(Agent agent : yours){\n\t\t\tdouble tauPos = carlos.network.getTauPos(agent, ts-1);\n\t\t\tif(targetValue == 1 && (1-tauPos) < carlos.tau){\n\t\t\t\tcontinue; //safe\n\t\t\t}\n\t\t\t\n\t\t\tif(targetValue == -1 && (tauPos) < carlos.tau){\n\t\t\t\tcontinue; //safe\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"TakeSing: found one\");\n\t\t\treturn agent;\n\t\t}\n\t\t\n\t\t//Steel others which you can get\n\t\tfor(Agent agent: others){\n\t\t\tdouble tauPos = carlos.network.getTauPos(agent, ts-1);\n\t\t\tif(targetValue == 1 && (tauPos) < carlos.tau){\n\t\t\t\tcontinue; //lost anyway\n\t\t\t}\n\t\t\t\n\t\t\tif(targetValue == -1 && (1-tauPos) < carlos.tau){\n\t\t\t\tcontinue; //lost anyway\n\t\t\t}\n\t\t\t//System.out.println(\"TakeSing: found one\");\n\t\t\treturn agent;\n\t\t}\n\t\t\n\t\treturn this.carlos.network.availableAgentsInTS.getFirst();\n\t}", "public static void computeRanks(int first, int second) {\r\n\r\n double AOld[], A[];\r\n double BOld[], B[];\r\n double diffOld[], diff[];\r\n int ties, N, pointer;\r\n boolean sign[];\r\n double ranks[];\r\n double RA, RB;\r\n ArrayList<Double> walsh;\r\n int criticalN;\r\n String interval;\r\n\r\n AOld = new double[rows];\r\n BOld = new double[rows];\r\n diffOld = new double[rows];\r\n\r\n ties = 0;\r\n\r\n for (int i = 0; i < rows; i++) {\r\n\r\n if (Configuration.getObjective() == 1) {\r\n AOld[i] = data[i][first];\r\n BOld[i] = data[i][second];\r\n } else {\r\n AOld[i] = data[i][second];\r\n BOld[i] = data[i][first];\r\n }\r\n\r\n diffOld[i] = Math.abs(AOld[i] - BOld[i]);\r\n\r\n if (diffOld[i] == 0.0) {\r\n ties++;\r\n }\r\n }\r\n\r\n N = rows - ties;\r\n\r\n A = new double[N];\r\n B = new double[N];\r\n diff = new double[N];\r\n sign = new boolean[N];\r\n ranks = new double[N];\r\n\r\n pointer = 0;\r\n\r\n for (int i = 0; i < rows; i++) {\r\n\r\n if (diffOld[i] != 0.0) {\r\n A[pointer] = AOld[i];\r\n B[pointer] = BOld[i];\r\n diff[pointer] = Math.abs(A[pointer] - B[pointer]);\r\n if ((A[pointer] - B[pointer]) > 0.0) {\r\n sign[pointer] = true;\r\n } else {\r\n sign[pointer] = false;\r\n }\r\n pointer++;\r\n }\r\n\r\n }\r\n\r\n //compute ranks\r\n double min;\r\n double points;\r\n int tied;\r\n String tiedString = \"\";\r\n\r\n Arrays.fill(ranks, -1.0);\r\n\r\n for (int rank = 1; rank <= N;) {\r\n min = Double.MAX_VALUE;\r\n tied = 1;\r\n\r\n for (int i = 0; i < N; i++) {\r\n if ((ranks[i] == -1.0) && diff[i] == min) {\r\n tied++;\r\n }\r\n if ((ranks[i] == -1.0) && diff[i] < min) {\r\n min = diff[i];\r\n tied = 1;\r\n }\r\n\r\n }\r\n\r\n //min has the lower unassigned value\r\n if (tied == 1) {\r\n points = rank;\r\n } else {\r\n tiedString += (tied + \"-\");\r\n points = 0.0;\r\n for (int k = 0; k < tied; k++) {\r\n points += (rank + k);\r\n }\r\n points /= tied;\r\n }\r\n\r\n for (int i = 0; i < N; i++) {\r\n if (diff[i] == min) {\r\n ranks[i] = points;\r\n }\r\n }\r\n\r\n rank += tied;\r\n }\r\n\r\n //compute sumOfRanks\r\n\r\n RA = 0.0;\r\n RB = 0.0;\r\n\r\n for (int i = 0; i < ranks.length; i++) {\r\n if (sign[i]) {\r\n RA += ranks[i];\r\n } else {\r\n RB += ranks[i];\r\n }\r\n }\r\n\r\n //Treatment of 0's\r\n double increment;\r\n double sum0;\r\n if (ties > 1) {\r\n //discard a tie if there's an odd number of them\r\n if (ties % 2 == 1) {\r\n increment = ties - 1.0;\r\n } else {\r\n increment = ties;\r\n }\r\n\r\n //Adition of 0 ranked differences\r\n sum0 = (((double) increment + 1.0) * (double) increment) / 2.0;\r\n sum0 /= 2.0;\r\n\r\n RA += sum0;\r\n RB += sum0;\r\n\r\n //Reescaling of the rest of ranks\r\n for (int i = 0; i < ranks.length; i++) {\r\n if (sign[i]) {\r\n RA += increment;\r\n } else {\r\n RB += increment;\r\n }\r\n }\r\n }\r\n \r\n //save the ranks\r\n wilcoxonRanks[first][second] = RA;\r\n wilcoxonRanks[second][first] = RB;\r\n\r\n //compute exact pValue\r\n exactPValues[first][second] = WilcoxonDistribution.computeExactProbability(N, RB);\r\n exactPValues[second][first] = WilcoxonDistribution.computeExactProbability(N, RA);\r\n\r\n //compute asymptotic P Value\r\n\r\n int tiesDistribution[];\r\n\r\n tiesDistribution = decode(tiedString);\r\n\r\n asymptoticPValues[first][second] = WilcoxonDistribution.computeAsymptoticProbability(N, RB, tiesDistribution);\r\n asymptoticPValues[second][first] = WilcoxonDistribution.computeAsymptoticProbability(N, RA, tiesDistribution);\r\n\r\n //compute confidence intervals\r\n walsh = new ArrayList<Double>();\r\n\r\n double aux, aux2;\r\n for (int i = 0; i < diffOld.length - 1; i++) {\r\n if (Configuration.getObjective() == 1) {\r\n aux = AOld[i] - BOld[i];\r\n } else {\r\n aux = BOld[i] - AOld[i];\r\n }\r\n\r\n walsh.add(aux);\r\n for (int j = i + 1; j < diffOld.length; j++) {\r\n if (Configuration.getObjective() == 1) {\r\n aux2 = AOld[j] - BOld[j];\r\n } else {\r\n aux2 = BOld[j] - AOld[j];\r\n }\r\n walsh.add((aux + aux2) / 2.0);\r\n }\r\n }\r\n\r\n Collections.sort(walsh);\r\n\r\n //Find critical levels\r\n\r\n criticalN = findCriticalValue(diffOld.length, 0.05, tiesDistribution);\r\n criticalN = Math.max(criticalN, 0);\r\n\r\n //Build interval\r\n interval = \"[\";\r\n interval += nf.format(walsh.get(criticalN));\r\n interval += \" , \";\r\n interval += nf.format(walsh.get(walsh.size() - (criticalN + 1)));\r\n interval += \"]\";\r\n\r\n confidenceIntervals95[first][second] = interval;\r\n exactConfidence95[first][second] = 1.0 - (WilcoxonDistribution.computeExactProbability(diffOld.length, criticalN));\r\n\r\n criticalN = findCriticalValue(diffOld.length, 0.1, tiesDistribution);\r\n criticalN = Math.max(criticalN, 0);\r\n\r\n //Build interval\r\n interval = \"[\";\r\n interval += nf.format(walsh.get(criticalN));\r\n interval += \" , \";\r\n interval += nf.format(walsh.get(walsh.size() - (criticalN + 1)));\r\n interval += \"]\";\r\n\r\n confidenceIntervals90[first][second] = interval;\r\n exactConfidence90[first][second] = 1.0 - (WilcoxonDistribution.computeExactProbability(diffOld.length, criticalN));\r\n\r\n }", "public void testAltScoring() throws Exception {\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n // alt1: 0 0 200\n \n String[] alt1rankData = {\n \"1,team1,1,200\",\n \"2,team2,1,200\", // tie-breaker causes rank 2\n };\n \n scoreboardTest (2, runsData, alt1rankData, alt1);\n // alt2: 30 5 0\n String[] alt2rankData = {\n \"1,team1,1,45\", // 1 no@30 each + 3 min * 5\n \"2,team2,1,150\", // 5*30\n };\n \n scoreboardTest (2, runsData, alt2rankData, alt2);\n \n // alt3: 0 10 0\n String[] alt3rankData = {\n \"1,team1,1,30\", // 3 min * 10\n \"2,team2,1,300\", // 30 min * 10\n };\n \n scoreboardTest (2, runsData, alt3rankData, alt3);\n \n // alt4: 5 0 20\n String[] alt4rankData = {\n \"1,team2,1,20\", // base yes\n \"2,team1,1,25\", // base yes + 1 no\n };\n \n scoreboardTest (2, runsData, alt4rankData, alt4);\n\n }", "@Override\n public int[] schedule(TestInstance testInstance, int[] minizincSolution) {\n\n long start = System.currentTimeMillis();\n\n int numAgents = testInstance.numAgents;\n int numJobs = testInstance.numJobs;\n //Initialize some testers for later\n CondorcetConsistencyTester condorsetTests = new CondorcetConsistencyTester(numJobs, numAgents);\n SumOfTardinessTester sumOfTardTests = new SumOfTardinessTester(numJobs, numAgents);\n ParetoEfficiencyTester paretoTests = new ParetoEfficiencyTester(numJobs, numAgents);\n\n // Initialize the scores with all 0\n Scores scores = new Scores(numJobs);\n\n //PART 1\n // This double loop compares each job with all the others\n for(int i = 0; i < numJobs - 1; i++) {\n for (int j = i + 1; j < numJobs; j++) {\n\n int counter_i = 0;\n int counter_j = 0;\n // Now we count how many times the job with ID=i comes before the job with ID=j\n // For all preferences\n // If job with ID=i comes before the job with ID=j\n for (Preference preference : testInstance.preferences)\n if (preference.isBefore(i, j))\n counter_i++; // Increment the number of agents preferring i over j\n else counter_j++; // Increment the number of agents preferring j over i\n\n\n int p_i = testInstance.processingTimes[i];\n int p_j = testInstance.processingTimes[j];\n\n // The threshold of job i, as given by our definition\n // This rule is the main and only way the processing times of the\n // jobs are taken into account for the final \"true\" ranking\n float threshold = (float)(p_i * numAgents) / (float)(p_i + p_j);\n\n if (counter_i == threshold) { //If the number of votes equals the threshold for job i,\n // the same applies for job j and its corresponding threshold, because math, so give both of them a point\n scores.addOne(i);\n scores.addOne(j);\n } else if (counter_i > threshold) { //Give a point to job i for surpassing the threshold\n scores.addOne(i);\n } else { //Give a point to job j for surpassing its threshold (again, because math)\n scores.addOne(j);\n }\n\n // Store the votes each job got against the other\n CondorcetConsistencyTester.votes[i][j] = counter_i;\n CondorcetConsistencyTester.votes[j][i] = counter_j;\n\n }\n }\n\n //Sort the jobs in descending order, based on the score they obtained\n ArrayList scheduleArrayList = scores.sorted();\n\n //Transform the sorted list of jobs into an array\n int[] schedule = new int[numJobs];\n for(int i = 0; i < numJobs; i++){\n schedule[i] = (int)scheduleArrayList.get(i);\n }\n\n// boolean isThereWinner = condorsetTests.isThereCondorcetWinner();\n// System.out.println(\"isThereWinner: \" + isThereWinner);\n// boolean isCondorcetWinner = condorsetTests.testCondorcetWinner(schedule);\n// System.out.println(\"isCondorcetWinner: \" + isCondorcetWinner);\n// System.out.println(\"--------------------------------------------------------------------\");\n// System.out.println(\"PTA violations before: \" + condorsetTests.countPTACondorcetViolations(schedule, testInstance.processingTimes));\n// System.out.println(\"Sum of Tardiness before: \" + sumOfTardTests.calculateSumOfTardiness(schedule, testInstance.preferences, testInstance.processingTimes));\n// System.out.println(\"--------------------------------------------------------------------\");\n// int[] agentTardiness = sumOfTardTests.getAgentTardiness();\n// System.out.println(\"Tardiness per agent (before): \" + Arrays.toString(agentTardiness));\n// System.out.println(\"Gini Index (before): \" + GiniIndexTester.getIndex(agentTardiness, numAgents));\n\n\n //PART 2 - Make our schedule Condorcet-consistent\n //First cell of the \"results\" array represents consistency,\n //second cell represents index to start the next search from (optimization purposes)\n int[] results = new int[2];\n //While our schedule is not Condorcet-consistent\n while (results[0] == 0) {\n //Search for swaps that will render the schedule Condorcet-consistent\n results = condorsetTests.testCondorcetConsistency(schedule, results[1]);\n //If schedule has become Condorcet-consistent\n if (results[0] == 1)\n System.out.println(\"Schedule: \" + Arrays.toString(schedule));\n }\n\n //Runtime\n long end = System.currentTimeMillis();\n long ourRuntime = end - start;\n System.out.println(\"OUR TOTAL RUNTIME: \" + ourRuntime + \" ms\");\n\n Statistics.myRuntime.add(ourRuntime);\n Statistics.numAgents.add(testInstance.numAgents);\n Statistics.numJobs.add(testInstance.numJobs);\n\n //PTA-Violations\n double myPercPTA = ((double)condorsetTests.countPTACondorcetViolations(schedule, testInstance.processingTimes)) / (numJobs * numJobs /2);\n System.out.println(\"PTA violations % for our solution: \" + myPercPTA);\n Statistics.myPTAviolations.add(myPercPTA);\n if (minizincSolution != null) {\n double mznPercPTA = ((double) condorsetTests.countPTACondorcetViolations(minizincSolution, testInstance.processingTimes) / (numJobs * numJobs /2));\n System.out.println(\"PTA violations % for MINIZINC: \" + mznPercPTA);\n Statistics.mznPTAviolations.add(mznPercPTA);\n }\n\n //Sum-of-tardiness and tardiness per agent\n int mySum = sumOfTardTests.calculateSumOfTardiness(schedule, testInstance.preferences, testInstance.processingTimes);\n System.out.println(\"Sum of Tardiness for our solution: \" + mySum);\n int[] agentTardiness = sumOfTardTests.getAgentTardiness();\n\n int mznSum = 0;\n int[] agentTardinessMinizinc = null;\n if (minizincSolution != null) {\n mznSum = sumOfTardTests.calculateSumOfTardiness(minizincSolution, testInstance.preferences, testInstance.processingTimes);\n System.out.println(\"Sum of Tardiness for MINIZINC: \" + mznSum);\n agentTardinessMinizinc = sumOfTardTests.getAgentTardiness();\n }\n\n Statistics.mySumOfTardiness.add(mySum);\n if (minizincSolution != null) {\n Statistics.mznSumOfTardiness.add(mznSum);\n }\n\n System.out.println(\"Tardiness per agent: \" + Arrays.toString(agentTardiness));\n\n //Pareto efficiency\n System.out.println(\"Pareto Efficient schedule: \" + paretoTests.isScheduleParetoEfficient(schedule));\n //System.out.println(\"Pareto Efficiency per agent: \" + Arrays.toString(paretoTests.agentParetoEfficiency(agentTardiness)));\n\n //Gini index\n double myIndex = GiniIndexTester.getIndex(agentTardiness, numAgents);\n System.out.println(\"Gini Index for our solution: \" + myIndex);\n Statistics.myGiniIndex.add(myIndex);\n\n if (minizincSolution != null) {\n double mznIndex = GiniIndexTester.getIndex(agentTardinessMinizinc, numAgents);\n System.out.println(\"Gini Index for MINIZINC: \" + mznIndex);\n Statistics.mznGiniIndex.add(mznIndex);\n }\n\n return schedule;\n\n\n }", "public void assignPointsToTeams(){\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalRuns() < two.getTotalRuns()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsRuns(setvalue);\n }\n \n //SORTS FOR TOTALHOMERUNS THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalHomeRuns() < two.getTotalHomeRuns()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsHomeRuns(setvalue);\n }\n \n //SORTS FOR RunsBattedIn THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalRunsBattedIn() < two.getTotalRunsBattedIn()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsRunsBattedIn(setvalue);\n }\n \n //SORTS FOR STOLENBASES THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalStolenBases() < two.getTotalStolenBases()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsStolenBases(setvalue);\n }\n \n //SORTS FOR BATTINGAVERAGE THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getBattingAverage() < two.getBattingAverage()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsBattingAverage(setvalue);\n }\n \n //SORTS FOR Wins THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getWins() < two.getWins()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsWins(setvalue);\n }\n \n //SORTS FOR Strikeouts THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getStrikeouts() < two.getStrikeouts()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsStrikeouts(setvalue);\n }\n \n //SORTS FOR Saves THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getSaves() < two.getSaves()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsSaves(setvalue);\n }\n \n //SORTS FOR ERA THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getEarnedRunAverage() < two.getEarnedRunAverage()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsERA(setvalue);\n }\n \n //SORTS FOR WHIP THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getWhip() < two.getWhip()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsWHIP(setvalue);\n } \n }", "public PentagoMove alphabetaw(PentagoBoardState boardState){\n PentagoBoardState pbs = (PentagoBoardState) boardState.clone();\n ArrayList<PentagoMove> legalmoves = pbs.getAllLegalMoves();\n\n PentagoMove bestmove = legalmoves.get(0);\n PentagoMove bestopponentmove = new PentagoMove(0,0,0,0,0);\n int bestmovescore = -9999999;\n int bestwhitescore = 0;\n //ArrayList<Integer> scores = new ArrayList<Integer>();\n for(int i = 0;i<legalmoves.size()-1;i++){\n\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove next = legalmoves.get(i);\n\n newboard.processMove(next);\n\n int score = evaluate(newboard);\n //scores.add(score);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n\n if(score > 100000){\n newboard.getWinner();\n newboard.printBoard();\n System.out.println(\"FOUND A WINNER\" + score);\n return next;\n }\n\n\n PentagoMove currentopponentmove;\n ArrayList<PentagoMove> opponentlegalmoves = newboard.getAllLegalMoves();\n if (opponentlegalmoves.size()!=0){\n currentopponentmove = opponentlegalmoves.get(0);\n }\n\n int minopponentmovescore = 999999;\n int thismovescore = -9999;\n ArrayList<PentagoMove> bestopponentmoves = new ArrayList<PentagoMove>();\n PentagoMove currentbestopponentmove = new PentagoMove(0,0,0,0,0);\n\n for(int a = 0;a<opponentlegalmoves.size()-1;a++){\n\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove opponentnext = opponentlegalmoves.get(a);\n\n pbsopponent.processMove(opponentnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int opponentscore = evaluate(pbsopponent);\n\n\n\n\n\n if (minopponentmovescore>opponentscore){\n //currentopponentmove = opponentnext;\n minopponentmovescore = opponentscore;\n bestopponentmoves.add(opponentnext);\n currentbestopponentmove = opponentnext;\n }\n\n\n }\n bestopponentmove = currentbestopponentmove;\n //lvl 3\n /*\n\n int lvl3minscore =99999;\n PentagoMove currentmaxmove;\n for (int r = 0;r<bestopponentmoves.size()-1;r++) {\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n pbsopponent.processMove(bestopponentmoves.get(r));\n\n ArrayList<PentagoMove> maxlegalmoves = pbsopponent.getAllLegalMoves();\n if (maxlegalmoves.size() != 0) {\n currentmaxmove = maxlegalmoves.get(0);\n }\n int opponentscore = evaluate(pbsopponent);\n int findminmaxmovescore = -99999;\n for (int s = 0; s < maxlegalmoves.size() - 1; s++) {\n\n PentagoBoardState maxboard = (PentagoBoardState) pbsopponent.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove maxnext = maxlegalmoves.get(s);\n\n maxboard.processMove(maxnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int maxnextscore = evaluate(pbsopponent);\n if (findminmaxmovescore < maxnextscore) {\n currentmaxmove = maxnext;\n findminmaxmovescore = maxnextscore;\n }\n }\n if (thismovescore<findminmaxmovescore){\n //currentopponentmove = opponentnext;\n thismovescore = findminmaxmovescore;\n }\n\n //opponentscore = maxmovescore;\n }\n\n //end experiment\n\n\n\n\n if (mycolour ==1){\n lvl3minscore =minopponentmovescore;\n }\n */\n if (minopponentmovescore>bestmovescore){//minopponentmovescore\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n\n }\n else if (minopponentmovescore == bestmovescore){\n if (score > bestwhitescore){\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n }\n\n\n\n }\n\n\n }\n System.out.println(\"final max player move score: \"+ bestmovescore + \"\\n My best move: \"+bestmove.toPrettyString() + \"\\n My best move: \"+ bestopponentmove.toPrettyString());\n return bestmove;\n }", "public void summariseScore(Athletes[] competitors, Game gam) {\n\t\tint min = Integer.MAX_VALUE;\n\t\tAthletes winner1 = null;\n\t\tAthletes winner2 = null;\n\t\tAthletes winner3 = null;\n\t\t/* choosing the first winner and giving him his points */\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\twinner1 = competitors[i];\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner1(winner1);\n\t\twinner1.setPoints(5);\n\n\t\t/* choosing the second winner and giving him his points */\n\t\tmin = Integer.MAX_VALUE;\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tif (competitors[i] != winner1) {\n\t\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\t\twinner2 = competitors[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner2(winner2);\n\t\twinner2.setPoints(3);\n\n\t\t/* choosing the last winner and giving him his points */\n\t\tmin = Integer.MAX_VALUE;\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tif (competitors[i] != winner1 && competitors[i] != winner2) {\n\t\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\t\twinner3 = competitors[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner3(winner3);\n\t\twinner3.setPoints(1);\t\n\t\t\n\t\tsortCompetitors(competitors);\n\t}", "public static int applyMinMax(int d, BoardModel model, boolean maximizingTeam, int alpha, int beta, boolean whiteTeam, int startDepth) {\n //base case, figure out determinaion of game over\n\n // printMap(model);\n // System.out.println(\"Depth: \"+d);\n \n\n //allPossibleMoves moveTree = new allPossibleMoves();\n int[] currentQueen;\n ArrayList<int[]> whiteQueens = new ArrayList<>();\n ArrayList<int[]> blackQueens = new ArrayList<>();\n ArrayList<int[]> myQueens = new ArrayList<>();\n // possibleMove bestestMove = null;\n\n// for (int count = 0; count < model.queenPositions.size(); count++) {\n// if (model.getTile(model.queenPositions.get(count)).equals(POS_MARKED_BLACK)) {\n// blackQueens.add(model.queenPositions.get(count));\n// // System.out.println(\"Black: \"+model.getTile(model.queenPositions.get(count)));\n// } else {\n// whiteQueens.add(model.queenPositions.get(count));\n// // System.out.println(\"White: \"+model.getTile(model.queenPositions.get(count)));\n// }\n// }\n//set black and white queens \n for (int jam = 0; jam < 10; jam++) {\n for (int pb = 0; pb < 10; pb++) {\n if (model.getTile(new int[]{jam, pb}).equals(POS_MARKED_WHITE)) {\n whiteQueens.add(new int[]{jam, pb});\n }\n if (model.getTile(new int[]{jam, pb}).equals(POS_MARKED_BLACK)) {\n blackQueens.add(new int[]{jam, pb});\n }\n }\n }\n if (maximizingTeam){\n if (whiteTeam){\n myQueens = whiteQueens;\n }\n else{\n myQueens = blackQueens;\n }\n }\n if (!maximizingTeam){\n if (whiteTeam){\n myQueens = blackQueens;\n }\n else{\n myQueens = whiteQueens;\n }\n }\n \n if (d == 0 || findAllMoves(model,myQueens).isEmpty() ) {\n return baseCase(model, whiteTeam);\n }\n\n // System.out.println(\"White Queens identified as: \" + whiteQueens.get(0)[0] + \"\" + whiteQueens.get(0)[1] + \" \" + whiteQueens.get(1)[0] + whiteQueens.get(1)[1] + \" \" + whiteQueens.get(2)[0] + whiteQueens.get(2)[1] + \" \" + whiteQueens.get(3)[0] + whiteQueens.get(3)[1]);\n //if (whiteTeam) {\n // myQueens = whiteQueens;\n //} else {\n // myQueens = blackQueens;\n // }\n // perform a check to see which side we are on. \n // System.out.println(\"Status: \"+maximizingTeam);\n if (maximizingTeam) {\n // System.out.println(\"Maximizing turn\");\n if (whiteTeam) {\n myQueens = whiteQueens;\n } else {\n myQueens = blackQueens;\n }\n\n int maxEval = -1000000;\n // considering this move was played. \n\n // printMap(model);\n // System.out.println();\n //find all children from this state\n ArrayList<ArrayList<int[]>> children = findAllMoves(model, myQueens);\n if (children.size() == 0){\n return baseCase(model, whiteTeam);\n }\n if(children.size()==0 && d == startDepth){\n System.out.println(\"We Lost :( \");\n }\n // printMap(model);\n // System.out.println();\n for (int i = 0; i < children.size(); i++) {\n\n String m1 = stringMap(model);\n\n BoardModel recursionModel = new BoardModel(10);\n\n for (int jam = 0; jam < 10; jam++) {\n for (int pb = 0; pb < 10; pb++) {\n recursionModel.setTile(new int[]{jam, pb}, model.getTile(new int[]{jam, pb}));\n }\n }\n recursionModel.queenPositions = new ArrayList<>();\n for (int x = 0; x < model.queenPositions.size(); x++) {\n recursionModel.queenPositions.add(model.queenPositions.get(x));\n }\n\n // printMap(recursionModel);\n recursionModel.moveQueen(children.get(i).get(0), children.get(i).get(1));\n recursionModel.setTile(children.get(i).get(2), POS_MARKED_ARROW);\n // System.out.println(\"max recursive call\");\n int childVal = applyMinMax(d - 1, recursionModel, false, alpha, beta, whiteTeam, startDepth);\n recursionModel.moveQueen(children.get(i).get(1), children.get(i).get(0));\n recursionModel.setTile(children.get(i).get(2), POS_AVAILABLE);\n\n String m2 = stringMap(model);\n // System.out.println(\"Check board Validity Max: \"+m1.equals(m2));\n\n maxEval = max(maxEval, childVal);\n if (d == startDepth) {\n ArrayList<int[]> blah = new ArrayList<int[]>();\n blah.add(children.get(i).get(0));\n blah.add(children.get(i).get(1));\n blah.add(children.get(i).get(2));\n blah.add(new int[]{childVal});\n maxMinMoves.add(blah);\n }\n alpha = max(maxEval, alpha);\n // System.out.println(\"A: \"+alpha);\n if (alpha >= beta) {\n break;\n }\n }\n return maxEval;\n\n } else {\n // System.out.println(\"Minimizing turn\");\n if (!whiteTeam) {\n myQueens = whiteQueens;\n } else {\n myQueens = blackQueens;\n }\n\n int maxEval = 1000000;\n // considering this move was played. \n\n // printMap(model);\n // System.out.println();\n //find all children from this state\n ArrayList<ArrayList<int[]>> children = findAllMoves(model, myQueens);\n if (children.size() == 0){\n return baseCase(model, whiteTeam);\n }\n if(children.size()==0 && d == startDepth){\n System.out.println(\"We Lost :( \");\n }\n // printMap(model);\n // System.out.println();\n for (int i = 0; i < children.size(); i++) {\n\n String m1 = stringMap(model);\n\n BoardModel recursionModel = new BoardModel(10);\n\n for (int jam = 0; jam < 10; jam++) {\n for (int pb = 0; pb < 10; pb++) {\n recursionModel.setTile(new int[]{jam, pb}, model.getTile(new int[]{jam, pb}));\n }\n }\n recursionModel.queenPositions = new ArrayList<>();\n for (int x = 0; x < model.queenPositions.size(); x++) {\n recursionModel.queenPositions.add(model.queenPositions.get(x));\n }\n\n // printMap(recursionModel);\n recursionModel.moveQueen(children.get(i).get(0), children.get(i).get(1));\n recursionModel.setTile(children.get(i).get(2), POS_MARKED_ARROW);\n // System.out.println(\"min recursive call\");\n int childVal = applyMinMax(d - 1, recursionModel, true, alpha, beta, whiteTeam, startDepth);\n recursionModel.moveQueen(children.get(i).get(1), children.get(i).get(0));\n recursionModel.setTile(children.get(i).get(2), POS_AVAILABLE);\n\n String m2 = stringMap(model);\n // System.out.println(\"Check board Validity Max: \"+m1.equals(m2));\n\n maxEval = min(maxEval, childVal);\n if (d == startDepth) {\n ArrayList<int[]> blah = new ArrayList<int[]>();\n blah.add(children.get(i).get(0));\n blah.add(children.get(i).get(1));\n blah.add(children.get(i).get(2));\n blah.add(new int[]{childVal});\n maxMinMoves.add(blah);\n }\n beta = min(maxEval, alpha);\n // System.out.println(\"A: \"+alpha);\n if (alpha >= beta) {\n break;\n }\n }\n return maxEval;\n }\n\n }", "private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "public OtherAgent nearestAgent(RedAgent agent, Function<OtherAgent, Boolean> test)\n\t{\n\t\t// get a list of OtherAgents satisfying the test\n\t\tList<OtherAgent> ags = new ArrayList<OtherAgent>();\n\t\tfor (OtherAgent ag : agent.agents.values())\n\t\t{\n\t\t\tif (ag.position != null && test.apply(ag))\n\t\t\t{\n\t\t\t\tags.add(ag);\n\t\t\t}\n\t\t}\n\n\t\tif (ags.isEmpty()) return null;\n\n\t\t// get the shortest path to one of those agents\n\t\tLinkedList<String> path = shortestPath(agent.position, (id) -> {\n\t\t\tfor (OtherAgent ag : ags) if (ag.position.equals(id)) return true;\n\t\t\treturn false;\n\t\t});\n\n\t\tif (path == null) return null;\n\n\t\t// (arbitrarily) pick one agent that that path leads to\n\t\tfor (OtherAgent ag : ags)\n\t\t{\n\t\t\tif (path.isEmpty())\n\t\t\t{\n\t\t\t\tif (ag.position.equals(agent.position)) return ag;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (ag.position.equals(path.get(path.size() - 1))) return ag;\n\t\t\t}\n\t\t}\n\n\t\t// XXX shouldn't get here\n\t\tthrow new RuntimeException(\"failed to find nearest agent\");\n\t}", "private int findBidders() {\r\n try {\r\n agents = new ArrayList<AMSAgentDescription>();\r\n //definisce i vincoli di ricerca, in questo caso tutti i risultati\r\n SearchConstraints searchConstraints = new SearchConstraints();\r\n searchConstraints.setMaxResults(Long.MAX_VALUE);\r\n //tutti gli agenti dell'AMS vengono messi in un array\r\n AMSAgentDescription [] allAgents = AMSService.search(this, new AMSAgentDescription(), searchConstraints);\r\n //scorre la lista degli agenti trovati al fine di filtrare solo quelli di interesse\r\n for (AMSAgentDescription a: allAgents) {\r\n //aggiunge l'agente partecipante all'ArrayList se e' un partecipante\r\n if(a.getName().getLocalName().contains(\"Participant\")) {\r\n agents.add(a);\r\n } \r\n }\r\n } catch (Exception e) {\r\n System.out.println( \"Problema di ricerca dell'AMS: \" + e );\r\n e.printStackTrace();\r\n }\r\n return agents.size();\r\n }", "private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }", "public Map<Integer,List<Node>> getPrefixes(Map<Agent,Integer>budgetMap)\n {\n Map<Agent,Pair<Node,Node>> agent_goal_start = problem.getAgentsAndStartGoalNodes();\n Set<Agent> agents = agent_goal_start.keySet();\n pAgents = new PriorityQueue<>(new CompareAgentsPriority());\n //PriorityQueue<Agent> pAgents = new PriorityQueue<>(new CompareAgentsHeurstics());\n\n prefixes = new HashMap<>();\n pAgents.addAll(agents);\n int numOfNodesToDevelop;\n while(pAgents.size()>0)\n {\n Agent agent = pAgents.poll();\n\n /* if(agent.isDone())\n {\n\n List<Node> done = new ArrayList<>();\n done.add(agent.getGoal());\n prefixes.put(agent.getId(),done);\n // inhabitAgent(agent.getGoal().getId(),0);// TODO: 22/09/2019 remove\n\n }*/\n //else {\n numOfNodesToDevelop = budgetMap.get(agent);\n Node current = agent.getCurrent();\n List<Node> prefix;\n\n\n if(this instanceof BudgetOrientedMALRTA)\n prefix = calculatePrefix(current, agent.getGoal(), numOfNodesToDevelop, agent);\n else\n prefix = super.calculatePrefix(current, agent.getGoal(), numOfNodesToDevelop, agent);\n\n if (prefix == null) {\n System.out.println(\"No Solution agent \" + agent.getId()+\" can't move from \"+agent.getCurrent() + \" id = \"+agent.getCurrent().getId());\n prefixes.put(agent.getId(), prefix);\n return prefixes;\n\n }\n\n\n //Updating node\n for (int i = 0; i < prefix.size() - 1; i++) {\n updateNode(prefix.get(i).getId(), i);\n }\n inhabitAgent(prefix.get(prefix.size() - 1).getId(),prefix.size() - 1 );\n prefixes.put(agent.getId(), prefix);\n\n //}\n\n }\n\n // if(this instanceof BudgetOrientedMALRTA)\n // System.out.println(\"The amount of leftover after this round = \"+((BudgetOrientedMALRTA)this).getLeftover());\n\n return prefixes;\n }", "public int tournament(int size) {\n\t\t\n\t\tint best = 0;\n\t\tfloat bestFitness = Float.NEGATIVE_INFINITY;\n\t\t\n\t\t//selects the best individual from randomly sampled tournament participants\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tint index = R.nextInt(populationSize);\n\t\t\tif(fitness[index] > bestFitness){\n\t\t\t\tbestFitness = fitness[index];\n\t\t\t\tbest = index;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn best;\n\t}", "private WeightedSampler<String> getPossibleActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedRandomSampler<>();\n // playing cards & selecting targets\n List<Card> hand = p.getHand();\n for (Card c : hand) {\n if (p.canPlayCard(c)) {\n double totalWeight = PLAY_CARD_TOTAL_WEIGHT + PLAY_CARD_COST_WEIGHT_MULTIPLIER * c.finalStats.get(Stat.COST);\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(c.getBattlecryTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n if (c instanceof BoardObject) {\n double weightPerPos = totalWeight / (p.getPlayArea().size() + 1);\n // rip my branching factor lol\n for (int playPos = 0; playPos <= p.getPlayArea().size(); playPos++) {\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new PlayCardAction(p, c, playPos, targets).toString().intern(), weightPerPos / targetSearchSpace.size());\n }\n }\n } else {\n // spells don't require positioning\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new PlayCardAction(p, c, 0, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n }\n this.b.getMinions(team, false, true).forEachOrdered(m -> {\n // unleashing cards & selecting targets\n if (p.canUnleashCard(m)) {\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), UNLEASH_TOTAL_WEIGHT / targetSearchSpace.size());\n }\n }\n // minion attack\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n double weight = totalWeight / m.getAttackableTargets().count();\n m.getAttackableTargets().forEachOrdered(target -> {\n double bonus = target instanceof Leader ? ATTACK_TARGET_LEADER_MULTIPLIER : 1;\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * bonus * weight);\n });\n }\n });\n // ending turn\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "private Pair<Double, Move> minimax(OthelloBoard board, OthelloSide side, int depth, int max_depth, \n\t\t\t\t\t\t\t\tMove m, double alpha, double beta) {\n\t\tdouble bestScore;\n\t\tint turncount = turn;\n\t\tMove bestMove;\n\t\t//System.out.println(\"Start of minimax. Depth: \" + depth + \" Side: \" + side);\n\t /* int state = board.getState();\n\t\tif (state == OthelloBoard.DRAW)\n\t return new Pair<Double, Move>(0, m);\n\t if ((state == OthelloBoard.BLACK_WINS) && (side == OthelloSide.BLACK)) \n\t return new Pair<Double, Move>(Double.POSITIVE_INFINITY, m); \n\t if ((state == OthelloBoard.WHITE_WINS) && (side == OthelloSide.WHITE))\n\t return new Pair<Double, Move>(Double.POSITIVE_INFINITY, m);\n\t if ((state == OthelloBoard.BLACK_WINS) && (side == OthelloSide.WHITE))\n\t return new Pair<Double, Move>(Double.NEGATIVE_INFINITY, m);\n\t if ((state == OthelloBoard.WHITE_WINS) && (side == OthelloSide.BLACK))\n\t return new Pair<Double, Move>(Double.NEGATIVE_INFINITY, m);*/\n\t\tif(board.isDone()) {\n\t\t\tdouble endgame = board.countBlack() - board.countWhite();\n\t\t\treturn new Pair<Double, Move>(endgame, m);\n\t\t}\n\t\tif(depth == max_depth) {\n\t\t\tdouble mdScore = evaluator(board, side);\n\t\t\treturn new Pair<Double, Move>(mdScore, m);\t\t\t\n\t\t} else {\n\t\t\tLinkedList<Move> moveList = getMoveList(board, side);\n\t\t\tif(depth == 0) {\n\t \t\t\tLinkedList<Move> corners = new LinkedList<Move>();\n\t\t\t\tfor(Move mv : moveList) {\n\t\t\t\t\tif(board.isCorner(mv)) {\n\t\t\t\t\t\tcorners.add(mv);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(corners.size() != 0) {\n\t\t\t\t\tMove bcorner = null;\n\t\t\t\t\tdouble best = -Double.MAX_VALUE;\n\t\t\t\t\tfor(Move ml : corners) {\n\t\t\t\t\t\tdouble temp = evalMove(board, side, ml);\n\t\t\t\t\t\tif(temp > best) {\n\t\t\t\t\t\t\tbest = temp;\n\t\t\t\t\t\t\tbcorner = ml;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn new Pair<Double, Move>(best, bcorner);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(moveList.toString());\n\t\t\tbestScore = -Double.MAX_VALUE;\n\t\t\tbestMove = new Move(1,1);\n\t\t\tif(moveList.size() == 0) {\n\t\t\t\tdouble mdScore = evaluator(board, side);\n\t\t\t\treturn new Pair<Double, Move>(mdScore, m);\n\t\t\t} else {\n\t\t\t\tfor(int i = 0; i < moveList.size(); i++) {\n\t\t\t\t\tOthelloBoard tempBoard = board.copy();\n\t\t\t\t\tMove move = moveList.get(i);\n\t\t\t\t\ttempBoard.move(move, side);\n\t\t\t\t\talpha = -(minimax(tempBoard, side.opposite(), depth + 1, max_depth, move, -beta, -alpha)).score;\n\t\t\t\t\t//System.out.println(\"Side: \" + side);\n\t\t\t\t\t//System.out.println(\"alpha (before IF): \" + alpha);\n\t\t\t\t\t//System.out.println(\"bestScore (before IF): \" + bestScore);\n\t\t\t\t\tif(beta <= alpha) {\n\t\t\t\t\t\treturn new Pair<Double, Move>(alpha, move);\n\t\t\t\t\t}\n\t\t\t\t\tif(alpha > bestScore ) {\n\t\t\t\t\t\tbestScore = alpha;\n\t\t\t\t\t\tbestMove = move;\n\t\t\t\t\t\t//bestMove.copy(move);\n\t\t\t\t\t\t//System.out.println(\"theScore(IF): \" + alpha);\n\t\t\t\t\t\t//System.out.println(\"bestScore(IF): \" + bestScore);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn new Pair<Double, Move>(bestScore, bestMove);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n\t\tCounter fcSecurity1 = new Counter(true);\r\n\t\tCounter ccSecurity1 = new Counter(false);\r\n\t\tCounter ccSecurity2 = new Counter(false);\r\n\t\tScanner inscan = new Scanner(System.in);\r\n\r\n\t\tLineQueue<Passenger> internationalLeaving = new LineQueue<Passenger>();\r\n\t\tLineQueue<Passenger> checkFirstQ = new LineQueue<Passenger>();\r\n\t\tLineQueue<Passenger> checkComQ = new LineQueue<Passenger>();\r\n\t\tLineQueue<Passenger> securityFirstQ = new LineQueue<Passenger>();\r\n\t\tLineQueue<Passenger> securityComQ = new LineQueue<Passenger>();\r\n\t\tLineQueue<Passenger> gateComQ = new LineQueue<Passenger>();\r\n\t\tdouble[] interArray = new double[2];\r\n\t\tLineQueue<Passenger> interArrival = new LineQueue<Passenger>();\r\n\t\tLineQueue<Passenger> commuterArrival = new LineQueue<Passenger>();\r\n\t\tint days = 0;\r\n\t\t/*\r\n\t\t * Get inputs from user to run simulation (days, number of desks)\r\n\t\t */\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(\"How many days to run the simulation?\");\r\n\t\t\t\tdays = inscan.nextInt();\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\tSystem.out.println(\"Incorrect input type. Please enter an integer\");\r\n\t\t\t\tinscan.next();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tdouble TIME = 60 * 60 * 24 * days;\r\n\t\tint numOfCoachAgents = 3;\r\n\t\tint numOfFirstAgents = 1;\r\n\t\tint totalAgents = 0;\r\n\t\tint checker;\r\n\t\tSystem.out.println(\"There can be a maximum of 6 desks:\");\r\n\t\tdo {\r\n\t\t\twhile (true) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"How many coach class check-in desks will there be? (enter 0 for default)\");\r\n\t\t\t\t\tchecker = inscan.nextInt();\r\n\t\t\t\t\tif (checker > 0) {\r\n\t\t\t\t\t\tnumOfCoachAgents = checker;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\t\tSystem.out.println(\"Incorrect input type. Please enter an integer\");\r\n\t\t\t\t\tinscan.next();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twhile (true) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"How many first class check-In desks will there be? (enter 0 for default)\");\r\n\t\t\t\t\tchecker = inscan.nextInt();\r\n\t\t\t\t\tif (checker > 0) {\r\n\t\t\t\t\t\tnumOfFirstAgents = checker;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\t\tSystem.out.println(\"Incorrect input type. Please enter an integer\");\r\n\t\t\t\t\tinscan.next();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ttotalAgents = numOfFirstAgents + numOfCoachAgents;\r\n\t\t\tif (totalAgents > 6) {\r\n\t\t\t\tSystem.out.println(\"You can have a maximum of 6 counters, enter new numbers\");\r\n\t\t\t}\r\n\r\n\t\t} while (totalAgents > 6);\r\n\r\n\t\tdouble curInt = 0;\r\n\t\tdouble curCom = 0;\r\n\t\t// check in counters\r\n\t\tCounter[] coachCounter = new Counter[numOfCoachAgents];\r\n\t\tCounter[] firstCounter = new Counter[numOfFirstAgents];\r\n\t\tfor (int i = 0; i < firstCounter.length; i++) {\r\n\t\t\tCounter fcCounter1 = new Counter(true);\r\n\t\t\tfirstCounter[i] = fcCounter1;\r\n\t\t}\r\n\t\tfor (int i = 0; i < coachCounter.length; i++) {\r\n\t\t\tCounter ccCounter1 = new Counter(false);\r\n\t\t\tcoachCounter[i] = ccCounter1;\r\n\t\t}\r\n\t\tint flightRate = 3600;\r\n\r\n\t\tint numberOfCoachC = 0;\r\n\t\tdouble totalCoachCheckQ = 0;\r\n\t\tdouble totalCoachCheck = 0;\r\n\t\tdouble totalCoachSecurityQ = 0;\r\n\t\tdouble totalCoachS = 0;\r\n\t\tdouble totalGate = 0;\r\n\r\n\t\tint numberOfFirst = 0;\r\n\t\tint numberOfCoachI = 0;\r\n\t\tdouble totalFirstCheckQ = 0;\r\n\t\tdouble totalFirstCheck = 0;\r\n\t\tdouble totalFirstSecurityQ = 0;\r\n\t\tdouble totalFirstSecurity = 0;\r\n\r\n\t\tint firstMissedFlight = 0;\r\n\t\tint coachMissedFlight = 0;\r\n\t\tint coachRefund = 0;\r\n\t\tint firstRefund = 0;\r\n\r\n\t\tPassenger nextCommuter = null;\r\n\t\tPassenger nextInternational = null;\r\n\r\n\t\t// keep going until timeElapsed has reached TIME running\r\n\t\twhile (timeElapsed != TIME) {\r\n\t\t\t// System.out.println(\"while\");\r\n\t\t\t/*\r\n\t\t\t * First part of the program, generating commuters that are arriving\r\n\t\t\t * to the airport, then queueing them in the appropriate check in\r\n\t\t\t * location\r\n\t\t\t * \r\n\t\t\t * \r\n\t\t\t */\r\n\r\n\t\t\t// check if commuter should be generated\r\n\t\t\tif (timeElapsed % flightRate == 1800) {\r\n\t\t\t\tcommuterArrival = makeCommuter();\r\n\t\t\t\tnextCommuter = commuterArrival.dequeue();\r\n\t\t\t\tcurCom = timeElapsed;\r\n\t\t\t} // end if\r\n\r\n\t\t\t// check if international should be generated and get the first\r\n\t\t\t// person that will arrive\r\n\t\t\tif (timeElapsed % 21600 == 0) {\r\n\t\t\t\tinterArrival = makeInter();\r\n\t\t\t\tnextInternational = interArrival.dequeue();\r\n\t\t\t\tcurInt = timeElapsed;\r\n\t\t\t} // end if\r\n\r\n\t\t\tif (nextCommuter != null && curCom - nextCommuter.arrival() <= timeElapsed) {\r\n\t\t\t\tnextCommuter.setCurrentTime(timeElapsed);\r\n\t\t\t\tg++;\r\n\t\t\t\tcheckComQ.enqueue(nextCommuter);\r\n\t\t\t\tif (!commuterArrival.isEmpty()) {\r\n\t\t\t\t\tnextCommuter = commuterArrival.dequeue();\r\n\t\t\t\t\tcurCom = timeElapsed;\r\n\t\t\t\t}\r\n\t\t\t} // end if\r\n\r\n\t\t\tif (curInt - 21600 - nextInternational.arrival() <= timeElapsed) {\r\n\t\t\t\tge++;\r\n\t\t\t\tif (nextInternational.isFirstClass()) {\r\n\t\t\t\t\tnextInternational.setCurrentTime(timeElapsed);\r\n\t\t\t\t\tcheckFirstQ.enqueue(nextInternational);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnextInternational.setCurrentTime(timeElapsed);\r\n\t\t\t\t\tcheckComQ.enqueue(nextInternational);\r\n\t\t\t\t}\r\n\t\t\t\t// nextInternational.flightIsLeaving(curInt+(21600-nextInternational.arrival()));\r\n\t\t\t\tif (!interArrival.isEmpty()) {\r\n\t\t\t\t\tnextInternational = interArrival.dequeue();\r\n\t\t\t\t\tcurInt = timeElapsed;\r\n\t\t\t\t}\r\n\t\t\t} // end if\r\n\r\n\t\t\t/*\r\n\t\t\t * second part of the process, dequeuing from the bag line, and\r\n\t\t\t * servicing them at the bag counter\r\n\t\t\t */\r\n\r\n\t\t\t// first class counter\r\n\r\n\t\t\tfor (int i = 0; i < coachCounter.length; i++) {\r\n\t\t\t\tcheckCounter(checkComQ, securityComQ, coachCounter[i], timeElapsed);\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < firstCounter.length; i++) {\r\n\t\t\t\tcheckCounter(checkFirstQ, securityFirstQ, firstCounter[i], timeElapsed);\r\n\t\t\t}\r\n\r\n\t\t\tcheckSecurity(securityFirstQ, gateComQ, fcSecurity1, internationalLeaving);\r\n\t\t\tcheckSecurity(securityComQ, gateComQ, ccSecurity1, internationalLeaving);\r\n\t\t\tcheckSecurity(securityComQ, gateComQ, ccSecurity2, internationalLeaving);\r\n\r\n\t\t\tif (timeElapsed > 0 && timeElapsed % 3600 == 1800) {\r\n\t\t\t\tfor (int i = 0; i < 50 && !gateComQ.isEmpty(); i++) {\r\n\t\t\t\t\tPassenger gettingOn = gateComQ.dequeue();\r\n\t\t\t\t\tgettingOn.atGate(timeElapsed);\r\n\t\t\t\t\t// System.out.println(\"i: \"+i);\r\n\t\t\t\t\tnumberOfCoachC++;\r\n\t\t\t\t\ttotalCoachCheckQ = totalCoachCheckQ + gettingOn.counterQTime();\r\n\t\t\t\t\ttotalCoachCheck = totalCoachCheck + gettingOn.counterTime();\r\n\t\t\t\t\ttotalCoachSecurityQ = totalCoachSecurityQ + gettingOn.securityQTime();\r\n\t\t\t\t\ttotalCoachS = totalCoachS + gettingOn.securityTime();\r\n\t\t\t\t\ttotalGate = totalGate + gettingOn.gateTime();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\twhile (!internationalLeaving.isEmpty()) {\r\n\t\t\t\tPassenger gettingOn = internationalLeaving.dequeue();\r\n\r\n\t\t\t\tif (gettingOn.isFirstClass()) {\r\n\t\t\t\t\tnumberOfFirst++;\r\n\t\t\t\t\ttotalFirstCheckQ = totalFirstCheckQ + gettingOn.counterQTime();\r\n\t\t\t\t\ttotalFirstCheck = totalFirstCheck + gettingOn.counterTime();\r\n\t\t\t\t\ttotalFirstSecurityQ = totalFirstSecurityQ + gettingOn.securityQTime();\r\n\t\t\t\t\ttotalFirstSecurity = totalFirstSecurity + gettingOn.securityTime();\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tnumberOfCoachI++;\r\n\t\t\t\t\ttotalCoachCheckQ = totalCoachCheckQ + gettingOn.counterQTime();\r\n\t\t\t\t\ttotalCoachCheck = totalCoachCheck + gettingOn.counterTime();\r\n\t\t\t\t\ttotalCoachSecurityQ = totalCoachSecurityQ + gettingOn.securityQTime();\r\n\t\t\t\t\ttotalCoachS = totalCoachS + gettingOn.securityTime();\r\n\t\t\t\t\tif (timeElapsed > gettingOn.getFlightLeavingTime()) {\r\n\t\t\t\t\t\tcoachMissedFlight++;\r\n\t\t\t\t\t\tif (gettingOn.onTime()) {\r\n\t\t\t\t\t\t\tcoachRefund++;\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\ttimeElapsed++;\r\n\t\t} // end of while\r\n\r\n\t\t/*\r\n\t\t * print out statistics\r\n\t\t */\r\n\t\tint allCoach = numberOfCoachC + numberOfCoachI;\r\n\r\n\t\tSystem.out.println(\"There were \" + allCoach + \" coach class passengers that made it through the airport\");\r\n\t\tSystem.out.println(\r\n\t\t\t\t\"\\t\" + numberOfCoachI + \" were international fliers\\n\\t\" + numberOfCoachC + \" were commuter fliers\");\r\n\t\tSystem.out.printf(\"\\tTheir average time in the check in queue was %.2f minutes\\n\",\r\n\t\t\t\t((double) ((int) totalCoachCheckQ / allCoach) / 60));\r\n\t\tSystem.out.println(\"\\tTheir average time at the check in counter \" + (double) ((int) totalCoachCheck / allCoach)\r\n\t\t\t\t+ \" seconds\");\r\n\t\tSystem.out.println(\"\\tTheir average time in the security queue was \" + (int) (totalCoachSecurityQ / allCoach)\r\n\t\t\t\t+ \" seconds\");\r\n\t\tSystem.out.println(\"\\tTheir average time in security was \" + (int) (totalCoachS / allCoach) + \" seconds\");\r\n\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTheir were \" + numberOfFirst + \" first class passengers that made it through the airport \");\r\n\t\tSystem.out.printf(\"\\tTheir average time in the check in queue was %.2f minutes\\n\",\r\n\t\t\t\t((double) ((int) totalFirstCheckQ / numberOfFirst) / 60));\r\n\t\tSystem.out.println(\"\\tTheir average time at the check in counter \"\r\n\t\t\t\t+ (double) ((int) totalFirstCheck / numberOfFirst) + \" seconds\");\r\n\t\tSystem.out.println(\"\\tTheir average time in the security queue was \"\r\n\t\t\t\t+ (int) (totalFirstSecurityQ / numberOfFirst) + \" seconds\");\r\n\t\tSystem.out.println(\r\n\t\t\t\t\"\\tThere average time in security was \" + (int) (totalFirstSecurity / numberOfFirst) + \" seconds\\n\");\r\n\r\n\t\tSystem.out\r\n\t\t\t\t.println(firstMissedFlight + \" first class passengers missed flights \" + firstRefund + \" got a refund\");\r\n\t\tSystem.out\r\n\t\t\t\t.println(coachMissedFlight + \" coach class passengers missed flights \" + coachRefund + \" got a refund\");\r\n\t\tSystem.out.println(\"There were \" + totalAgents + \" agents, making a total of \" + totalAgents * days * 24 * 25);\r\n\t\tSystem.out.println(\"The airport made $\" + 500 * numberOfCoachI + \" from coach class international fliers\");\r\n\t\tSystem.out.println(\"The airport made $\" + 1000 * numberOfFirst + \" from first class international fliers\");\r\n\t\tSystem.out.println(\"The airport made $\" + 200 * numberOfCoachC + \" from coach class commute fliers\");\r\n\t\tSystem.out.println(\"It cost $\" + 10000 * days * 4 + \" to run the international flights\");\r\n\t\tSystem.out.println(\"It cost $\" + 1000 * days * 24 + \" to run the commute flights\");\r\n\r\n\t}", "public HardSoftScore calculateScore(MPSReadinessCheckSolution solution) {\n\t\tint hardScore = 0, softScore = 0;\n\t\tMap<ProductionPlant, Map<Date, List<FixedPlanEntry>>> fulfilled = solution.getFulfilledMPS();\n\t\tMap<PlanEntryIndex, MRPEntry> mrp = solution.getAccumulatedMRP();\n\t\tMap<ProductionPlant, Map<Date, Map<UUID, Integer>>> aggregatecDemands = aggregateDemands(fulfilled);\n\t\tfor (Map.Entry<ProductionPlant, Map<Date, Map<UUID, Integer>>> fulfilledByLocEntry: aggregatecDemands.entrySet()) {\n\t\t\tProductionPlant fulfilledLoc = fulfilledByLocEntry.getKey();\n\t\t\tMap<Date, Map<UUID, Integer>> fulfilledByLoc = fulfilledByLocEntry.getValue();\n\t\t\tfor (Map.Entry<Date, Map<UUID, Integer>> fulfilledByDateEntry: fulfilledByLoc.entrySet()) {\n\t\t\t\tDate fulfilledDate = fulfilledByDateEntry.getKey();\n\t\t\t\tMap<UUID, MRPEntry> mrpPlan = findMRPSupportByFulfilledDate(mrp, fulfilledLoc, fulfilledDate);\n\t\t\t\tif (mrpPlan == null) {\n\t\t\t\t\thardScore = -10;\n\t\t\t\t\t//System.out.println(\"no mrp plan, date=\" + fulfilledDate);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tMap<UUID, Integer> skuDemands = fulfilledByDateEntry.getValue();\n\t\t\t\tfor (Map.Entry<UUID, Integer> skuDemand: skuDemands.entrySet()) {\n\t\t\t\t\tSystem.out.println(\"skuDemand:\" + skuDemand);\n\t\t\t\t\tUUID skuNo = skuDemand.getKey();\n\t\t\t\t\tint mpsQty = skuDemand.getValue();\n\t\t\t\t\t//System.out.println(\"calculateScore Called, skuNo=\" + skuNo + \",mpsQty =\" + mpsQty);\n\t\t\t\t\tif (mpsQty == 0) {\n\t\t\t\t\t\thardScore++;\n\t\t\t\t\t\t//System.out.println(\"calculateScore no demand, hardscore:\" + hardScore);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tMRPEntry mrpEntry = mrpPlan.get(skuNo);\n\t\t\t\t\tif (mrpEntry == null) {\n\t\t\t\t\t\thardScore=-10;\n\t\t\t\t\t\t//System.out.println(\"calculateScore no mrp, hardscore:\" + hardScore + \",sku=\" + skuDemand.getKey());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (mrpEntry.getPlanQty() >= mpsQty) {\n\t\t\t\t\t\thardScore++;\n\t\t\t\t\t\t//System.out.println(\"calculateScore mrp meet demand, hardscore:\" + hardScore + \",mrpEntry=\" + mrpEntry);\n\t\t\t\t\t} else { \n\t\t\t\t\t\thardScore = -1;\n\t\t\t\t\t\t//System.out.println(\"calculateScore mrp less than demand, hardscore:\" + hardScore + \",mrpEntry=\" + mrpEntry);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (hardScore < 0) break;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"end calculateScore Called, hardScore=\" + hardScore + \",solution=\" + solution);\n\t\t//System.out.println(\"\");\n\t\treturn HardSoftScore.valueOf(hardScore, softScore);\n\t}", "private float getQScore(Stone[][] board, int line, int col,\n int depth, int initialDepth){\n Chain chain = new Chain();\n Stone stone;\n if(depth % 2 == 1) stone = new Stone(color ? \"black\" : \"white\", chain);\n else stone = new Stone(color ? \"white\" : \"black\", chain);\n stone.setPosition(line, col);\n int nrStonesRemoved, chainSize, chainLiberties, score;\n board[line][col] = stone;\n //verific daca am luat pietre detinute de oponent\n nrStonesRemoved = Control.verifyNeighbourStones(board, stone.getColor(),\n line, col, false);\n //efectuez eventualele modificari ale lanturilor proprii ce pot aparea in urma plasarii pietrei\n Control.combineChains(board, stone, stone.getColor(), line, col);\n chainSize = stone.getChain().getStones().size();\n chainLiberties = stone.getChain().getLibertiesNumber();\n //aflu scorul starii\n score = nrStonesRemoved * 10 + chainSize * 30 + chainLiberties * 50;\n\n if(depth == 0){\n return (initialDepth % 2 == 1) ? -score : score;\n }\n\n float currentScore, max = 0;\n for(int i = 0; i < size; i++)\n for(int j = 0; j < size; j++){\n chain = new Chain();\n if(depth % 2 == 1) stone = new Stone(color ? \"white\" : \"black\", chain);\n else stone = new Stone(color ? \"black\" : \"white\", chain);\n stone.setPosition(i, j);\n int[] lib = Control.verifyLiberties(board, stone, i, j);\n if(board[i][j] == null && lib[0] + lib[1] != 0){\n currentScore = getQScore(board, i, j, depth - 1, initialDepth);\n if(currentScore > max){\n max = currentScore;\n }\n }\n }\n\n score += max * (depth / initialDepth);\n return (depth % 2 == 1) ? score : -score;\n }", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "public int chooseVTD(){\n int min=0;\n //this loop is used to avoid a bug\n for(int i=0;i<heuristicArrayTD.length;i++){\n if(heuristicArrayTD[i]< heuristicArrayTD[min]){\n min=i;\n }\n }\n int max=min;\n //returns highest scoring and unused var\n for(int i=0;i<heuristicArrayTD.length;i++){\n if(heuristicArrayTD[i]>= heuristicArrayTD[max] && usageArray[i%variableLength]==0){\n max=i;\n }\n }\n return max%variableLength;\n }", "public NeuralPlayer[] bestIndividual(boolean recalculate)\n\t{\n\t\tif (recalculate)\n\t\t{\n\t\t\tCollection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>(numThreads);\n\t\t\t\n\t\t\tfor (int i = 0 ; i < hosts.length; i+=partition)\n\t\t\t{\n\t\t\t\tCallable<Integer> worker = new fitnessCalculator(i,Math.min(i+partition,hosts.length),true);\n\t\t\t\ttasks.add(worker);\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\texecutor.invokeAll(tasks);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Something bad happened...\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tArrays.sort(hRandFitnesses,new ArrayComparator(1,false));\n\t\t\tArrays.sort(pRandFitnesses,new ArrayComparator(1,false));\n\t\t\tdouble bestScore = hRandFitnesses[0][1];\n\t\t\tdouble bestIndex = hRandFitnesses[0][0];\n\t\t\t\n\t\t\tif (bestScore >= bestHost)\n\t\t\t{\n\t\t\t\tif (bestScore == 100)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT HOST\");\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT HOST\");\n\t\t\t\t\tReversiBoard b = new ReversiBoard(boardSize);\n\t\t\t\t\tRandomPlayer r = new RandomPlayer(-1, \"Mr Random\");\n\t\t\t\t\tGame gg = new Game(hosts[(int)bestIndex],r,b);\n\t\t\t\t\tdouble score1 = gg.playGames(1000,false)[0];\n\t\t\t\t\t\n\t\t\t\t\tgg = new Game(allTimeBestHost,r,b);\n\t\t\t\t\tdouble score2 = gg.playGames(1000,false)[0];\n\t\t\t\t\t\n\t\t\t\t\tif (score1 >= score2)\n\t\t\t\t\t{\n\t\t\t\t\t\tbestHost = bestScore;\n\t\t\t\t\t\tallTimeBestHost = new NeuralPlayer(1,\"Da best H\",(BasicNetwork)hosts[(int)bestIndex].net.clone());\n\t\t\t\t\t}\n\t\t\t\t\tperfectHosts.add(new NeuralPlayer(1,\"A good H\",(BasicNetwork)hosts[(int)bestIndex].net.clone()));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbestHost = bestScore;\n\t\t\t\t\tallTimeBestHost = new NeuralPlayer(1,\"Da best H\",(BasicNetwork)hosts[(int)bestIndex].net.clone());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tbestScore = pRandFitnesses[0][1];\n\t\t\tbestIndex = pRandFitnesses[0][0];\n\t\t\t\n\t\t\tif (bestScore >= bestPara)\n\t\t\t{\n\t\t\t\tif (bestScore == 100)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT PARASITE\");\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT PARASITE\");\n\t\t\t\t\tReversiBoard b = new ReversiBoard(boardSize);\n\t\t\t\t\tRandomPlayer r = new RandomPlayer(1, \"Mr Random\");\n\t\t\t\t\tGame gg = new Game(r,parasites[(int)bestIndex],b);\n\t\t\t\t\tdouble score1 = gg.playGames(1000,false)[1];\n\t\t\t\t\t\n\t\t\t\t\tgg = new Game(allTimeBestPara,r,b);\n\t\t\t\t\tdouble score2 = gg.playGames(1000,false)[1];\n\t\t\t\t\t\n\t\t\t\t\tif (score1 >= score2)\n\t\t\t\t\t{\n\t\t\t\t\t\tbestPara = bestScore;\n\t\t\t\t\t\tallTimeBestPara = new NeuralPlayer(-1,\"Da best P\",(BasicNetwork)parasites[(int)bestIndex].net.clone());\n\t\t\t\t\t}\n\t\t\t\t\tperfectParasites.add(new NeuralPlayer(-1,\"A good P\",(BasicNetwork)parasites[(int)bestIndex].net.clone()));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbestPara = bestScore;\n\t\t\t\t\tallTimeBestPara = new NeuralPlayer(-1,\"Da best P\",(BasicNetwork)parasites[(int)bestIndex].net.clone());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tNeuralPlayer[] result = {allTimeBestHost,allTimeBestPara};\n\t\treturn result;\n\t}", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(new FileReader(\"talent.in\"));// new InputStreamReader(System.in)); //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"talent.out\")));\n int N = sc.nextInt();\n int minWeight = sc.nextInt();\n int[] weight = new int[N];\n int[] value = new int[N];\n int totalTalent = 0;\n for (int i = 0; i < N; i++) {\n int wt = sc.nextInt();\n int val = sc.nextInt();\n weight[i] = wt;\n value[i] = val;\n totalTalent += val;\n }\n\n // Store, for a given talent, what is the smallest weight used to achieve it?\n int[] dp = new int[totalTalent + 1];\n Arrays.fill(dp, (int) 1e9);\n dp[0] = 0;\n // the min weight to produce 0 talent is 0. However,\n // it is necessary to make everything else big because we can only BUILD\n // from 0\n double bestRatio = 0;\n for (int cow = 0; cow < N; cow++) {\n // look at each cow, and go DOWN THROUGH THE dp array, updating the\n // best weight achievable BEHIND US. This countercurrent motion ensures no repeated\n // counting of a single cow's talents\n int contribution = value[cow];\n int wt = weight[cow];\n for (int talent = totalTalent; talent >= 0; talent--) {\n int boostedTalent = contribution + talent;\n int boostedWeight = dp[talent] + wt;\n // with the min weight of a certain talent,\n // is it possible to get a smaller boostedWeight for a boostedTalent\n if (boostedTalent <= totalTalent) {\n // If we are in bounds,\n if (boostedWeight < dp[boostedTalent]) {\n // and the attempted team has a better weight value\n // then update it!\n // Initially, when everything is 1 billion, this cannot\n // happen except for from the base cases, building outward\n dp[boostedTalent] = boostedWeight;\n\n // At the same time, we can be more efficient by constantly\n // checking if we had enough weight first of all, and\n // second of all had a better talent/weight ratio!\n double ratio = (double) boostedTalent / boostedWeight;\n if (ratio > bestRatio && boostedWeight >= minWeight) {\n bestRatio = ratio;\n }\n }\n }\n }\n }\n\n out.println((int) (1000 * bestRatio));\n out.close();\n }", "private void updateBest() {\n if (bestTourOrder == null) {\n bestTourOrder = ants.get(0).trail;\n bestTourLength = ants.get(0)\n .trailLength(graph);\n }\n for (Ant a : ants) {\n if (a.trailLength(graph) > bestTourLength) {\n bestTourLength = a.trailLength(graph);\n bestTourOrder = a.trail.clone();\n }\n }\n\n\n }", "private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}", "public double calculateVal(DraughtsState s, int depth) {\n int[] pieces = s.getPieces(); \n \n \n // This is where the actual heuristic is calculated. because the situation is slightly different for the white and black\n // player their heuristic is calculated seperately.\n double h = 0;\n int enemypieces = 0;\n for (int i = 1; i < pieces.length; i++) {\n int piece = pieces[i];\n \n // If we are white, substract 1, giving the white piece of the same category.\n if (piece == BLACKPIECE + ((isWhite) ? -1 : 0) || piece == BLACKKING + ((isWhite) ? -1 : 0)) {\n enemypieces++;\n }\n \n //for the kings it is not checked whether they are on the sides of the board or not since they have more movement freedom\n //and their is no real benifit for them to be at the sides.\n h += SQ_LEFT(i) * SQ_RIGHT(i) * ((piece == WHITEPIECE) ? 1.5 : 0) - SQ_LEFT(i) * SQ_RIGHT(i) * ((piece == BLACKPIECE) ? 1 : 0) + \n ((piece == WHITEKING) ? 4 : 0) - ((piece == BLACKKING) ? 5 : 0) + 0.3 * is_square(i, pieces);\n \n }\n \n // Victory rush\n if(enemypieces < 4) {\n h += 1;\n }\n\n \n if (isWhite) {\n return h;\n } else\n \n return -h;\n }", "private void evaluateOrderRanks() {\n\t\t// First ensure that the order rank is respected if was provided\n\t\tfor (HLChoice choice : process.getChoices()) {\n\t\t\tArrayList<HLCondition> rankedConditions = new ArrayList<HLCondition>();\n\t\t\t// check order rank for each condition\n\t\t\tfor (HLCondition cond : choice.getConditions()) {\n\t\t\t\tif (cond.getExpression().getOrderRank() != -1) {\n\t\t\t\t\trankedConditions.add(cond);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (rankedConditions.size() > 1) {\n\t\t\t\tHashMap<HLDataExpression, HLCondition> exprCondMapping = new HashMap<HLDataExpression, HLCondition>();\n\t\t\t\tfor (HLCondition mappedCond : rankedConditions) {\n\t\t\t\t\texprCondMapping.put(mappedCond.getExpression(), mappedCond);\n\t\t\t\t}\n\t\t\t\tArrayList<HLDataExpression> exprList = new ArrayList<HLDataExpression>(exprCondMapping.keySet());\n\t\t\t\tObject[] sortedRanks = exprList.toArray();\n\t\t\t\tArrays.sort(sortedRanks);\n\t\t\t\tfor (int i=0; i<sortedRanks.length; i++) {\n\t\t\t\t\tArrayList<HLDataExpression> lowerRankExpressions = new ArrayList<HLDataExpression>();\n\t\t\t\t\tfor (int j=0; j<sortedRanks.length; j++) {\n\t\t\t\t\t\tif (j<i) {\n\t\t\t\t\t\t\tlowerRankExpressions.add((HLDataExpression) sortedRanks[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (lowerRankExpressions.size() > 0) {\n\t\t\t\t\t\t// connect lower rank conditions with OR and negate\n\t\t\t\t\t\tHLExpressionElement orConnected = HLExpressionManager.connectExpressionsWithOr(lowerRankExpressions);\n\t\t\t\t\t\tHLExpressionElement negatedOr = HLExpressionManager.negateExpression(new HLDataExpression(orConnected));\n\t\t\t\t\t\t// add own expression in front and connect with AND\n\t\t\t\t\t\tHLAndOperator andOp = new HLAndOperator();\t\t\n\t\t\t\t\t\tandOp.addSubExpression(((HLDataExpression) sortedRanks[i]).getRootExpressionElement().getExpressionNode());\n\t\t\t\t\t\tandOp.addSubExpression(negatedOr.getExpressionNode());\n\t\t\t\t\t\t// assign the expanded expression to the original condition\n\t\t\t\t\t\tHLCondition condition = exprCondMapping.get(sortedRanks[i]);\n\t\t\t\t\t\tcondition.setExpression(new HLDataExpression(andOp, ((HLDataExpression) sortedRanks[i]).getOrderRank()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Now, generate data expressions for \"default\" (i.e., \"else\") branch \n\t\tHLCondition defaultCond = null;\n\t\tfor (HLChoice choice : process.getChoices()) {\n\t\t\tArrayList<HLCondition> nonDefaultConditions = new ArrayList<HLCondition>(choice.getConditions());\n\t\t\tfor (HLCondition cond : choice.getConditions()) {\n\t\t\t\tif (cond.getExpression().getRootExpressionElement() == null && \n\t\t\t\t\t\tcond.getExpression().getExpressionString().equals(\"default\")) {\n\t\t\t\t\tnonDefaultConditions.remove(cond);\n\t\t\t\t\tdefaultCond = cond;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultCond != null) {\n\t\t\t\tHLExpressionElement orConnected = HLExpressionManager.connectConditionsWithOr(nonDefaultConditions);\n\t\t\t\tHLExpressionElement negatedOr = HLExpressionManager.negateExpression(new HLDataExpression(orConnected));\n\t\t\t\tdefaultCond.setExpression(new HLDataExpression(negatedOr));\n\t\t\t}\n\t\t}\n\t}", "public void determineRank(){\r\n //ranks highcard 0, pair 1, twopair 2, three of a kind 3, straight 4, flush 5,\r\n //full house 6, four of a kind 7 , straight flush 8, royal flush 9\r\n //I should start top down.\r\n\r\n //Royal Flush\r\n if(isRoyalFlush())\r\n setRank(9);\r\n //Straight flush\r\n else if(isFlush() && isStraight())\r\n setRank(8);\r\n //four of a kind\r\n else if(isFourOfAKind())\r\n setRank(7);\r\n //full house\r\n else if( isFullHouse())\r\n setRank(6);\r\n //flush\r\n else if(isFlush())\r\n setRank(5);\r\n //straight\r\n else if(isStraight())\r\n setRank(4);\r\n //three of a kind\r\n else if(isThreeOfAKind())\r\n setRank(3);\r\n //twoPair\r\n else if(isTwoPair())\r\n setRank(2);\r\n //pair\r\n else if(isPair())\r\n setRank(1);\r\n //highcard\r\n else\r\n setRank(0);\r\n\r\n }", "@Test\n public void testAdvanceWithHighNumberOfArmies() {\n List<Country> l_countryList = d_gameData.getD_warMap().getD_continents().get(1).getD_countryList();\n l_countryList.add(d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0));\n d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).getD_neighbourCountries().add(\"nepal\");\n d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).setD_noOfArmies(7);\n d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0).setD_noOfArmies(3);\n d_orderProcessor.processOrder(\"advance india nepal 15\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(false, l_order.executeOrder());\n }", "private WeightedSampler<String> getPossibleLethalActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedOrderedSampler<>();\n List<Minion> minions = this.b.getMinions(team, false, true).collect(Collectors.toList());\n for (Minion m : minions) {\n if (p.canUnleashCard(m)) {\n double totalWeight = UNLEASH_TOTAL_WEIGHT + UNLEASH_WEIGHT_PER_PRESENCE * m.getTotalEffectValueOf(e -> e.getPresenceValue(5));\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n if (this.b.getMinions(team * -1, false, true).anyMatch(m -> m.finalStats.get(Stat.WARD) > 0)) {\n // find ways to break through the wards\n for (Minion m : minions) {\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n List<Minion> searchSpace = m.getAttackableTargets().collect(Collectors.toList());\n double weight = totalWeight / searchSpace.size();\n for (Minion target : searchSpace) {\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * weight);\n }\n }\n }\n } else {\n // just go face\n this.b.getPlayer(team * -1).getLeader().ifPresent(l -> {\n for (Minion m : minions) {\n if (m.canAttack(l)) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n poss.add(new OrderAttackAction(m, l).toString().intern(), totalWeight);\n }\n }\n });\n }\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "private static void findBestRelocationMove(RelocationMove rm, Solution s, double [][] distanceMatrix, int numberOfVehicles) \n\t{\n\t\t//This is a variable that will hold the cost of the best relocation move\n\t\tdouble bestMoveCost = Double.MAX_VALUE;\n\n\t\t//We will iterate through all available vehicles\n\t\t\n\t\t//Vehicles to relocate FROM\n\t\tfor (int from = 0; from<numberOfVehicles; from++)\n\t\t{\n\t\t\t// Vehicles to relocate TO\n\t\t\tfor (int to = 0; to<numberOfVehicles; to++)\n\t\t\t{\n\n\t\t\t\tfor (int fromIndex = 1; fromIndex < s.routes.get(from).customers.size() - 1; fromIndex++)\n\t\t\t\t{\n\t\t\t\t\t//Node A is the predecessor of B\n\t\t\t\t\tCustomer A = s.routes.get(from).customers.get(fromIndex - 1);\n\n\t\t\t\t\t//Node B is the relocated node\n\t\t\t\t\tCustomer B = s.routes.get(from).customers.get(fromIndex);\n\n\t\t\t\t\t//Node C is the successor of B\n\t\t\t\t\tCustomer C = s.routes.get(from).customers.get(fromIndex + 1);\n\n\t\t\t\t\t//We will iterate through all possible re-insertion positions for B\n\t\t\t\t\tfor (int afterIndex = 0; afterIndex < s.routes.get(to).customers.size() -1; afterIndex ++)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif ((afterIndex != fromIndex && afterIndex != fromIndex - 1)||from != to)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Node F the node after which B is going to be reinserted\n\t\t\t\t\t\t\tCustomer F = s.routes.get(to).customers.get(afterIndex);\n\n\t\t\t\t\t\t\t//Node G the successor of F\n\t\t\t\t\t\t\tCustomer G = s.routes.get(to).customers.get(afterIndex + 1);\n\n\t\t\t\t\t\t\t//The arcs A-B, B-C, and F-G break\n\t\t\t\t\t\t\tdouble costRemovedFrom = distanceMatrix[A.ID][B.ID] + distanceMatrix[B.ID][C.ID];\n\t\t\t\t\t\t\tdouble costRemovedTo = distanceMatrix[F.ID][G.ID];\n\n\t\t\t\t\t\t\t//The arcs A-C, F-B and B-G are created\n\t\t\t\t\t\t\tdouble costAddedFrom = distanceMatrix[A.ID][C.ID];\n\t\t\t\t\t\t\tdouble costAddedTo = distanceMatrix[F.ID][B.ID] + distanceMatrix[B.ID][G.ID];\n\n\t\t\t\t\t\t\t//This is the cost of the move, or in other words\n\t\t\t\t\t\t\t//the change that this move will cause if applied to the current solution\n\t\t\t\t\t\t\tdouble fromMoveCost = costAddedFrom - costRemovedFrom;\n\t\t\t\t\t\t\tdouble toMoveCost = costAddedTo - costRemovedTo;\n\n\t\t\t\t\t\t\t//If this move is the best found so far\n\t\t\t\t\t\t\tdouble moveCost = fromMoveCost+toMoveCost;\n\t\t\t\t\t\t\tif ((moveCost < bestMoveCost)&&(from == to || (s.routes.get(to).load + s.routes.get(from).customers.get(fromIndex).demand<=s.routes.get(to).capacity)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//set the best cost equal to the cost of this solution\n\t\t\t\t\t\t\t\tbestMoveCost = moveCost;\n\n\t\t\t\t\t\t\t\t//store its characteristics\n\t\t\t\t\t\t\t\trm.positionOfRelocated = fromIndex;\n\t\t\t\t\t\t\t\trm.positionToBeInserted = afterIndex;\n\t\t\t\t\t\t\t\trm.toMoveCost = toMoveCost;\n\t\t\t\t\t\t\t\trm.fromMoveCost = fromMoveCost;\n\t\t\t\t\t\t\t\trm.fromRoute = from;\n\t\t\t\t\t\t\t\trm.toRoute = to;\n\t\t\t\t\t\t\t\trm.moveCost = moveCost;\n\t\t\t\t\t\t\t\tif (from != to) {\n\t\t\t\t\t\t\t\t\trm.fromUpdLoad = s.routes.get(from).load - s.routes.get(from).customers.get(fromIndex).demand;\n\t\t\t\t\t\t\t\t\trm.toUpdLoad = s.routes.get(to).load + s.routes.get(from).customers.get(fromIndex).demand;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\trm.fromUpdLoad = s.routes.get(from).load;\n\t\t\t\t\t\t\t\t\trm.toUpdLoad = s.routes.get(to).load;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void ss(){\n for (int c=0; c < league.length;c++) {\r\n for (int t=c+1;t<league.length;t++) {\r\n score = league[c].scoregenerator();\r\n secondscore = league[t].scoregenerator();\r\n league[c].pointsfor(score);\r\n league[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n league[c].wins();\r\n league[t].losses();\r\n }\r\n else if (score == secondscore){\r\n league[c].ties();\r\n league[t].ties();\r\n }\r\n else {\r\n league[t].wins();\r\n league[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFC.length;c++) {\r\n for (int t=c+1;t<AFC.length;t++) {\r\n score = AFC[c].scoregenerator();\r\n secondscore = AFC[t].scoregenerator();\r\n AFC[c].pointsfor(score);\r\n AFC[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFC[c].wins();\r\n AFC[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFC[c].ties();\r\n AFC[t].ties();\r\n }\r\n else {\r\n AFC[t].wins();\r\n AFC[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFC.length;c++) {\r\n for (int t=c+1;t<NFC.length;t++) {\r\n score = NFC[c].scoregenerator();\r\n secondscore = NFC[t].scoregenerator();\r\n NFC[c].pointsfor(score);\r\n NFC[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFC[c].wins();\r\n NFC[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFC[c].ties();\r\n NFC[t].ties();\r\n }\r\n else {\r\n NFC[t].wins();\r\n NFC[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0;c<AFCeast.length;c++) {\r\n for (int t=c+1;t<AFCeast.length;t++) {\r\n score = AFCeast[c].scoregenerator();\r\n secondscore = AFCeast[t].scoregenerator();\r\n AFCeast[c].pointsfor(score);\r\n AFCeast[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCeast[c].wins();\r\n AFCeast[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCeast[c].ties();\r\n AFCeast[t].ties();\r\n }\r\n else {\r\n AFCeast[t].wins();\r\n AFCeast[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFCnorth.length;c++) {\r\n for (int t=c+1;t<AFCnorth.length;t++) {\r\n score = AFCnorth[c].scoregenerator();\r\n secondscore = AFCnorth[t].scoregenerator();\r\n AFCnorth[c].pointsfor(score);\r\n AFCnorth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCnorth[c].wins();\r\n AFCnorth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCnorth[c].ties();\r\n AFCnorth[t].ties();\r\n }\r\n else {\r\n AFCnorth[t].wins();\r\n AFCnorth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFCsouth.length;c++) {\r\n for (int t=c+1;t<AFCsouth.length;t++) {\r\n score = AFCsouth[c].scoregenerator();\r\n secondscore = AFCsouth[t].scoregenerator();\r\n AFCsouth[c].pointsfor(score);\r\n AFCsouth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCsouth[c].wins();\r\n AFCsouth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCsouth[c].ties();\r\n AFCsouth[t].ties();\r\n }\r\n else {\r\n AFCsouth[t].wins();\r\n AFCsouth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFCwest.length;c++) {\r\n for (int t=c+1;t<AFCwest.length;t++) {\r\n score = AFCwest[c].scoregenerator();\r\n secondscore = AFCwest[t].scoregenerator();\r\n AFCwest[c].pointsfor(score);\r\n AFCwest[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCwest[c].wins();\r\n AFCwest[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCwest[c].ties();\r\n AFCwest[t].ties();\r\n }\r\n else {\r\n AFCwest[t].wins();\r\n AFCwest[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCeast.length;c++) {\r\n for (int t=c+1;t<NFCeast.length;t++) {\r\n score = NFCeast[c].scoregenerator();\r\n secondscore = NFCeast[t].scoregenerator();\r\n NFCeast[c].pointsfor(score);\r\n NFCeast[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCeast[c].wins();\r\n NFCeast[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCeast[c].ties();\r\n NFCeast[t].ties();\r\n }\r\n else {\r\n NFCeast[t].wins();\r\n NFCeast[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCnorth.length;c++) {\r\n for (int t=c+1;t<NFCnorth.length;t++) {\r\n score = NFCnorth[c].scoregenerator();\r\n secondscore = NFCnorth[t].scoregenerator();\r\n NFCnorth[c].pointsfor(score);\r\n NFCnorth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCnorth[c].wins();\r\n NFCnorth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCnorth[c].ties();\r\n NFCnorth[t].ties();\r\n }\r\n else {\r\n NFCnorth[t].wins();\r\n NFCnorth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCsouth.length;c++) {\r\n for (int t=c+1;t<NFCsouth.length;t++) {\r\n score = NFCsouth[c].scoregenerator();\r\n secondscore = NFCsouth[t].scoregenerator();\r\n NFCsouth[c].pointsfor(score);\r\n NFCsouth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCsouth[c].wins();\r\n NFCsouth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCsouth[c].ties();\r\n NFCsouth[t].ties();\r\n }\r\n else {\r\n NFCsouth[t].wins();\r\n NFCsouth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCwest.length;c++) {\r\n for (int t=c+1;t<NFCwest.length;t++) {\r\n score = NFCwest[c].scoregenerator();\r\n secondscore = NFCwest[t].scoregenerator();\r\n NFCwest[c].pointsfor(score);\r\n NFCwest[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCwest[c].wins();\r\n NFCwest[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCwest[c].ties();\r\n NFCwest[t].ties();\r\n }\r\n else {\r\n NFCwest[t].wins();\r\n NFCwest[c].losses();\r\n }\r\n } \r\n }\r\n\r\n for (int c=0;c<league.length;c++){\r\n System.out.println(league[c]);\r\n }\r\n System.out.println(\"...\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(\"\\n\" + \"Now let the playoffs begin!\" + \"\\n\");\r\n\r\n for (int y=0;y<4;y++){ // These next groups of code are sorting each division, and each conference based on wins\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCeast[a].displaywins() > AFCeast[p].displaywins()){\r\n Temp = AFCeast[p];\r\n AFCeast[p] = AFCeast[a];\r\n AFCeast[a] = Temp;\r\n }\r\n else if (AFCeast[a].displaywins() == AFCeast[p].displaywins() && AFCeast[a].displaypf() > AFCeast[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n // System.out.println(AFCeast[0]);\r\n\r\n afcplayoff[0] = AFCeast[0];\r\n // System.out.println(afcplayoff[0]);\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCnorth[a].displaywins() > AFCnorth[p].displaywins()){\r\n Temp = AFCnorth[p];\r\n AFCnorth[p] = AFCnorth[a];\r\n AFCnorth[a] = Temp;\r\n }\r\n else if (AFCnorth[a].displaywins() == AFCnorth[p].displaywins() && AFCnorth[a].displaypf() > AFCnorth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n afcplayoff[1] = AFCnorth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCsouth[a].displaywins() > AFCsouth[p].displaywins()){\r\n Temp = AFCsouth[p];\r\n AFCsouth[p] = AFCsouth[a];\r\n AFCsouth[a] = Temp;\r\n }\r\n else if (AFCsouth[a].displaywins() == AFCsouth[p].displaywins() && AFCsouth[a].displaypf() > AFCsouth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n afcplayoff[2] = AFCsouth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCwest[a].displaywins() > AFCwest[p].displaywins()){\r\n Temp = AFCwest[p];\r\n AFCwest[p] = AFCwest[a];\r\n AFCwest[a] = Temp;\r\n }\r\n else if (AFCwest[a].displaywins() == AFCwest[p].displaywins() && AFCwest[a].displaypf() > AFCwest[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n afcplayoff[3] = AFCwest[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCeast[a].displaywins() > NFCeast[p].displaywins()){\r\n Temp = NFCeast[p];\r\n NFCeast[p] = NFCeast[a];\r\n NFCeast[a] = Temp;\r\n }\r\n else if (NFCeast[a].displaywins() == NFCeast[p].displaywins() && NFCeast[a].displaypf() > NFCeast[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[0] = NFCeast[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCnorth[a].displaywins() > NFCnorth[p].displaywins()){\r\n Temp = NFCnorth[p];\r\n NFCnorth[p] = NFCnorth[a];\r\n NFCnorth[a] = Temp;\r\n }\r\n else if (NFCnorth[a].displaywins() == NFCnorth[p].displaywins() && NFCnorth[a].displaypf() > NFCnorth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[1] = NFCnorth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCsouth[a].displaywins() > NFCsouth[p].displaywins()){\r\n Temp = NFCsouth[p];\r\n NFCsouth[p] = NFCsouth[a];\r\n NFCsouth[a] = Temp;\r\n }\r\n else if (NFCsouth[a].displaywins() == NFCsouth[p].displaywins() && NFCsouth[a].displaypf() > NFCsouth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[2] = NFCsouth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCwest[a].displaywins() > NFCwest[p].displaywins()){\r\n Temp = NFCwest[p];\r\n NFCwest[p] = NFCwest[a];\r\n NFCwest[a] = Temp;\r\n }\r\n else if (NFCwest[a].displaywins() == NFCwest[p].displaywins() && NFCwest[a].displaypf() > NFCwest[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[3] = NFCwest[0];\r\n for (int y=0;y<16;y++){\r\n for (int p=0;p<15;p++) {\r\n int a = p+1;\r\n if (AFC[a].displaywins() > AFC[p].displaywins()){\r\n Temp = AFC[p];\r\n AFC[p] = AFC[a];\r\n AFC[a] = Temp;\r\n }\r\n else if (AFC[a].displaywins() == AFC[p].displaywins() && AFC[a].displaypf() > AFC[p].displaypf()){\r\n Temp = AFC[p];\r\n AFC[p] = AFC[a];\r\n AFC[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n for (int y=0;y<16;y++){\r\n for (int p=0;p<15;p++) {\r\n int a = p+1;\r\n if (NFC[a].displaywins() > NFC[p].displaywins()){\r\n Temp = NFC[p];\r\n NFC[p] = NFC[a];\r\n NFC[a] = Temp;\r\n }\r\n else if (NFC[a].displaywins() == NFC[p].displaywins() && NFC[a].displaypf() > NFC[p].displaypf()){\r\n Temp = NFC[p];\r\n NFC[p] = NFC[a];\r\n NFC[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n int maxw=0;\r\n\r\n for (int x=0;x<AFC.length;x++){\r\n\r\n if ((AFC[x].displaywins() > maxw) && \r\n (AFC[x].getName() != afcplayoff[0].getName()) && \r\n (AFC[x].getName() != afcplayoff[1].getName()) && \r\n (AFC[x].getName() != afcplayoff[2].getName()) && \r\n (AFC[x].getName() != afcplayoff[3].getName()) && \r\n (AFC[x].getName() != afcplayoff[4].getName()) && \r\n (AFC[x].getName() != afcplayoff[5].getName())){\r\n maxw = AFC[x].displaywins();\r\n afcplayoff[4] = AFC[x]; \r\n }\r\n\r\n }\r\n\r\n maxw=0;\r\n for (int x=0;x<AFC.length;x++){\r\n\r\n if (AFC[x].displaywins() > maxw && \r\n AFC[x].getName() != afcplayoff[0].getName() && \r\n AFC[x].getName() != afcplayoff[1].getName() && \r\n AFC[x].getName() != afcplayoff[2].getName() && \r\n AFC[x].getName() != afcplayoff[3].getName() && \r\n AFC[x].getName() != afcplayoff[4].getName() && \r\n AFC[x].getName() != afcplayoff[5].getName()){\r\n maxw = AFC[x].displaywins();\r\n afcplayoff[5] = AFC[x]; \r\n }\r\n }\r\n\r\n maxw=0;\r\n for (int x=0;x<NFC.length;x++){\r\n if (NFC[x].displaywins() > maxw && \r\n NFC[x].getName() != nfcplayoff[0].getName() && \r\n NFC[x].getName() != nfcplayoff[1].getName() && \r\n NFC[x].getName() != nfcplayoff[2].getName() && \r\n NFC[x].getName() != nfcplayoff[3].getName() && \r\n NFC[x].getName() != nfcplayoff[4].getName() && \r\n NFC[x].getName() != nfcplayoff[5].getName()){\r\n maxw = NFC[x].displaywins();\r\n nfcplayoff[4] = NFC[x]; \r\n }\r\n }\r\n maxw=0;\r\n for (int x=0;x<NFC.length;x++){\r\n\r\n if (NFC[x].displaywins() > maxw && \r\n NFC[x].getName() != nfcplayoff[0].getName() && \r\n NFC[x].getName() != nfcplayoff[1].getName() && \r\n NFC[x].getName() != nfcplayoff[2].getName() && \r\n NFC[x].getName() != nfcplayoff[3].getName() && \r\n NFC[x].getName() != nfcplayoff[4].getName() && \r\n NFC[x].getName() != nfcplayoff[5].getName()){\r\n maxw = NFC[x].displaywins();\r\n nfcplayoff[5] = NFC[x]; \r\n }\r\n }\r\n\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (afcplayoff[a].displaywins() > afcplayoff[p].displaywins()){\r\n Temp = afcplayoff[p];\r\n afcplayoff[p] = afcplayoff[a];\r\n afcplayoff[a] = Temp;\r\n }\r\n else if (afcplayoff[a].displaywins() == afcplayoff[p].displaywins() && afcplayoff[a].displaypf() > afcplayoff[p].displaypf()){\r\n Temp = afcplayoff[p];\r\n afcplayoff[p] = afcplayoff[a];\r\n afcplayoff[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n for (int c=0;c<afcplayoff.length;c++){ // Testing to see if users team made the playoffs.\r\n if(YourTeam.getName().equals(afcplayoff[c].getName()))\r\n afcplayofft = true;\r\n }\r\n\r\n for (int y=0;y<4;y++){\r\n for (int r=0;r<3;r++) {\r\n int c = r+1;\r\n if (nfcplayoff[c].displaywins() > nfcplayoff[r].displaywins()){\r\n Temp = nfcplayoff[r];\r\n nfcplayoff[r] = nfcplayoff[c];\r\n nfcplayoff[c] = Temp;\r\n }\r\n else if (nfcplayoff[c].displaywins() == nfcplayoff[r].displaywins() && nfcplayoff[c].displaypf() > nfcplayoff[r].displaypf()){\r\n Temp = nfcplayoff[r];\r\n nfcplayoff[r] = nfcplayoff[c];\r\n nfcplayoff[c] = Temp;\r\n }\r\n\r\n }\r\n }\r\n for (int c=0;c<nfcplayoff.length;c++){\r\n if(YourTeam.getName().equals(nfcplayoff[c].getName()))\r\n nfcplayofft = true;\r\n }\r\n // This shows how the playoffs will look like to the user\r\n System.out.println(\"...\" + \"\\n\" + \"Based on the regular season, here is what the first round of playoffs will look like:\" + \"\\n\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(afcplayoff[0].getName() + \" got a bye in the first round of the playoffs for placing first in the afc.\");\r\n System.out.println(afcplayoff[1].getName() + \" also got a bye in the first round of the playoffs for placing second in the afc.\" + \"\\n\");\r\n System.out.println(nfcplayoff[0].getName() + \" got a bye in the first round of the playoffs for placing first in the nfc.\");\r\n System.out.println(nfcplayoff[1].getName() + \" also got a bye in the first round of the playoffs for placing second in the nfc.\" + \"\\n\");\r\n\r\n System.out.println(afcplayoff[2].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves on to play the \" + afcplayoff[0].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(afcplayoff[5].getName() + \"\\n\");\r\n\r\n System.out.println(afcplayoff[3].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves onto play the \"+ afcplayoff[1].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(afcplayoff[4].getName() + \"\\n\");\r\n\r\n System.out.println(nfcplayoff[2].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves onto play the \"+ nfcplayoff[0].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(nfcplayoff[5].getName() + \"\\n\");\r\n\r\n System.out.println(nfcplayoff[3].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves onto play the \"+ nfcplayoff[1].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(nfcplayoff[4].getName() + \"\\n\");\r\n\r\n System.out.println(\"...\"+ \"\\n\");\r\n\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n\r\n {}\r\n }", "public int[] mcts() {\n\t\t// Get first set of children\n\t\tif(firstMoves.isEmpty()) {\n\t\t\tgenerateFirstMap(root, mctsBoard, player);\n\t\t\tfirstMoves = root.children;\n\t\t}\n\t\t\n\t\t// Initialize simulation variables\n\t\tlong timer = System.currentTimeMillis();\n\t\tNode maxNode;\n\t\tint[] gboard;\n\t\t\n\t\t// Run simulations for 28 seconds. On the first simulation randomly select a first move to explore,\n\t\t// otherwise calculate the UCB scores for each first child, select the highest scoring node and simulate it.\n\t\tdo {\n\t\t\tmaxNode = null;\n\t\t\tgboard = mctsBoard.clone();\n\t\t\t\n\t\t\tif(simulations == 0) {\n\t\t\t\tmaxNode = (Node)firstMoves.get(rand.nextInt(firstMoves.size()));\n\t\t\t} else {\n\t\t\t\tfloat maxScore = 0;\n\t\t\t\t\n\t\t\t\tfor(Node child : firstMoves) {\n\t\t\t\t\tcalculatePickMeScore(child);\n\t\t\t\t\t\n\t\t\t\t\tif(child.value > maxScore) {\n\t\t\t\t\t\tmaxScore = child.value;\n\t\t\t\t\t\tmaxNode = child;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If none of the nodes had a score greater than 0 (common in first few sims) randomly select another node\n\t\t\t\tif(maxNode == null) {\n\t\t\t\t\tSystem.out.println(\"Picking another random node...\");\n\t\t\t\t\tmaxNode = (Node)firstMoves.get(rand.nextInt(firstMoves.size()));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmaxNode.sims++;\n\t\t\t\n\t\t\tsimulate(maxNode, gboard, player);\n\t\t\tsimulations++;\n\t\t} while((System.currentTimeMillis() - timer) < 28000);\n\t\t\n\t\t// ****************************************************************************************************************************\n\t\t// Recalculates the score for each node as a percentage of the highest simulation count. So the node\n\t\t// that has the highest simulation count will have an unchanged win/loss ratio, while other nodes with a lower \n\t\t// sim count will have a reduced score to reflect the confidence of that win %age. In this way, a node that had\n\t\t// slightly less simulations than the highest simulated node - but a higher win ratio - has the possibility of being\n\t\t// the successor move rather than just naively picking the most simulated node.\n\t\t// ****************************************************************************************************************************\n\t\tint maxSims = 0, numWins = 0;\n\t\tNode winningMove = null;\n\t\tdouble highScore = 0, temp = 0;\n\t\t\n\t\tfor(Node child : firstMoves) {\n\t\t\tmaxSims = Math.max(maxSims, child.sims);\n\t\t}\n\t\t\n\t\tfor(Node child : firstMoves) {\n\t\t\tnumWins = (player == WHITE ? child.whiteWin : child.blackWin);\n\t\t\t\n\t\t\ttemp = (double)numWins/(double)maxSims;\n\t\t\tif(temp > highScore) {\n\t\t\t\thighScore = temp;\n\t\t\t\twinningMove = child;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Play the move on the AI's respective boards and return it\n\t\tint move = winningMove.move;\n\t\t\n\t\tmctsDoMove(move, mctsBoard, player);\n\t\tg_board.doMove(move);\n\t\t\n\t\tint[] response = new int[]{move, (int)(highScore*100), winningMove.sims, simulations};\n\t\tsimulations = 0;\n\t\tfirstMoves.clear();\n\t\t\n\t\treturn response;\n\t}", "@Override\n\t\tpublic double heuristic() {\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tsum += Math.abs(xGoals[i] - state[i]);\n\t\t\t\tsum += Math.abs(yGoals[i] - state[k + i]);\n\t\t\t}\n\t\t\treturn sum;\n\t\t}", "public void playGame () {\n int rank1 = team1.getSeed();\n int rank2 = team2.getSeed();\n double s1 = Math.random();\n System.out.println(s1);\n double s2 = Math.random();\n System.out.println(s2);\n \n if(rank1 < rank2){\n\t double one = (s1*10)+1;\n\t score1 = (int)one;//gives a slight advantage to the person with a higher seed\n\t double two = (s2*10); \n\t score2 = (int)two;\n\t if(score1 == score2){\n\t score1 = score1+1; //gives the game to the higher seed if there is a tie\n }\n else if(rank2 < rank1){\n\t double r = (s2*10)+1;\n\t score2 = (int)r;\n\t double t = (s1*10); \n\t score1 = (int)t;\n\t if(score1 == score2){\n\t score2 = score2+1;\n\t }}}}", "public int minCost(int[][] costs) {\n\nif(costs== null || costs.length == 0)\nreturn 0;\n// int n_houses = costs.length ;\nint lastR = costs[0][0];\nint lastB = costs[0][1];\nint lastG = costs[0][2];\nint currR,currB,currG ;\nfor(int i = 1; i< costs.length ; i++ ){\ncurrR = costs[i][0] + Math.min(lastB,lastG);\ncurrB = costs[i][1] + Math.min(lastR,lastG);\ncurrG = costs[i][2] + Math.min(lastR,lastB);\nlastR = currR;\nlastB = currB;\nlastG = currG;\n}\n// return Math.min(Math.min(lastR,lastB),lastG);\nreturn Math.min(Math.min(lastR,lastB),lastG);\n}", "public static int nextNode(directed_weighted_graph g, CL_Agent agent, int src, List<CL_Pokemon> c) {\n int ans = -1;\n dw_graph_algorithms ga = new DWGraph_Algo();\n ga.init(g);\n for (int a = 0; a < c.size(); a++) {\n Arena.updateEdge(c.get(a), g);\n }\n int fdest = -1;\n double mint = Double.MAX_VALUE;\n CL_Pokemon ca = null;\n for (CL_Pokemon pokemon : c) {\n if (arna.can_he_go(agent.getID(), pokemon)) {\n int dest = pokemon.get_edge().getDest();\n if (pokemon.getType() > 0) {\n dest = pokemon.get_edge().getSrc();\n }\n double t = ga.shortestPathDist(src, dest) / agent.getSpeed() / pokemon.getValue();\n if (t >= 0 && t < mint) {\n ca = pokemon;\n mint = t;\n fdest = dest;\n if (t == 0) {\n fdest = pokemon.get_edge().getSrc();\n if (pokemon.getType() > 0) {\n fdest = pokemon.get_edge().getDest();\n }\n }\n }\n\n }\n }\n\n if (fdest != -1) {\n agent.set_curr_fruit(ca);\n arna.i_am_going(agent.getID(), ca.get_edge());\n List<node_data> p = ga.shortestPath(src, fdest);\n ans = p.get(1).getKey();\n agent.setNextNode(p.get(1).getKey());\n } else {\n double min = Double.MAX_VALUE;\n Iterator<edge_data> edge = g.getE(agent.getSrcNode()).iterator();\n while (edge.hasNext()) {\n edge_data t = edge.next();\n if (min > g.getNode(agent.getSrcNode()).getLocation().distance(g.getNode(t.getDest()).getLocation())) {\n min = g.getNode(agent.getSrcNode()).getLocation().distance(g.getNode(t.getDest()).getLocation());\n ans = t.getDest();\n\n }\n\n }\n }\n return ans;\n }", "@Test\n public void determineWinnerNoRedMove()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final Agent agentRed = agents.get(0);\n final Agent agentWhite = agents.get(1);\n final CheckersEnvironment environment = new CheckersEnvironment();\n\n environment.placeToken(CheckersPosition.P07, King.WHITE.withAgent(agentWhite));\n environment.placeToken(CheckersPosition.P03, Pawn.WHITE.withAgent(agentWhite));\n environment.placeToken(CheckersPosition.P02, Pawn.WHITE.withAgent(agentWhite));\n environment.placeToken(CheckersPosition.P12, Pawn.RED.withAgent(agentRed));\n environment.placeToken(CheckersPosition.P08, Pawn.RED.withAgent(agentRed));\n environment.placeToken(CheckersPosition.P04, King.RED.withAgent(agentRed));\n // System.out.println(environment);\n\n assertThat(environment.getTokenCountFor(CheckersTeam.RED), is(3));\n assertThat(environment.getTokenCountFor(CheckersTeam.WHITE), is(3));\n\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertTrue(adjudicator.isGameOver(environment));\n assertThat(adjudicator.determineWinner(environment), is(agentWhite));\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int loses = sc.nextInt();\n int[] games = new int[n];\n int[] status = new int[n];\n int count = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n int sum = 0;\n for(int j =0,k=0 ;j<n;j++)\n {\n games[j] = sc.nextInt();\n status[j] = sc.nextInt();\n if(status[j] == 0)\n {\n sum = sum + games[j];\n }\n else\n {\n count = count + 1 ; \n //set.add(games[j]);\n //System.out.println(set);\n }\n }\n int[] win = new int[count];int z =0; \n for(int j = 0 ;j<status.length;j++ )\n {\n if(status[j] == 1)\n {\n win[z] = games[j];z++ ;\n //System.out.println(win[j]);\n \n }\n }\n Arrays.sort(win);\n for(int i = win.length- 1 ;i >= 0 ;i--)\n {\n //System.out.println(win[i]);\n if(loses > 0)\n {\n \n sum = sum + win[i];loses--;\n }\n else\n {\n //System.out.println(\"Subtract\");\n sum = sum - win[i];\n }\n }\n \n \n \n System.out.println(sum);\n }", "public void calculations(){\n\n int temp_size1 = fight_list.get(0).t1.members.size();\n int[] t1_counter = new int[temp_size1 + 1]; //counter for deaths: 0, 1, 2..., party size.\n float t1_avg = 0; //Average number of deaths.\n\n //We don't need to calculate for t2 right now, because t2 is just monsters.\n //temp_size = fight_list.get(0).t2.members.size();\n //int[] t2_counter = new int[temp_size + 1];\n\n for(FightResult fig : this.fight_list){\n int i = 0;\n while(i != fig.t1_deaths){\n i++;\n }\n t1_counter[i]++;\n t1_avg += fig.t1_deaths;\n }//end for\n\n System.out.println(t1_avg);\n System.out.println(Float.toString(t1_avg/fight_list.size()) + \" / \" + Integer.toString(temp_size1));\n\n String axis = \"# of deaths: \\t\";\n int axis_int = 0;\n String t1_results = \"Happened: \\t\";\n for(int i : t1_counter){\n axis += Integer.toString(axis_int++) + \"\\t\";\n t1_results += Integer.toString(i) + \"\\t\";\n }//end for\n System.out.println(axis);\n System.out.println(t1_results);\n\n float tpk_amount = t1_counter[temp_size1]; //by taking the size, we take the item at the end of the array. In this case, the number where everyone dies.\n tpk_amount = (tpk_amount/fight_list.size())*100;\n System.out.println(\"Probability of TPK: \" + Float.toString(tpk_amount) + \" %.\");\n\n System.out.println(\"\\n--------\\n\");\n }", "public static void insideAlgorithmFirstOrderExpect(final Hypergraph graph, final HyperpotentialFoe w,\n final SemiringExt s, final Scores scores) {\n final int n = graph.getNodes().size();\n final double[] beta = new double[n];\n final double[] betaFoe = new double[n];\n // \\beta_i = 0 \\forall i\n Arrays.fill(beta, s.zero());\n Arrays.fill(betaFoe, s.zero());\n graph.applyTopoSort(new HyperedgeFn() {\n\n @Override\n public void apply(Hyperedge e) {\n // \\beta_{H(e)} += w_e \\prod_{j \\in T(e)} \\beta_j\n double prod = s.one();\n double prodFoe = s.zero();\n for (Hypernode jNode : e.getTailNodes()) {\n int j = jNode.getId();\n // prod = s.times(prod, beta[j]);\n // prodFoe = s.plus(s.times(prod, betaFoe[j]), s.times(beta[j], prodFoe));\n double p1 = prod;\n double p2 = beta[j];\n double r1 = prodFoe;\n double r2 = betaFoe[j];\n prod = s.times(p1, p2);\n prodFoe = s.plus(s.times(p1, r2), s.times(p2, r1));\n }\n // prod = s.times(prod, w.getScore(e, s));\n // prodFoe = s.plus(s.times(prod, w.getScoreFoe(e, s)), s.times(w.getScore(e, s), prodFoe));\n double p1 = prod;\n double p2 = w.getScore(e, s);\n double r1 = prodFoe;\n double r2 = w.getScoreFoe(e, s);\n prod = s.times(p1, p2);\n prodFoe = s.plus(s.times(p1, r2), s.times(p2, r1));\n \n int i = e.getHeadNode().getId();\n //if (log.isTraceEnabled()) { log.trace(String.format(\"old beta[%d] = %f\", i, s.toReal(beta[i]))); }\n beta[i] = s.plus(beta[i], prod);\n betaFoe[i] = s.plus(betaFoe[i], prodFoe);\n assert !Double.isNaN(beta[i]) && !Double.isNaN(s.toReal(betaFoe[i]));\n // log.debug(String.format(\"%s w_e=%f beta[%d] = %.3f betaFoe[%d] = %.3f\", e.getLabel(), s.toReal(w.getScore(e, s)), i, s.toReal(beta[i]), i, s.toReal(betaFoe[i]))); \n }\n \n });\n scores.beta = beta;\n scores.betaFoe = betaFoe;\n }", "public static double evaluateSurvivability(Board b, int team) {\n Optional<Leader> ol = b.getPlayer(team).getLeader();\n if (ol.isEmpty()) {\n return 0;\n }\n Leader l = ol.get();\n if (l.health <= 0) { // if dead\n return -99999 + l.health; // u dont want to be dead\n }\n int shield = l.finalStats.get(Stat.SHIELD);\n Supplier<Stream<Minion>> attackingMinions = () -> b.getMinions(team * -1, true, true);\n // TODO add if can attack check\n // TODO factor in damage limiting effects like durandal\n int potentialDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int potentialLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int threatenDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int threatenLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int attackers = attackingMinions.get()\n .map(m -> m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n List<Minion> defendingMinons = b.getMinions(team, false, true)\n .filter(m -> m.finalStats.get(Stat.WARD) > 0)\n .collect(Collectors.toList());\n int leaderhp = l.health + shield;\n int ehp = defendingMinons.stream()\n .map(m -> m.health)\n .reduce(leaderhp, Integer::sum);\n long defenders = defendingMinons.size();\n if (shield > 0) {\n defenders++;\n }\n if (b.getCurrentPlayerTurn() != team) {\n threatenDamage = potentialDamage;\n threatenLeaderDamage = potentialLeaderDamage;\n }\n // if there are more defenders than attacks, then minions shouldn't be\n // able to touch face\n if (defenders >= attackers) {\n ehp = Math.max(ehp - threatenDamage, leaderhp);\n } else {\n ehp = Math.max(ehp - threatenDamage, leaderhp - threatenLeaderDamage);\n if (ehp <= 0) {\n if (team == b.getCurrentPlayerTurn()) {\n // they're threatening lethal if i dont do anything\n return -30 + ehp;\n } else {\n // they have lethal, i am ded\n return -60 + ehp;\n }\n }\n }\n return 6 * Math.log(ehp);\n }", "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n mNodes = sc.nextInt();\n mEdges = sc.nextInt();\n \n mDistances = new int[mNodes+1][mNodes+1];\n \n for (int i =1; i <= mNodes; i++)\n {\n \n for (int j =1; j <=mNodes;j++)\n {\n mDistances[i][j] = Integer.MAX_VALUE;\n \n }\n }\n \n for (int i =1; i <= mNodes; i++)\n {\n mDistances[i][i] =0;\n }\n \n for (int i = 0 ; i < mEdges; i++)\n {\n int from = sc.nextInt();\n int to = sc.nextInt();\n \n mDistances[from][to] = sc.nextInt();\n \n \n }\n \n \n //FW\n \n for (int k = 1; k <= mNodes; k++)\n {\n \n for (int i = 1; i <= mNodes; i++)\n {\n \n for (int j = 1; j <= mNodes; j++)\n {\n \n if (mDistances[i][k]!= Integer.MAX_VALUE && mDistances[k][j] != Integer.MAX_VALUE )\n {\n if (mDistances[i][j] > mDistances[i][k] + mDistances[k][j])\n {\n \n mDistances[i][j] = mDistances[i][k] + mDistances[k][j];\n }\n \n }\n \n }\n }\n \n }\n \n mQueries = sc.nextInt();\n \n for (int i =0; i < mQueries; i++)\n {\n int dist = mDistances[sc.nextInt()][sc.nextInt()];\n \n if (dist == Integer.MAX_VALUE)\n {\n dist = -1;\n }\n \n System.out.println(dist);\n \n }\n \n \n \n \n \n \n \n \n \n }", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "public void executeMove(Game game) {\n int bestScore = 0;\n int comScore = 0;\n Board board = game.getBoard();\n int col = (board.getCols());\n int row = (board.getRows());\n \n // Basic for loop to go through and grab each gem and call the score policy on it\n // it stores the best opton in best score\n for(int i = 0; i < row; i++){\n for(int ii = 0; ii < col; ii++){\n if(board.gemAt(i,ii).isEmpty() == true){\n continue;\n }\n comScore = game.getPolicy().scoreMove(i,ii,board);\n if(comScore >= bestScore){\n bestScore = comScore;\n }\n }\n }\n \n // This for loop makes a Coord with the rows and col i and ii to keep track of where the best gem was located \n for(int i = 0; i < row; i++){\n for(int ii = 0; ii < col; ii++){\n if(board.gemAt(i,ii).isEmpty() == true){\n continue;\n }\n if(game.getPolicy().scoreMove(i,ii,board) == bestScore){\n holder.add(new Coord(i,ii));\n }\n }\n }\n \n // For loop to choose the best Gem out of the holders Coords to call \"removeGemAdjustScore()\"\n for(int i = 0; i < holder.size(); i++){\n if(holder.size() == 1){\n game.removeGemAdjustScore(holder.get(i).row,holder.get(i).col);\n break;\n }\n game.removeGemAdjustScore(holder.get(i).row,holder.get(i).col);\n break;\n }\n \n // Resets the holder and best score for the next move\n holder = new ArrayList<Coord>();\n bestScore = 0;\n \n }", "public void calculerSatisfaction(AgentState etat) {\n\n int nb = this.getConstraints().size();\n if (GeographicAgentGeneralisation.logger.isDebugEnabled()) {\n GeographicAgentGeneralisation.logger\n .debug(\"calcul de satisfaction de l'agent \" + this\n + \" (nb contraintes=\" + nb + \")\");\n }\n\n // si l'agent n'a pas de contrainte ou qu'il est supprime, il est\n // parfaitement satisfait\n if (nb == 0 || this instanceof GeographicObjectAgent\n && ((GeographicObjectAgentGeneralisation) this).isDeleted()) {\n if (GeographicAgentGeneralisation.logger.isDebugEnabled()) {\n GeographicAgentGeneralisation.logger.debug(\" S=100\");\n }\n\n this.setSatisfaction(100.0);\n etat.setSatisfaction(100);\n\n // stocke les valeurs de satisfaction des contraintes\n for (Constraint cont : this.getConstraints()) {\n etat.getValeursMesures().put(cont.getClass().getSimpleName(),\n new Double(100));\n }\n return;\n }\n\n // calcul de la moyenne des satisfactions des contrainte ponderee par leur\n // importance\n double sommeSatisfactions = 0.0;\n double sommeImportances = 0.0;\n for (Constraint cont : this.getConstraints()) {\n // calcul de satisfaction de la contrainte\n GeographicConstraint cont_ = (GeographicConstraint) cont;\n cont_.computeSatisfaction();\n\n // stocke la valeur de satisfaction\n etat.getValeursMesures().put(cont.getClass().getSimpleName(),\n new Double(cont_.getSatisfaction()));\n\n sommeSatisfactions += cont_.getImportance() * cont_.getSatisfaction();\n sommeImportances += cont_.getImportance();\n\n if (GeographicAgentGeneralisation.logger.isTraceEnabled()) {\n GeographicAgentGeneralisation.logger\n .trace(\" Cont: \" + cont_.getClass().getSimpleName() + \" imp=\"\n + cont_.getImportance() + \" s=\" + cont_.getSatisfaction());\n }\n }\n if (sommeImportances == 0) {\n this.setSatisfaction(100.0);\n } else {\n this.setSatisfaction(sommeSatisfactions / sommeImportances);\n }\n etat.setSatisfaction(this.getSatisfaction());\n if (GeographicAgentGeneralisation.logger.isDebugEnabled()) {\n GeographicAgentGeneralisation.logger\n .debug(\" S=\" + this.getSatisfaction());\n }\n }", "private int getBestMove(int[] board, int depth, boolean turn) {\n int boardCopy[];\n if (depth <= 0) {\n return 0;\n }\n if (depth > STEP_BACK_DEPTH) {\n try {\n Thread.sleep(3);\n } catch (InterruptedException e) {\n e.printStackTrace();\n if (shouldStop()) {\n Log.d(Constants.MY_TAG,\"out CalculatingBot\");\n unlock();\n return 0;\n }\n }\n }\n if (turn) {\n int minimum = MAXIMUM_POSSIPLE_SCORE_DIFFERENCE;\n for (int i = 0; i < 5; i++) {\n if (board[i] < 2) {\n continue;\n }\n boardCopy = board.clone();\n int x = playMove(boardCopy, i);\n int y = 0;\n if (!hasPlayer2Move(boardCopy)) {\n if (hasPlayer1Move(boardCopy)) {\n y = getBestMove(boardCopy, depth - 1, turn);\n } else {\n for (int j = 0; j < 5; j++) {\n y = y - boardCopy[j];\n }\n for (int j = 5; j < 10; j++) {\n y = y + boardCopy[j];\n }\n }\n } else {\n y = getBestMove(boardCopy, depth - 1, ! turn);\n }\n int z = y - x;\n if (z < minimum) {\n minimum = z;\n }\n }\n int i = 10;\n if (board[2] < 2) {\n return minimum;\n }\n boardCopy = board.clone();\n int x = playMove(boardCopy, i);\n int y = 0;\n if (!hasPlayer2Move(boardCopy)) {\n if (hasPlayer1Move(boardCopy)) {\n y = getBestMove(boardCopy, depth - 1, turn);\n } else {\n for (int j = 0; j < 5; j++) {\n y = y - boardCopy[j];\n }\n for (int j = 5; j < 10; j++) {\n y = y + boardCopy[j];\n }\n }\n } else {\n y = getBestMove(boardCopy, depth - 1, !turn);\n }\n int z = y - x;\n if (z < minimum) {\n minimum = z;\n }\n return minimum;\n } else {\n int maximum = MINIMUM_POSSIPLE_SCORE_DIFFERENCE;\n for (int i = 5; i < 10; i++) {\n if (board[i] < 2) {\n continue;\n }\n boardCopy = board.clone();\n int x = playMove(boardCopy, i);\n int y = 0;\n if (!hasPlayer1Move(boardCopy)) {\n if (hasPlayer2Move(boardCopy)) {\n y = getBestMove(boardCopy, depth - 1, turn);\n } else {\n for (int j = 0; j < 5; j++) {\n y = y - boardCopy[j];\n }\n for (int j = 5; j < 10; j++) {\n y = y + boardCopy[j];\n }\n }\n } else {\n y = getBestMove(boardCopy, depth - 1, !turn);\n }\n int z = y + x;\n if (z > maximum) {\n maximum = z;\n }\n }\n int i = 11;\n if (board[7] < 2) {\n return maximum;\n }\n boardCopy = board.clone();\n int x = playMove(boardCopy, i);\n int y = 0;\n if (!hasPlayer1Move(boardCopy)) {\n if (hasPlayer2Move(boardCopy)) {\n y = getBestMove(boardCopy, depth - 1, turn);\n } else {\n for (int j = 0; j < 5; j++) {\n y = y - boardCopy[j];\n }\n for (int j = 5; j < 10; j++) {\n y = y + boardCopy[j];\n }\n }\n } else {\n y = getBestMove(boardCopy, depth - 1, !turn);\n }\n int z = y + x;\n if (z > maximum) {\n maximum = z;\n }\n return maximum;\n }\n }", "public static Pair<Integer, PentagoMove> miniMaxAlgo(PentagoBoardState boardState, int depth, int playerTurn) {\n\t\t\n\t\tArrayList<PentagoMove> possibleMoves = boardState.getAllLegalMoves();\n\t\tint score = 0;\n\t\t\n\t\t//assign a high or low value to begin with, no move can have that high/low a value\n\t\tif (playerTurn == 1) {\n\t\t\tscore = Integer.MIN_VALUE;\n\t\t}\n\t\telse {\n\t\t\tscore = Integer.MAX_VALUE;\n\t\t}\n\t\t\n\t\tint currentScore;\n\t\tPentagoMove chosenMove = null;\n\t\t\n\t\t//when all moves have been propagated up to the depth desired, find the most valuated move\n\t\tif (possibleMoves.size() == 0 || depth == 0) {\n\t\t\tscore = heuristic(boardState);\n\t\t}\n\t\telse {\n\t\t\t//iterating through all possible moves\n\t\t\tfor(int i = 0; i < possibleMoves.size(); i++) {\n\t\t\t\t\n\t\t\t\t//cloning board to predict 2 moves ahead (depth is 2)\n\t\t\t\tPentagoBoardState clone = (PentagoBoardState) boardState.clone();\n\t\t\t\tclone.processMove(possibleMoves.get(i));\n\t\t\t\tint player = 1 - playerTurn;\n\t\t\t\t\n\t\t\t\t//0 = white, trying to maximize\n\t\t\t\tif (player == 0) {\n\t\t\t\t\t\n\t\t\t\t\t//if a found score is higher, make it the new current score, then use minimize at the lower depth\n\t\t\t\t\t//player will be \"swapped\" (if opponent is current player, we'll simulate the player's turn) when making the recursive call\n\t\t\t\t\tcurrentScore = miniMaxAlgo(clone, depth - 1, player).getKey();\n\t\t\t\t\t\n\t\t\t\t\tif (currentScore >= score) {\n\t\t\t\t\t\tchosenMove = possibleMoves.get(i);\n\t\t\t\t\t\tscore = currentScore;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t//1 = black, trying to minimize\n\t\t\t\telse if (player == 1) {\n\t\t\t\t\t\n\t\t\t\t\t//if a found score is lower, make it the new current score, then use maximize at the lower depth\n\t\t\t\t\t//player will be \"swapped\" (if opponent is current player, we'll simulate the player's turn) when making the recursive call\n\t\t\t\t\tcurrentScore = miniMaxAlgo(clone, depth - 1, player).getKey();\n\t\t\t\t\t\n\t\t\t\t\tif (currentScore <= score) {\n\t\t\t\t\t\tchosenMove = possibleMoves.get(i);\n\t\t\t\t\t\tscore = currentScore;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//decided to go with pair to avoid having separated methods for the score and the move\n\t\t//it is easy to extract the required value using .getKey() or .getValue()\n\t\tPair<Integer, PentagoMove> answer = new Pair<>(score, chosenMove);\n\t\treturn answer;\n\t}", "public int heuristic()\n {\n if (this.heuristic != Integer.MIN_VALUE)\n return this.heuristic;\n this.heuristic = 0;\n if (!this.safe)\n return 0;\n // End game bonus\n int bonus = this.d.size() * Math.max(0, (this.L - 3 * this.b.shots)) * 3;\n this.heuristic = (this.d.size() * 100) + (this.NE * 10) + bonus;\n // value:\n return this.heuristic;\n }", "private static int getHeuristic(MazeState current, HashSet<MazeState> goals) {\n\t\tint lowestCost = Integer.MAX_VALUE;\n\t\tint currentCost = 0;\n\t\tfor (MazeState goal : goals) {\n\t\t\tcurrentCost = Math.abs(current.col - goal.col) + Math.abs(current.row - goal.row);\n\t\t\tif (currentCost <= lowestCost) {\n\t\t\t\tlowestCost = currentCost;\n\t\t\t}\n\t\t}\n\t\treturn currentCost;\n\t}", "private static double getMinSetCost_given_r( int r, Vector rSetVector,\r\n Host currentNode,\r\n ArrayList neighbors,\r\n ArrayList destList)\r\n {\n int n = neighbors.size();\r\n long cnr = getCnr(n, r);\r\n double minCostFor_r = MaxDistance;\r\n\r\n int[] set = new int[r]; /// ?????????????????????????\r\n set = initSet(r);\r\n\r\n //loop cnr set, find one set with minimum remaining distance\r\n for (long i = 0; i < cnr; ++i)\r\n {\r\n Vector oneSetVector = new Vector();\r\n double oneSetCost;\r\n oneSetCost = findOneSetCost(r, set,\r\n oneSetVector,\r\n currentNode,\r\n neighbors,\r\n destList);\r\n if ( oneSetCost < minCostFor_r ) {\r\n minCostFor_r = oneSetCost;\r\n rSetVector.clear();\r\n for (int k = 0; k < oneSetVector.size(); ++k) {\r\n rSetVector.add(k, oneSetVector.get(k));\r\n }\r\n }\r\n if (i < (cnr - 1)) {\r\n calculateNextSet(n,r,set);\r\n }\r\n }\r\n\r\n return minCostFor_r;\r\n\r\n }", "public BattleSimulator findBattle(){\r\n\r\n List<Enemy> enemies = world.getEnemies();\r\n Character character = world.getCharacter();\r\n List<MovingEntity> activeStructures = world.getActiveStructures();\r\n List<MovingEntity> friendlyEntities = world.getFriendlyEntities();\r\n List<Ally> allies = world.getAllies();\r\n\r\n\r\n // Create potentialFighting list which begins with all enemies in the world\r\n ArrayList<MovingEntity> potentialFighting = new ArrayList<MovingEntity>(enemies);\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n List<Pair<MovingEntity, Double>> pairEnemyDistance = new ArrayList<Pair<MovingEntity, Double>>();\r\n ArrayList<MovingEntity> structures = new ArrayList<MovingEntity>();\r\n\r\n // For each enemy in potentialFighting, find the distance from enemy to character \r\n // If character is in battle radius of enemy, add enemy to a pairEnemyDistance list, remove them from potentialFighting list\r\n for(MovingEntity enemy: enemies) {\r\n double distanceSquaredBR = inRangeOfCharacter(character, enemy, enemy.getBattleRadius());\r\n if(distanceSquaredBR >= 0){\r\n potentialFighting.remove(enemy);\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredBR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n // if no enemies within battle radius, no battle happens\r\n if (pairEnemyDistance.size() == 0) {\r\n return null;\r\n \r\n // else a battle is about to begin!!!\r\n } else if(pairEnemyDistance.size() > 0) {\r\n // For remaining enemies in potentialFighting list, if fighters list size > 0 and if character is in support radius of that enemy\r\n // also add that enemy to pairEnemyDistance list\r\n for(MovingEntity enemy : potentialFighting){\r\n double distanceSquaredSR = inRangeOfCharacter(character, enemy, enemy.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredSR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n }\r\n\r\n // Sort pairEnemyDistance list by distance of enemy to character, so that the closest enemy is first, the furthest enemy is last\r\n Collections.sort(pairEnemyDistance, new Comparator<Pair<MovingEntity, Double>>() {\r\n @Override\r\n public int compare(final Pair<MovingEntity, Double> p1, final Pair<MovingEntity, Double> p2) {\r\n if(p1.getValue1() > p2.getValue1()) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n });\r\n\r\n // Take all enemies from sorted pairEnemyDistance and add to fighters list\r\n for(Pair<MovingEntity, Double> pairEnemy : pairEnemyDistance) {\r\n fighters.add(pairEnemy.getValue0());\r\n }\r\n \r\n // For each tower, find the distance from tower to character\r\n // If character is in the support radius of tower, add tower to structure list\r\n if(activeStructures.size() > 0){\r\n for(MovingEntity structure : activeStructures) {\r\n if(structure.getID().equals(\"TowerBattler\")) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, structure, structure.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n structures.add(structure);\r\n }\r\n }\r\n }\r\n }\r\n // If character is in the support radius of friendly entities, add to fighters\r\n if(friendlyEntities.size() > 0){\r\n for(MovingEntity friendly : friendlyEntities) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, friendly, friendly.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n fighters.add(friendly);\r\n }\r\n }\r\n }\r\n \r\n // Add all allies to fighters list\r\n for(Ally ally : allies) {\r\n fighters.add(ally);\r\n }\r\n\r\n // Construct BattleSimulator class with character, fighters, structures\r\n BattleSimulator battle = new BattleSimulator(character, fighters, structures);\r\n\r\n // battle is about to begin!\r\n return battle;\r\n }", "static int calculateScore(Card[] winnings) {\n int score = 0;\n for (Card card : winnings)\n if (card != null)\n score++;\n else\n break;\n return score;\n }", "public static float[] FindingKleader(boolean[] ineligible, float[] kstat, int numberofplayer)\n {\n float first,second,third;\n first=second=third = Float.POSITIVE_INFINITY; // assigned positive infinity so any integer lower than infinity can be assigned to leader value\n for (int a = 0; a<numberofplayer; a++) // for number of players\n {\n\n if ((first>kstat[a]||first==kstat[a]) && ineligible[a] != true)// if stat exists and the stat is equal to or greater than first \n {\tif(first==kstat[a]) { // do nothing if the stat is same fisrt value\n \t}\n \telse { // if not tie\n third = second; // previous second value is assigned to third \n second = first; // previous first value is now assigned to second\n first = kstat[a]; // value of the stat is now assigned to first\n \t}\n }\n else if((second>kstat[a]||second==kstat[a]) && ineligible[a] != true) {\n \tif(second==kstat[a]) {\n \t}\n \telse {\n \tthird = second;// previous second value is assigned to third\n \tsecond = kstat[a]; // value of second is stat \n \t}\n \t}\n \telse if((third>kstat[a]||third==kstat[a]) && ineligible[a] != true) {\n \t\tif(third==kstat[a]) {\n \t}\n \telse {\n \tthird = kstat[a]; // value of third is replace by the value of stat\n \t}\n }\n }\n float[] top3kleader = {first,second,third};\n return top3kleader;\n }", "public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ttp.getRent();\n int m = ttp.getNbCities(),\n n = ttp.getNbItems();\n TTPSolution s = new TTPSolution(m, n);\n int[] x = s.getTour(),\n z = s.getPickingPlan();\n \n /*\n * the tour\n * generated using greedy algorithm\n */\n x = linkernTour();\n z = zerosPickingPlan();\n Deb.echo(x);\n Deb.echo(z);\n \n /*\n * the picking plan\n * generated so that the TTP objective value is maximized\n */\n ttp.objective(s);\n \n // partial distance from city x_i\n long di;\n \n // partial time with item k collected from city x_i\n double tik;\n \n // item scores\n Double[] score = new Double[n];\n \n // total time with no items collected\n double t_ = s.ft;\n \n // total time with only item k collected\n double tik_;\n \n // fitness value\n double u[] = new double[n];\n \n for (int k=0; k<n; k++) {\n \n int i;\n for (i=0; i<m; i++) {\n if (A[k]==x[i]) break;\n }\n //P.echo2(\"[\"+k+\"]\"+(i+1)+\"~\");\n \n // time to start with\n tik = i==0 ? .0 : s.timeAcc[i-1];\n int iw = ttp.weightOf(k),\n ip = ttp.profitOf(k);\n \n // recalculate velocities from start\n di = 0;\n for (int r=i; r<m; r++) {\n \n int c1 = x[r]-1;\n int c2 = x[(r+1)%m]-1;\n \n di += D[c1][c2];\n tik += D[c1][c2] / (maxSpeed-iw*C);\n }\n \n score[k] = ip - R*tik;\n tik_ = t_ - di + tik;\n u[k] = R*t_ + ttp.profitOf(k) - R*tik_;\n //P.echo(k+\" : \"+u[k]);\n }\n \n Quicksort<Double> qs = new Quicksort<Double>(score);\n qs.sort();\n int[] si = qs.getIndices();\n int wc = 0;\n for (int k=0; k<n; k++) {\n int i = si[k];\n int wi = ttp.weightOf(i);\n // eliminate useless\n if (wi+wc <= capacity && u[i] > 0) {\n z[i] = A[i];\n wc += wi;\n }\n }\n \n ttp.objective(s);\n \n return s;\n }", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }", "private static void solve(long[][][] ranks, String problem_name) {\n Solver solver = new Solver(\"StableMarriage\");\n\n //\n // data\n //\n System.out.println(\"\\n#####################\");\n System.out.println(\"Problem: \" + problem_name);\n\n long[][] rankWomen = ranks[0];\n long[][] rankMen = ranks[1];\n\n int n = rankWomen.length;\n\n //\n // variables\n //\n IntVar[] wife = solver.makeIntVarArray(n, 0, n - 1, \"wife\");\n IntVar[] husband = solver.makeIntVarArray(n, 0, n - 1, \"husband\");\n\n //\n // constraints\n // (the comments are the Comet code)\n // forall(m in Men)\n // cp.post(husband[wife[m]] == m);\n for (int m = 0; m < n; m++) {\n solver.addConstraint(solver.makeEquality(solver.makeElement(husband, wife[m]), m));\n }\n\n // forall(w in Women)\n // cp.post(wife[husband[w]] == w);\n for (int w = 0; w < n; w++) {\n solver.addConstraint(solver.makeEquality(solver.makeElement(wife, husband[w]), w));\n }\n\n // forall(m in Men, o in Women)\n // cp.post(rankMen[m,o] < rankMen[m, wife[m]] =>\n // rankWomen[o,husband[o]] < rankWomen[o,m]);\n for (int m = 0; m < n; m++) {\n for (int o = 0; o < n; o++) {\n IntVar b1 = solver.makeIsGreaterCstVar(\n solver.makeElement(rankMen[m], wife[m]).var(), rankMen[m][o]);\n\n IntVar b2 = solver.makeIsLessCstVar(\n solver.makeElement(rankWomen[o], husband[o]).var(), rankWomen[o][m]);\n solver.addConstraint(solver.makeLessOrEqual(solver.makeDifference(b1, b2), 0));\n }\n }\n\n // forall(w in Women, o in Men)\n // cp.post(rankWomen[w,o] < rankWomen[w,husband[w]] =>\n // rankMen[o,wife[o]] < rankMen[o,w]);\n for (int w = 0; w < n; w++) {\n for (int o = 0; o < n; o++) {\n IntVar b1 = solver.makeIsGreaterCstVar(\n solver.makeElement(rankWomen[w], husband[w]).var(), rankWomen[w][o]);\n IntVar b2 =\n solver.makeIsLessCstVar(solver.makeElement(rankMen[o], wife[o]).var(), rankMen[o][w]);\n solver.addConstraint(solver.makeLessOrEqual(solver.makeDifference(b1, b2), 0));\n }\n }\n\n //\n // search\n //\n DecisionBuilder db = solver.makePhase(wife, solver.INT_VAR_DEFAULT, solver.INT_VALUE_DEFAULT);\n\n solver.newSearch(db);\n\n //\n // output\n //\n while (solver.nextSolution()) {\n System.out.print(\"wife : \");\n for (int i = 0; i < n; i++) {\n System.out.print(wife[i].value() + \" \");\n }\n System.out.print(\"\\nhusband: \");\n for (int i = 0; i < n; i++) {\n System.out.print(husband[i].value() + \" \");\n }\n System.out.println(\"\\n\");\n }\n\n solver.endSearch();\n\n // Statistics\n // System.out.println();\n System.out.println(\"Solutions: \" + solver.solutions());\n System.out.println(\"Failures: \" + solver.failures());\n System.out.println(\"Branches: \" + solver.branches());\n System.out.println(\"Wall time: \" + solver.wallTime() + \"ms\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tList<Integer> a = new ArrayList<>();\n\t\ta.add(1);\n\t\ta.add(1);\n\t\ta.add(2);\n\t\ta.add(2);\n\t\ta.add(4);\n\t\ta.add(3);\n\t\tList<Integer> b = new ArrayList<>();\n\t\tb.add(2);\n\t\tb.add(3);\n\t\tb.add(3);\n\t\tb.add(4);\n\t\tb.add(4);\n\t\tb.add(5);\n\t\tgetMinScore(6, a, b);\n\t}", "public final void distributeTeamsPoints() {\n final Announce normalAnnounce = game.getAnnounceList().getOpenContractAnnounce();\n final Announce lastAnnounce = game.getAnnounceList().getContractAnnounce();\n\n if (normalAnnounce != null && lastAnnounce != null) {\n if (lastAnnounce.getType().equals(AnnounceType.Normal)) {\n distributeTeamsPointsNormalGame(normalAnnounce);\n } else if (lastAnnounce.getType().equals(AnnounceType.Double)) {\n distributeTeamsPointsDoubleGame(normalAnnounce);\n } else if (lastAnnounce.getType().equals(AnnounceType.Redouble)) {\n distributeTeamsPointsRedoubleGame(normalAnnounce);\n }\n }\n }", "private List<Double> MinimaxAlgorithm(MinimaxNode<GameState> node, int dataCount){\n if(node.getNumberOfChildren() == 0){ //checks to see if terminal node\n List<Double> heuristics = new ArrayList();\n heuristics.addAll(calculateHeuristic(node.getState()));\n return heuristics;\n }\n else{ //will maximise all the scores for each player.\n double value = Double.NEGATIVE_INFINITY;\n double checkValue;\n int bestMove;\n List<Double> heuristics = new ArrayList();\n if(node.getIfChanceNode()){ //checks if current node is a chance node, if so, times \n for (int i = 0; i < node.getChildren().size(); i++){\n List<Double> tempHeuristics = new ArrayList();\n tempHeuristics.addAll(MinimaxAlgorithm(node.getChildren().get(i),dataCount+1));\n checkValue = node.getChildren().get(i).getProbability() * tempHeuristics.get(node.getNodeIndex());\n value = Math.max(value, checkValue);//maximises the score.\n if(checkValue == value){\n heuristics.addAll(tempHeuristics); \n }\n if(dataCount == 0){//checks if this is the root node\n if(checkValue == value){\n MinimaxPlayer.optimalMoves = node.getChildren().get(i).getState().getOrientation(node.getNodeIndex()); \n }\n } \n }\n }\n else{\n for (int i = 0; i < node.getChildren().size(); i++){\n List<Double> tempHeuristics = new ArrayList();\n tempHeuristics.addAll(MinimaxAlgorithm(node.getChildren().get(i),dataCount+1));\n checkValue = tempHeuristics.get(node.getNodeIndex());\n value = Math.max(value, checkValue);//maximises the score.\n if(checkValue == value){\n heuristics.addAll(tempHeuristics); \n }\n if(dataCount == 0){//checks if this is the root node\n if(checkValue == value){\n MinimaxPlayer.optimalMoves = node.getChildren().get(i).getState().getOrientation(node.getNodeIndex()); \n }\n } \n } \n }\n return heuristics;\n } \n }", "private int minWeight(int dist[], Boolean sptSet[]){\n int min = Integer.MAX_VALUE;\r\n int minIndex = -1;\r\n\r\n for(int n = 0; n< rideCount; n++){\r\n if(!sptSet[n] && dist[n] <= min) {\r\n min = dist[n];\r\n minIndex = n;\r\n }\r\n }\r\n return minIndex;\r\n }", "@Test\n\tpublic void testAddScoreAndGetWinner2() throws BattleshipException {\n\t\t\n\t\t//Play Julia\n\t\tinitScores(playerJulia);\n\t\t\t\n\t\t//Julia realiza 46 disparos a distintos Crafts y destruye 46 Destroyer, 10 Cruiser y 5 Bomber\n\t\tfor (int i=0; i<46; i++) {\n\t\t\thitScore.score(CellStatus.HIT);\n\t\t\tcraftScore.score(CraftFactory.createCraft(\"ship.Destroyer\", Orientation.NORTH));\n\t\t\tif (i<10) craftScore.score(CraftFactory.createCraft(\"ship.Cruiser\", Orientation.WEST));\n\t\t\tif (i<5) craftScore.score(CraftFactory.createCraft(\"aircraft.Bomber\", Orientation.EAST));\n\t\t}\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\tcompareScores(\"Julia(PlayerFile):263\",craftRanking.getWinner().toString());\t\n\t\tcompareScores(\"Julia(PlayerFile):46\",hitRanking.getWinner().toString());\n\t\t\n\t\t//Play Raul\n\t\tinitScores(playerRaul);\n\t\t//Raul realiza 45 disparos a distintos Crafts y destruye 10 Carrier, 30 Battleship y 5 Fighter\n\t\tfor (int i=0; i<45; i++) {\n\t\t\thitScore.score(CellStatus.HIT);\n\t\t\tif (i<30) craftScore.score(CraftFactory.createCraft(\"ship.Battleship\", Orientation.NORTH));\n\t\t\tif (i<10) craftScore.score(CraftFactory.createCraft(\"ship.Carrier\", Orientation.WEST));\n\t\t\tif (i<5) craftScore.score(CraftFactory.createCraft(\"aircraft.Fighter\", Orientation.EAST));\n\t\t}\n\t\t\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\tcompareScores(\"Raul(PlayerRandom):310\",craftRanking.getWinner().toString());\t\n\t\tcompareScores(\"Julia(PlayerFile):46\",hitRanking.getWinner().toString());\n\t\t\n\t\t//Play Laura\n\t\tinitScores(playerLaura);\n\t\t//Laura realiza 120 disparos a distintos Crafts y destruye 30 Battleship, 10 Cruiser y 5 Fighter\n\t\tfor (int i=0; i<120; i++) {\n\t\t\thitScore.score(CellStatus.HIT);\n\t\t\tif (i<30) craftScore.score(CraftFactory.createCraft(\"ship.Battleship\", Orientation.EAST));\n\t\t\tif (i<10) craftScore.score(CraftFactory.createCraft(\"ship.Cruiser\", Orientation.WEST));\n\t\t\tif (i<5) craftScore.score(CraftFactory.createCraft(\"aircraft.Fighter\", Orientation.SOUTH));\n\t\t}\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\tcompareScores(\"Raul(PlayerRandom):310\",craftRanking.getWinner().toString());\t\n\t\tcompareScores(\"Laura(PlayerRandom):120\",hitRanking.getWinner().toString());\n\t\t\n\t\t//Play Simon\n\t\tinitScores(playerSimon);\n\t\t//Simon realiza 100 disparos a distintos Crafts y destruye 40 Bomber, 15 Destroyer y 75 Transport\n\t\tfor (int i=0; i<100; i++) {\n\t\t\thitScore.score(CellStatus.DESTROYED);\n\t\t\tif (i<40) craftScore.score(CraftFactory.createCraft(\"aircraft.Bomber\", Orientation.NORTH));\n\t\t\tif (i<15) craftScore.score(CraftFactory.createCraft(\"ship.Destroyer\", Orientation.WEST));\n\t\t\tif (i<75) craftScore.score(CraftFactory.createCraft(\"aircraft.Transport\", Orientation.EAST));\n\t\t}\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\tcompareScores(\"Simon(PlayerFile):1995\",craftRanking.getWinner().toString());\t\n\t\tcompareScores(\"Laura(PlayerRandom):120\",hitRanking.getWinner().toString());\n\t\tcompareRankings(SRANKING4, rankingsToString());\n\t}", "protected Object[] getBestMove(Solution soln, Move[] moves, ObjectiveFunction objectiveFunction, TabuList tabuList, AspirationCriteria aspirationCriteria, boolean maximizing, boolean chooseFirstImprovingMove)\n/* */ {\n/* 260 */ int threads = getThreads();\n/* 261 */ if (threads == 1)\n/* */ {\n/* 263 */ return SingleThreadedTabuSearch.getBestMove(soln, moves, objectiveFunction, tabuList, aspirationCriteria, maximizing, chooseFirstImprovingMove, this);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 271 */ Move bestMove = null;\n/* 272 */ double[] bestMoveVal = null;\n/* 273 */ boolean bestMoveTabu = false;\n/* 274 */ NeighborhoodHelper[] helpers = getHelpers();\n/* */ \n/* */ \n/* 277 */ int numGroups = helpers.length;\n/* 278 */ int nominalSize = moves.length / numGroups;\n/* 279 */ Move[][] moveGroups = new Move[numGroups][];\n/* */ \n/* */ \n/* 282 */ for (int i = 0; i < numGroups - 1; i++)\n/* */ {\n/* 284 */ moveGroups[i] = new Move[nominalSize];\n/* 285 */ System.arraycopy(moves, i * nominalSize, moveGroups[i], 0, nominalSize);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 291 */ moveGroups[(numGroups - 1)] = new Move[nominalSize + moves.length % numGroups];\n/* 292 */ System.arraycopy(moves, (numGroups - 1) * nominalSize, moveGroups[(numGroups - 1)], 0, moveGroups[(numGroups - 1)].length);\n/* */ \n/* */ \n/* */ \n/* 296 */ for (int i = 0; i < numGroups; i++) {\n/* 297 */ helpers[i].setWork(soln, moveGroups[i], objectiveFunction, tabuList, aspirationCriteria, maximizing, chooseFirstImprovingMove, this);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 304 */ Object[][] bestMoves = new Object[numGroups][];\n/* 305 */ for (int i = 0; i < numGroups; i++)\n/* */ {\n/* */ \n/* 308 */ Object[] contender = helpers[i].getBestMove();\n/* */ \n/* */ \n/* 311 */ Move newMove = (Move)contender[0];\n/* 312 */ double[] newObjVal = (double[])contender[1];\n/* 313 */ boolean newMoveTabu = ((Boolean)contender[2]).booleanValue();\n/* */ \n/* */ \n/* */ \n/* 317 */ if (bestMove == null)\n/* */ {\n/* 319 */ bestMove = newMove;\n/* 320 */ bestMoveVal = newObjVal;\n/* 321 */ bestMoveTabu = newMoveTabu;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 327 */ else if (SingleThreadedTabuSearch.isFirstBetterThanSecond(newObjVal, bestMoveVal, maximizing))\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 335 */ if ((bestMoveTabu) || (!newMoveTabu)) {\n/* 336 */ bestMove = newMove;\n/* 337 */ bestMoveVal = newObjVal;\n/* 338 */ bestMoveTabu = newMoveTabu;\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 344 */ else if ((bestMoveTabu) && (newMoveTabu)) {\n/* 345 */ bestMove = newMove;\n/* 346 */ bestMoveVal = newObjVal;\n/* 347 */ bestMoveTabu = newMoveTabu;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 355 */ return new Object[] { bestMove, bestMoveVal, new Boolean(bestMoveTabu) };\n/* */ }", "@Override\n public int ChooseAction(double[] actionEstimates){\n int actionsCount = actionEstimates.length;\n\n // find the best action (greedy)\n double maxReward = actionEstimates[0];\n int greedyAction = 0;\n\n for ( int i = 1; i < actionsCount; i++ )\n {\n if ( actionEstimates[i] > maxReward )\n {\n maxReward = actionEstimates[i];\n greedyAction = i;\n }\n }\n\n // try to do exploration\n if ( r.nextDouble( ) < epsilon )\n {\n int randomAction = r.nextInt( actionsCount - 1 );\n\n if ( randomAction >= greedyAction )\n randomAction++;\n\n return randomAction;\n }\n\n return greedyAction;\n }", "public void testScoreboardCaseTwo () throws Exception{\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\",\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 2 tests when all no runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n\n// Team 2 -- 30 <-- Team 2 is now winning with a lower score \n// Team 1 -- 63 (same database; different scoring method)\n \n// String [] rankData = {\n// \"1,team2,1,30\",\n// \"2,team1,1,63\",\n// };\n \n \n scoreboardTest (2, runsData, rankData);\n \n }", "static double addHeuristic1(GameState c, boolean isMaxNode) {\n\t\t// Value returned will be absolute. If its max node, this config is good\n\t\t// then value will be positive. If its min node,\n\t\t// and this config is good for min, then value will be negative\n\n\t\tint i, j, vacant_spaces;\n\t\t// Compute : Feasible Moves for self\n\t\tint self_feasible_moves = 0;\n\t\tint self_remaining_moves = 0;\n\t\tint opponent_feasible_moves = 0;\n\t\tint opponent_remaining_moves = 0;\n\n\t\t// Go through the board and figure out vacant spots\n\t\tvacant_spaces = 0;\n\t\tfor (i = -GameState.HALF_BOARD; i <= GameState.HALF_BOARD; i = i + 1) {\n\t\t\tif (c.getWeight(i) == 0) {\n\t\t\t\tvacant_spaces++;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 1; i <= GameState.MAX_WEIGHT; i = i + 1) {\n\t\t\t// Check if self have the weight\n\t\t\tif (c.IHaveWeight(i)) {\n\t\t\t\tself_remaining_moves++;\n\t\t\t\t// Go through all the possible positions\n\t\t\t\tfor (j = -GameState.HALF_BOARD; j < GameState.HALF_BOARD; j++) {\n\t\t\t\t\tif (c.getWeight(j) == 0) {\n\t\t\t\t\t\t// Place it and see if you tip\n\t\t\t\t\t\tc.makeMove(i, j, PlayerName.none);\n\t\t\t\t\t\tif (!c.isTipping_old()) {\n\t\t\t\t\t\t\tself_feasible_moves++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Now remove the weight\n\t\t\t\t\t\tc.removeMove(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if opponent has this weight\n\t\t\tif (c.opponentHasWeight(i)) {\n\t\t\t\topponent_remaining_moves++;\n\t\t\t\t// Go through all the possible positions\n\t\t\t\tfor (j = -GameState.HALF_BOARD; j < GameState.HALF_BOARD; j++) {\n\t\t\t\t\t// Place the weight and see if you tip\n\t\t\t\t\tif (c.getWeight(j) == 0) {\n\t\t\t\t\t\tc.makeMove(i, j, PlayerName.none);\n\t\t\t\t\t\tif (!c.isTipping_old()) {\n\t\t\t\t\t\t\topponent_feasible_moves++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Now remove the weight\n\t\t\t\t\t\tc.removeMove(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Need to take the max because one of the players may have played one\n\t\t// chance less\n\t\tif (self_remaining_moves == 0 && opponent_remaining_moves == 0) {\n\t\t\treturn 0.0;\n\t\t} else if (self_remaining_moves > opponent_remaining_moves)\n\t\t\treturn (double) (self_feasible_moves - opponent_feasible_moves)\n\t\t\t\t\t/ (double) (self_remaining_moves * vacant_spaces);\n\t\telse\n\t\t\treturn (double) (self_feasible_moves - opponent_feasible_moves)\n\t\t\t\t\t/ (double) (opponent_remaining_moves * vacant_spaces);\n\t}", "public void testScoreboardForBeingJudgedState () throws Exception {\n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20 (a No before first yes)\n \"2,1,A,3,Yes\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"3,1,A,5,No\", // zero -- after Yes\n \"4,1,A,7,Yes\", // zero -- after Yes\n \"5,1,A,9,No\", // zero -- after Yes\n \"6,1,B,11,No\", // zero -- not solved\n \"7,1,B,13,No\", // zero -- not solved\n \"8,2,A,30,Yes\", // 30 (minute points; no Run points on first Yes)\n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n// startExplorer(getOutputDataDirectory());\n \n InternalContest contest = new InternalContest();\n \n int numTeams = 2;\n\n initData(contest, numTeams, 5);\n \n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Run [] runs = contest.getRuns();\n \n for (Run run : runs){\n run.setStatus(RunStates.BEING_JUDGED);\n }\n\n checkOutputXML(contest);\n\n confirmRanks(contest, rankData);\n }", "public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }", "public void testScoreboardCaseFour () throws Exception {\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 4 tests when all runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n \n// Team 1 -- 123 <-- Team 1 is winning again\n// Team 2 -- 130\n \n// String [] rankData = {\n// \"1,team1,1,123\",\n// \"2,team2,1,130\"\n// };\n \n scoreboardTest (2, runsData, rankData);\n }", "void start() throws Exception {\n\t\tSystem.out.println(readLine(110));\n\n\t\tint teamsCount = Integer.parseInt(readLine(5));\n\n\t\tArrayList teams = new ArrayList(teamsCount+1);\n\t\tHashtable teamsTable = new Hashtable();\n\t\twhile(teamsCount--!=0) {\n\t\t\tTeam t = new Team();\n\t\t\tt.name = readLine(100);\n\t\t\tteams.add(t);\n\t\t\tteamsTable.put(t.name,t);\n\t\t}\n\n\t\tint gamesCount = Integer.parseInt(readLine(5));\n\t\twhile(gamesCount--!=0) {\n\t\t\tString line = readLine(100);\n\t\t\tint arroba = line.indexOf('@');\n\t\t\tTeam t1 = (Team) teamsTable.get(line.substring(0,line.indexOf('#')));\n\t\t\tint goals1 = Integer.parseInt(line.substring(line.indexOf('#')+1,arroba));\n\t\t\tt1.goals += goals1;\n\t\t\tline = line.substring(arroba);\n\t\t\tTeam t2 = (Team) teamsTable.get(line.substring(line.indexOf('#')+1));\n\t\t\tint goals2 = Integer.parseInt(line.substring(1,line.indexOf('#')));\n\t\t\tt2.goals += goals2;\n\t\t\tt1.against += goals2;\n\t\t\tt2.against += goals1;\n\n\t\t\tt1.games++;\n\t\t\tt2.games++;\n\n\t\t\tif(goals1>goals2) {\n\t\t\t\tt1.won++;\n\t\t\t\tt2.lost++;\n\t\t\t\tt1.points+=3;\n\t\t\t} else if(goals1<goals2) {\n\t\t\t\tt2.won++;\n\t\t\t\tt1.lost++;\n\t\t\t\tt2.points+=3;\n\t\t\t} else {\n\t\t\t\tt1.draw++;\n\t\t\t\tt2.draw++;\n\t\t\t\tt1.points+=1;\n\t\t\t\tt2.points+=1;\n\t\t\t}\n\n\t\t}\n\n\t\tTreeSet h = new TreeSet(new CompareTeams());\n\t\th.addAll(teams);\n\n\t\tint i=1;\n\t\tfor(Iterator it = h.iterator();it.hasNext();i++) {\n\t\t\tTeam t = (Team) it.next();\n\t\t\tSystem.out.println(\n\t\t\t\ti + \") \" + t.name + \" \" + t.points + \"p, \" + t.games + \"g (\"\n\t\t\t\t+ t.won + \"-\" + t.draw + \"-\" + t.lost + \"), \" + (t.goals-t.against) + \"gd (\"\n\t\t\t\t+ t.goals + \"-\" + t.against + \")\"\n\t\t\t);\n\t\t}\n\n\t}", "public int calculateMinimumHP(ArrayList<ArrayList<Integer>> grid) {\n\t\t\t\t int m =grid.size(), n = grid.get(0).size();\n\t\t\t\t int[][][] dp = new int[m+1][n+1][2];\n\t\t\t\t \n\t\t\t\t dp[0][0][0] = 0;\n\t\t\t\t dp[0][0][1] = 0;\n\t\t\t\t dp[0][1][0] = 1; // start with life\n\t\t\t\t dp[0][1][1] = 0; // balance life\n\t\t\t\t dp[1][0][0] = 1;\n\t\t\t\t dp[1][0][1] = 0;\n\t\t\t\t for(int i=2;i<dp[0].length;i++){\n\t\t\t\t\t dp[0][i][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[0][i][1] = 0;\n\t\t\t\t }\n\t\t\t\t for(int i=2;i<dp.length;i++){\n\t\t\t\t\t dp[i][0][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[i][0][1] = 0;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for(int i=1;i<dp.length;i++){\n\t\t\t\t\t for(int j=1;j<dp[0].length;j++){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(grid.get(i-1).get(j-1) < 0){\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0] - grid.get(i-1).get(j-1) - fromCell[1];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+ grid.get(i-1).get(j-1)>0?fromCell[1]+ grid.get(i-1).get(j-1):0;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+grid.get(i-1).get(j-1);\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\t return dp[m][n][0];\n\t\t\t\t \n\t\t\t }", "public static void main(String[] args) {\n\n\n\n\n\n ModelInterface model = new GameField(6, 7);\n Token blue = Token.BLUE;\n Token red = Token.RED;\n\n// model.setFieldStatus(0, red);\n// model.setFieldStatus(0, red);\n// model.setFieldStatus(0, red);\n\n model.setFieldStatus(0, red);\n model.setFieldStatus(1, blue);\n model.setFieldStatus(2, red);\n\n model.setFieldStatus(0, red);\n model.setFieldStatus(1, red);\n model.setFieldStatus(2, red);\n\n// model.setFieldStatus(2, blue);\n// model.setFieldStatus(2, blue);\n// model.setFieldStatus(2, blue);\n \n List<IRatingMechanism> ratingMechanisms = new ArrayList<IRatingMechanism>();\n ratingMechanisms.add(new MWin());\n ratingMechanisms.add(new MWinNot());\n// ratingMechanisms.add(new MGeneralPosition());\n// ratingMechanisms.add(new MTwoStonesWithSpaceChecking());\n// ratingMechanisms.add(new MCatch22());\n\n Tree tree = new Tree(model, ratingMechanisms, blue);\n System.out.println(tree.toString());\n\n MiniMaxAlgorithm instance = new MiniMaxAlgorithm();\n int result = instance.getBestMove(model, ratingMechanisms, blue);\n System.out.println(\"\" + result);\n\n\n\n\n\n }", "public double runSimulation(ArrayList<Rocket>list){\n int totalBudget = 0;\n int sentRocket = 0;\n int explodedRocket= 0;\n int successRocket = 0;\n for(Rocket rocket:list){\n if(!rocket.launch() || !rocket.land()) {\n sentRocket++;\n explodedRocket++;\n totalBudget += rocket.rocketCost;\n } else {\n sentRocket++;\n successRocket++;\n totalBudget += rocket.rocketCost;\n }\n }\n\n System.out.println(\"Total number of rockets sent \"+sentRocket);\n System.out.println(\"Total number of exploded rockets \"+explodedRocket);\n\n return totalBudget;\n\n }", "public boolean bestFirstSearch() {\n\t\twhile(!soloution){\n\t\t\tif(open.isEmpty()){\n\t\t\t\tSystem.out.println(\"No more choices to explore\");\n\t\t\t\tSystem.out.println(\"SolutionId: \" + solutionId);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//chooses the most optimal X\n\t\t\tNode x = popNode();\n\t\t\tclosed.add(x);\n\t\t\tSystem.out.println(\"X:\\t\\t\" + x.state + \" \" + x.h + \" + \" + x.g + \" = \" + x.f);\n\t\t\t//checks if it is a soulution\n\t\t\tif(solution(x)){\n\t\t\t\tSystem.out.println(\"SOLUTION:\\t\" + x.state);\n\t\t\t\tSystem.out.println(\"nodes created: \" + open.size() + closed.size());\n\t\t\t\tprintSolution(x);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t//handles the possible moves from the state x\n\t\t\tsucc = generateAllSuccesors(x);\n\t\t\tfor (Node s : succ) {\n\t\t\t\t//if this state already exist, we will use the node keeping it instead\n\t\t\t\tNode old = findOld(s);\n\t\t\t\tif(old != null)\n\t\t\t\t\ts = old;\n\t\t\t\t//makes the new node a child of x\n\t\t\t\tx.kids.add(s);\n\t\t\t\t//if its a new state it will be inserted to open after evaluation\n\t\t\t\tif(!open.contains(s) && !closed.contains(s)){\n\t\t\t\t\tattachAndEval(s,x);\n\t\t\t\t\tinsert(s);\n\t\t\t\t}\n\t\t\t\t//if its an old node and x is a better parent it will be evalueted again.\n\t\t\t\telse if(x.g + arcCost(x, s) < s.g){\n\t\t\t\t\tattachAndEval(s, x);\n\t\t\t\t\tif(closed.contains(s)){\n\t\t\t\t\t\t//if its closed all children will be evaluated with the new score of \"s\"\n\t\t\t\t\t\tpropagatePathImprovements(s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//reset the flag that indicates if a move has been found that decreases the heuristic\n\t\tfoundBetterMove = false;\n\t\t\n\t\t//fill in the appropriate heuristic values\n\t\tpopulateHillValues();\n\t\tArrayList<PotentialMove> myBestList = new ArrayList<PotentialMove>();\n\n\t\t//Find the square with the lowest heuristic value. this should really write the values to an array. \n\t\tint squareDifferential = -1;\n\t\t//String outValue = \"\";\n\t\tfor (int y = 0; y <= size-1; y++) {\n\t\t\tfor (int x = 0; x <= size-1; x++){\n\t\t\t\t//outValue = outValue + localBoard[y][x];\n\t\t\t\tif (squareDifferential < 0) //lowestSquareFound not found yet \n\t\t\t\t{\n\t\t\t\t\tif ((NQueens.queens[x] != y) && //set if the current square isn't already occupied by a queen\n\t\t\t\t\t\t\t(localBoard[NQueens.queens[x]][x] >= localBoard[y][x])) {\n\t\t\t\t\t\tif (localBoard[y][x] == localBoard[NQueens.queens[x]][x])\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) > squareDifferential) { // find the square with the largest differential in value from the queen in the column\n\t\t\t\t\tmyBestList.clear();\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t}\n\t\t\t\telse if (((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) == squareDifferential) && // the differential is equal to the current best differential\n\t\t\t\t\t\t(NQueens.queens[x] != y)) { // and isn't already occupied by a queen\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t}\n\t\t\t\t//else the square is higher, has a queen or isn't marginally better than the current queen's position in the row\n\t\t\t}\n\t\t\t//outValue = outValue + \"\\n\";\n\t\t}\n\t\t//JOptionPane.showMessageDialog(null, outValue);\n\t\t\n\t\tif (myBestList.isEmpty())\n\t\t\treturn;\n\t\t\n\t\tint listSize = myBestList.size();\n\t\tPotentialMove bestMove;\n\t\t\n\t\t//grab the non-Sideways moves first\n\t\tfor (int i = 0; i < listSize; i++) {\n\t\t\tif (!(myBestList.get(i).isSideways)) {\n\t\t\t\tbestMove = myBestList.get(i);\n\t\t\t\tfoundBetterMove = true;\n\t\t\t\tsidewaysMoves = 0;\n\t\t\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sidewaysMoves > MAXSIDEWAYSMOVES) { // hit MAXSIDEWAYSMOVES consecutive sideways moves, mark as unsolvable\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//all available moves sideways moves, let's select one randomly\n\t\tRandom generator = new Random();\n\t\tint randomElement = generator.nextInt(listSize);\n\t\t\n\t\tbestMove = myBestList.get(randomElement);\n\t\tfoundBetterMove = true;\n\t\tsidewaysMoves++;\n\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t}", "private DeterministicBoardStateNode getBestTurn(int team, int depth, double sampleRate, double maxSamples,\n boolean filterLethal) {\n // no turn possible\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n String state = this.b.stateToString();\n UUID stateHash = UUID.nameUUIDFromBytes(state.getBytes());\n DeterministicBoardStateNode dbsn;\n boolean cacheHit = false;\n if (!this.nodeMap.containsKey(stateHash)) {\n dbsn = new DeterministicBoardStateNode(team,\n evaluateAdvantage(this.b, team),\n filterLethal ? this.getPossibleLethalActions(team) : this.getPossibleActions(team));\n dbsn.sampleRate = sampleRate;\n this.nodeMap.put(stateHash, dbsn);\n } else {\n dbsn = this.nodeMap.get(stateHash);\n cacheHit = true;\n if (this.traversedNodes.contains(dbsn)) {\n System.err.println(\"AI encountered a cycle somehow\");\n return null;\n }\n }\n this.traversedNodes.add(dbsn);\n // start sampling\n int numSamples = (int) Math.round(Math.min(dbsn.totalBranches * sampleRate, maxSamples));\n numSamples = Math.max(numSamples, SAMPLING_MIN_SAMPLES);\n numSamples = Math.min(numSamples, dbsn.totalBranches);\n // if we are revisiting this node, but it needs to be re-evaluated at a better detail level\n if (cacheHit && dbsn.sampleRate < sampleRate - this.config.reevaluationMaxSampleRateDiff) {\n dbsn.resetEvaluationOrder();\n dbsn.sampleRate = sampleRate;\n this.totalReevaluations++;\n }\n\n // some statistics for debugging purposes\n this.maxBranches[depth] = Math.max(this.maxBranches[depth], numSamples);\n this.width[depth]++;\n this.totalEvaluated++;\n if (cacheHit) {\n this.cacheHits[depth]++;\n this.totalCacheHits++;\n }\n while (dbsn.evaluatedBranches < numSamples) {\n String action = dbsn.nextBranchToEvaluate();\n TraversalResult traverse = this.traverseAction(dbsn, state, action, depth, sampleRate, maxSamples,\n filterLethal, null);\n if (traverse.rng) {\n // rng, re-evaluate action many times, channel an average score into an RNGBoardStateNode\n int trials = Math.max(SelectRandom.ditherRound(Math.pow(this.config.rngDensityMultiplier, dbsn.totalBranches) * (this.config.rngMaxTrials - depth * this.config.rngTrialReduction)), this.config.rngMinTrials);\n RNGBoardStateNode nextBsn = (RNGBoardStateNode) dbsn.branches.get(action); // trust\n if (nextBsn != null) {\n // if previously evaluated this rng branch, see if we can add some trials to it\n trials = Math.max(1, trials - nextBsn.trials);\n } else {\n nextBsn = new RNGBoardStateNode(team);\n nextBsn.addTrial(traverse.next);\n }\n for (int j = 1; j < trials; j++) {\n traverse = this.traverseAction(dbsn, state, action, depth, sampleRate, maxSamples, filterLethal, nextBsn);\n nextBsn.addTrial(traverse.next);\n }\n dbsn.logEvaluation(action, nextBsn);\n } else {\n // not rng, whatever\n dbsn.logEvaluation(action, traverse.next);\n if (dbsn.lethal) {\n break;\n }\n }\n }\n this.traversedNodes.remove(dbsn);\n return dbsn;\n }", "private int heuristic(Node node, int currentDepth) {\n\n int ef, w1 = 1, w2 = 1, w3 = 0, w4 = 10, w5 = 1, w6 = 35, e1 = 0, e2 = 0, e3 = 0, e4 = 0, e5 = 0, e6 = 0;\n\n int ourSeedsInStore = node.getBoard().getSeedsInStore(ourSide);\n int oppSeedsInStore = node.getBoard().getSeedsInStore(ourSide.opposite());\n\n\n // hardcode fix.\n int parentOurSeedsInStore = 0;\n int parentOppSeedsInStore = 0;\n int parentMove = 0;\n int parentOurSeedsInHouse = 0;\n int parentOppSeedsInHouse = 0;\n\n if (currentDepth != 1) {\n parentOurSeedsInStore = node.getParent().getBoard().getSeedsInStore(ourSide);\n parentOppSeedsInStore = node.getParent().getBoard().getSeedsInStore(ourSide.opposite());\n parentMove = node.getName();\n parentOurSeedsInHouse = node.getParent().getBoard().getSeeds(ourSide, parentMove);\n parentOppSeedsInHouse = node.getParent().getBoard().getSeeds(ourSide.opposite(), parentMove);\n }\n\n int ourFreeHouse = 0;\n int oppFreeHouse = 0;\n int ourSeeds = ourSeedsInStore;\n int oppSeeds = oppSeedsInStore;\n\n int asdf1 = ourSeedsInStore - parentOurSeedsInStore;\n int asdf2 = oppSeedsInStore - parentOppSeedsInStore;\n\n e6 = asdf1 - asdf2;\n\n for (int i = 1; i <= 7; i++) {\n ourSeeds += node.getBoard().getSeeds(ourSide, i);\n oppSeeds += node.getBoard().getSeeds(ourSide.opposite(), i);\n }\n\n for (int i = 1; i <= 7; i++) {\n if (node.getBoard().getSeeds(ourSide, i) == 0)\n ourFreeHouse++;\n if (node.getBoard().getSeeds(ourSide.opposite(), i) == 0)\n oppFreeHouse++;\n }\n\n e1 = ourSeeds - oppSeeds;\n e2 = ourFreeHouse - oppFreeHouse;\n\n // hardcode fix.\n if (currentDepth != 1) {\n if (node.getParent().getPlayerSide() == this.getOurSide()) {\n // if last move puts seed into store\n if ((parentMove + parentOurSeedsInHouse) % 8 == 0) {\n e4 = 1;\n e3 = (parentMove + parentOurSeedsInHouse) / 8;\n } else if (parentMove + parentOurSeedsInStore > 8) {\n e4 = 0;\n e3 = (parentMove + parentOurSeedsInStore) / 8;\n }\n\n for (int i = 1; i <= 7; i++) {\n int parentOurSeedsInCurrentHouse = node.getParent().getBoard().getSeeds(ourSide, i);\n int parentOppSeedsInFrontHouse = node.getParent().getBoard().getSeeds(ourSide.opposite(), 8 - i);\n int oppSeedsInFrontHouse = node.getBoard().getSeeds(ourSide.opposite(), 8 - i);\n // if there's no seed in current house && there is seed right in front of us\n if ((parentOurSeedsInCurrentHouse == 0 || parentOurSeedsInCurrentHouse == 15) && parentOppSeedsInFrontHouse != 0 && oppSeedsInFrontHouse == 0) {\n if (currentDepth != 2) {\n if (node.getParent().getParent().getPlayerSide() == this.getOurSide()) {\n w5 = 5;\n e5 = parentOppSeedsInFrontHouse;\n break;\n }\n }\n e5 = parentOppSeedsInFrontHouse;\n break;\n }\n\n }\n } else if (node.getParent().getPlayerSide() == this.getOurSide().opposite()) {\n\n if (parentMove + parentOppSeedsInHouse == 8) {\n e4 = -1;\n e3 = -1 * (parentMove + parentOppSeedsInHouse) / 8;\n } else if (parentMove + parentOppSeedsInStore > 8) {\n e4 = 0;\n e3 = -(parentMove + parentOppSeedsInStore) / 8;\n }\n\n\n for (int i = 1; i <= 7; i++) {\n int parentOppSeedsInCurrentHouse = node.getParent().getBoard().getSeeds(ourSide.opposite(), i);\n int parentOurSeedsInFrontHouse = node.getParent().getBoard().getSeeds(ourSide, 8 - i);\n int oppSeedsInCurrentHouse = node.getBoard().getSeeds(ourSide, 8 - i);\n\n if ((parentOppSeedsInCurrentHouse == 0 || parentOppSeedsInCurrentHouse == 15) && parentOurSeedsInFrontHouse != 0 && oppSeedsInCurrentHouse == 0) {\n if (currentDepth != 2) {\n if (node.getParent().getParent().getPlayerSide() == this.getOurSide()) {\n w5 = 5;\n e5 = -parentOurSeedsInFrontHouse;\n break;\n }\n }\n w5 = 5;\n e5 = -parentOurSeedsInFrontHouse;\n break;\n }\n }\n }\n }\n ef = w1 * e1 + w2 * e2 + w3 * e3 + w4 * e4 + w5 * e5 + w6 * e6;\n return ef;\n }", "private int helper(int s, int M, int[] piles){\n if(s >= piles.length){\n return 0;\n }\n if(2*M + s > piles.length){\n return sums[s];\n }\n if(memo[s][M] != 0){\n return memo[s][M];\n }\n int min = Integer.MAX_VALUE;\n for(int x=1; x<=2*M; x++){\n // get the min score the player two can get\n min = Math.min(min, helper(s+x, Math.max(x, M), piles));\n }\n memo[s][M] = sums[s] - min;\n return memo[s][M];\n \n }", "public void kruskalMST()\n\t\t{\n\t\t\tPriorityQueue<Edge> pq = new PriorityQueue<>(allEdges.size(), Comparator.comparingInt(o -> o.roadCost));\n\n\t\t\tfor(int i = 0; i < allEdges.size(); i++)\n\t\t\t{\t\n\t\t\t\tpq.add(allEdges.get(i));\n\t\t\t}\t\t\t\n\n\t\t\tint [] parent = new int[edges];\n\t\t\tmakeSet(parent);\n\t\t\tArrayList<Edge> mst = new ArrayList<>();\n\t\t\tint index = 0, tempCost = 0;\n\n\t\t\t// Step 2: Pick the lowest cost edges to add to our result\n\t\t\twhile(index < edges - 1)\n\t\t\t{\n\t\t\t\tEdge edge = pq.remove();\n\t\t\t\tint x_set = find(parent, edge.source);\n\t\t\t\tint y_set = find(parent, edge.destination);\n\n\t\t\t\t// If creates a cycle, or a road with n wagons can't support the total weight ignore it\n\t\t\t\tif(x_set == y_set /* ||edge.weightCap * wagons < shipWeight */ ){\n\t\t\n\t\t\t\t}else{\n\t\t\t\t\t// These are valid edges for our MST\n\t\t\t\t\tmst.add(edge);\n\t\t\t\t\ttempCost += edge.roadCost;\n\t\t\t\t\tindex++;\n\t\t\t\t\tunion(parent, x_set, y_set);\n\t\t\t\t}\n\t\t\t\t// If there are no edges left, break out of the while loop\n\t\t\t\tif(pq.size() < 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ----------- Output working MSTs ----------- \n\t\t\t// printGraph(allEdges);\n\t\t\t// printCities(allCities);\n\n\t\t}", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "public ReturnClass astar_algo(){\n long start=System.nanoTime();\n TreeStar node=new TreeStar(variables,0);\n openList.push(node);\n\n while (!openList.isEmpty())\n {\n\n TreeStar temp= openList.pollLast(); //pop the highest scoring node in openList\n refreshUsage(temp.variables); //uses the current node variables to update usageArray\n\n if((System.nanoTime()-start)/1000000000>=maxTime){\n System.out.println(\"time limit reached\");\n ReturnClass returnClass= new ReturnClass(temp.variables,temp.score,false);\n return returnClass;\n }\n\n if(temp.score==nbC){\n System.out.println(\"solution trouvée !\");\n printArray(temp.variables);\n ReturnClass returnClass= new ReturnClass(temp.variables,temp.score,true);\n return returnClass;\n }\n\n int bestVar=0;\n if(heuristic.equals(\"TD Heuristic\")){\n bestVar= chooseVTD(); //get the highest scoring unused var to use it in children\n }\n else if(heuristic.equals(\"TD-long heuristic\")){\n bestVar=chooseVTD();\n }\n else if(heuristic.equals(\"Partial-diff Heuristic\")){\n bestVar= chooseVDiff(temp.variables); //get the highest scoring unused var to use it in children\n }\n else {\n bestVar= chooseVDiff(temp.variables);\n }\n\n\n TreeStar node1= nextVar(temp.variables, 0,bestVar,temp.profondeur+1);\n TreeStar node2= nextVar(temp.variables, 1,bestVar,temp.profondeur+1);\n\n if(node1!=null){\n addToOpenList(node1);\n addToOpenList(node2);\n }\n }\n\n System.out.println(\"solution non trouvée\");\n return null;\n }", "int main()\n{\n int f_amt,f_dis,f_shp,s_amt,s_dis,s_shp,a_amt,a_dis,a_shp,f_tot,s_tot,a_tot;\n std::cin>>f_amt>>f_dis>>f_shp>>s_amt>>s_dis>>s_shp>>a_amt>>a_dis>>a_shp;\n f_dis=(f_amt/100)*f_dis;\n s_dis=(s_amt/100)*s_dis;\n a_dis=(a_amt/100)*a_dis;\n f_tot=(f_amt-f_dis)+f_shp;\n s_tot=(s_amt-s_dis)+s_shp;\n a_tot=(a_amt-a_dis)+a_shp;\n std::cout<<\"In Flipkart Rs.\"<<f_tot;\n std::cout<<\"\\nIn Snapdeal Rs.\"<<s_tot;\n std::cout<<\"\\nIn Amazon Rs.\"<<a_tot;\n if((f_tot<s_tot)&&(f_tot<a_tot)||(f_tot==s_tot)&&(f_tot<a_tot)){\n std::cout<<\"\\nHe will prefer Flipkart\";\n }\n else if((s_tot<f_tot)&&(s_tot<a_tot)||(s_tot==a_tot)&&(s_tot<f_tot)){\n std::cout<<\"\\nHe will prefer Snapdeal\";\n \n }\n else if((a_tot<f_tot)&&(a_tot<s_tot)){\n std::cout<<\"\\nHe will prefer Amazon\";\n }\n}", "public void testTieBreakerSubmissionTime() throws Exception{\n\n // Sort order:\n // Primary Sort = number of solved problems (high to low)\n // Secondary Sort = score (low to high)\n // Tertiary Sort = earliest submittal of last submission (low to high)\n // Forth Sort = teamName (low to high)\n // Fifth Sort = clientId (low to high)\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,5,A,12,No\",\n \"6,5,A,12,Yes\", \n \n \"7,6,A,12,No\",\n \"8,6,A,12,Yes\",\n \n // Both solve 1 score 32 (no for 20, 12 min)\n\n \"15,5,B,21,No\",\n \"16,5,B,22,Yes\", \n \n \"25,6,B,21,No\",\n \"26,6,B,22,Yes\", \n \n // Both solve 2 score 42 (no for 20 and 22 min)\n // total 74 each\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n // must identical score, sort by team display name, identical ranks.\n \"1,team5,2,74\",\n \"1,team6,2,74\",\n \"3,team1,0,0\",\n \"3,team2,0,0\",\n \"3,team3,0,0\",\n \"3,team4,0,0\",\n };\n \n scoreboardTest (6, runsData, rankData);\n }", "public int minCostClimbingStairs(int[] cost) {\n // We initialize an array of size = cost, and it means the minimun cost of reaching n^th stair\n int[] dp = new int[cost.length];\n // We assign values to the first 2 numbers in the array because it can´t be smaller than 3\n dp[0] = cost[0];\n dp[1] = cost[1];\n // We iterate from n=2 to n-1, and in each position we save the min\n // value to reach the stair, the MIN is (dp[i-1] + cost[i] , dp[i-2] + cost[i]\n // that is so that the min way of reaching that stair is either using the n-1 or n-2\n for (int i = 2; i < cost.length; i++) {\n dp[i] = Math.min(dp[i - 1] + cost[i], dp[i - 2] + cost[i]);\n }\n\n // We return the min value of the last 2 stairs because both can reach the end\n return Math.min(dp[cost.length - 1], dp[cost.length - 2]);\n\n\t\t /*\n\t\t\t cost[1,100,1,1,1,100,1,1,100,1]\n\t\t 1.- Imagine this is the array\n\t\t\t dp[]\n\t\t 2.- We add the first two values\n\t\t\t dp[1,100]\n\t\t 3.- Iterate form 2 to n\n\t\t\t This is a representation of the first one\n\t\t dp[2] = Math.min(1+1, 100+1)\n\t\t dp[2] = Math.min(2,101)\n\t\t dp[2] = 2\n\t\t dp[1,100,2]\n\t\t\t After the for, this is how it should look\n\t\t dp[1,100,2,3,3,103,4,5,105,6]\n\t\t 4.- Select the min between last 2 because both can reach last step\n\t\t\treturn min (105,6)\n\t\t\treturn 6\n\n\t\t\tIt should have a space complexity of O(n) becuase we´re using an array of n size\n\t\t\tThe time complexity should also be O(n) because we have to iterate through all the array once\n\n\t\t */\n }", "private void calculate(int[][] turns) throws Exception {\n int score = 0;\n for (int i = 0; i < round; i++) {\n int[] t = turns[i];\n if (t[0] == maxSroce) {\n score += (maxSroce + getNext(turns, i, 2));\n situation[i] = Status.STRIKE;\n } else if (t[0] + t[1] == maxSroce) {\n score += (maxSroce + getNext(turns, i, 1));\n situation[i] = Status.SPARE;\n } else {\n score += (t[0] + t[1]);\n situation[i] = Status.MISS;\n }\n this.score[i] = score;\n }\n }", "private static double findOneSetCost(int r, int [] set,\r\n Vector oneSetVector,\r\n Host currentNode,\r\n ArrayList neighbors,\r\n ArrayList destList)\r\n {\n ArrayList setNeighbors = new ArrayList();\r\n for ( int i = 0; i < set.length; i++)\r\n {\r\n int index = set[i] - 1;\r\n Host neighbor = (Host) neighbors.get(index);\r\n setNeighbors.add(neighbor);\r\n }\r\n double [][] setDistanceArray = findDistanceArray(currentNode, destList, setNeighbors);\r\n //the setDistanceArray[r][m]\r\n\r\n //check if any neighbor in set is not common neighbor for all dests\r\n //if a neighbor is so, return a MaxDistance, hopArray = NULL\r\n int m = destList.size();\r\n for ( int i = 0; i < m; i++)\r\n {\r\n int num = 0;\r\n for ( int j = 0; j < r; j++)\r\n {\r\n if (setDistanceArray[j][i] < 0)\r\n {\r\n num++;\r\n setDistanceArray[j][i] = MaxDistance;\r\n }\r\n }\r\n if ( num >= r )\r\n {\r\n // All the neighbors in set cannot forward to destination[i]\r\n oneSetVector.clear(); // ???\r\n return MaxDistance;\r\n }\r\n }\r\n\r\n //find forward nodes provides min remain distance\r\n double totalCost = 0.0;\r\n\r\n //go thourgh destList, find a best forward neighbor for each dest\r\n //add the distance to totalRemainDistance\r\n for (int i = 0; i < m; ++i) {//loop through destList\r\n double minCost = setDistanceArray[0][i];//get first neighbor for each dest\r\n oneSetVector.add(i, setNeighbors.get(0));\r\n for (int j = 0; j < r; ++j) {// Loop through the neighbor\r\n if (minCost > setDistanceArray[j][i]) {\r\n // Swap\r\n minCost = setDistanceArray[j][i];\r\n oneSetVector.set(i, setNeighbors.get(j));\r\n }\r\n }\r\n totalCost += minCost;\r\n }\r\n\r\n return totalCost;\r\n }", "private void emptyRule2(boolean[] emptyElevators, int emptyCount){\n\t\t//create a sorted list of all of the floors based on the number of people waiting either to go up or down\n\t\tQueueSorter qs = new QueueSorter(this.upQueues.length*2+1);\n\t\tfor(int i = 0; i < this.upQueues.length ; i++){\n\t\t\t//add both the queue of people waiting to go up and down\n\t\t\tqs.add(( ElevatorQueue )this.upQueues[i] );\n\t\t\tqs.add(( ElevatorQueue )this.downQueues[i]);\n\t\t}\n\t\t\n\t\t// for every empty elevator\n\t\tfor( int i = 0 ; i < emptyCount; i++ ){\n\t\t\t// get the fullest floor Queue\n\t\t\tElevatorQueue tempQueue = qs.remove();\n\t\t\t//floor this queue is on\n\t\t\tint floor = tempQueue.getFloor();\n\t\t\t// do nothing if there is nobody in the queue (less non empty queues than elevators), no non empty queue's left, break from for loop\n\t\t\tif( tempQueue.size() == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// this checks to see if another elevator is headed to the target floor\n\t\t\tboolean check = false;\n\t\t\t//for each elevator\n\t\t\tfor( int j = 0; j < this.elevators.length ; j++ ){\n\t\t\t\t// if another elevator is headed to this target floor\n\t\t\t\tif( this.elevators[j].getTargetFloor() == floor &&\n\t\t\t\t\t this.elevators[j].getTargetDirection() == tempQueue.getDirectionQueue()){\n\t\t\t\t\tcheck = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if another elevator is already headed to this queue, continue to next biggest Queue\n\t\t\tif( check == true){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// initial values, will always be overwritten\n\t\t\tint tempIndex = -1;\n\t\t\tint tempDistance = -9999;\n\t\t\t// this will get the closest empty elevator, with no targetFloor set that is also empty\n\t\t\tfor( int j = 0 ; j < emptyElevators.length ; j++){\n\t\t\t\tif( emptyElevators[j] == true && this.elevators[j].getTargetFloor() < 0){\n\t\t\t\t\t//get the distance the elevator is from the Queue\n\t\t\t\t\t\n\t\t\t\t\tint distance = Math.abs(this.elevators[j].getCurrentFloor() - floor);\n\t\t\t\t\t// if this is the first empty Elevator checked, set it's values as the default\n\t\t\t\t\tif( tempDistance < 0 ){\n\t\t\t\t\t\ttempDistance = distance;\n\t\t\t\t\t\ttempIndex = j;\n\t\t\t\t\t}\n\t\t\t\t\t// if this elevator is closest elevator to the Queue checked so far\n\t\t\t\t\telse if( distance < tempDistance ){\n\t\t\t\t\t\t// set the new minimum distance\n\t\t\t\t\t\ttempDistance = distance;\n\t\t\t\t\t\t// index of this elevator\n\t\t\t\t\t\ttempIndex = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If there is an elevator that is empty (should always be if it gets this far). set the target information\n\t\t\t// for this elevator to head toward the Queue\n\t\t\tif( tempIndex >= 0){\n\t\t\t\tElevator.Direction d = tempQueue.getDirectionQueue();\n\t\t\t\t//set targetfloor / target direction\n\t\t\t\tthis.elevators[tempIndex].setTargetFloor(floor);\n\t\t\t\tthis.elevators[tempIndex].setTargetDirection(d);\n\t\t\t\t\n\t\t\t\t// this elevator has been assigned to a direction/ place to go, so we don't \n\t\t\t\t// want to consider it for future Queue's\n\t\t\t\temptyElevators[tempIndex] = false;\n\t\t\t\t\n\t\t\t\t// Set the direction that the elevator needs to go in to make it to the targetFloor\n\t\t\t\tif( this.elevators[tempIndex].getCurrentFloor() < floor){\n\t\t\t\t\tthis.elevators[tempIndex].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[tempIndex].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// This is for any remaining empty elevators that were not assigned a targetFloor (i.e. if there\n\t\t// are more empty elevators than queues with passengers waiting.\n\t\tfor( int i = 0 ; i < this.elevators.length ; i++){\n\t\t\tif( emptyElevators[i] == true){\n\t\t\t\t// half of the elevators will wait at the top and half will wait at the bottom\n\t\t\t\tif( i < this.elevators.length/2){\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic Solution<TTPVariable> run(SingleObjectiveThiefProblem thief, IEvaluator evaluator, MyRandom rand) {\n\t\tTTPVariable var = TTPVariable.create(new TourOptimalFactory(thief).next(rand), Pack.empty());\n\t\tSolution<TTPVariable> currentBest = thief.evaluate(var);\n\t\t\n\n\t\twhile (evaluator.hasNext()) {\n\n\t\t\t// now take the tour and optimize packing plan\n\t\t\tSolution<Pack> nextPack = optPack(thief, evaluator, rand, currentBest.getVariable().getTour(), currentBest.getVariable().getPack());\n\t\t\t\n\t\t\tSolution<Tour> nextTour = optTour(thief, evaluator, rand, currentBest.getVariable().getTour(), nextPack.getVariable());\n\t\t\t\n\t\t\tTTPVariable next = TTPVariable.create(nextTour.getVariable(), nextPack.getVariable());\n\t\t\tSolution<TTPVariable> s = thief.evaluate(next);\n\t\t\t\n\t\t\t//System.out.println(nextPack);\n\t\t\t//System.out.println(currentBest);\n\t\t\t//System.out.println(\"----------------\");\n\t\t\t\n\t\t\t// update the best found solution\n\t\t\tif (SolutionDominator.isDominating(s, currentBest)) {\n\t\t\t\tcurrentBest = s;\n\t\t\t\t//System.out.println(\"YES\");\n\t\t\t}\n\t\t\tevaluator.notify(currentBest);\n\n\t\t}\n\n\t\treturn currentBest;\n\t}" ]
[ "0.629629", "0.5609289", "0.5521074", "0.54175955", "0.52995104", "0.5230758", "0.5168712", "0.5114963", "0.511106", "0.5108104", "0.5099609", "0.50509477", "0.50311774", "0.49715686", "0.49542046", "0.49344298", "0.48904586", "0.4881143", "0.4868374", "0.48408356", "0.48340663", "0.48155358", "0.4798395", "0.47977042", "0.47964874", "0.4785567", "0.47758386", "0.4759752", "0.47476822", "0.4734104", "0.47314563", "0.4728329", "0.47261703", "0.47152543", "0.4709207", "0.47009808", "0.46902877", "0.46900433", "0.46802726", "0.46674144", "0.46663424", "0.46604675", "0.4656734", "0.46509352", "0.4645301", "0.46406528", "0.46275973", "0.4621791", "0.46178007", "0.46177378", "0.46173695", "0.46046034", "0.45961416", "0.45849526", "0.4584147", "0.45788318", "0.45780253", "0.4573801", "0.45676625", "0.45675483", "0.4566351", "0.45642194", "0.45617536", "0.45570266", "0.45568606", "0.45560932", "0.45518973", "0.45490107", "0.45462185", "0.45431542", "0.4540622", "0.45398572", "0.45372194", "0.45318744", "0.4523009", "0.4522921", "0.45199817", "0.45180085", "0.451585", "0.45074227", "0.4505747", "0.4504477", "0.45032883", "0.44966337", "0.44960895", "0.44913086", "0.44896385", "0.44847253", "0.44845194", "0.44840616", "0.44787633", "0.4476523", "0.44734928", "0.44732103", "0.44695547", "0.44685018", "0.44672075", "0.44666082", "0.44657525", "0.44573015" ]
0.6342835
0
/ how an agent decides which team to join: for each feasible team (team must have room to join based on its teamspecific size, and must either have at least 1 agent already, or must be the first empty team in the list): if the team has some agent already, take the sum of the values of current players, plus "the number of remaining spaces minus 1" times the "mean value of other remaining players". if the team is empty, take the value of the favorite remaining player, plus the "final team size 2" mean value of remaining players excluding the favorite.
private static int getFavoriteTeamIndexWithSpace( final List<List<Integer>> teams, final List<Integer> finalTeamSizes, final List<Agent> agents, final Agent selfAgent ) { // find mean value of other agents not yet on a team. double untakenOtherAgentsValue = 0.0; int untakenOtherAgentCount = 0; for (int i = 0; i < agents.size(); i++) { // don't count the self agent when evaluating // the mean value of other remaining agents. if (agents.get(i).equals(selfAgent)) { continue; } if (!EachDraftHelper.isAgentTaken(teams, i)) { final UUID currentAgentId = agents.get(i).getUuid(); untakenOtherAgentsValue += selfAgent.getValueByUUID(currentAgentId); untakenOtherAgentCount++; } } double meanValueOtherRemainingAgents = 0.0; if (untakenOtherAgentCount > 0) { meanValueOtherRemainingAgents = untakenOtherAgentsValue / untakenOtherAgentCount; } double maxTeamValue = -1.0; int bestTeamIndex = -1; for (int i = 0; i < teams.size(); i++) { final List<Integer> currentTeam = teams.get(i); final int currentTeamMaxSize = finalTeamSizes.get(i); // don't consider teams that are already full. if (currentTeam.size() == currentTeamMaxSize) { continue; } double currentTeamValue = 0.0; if (currentTeam.isEmpty()) { // team is empty. // you'd pick your favorite agent to join if there is room, // so add its value if the team has space. // then add "final team size - 2" * // mean value of remaining agents // excluding the favorite. if (currentTeamMaxSize > 1) { // there is room to pick favorite agent to join final List<UUID> idsHighToLowValue = selfAgent.getAgentIdsHighValueToLow(); UUID favoriteUUID = null; for (final UUID id: idsHighToLowValue) { if (!EachDraftHelper.isAgentTaken(teams, agents, id)) { favoriteUUID = id; break; } } if (favoriteUUID != null) { // some other agent is left besides self final double favoriteRemainingValue = selfAgent.getValueByUUID(favoriteUUID); currentTeamValue += favoriteRemainingValue; assert untakenOtherAgentCount > 0; double meanValueRemainingWithoutFavorite = 0.0; if (untakenOtherAgentCount > 1) { meanValueRemainingWithoutFavorite = (untakenOtherAgentsValue - favoriteRemainingValue) / (untakenOtherAgentCount - 1.0); } final int extraSpaces = currentTeamMaxSize - 2; currentTeamValue += meanValueRemainingWithoutFavorite * extraSpaces; } } } else { // team already has an agent. // sum values of current agents, // then add (spaces - 1) * mean value of remaining agents. for (final Integer playerIndex: currentTeam) { final UUID playerUUID = agents.get(playerIndex).getUuid(); final double playerValue = selfAgent.getValueByUUID(playerUUID); currentTeamValue += playerValue; } if (currentTeam.size() + 1 < currentTeamMaxSize) { // team has room for another // agent besides self agent. final int extraSpaces = currentTeamMaxSize - (1 + currentTeam.size()); currentTeamValue += extraSpaces * meanValueOtherRemainingAgents; } } if (currentTeamValue > maxTeamValue) { maxTeamValue = currentTeamValue; bestTeamIndex = i; } // only allowed to join the first empty team, not some other // empty team which may have more spaces. if (currentTeam.isEmpty()) { break; } } assert bestTeamIndex != -1; return bestTeamIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "public int getOccupancy() {\r\n return teamRed.getSize() + teamBlue.getSize();\r\n }", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "public static double evaluateSurvivability(Board b, int team) {\n Optional<Leader> ol = b.getPlayer(team).getLeader();\n if (ol.isEmpty()) {\n return 0;\n }\n Leader l = ol.get();\n if (l.health <= 0) { // if dead\n return -99999 + l.health; // u dont want to be dead\n }\n int shield = l.finalStats.get(Stat.SHIELD);\n Supplier<Stream<Minion>> attackingMinions = () -> b.getMinions(team * -1, true, true);\n // TODO add if can attack check\n // TODO factor in damage limiting effects like durandal\n int potentialDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int potentialLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int threatenDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int threatenLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int attackers = attackingMinions.get()\n .map(m -> m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n List<Minion> defendingMinons = b.getMinions(team, false, true)\n .filter(m -> m.finalStats.get(Stat.WARD) > 0)\n .collect(Collectors.toList());\n int leaderhp = l.health + shield;\n int ehp = defendingMinons.stream()\n .map(m -> m.health)\n .reduce(leaderhp, Integer::sum);\n long defenders = defendingMinons.size();\n if (shield > 0) {\n defenders++;\n }\n if (b.getCurrentPlayerTurn() != team) {\n threatenDamage = potentialDamage;\n threatenLeaderDamage = potentialLeaderDamage;\n }\n // if there are more defenders than attacks, then minions shouldn't be\n // able to touch face\n if (defenders >= attackers) {\n ehp = Math.max(ehp - threatenDamage, leaderhp);\n } else {\n ehp = Math.max(ehp - threatenDamage, leaderhp - threatenLeaderDamage);\n if (ehp <= 0) {\n if (team == b.getCurrentPlayerTurn()) {\n // they're threatening lethal if i dont do anything\n return -30 + ehp;\n } else {\n // they have lethal, i am ded\n return -60 + ehp;\n }\n }\n }\n return 6 * Math.log(ehp);\n }", "public void testSendToTeams() throws Exception{\n\n // Sort order:\n // Primary Sort = number of solved problems (high to low)\n // Secondary Sort = score (low to high)\n // Tertiary Sort = earliest submittal of last submission (low to high)\n // Forth Sort = teamName (low to high)\n // Fifth Sort = clientId (low to high)\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,5,A,12,No\",\n \"6,5,A,12,Yes\", \n\n // t5 solves A, 32 pts = 20 + 12\n \n \"7,6,A,12,No,Yes\",\n \"8,6,A,12,Yes,No\",\n \n // t6 does not solve, 0 solve, 0 pts\n\n \"15,5,B,21,No\",\n \"16,5,B,22,Yes,No\", \n \n // t5 does solve B, but not sent to team/used 0 pts 0 solved\n \n \"25,6,B,21,No,No\",\n \"26,6,B,22,Yes,Yes\",\n \n // t6 solves B, 22 pts because No at 21 is NOT counted.\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n // rank, team, solved, pts\n \"1,team6,1,22\",\n \"2,team5,1,32\",\n \"3,team1,0,0\",\n \"3,team2,0,0\",\n \"3,team3,0,0\",\n \"3,team4,0,0\",\n };\n \n scoreboardTest (6, runsData, rankData, true);\n }", "public static Player.PlayerTeam getWinningTeam(List<Player> players) {\n int sumForPaper = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.PAPER)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n int sumForRock = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.ROCK)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n int sumForScissors = players.stream()\n .filter(player -> player.getTeam() == Player.PlayerTeam.SCISSORS)\n .mapToInt(Player::getCurrentScore)\n .sum();\n\n Map<Player.PlayerTeam, Integer> finalList = new HashMap<>();\n finalList.put(Player.PlayerTeam.PAPER, sumForPaper);\n finalList.put(Player.PlayerTeam.ROCK, sumForRock);\n finalList.put(Player.PlayerTeam.SCISSORS, sumForScissors);\n\n int max = Collections.max(finalList.values());\n\n List<Player.PlayerTeam> collect = finalList.entrySet().stream()\n .filter(entry -> entry.getValue() == max)\n .map(entry -> entry.getKey())\n .collect(Collectors.toList());\n\n Player.PlayerTeam winningTeam = collect.get(0);\n\n return winningTeam;\n\n }", "@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}", "public Integer costOfDepartment() {\n Integer total = 0;\n for (Manager manager :\n departmentHeads) {\n total += manager.costOfTeam();\n }\n return total;\n }", "public void assignPointsToTeams(){\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalRuns() < two.getTotalRuns()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsRuns(setvalue);\n }\n \n //SORTS FOR TOTALHOMERUNS THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalHomeRuns() < two.getTotalHomeRuns()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsHomeRuns(setvalue);\n }\n \n //SORTS FOR RunsBattedIn THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalRunsBattedIn() < two.getTotalRunsBattedIn()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsRunsBattedIn(setvalue);\n }\n \n //SORTS FOR STOLENBASES THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getTotalStolenBases() < two.getTotalStolenBases()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsStolenBases(setvalue);\n }\n \n //SORTS FOR BATTINGAVERAGE THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getBattingAverage() < two.getBattingAverage()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsBattingAverage(setvalue);\n }\n \n //SORTS FOR Wins THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getWins() < two.getWins()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsWins(setvalue);\n }\n \n //SORTS FOR Strikeouts THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getStrikeouts() < two.getStrikeouts()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsStrikeouts(setvalue);\n }\n \n //SORTS FOR Saves THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getSaves() < two.getSaves()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsSaves(setvalue);\n }\n \n //SORTS FOR ERA THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getEarnedRunAverage() < two.getEarnedRunAverage()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsERA(setvalue);\n }\n \n //SORTS FOR WHIP THEN ASSIGNS EACH THE CORRESPONDING POINT VALUE\n Collections.sort(this.teams, new Comparator<Object>() {\n @Override\n public int compare(final Object object1, final Object object2) {\n Team one = (Team)object1;\n Team two = (Team)object2;\n \n if(one.getWhip() < two.getWhip()){\n return 1;\n }\n else{\n return -1;\n }\n }\n });\n \n for(int i=0;i<teams.size();i++){\n int setvalue = 12-i;\n if(setvalue<0){\n setvalue = 0;\n }\n Team t = teams.get(i);\n t.setPointsWHIP(setvalue);\n } \n }", "public int calculateNumberOfMatches(Tournament tournament, Round round) {\r\n\t\tint playersPerMatch = tournament.getTeamSize() * 2; // home and away team\r\n\t\tint possibleMatches = round.getPlayers().size() / playersPerMatch;\r\n\t\treturn Math.min(possibleMatches, tournament.getCourts());\r\n\t}", "public final void distributeTeamsPoints() {\n final Announce normalAnnounce = game.getAnnounceList().getOpenContractAnnounce();\n final Announce lastAnnounce = game.getAnnounceList().getContractAnnounce();\n\n if (normalAnnounce != null && lastAnnounce != null) {\n if (lastAnnounce.getType().equals(AnnounceType.Normal)) {\n distributeTeamsPointsNormalGame(normalAnnounce);\n } else if (lastAnnounce.getType().equals(AnnounceType.Double)) {\n distributeTeamsPointsDoubleGame(normalAnnounce);\n } else if (lastAnnounce.getType().equals(AnnounceType.Redouble)) {\n distributeTeamsPointsRedoubleGame(normalAnnounce);\n }\n }\n }", "public void calculations(){\n\n int temp_size1 = fight_list.get(0).t1.members.size();\n int[] t1_counter = new int[temp_size1 + 1]; //counter for deaths: 0, 1, 2..., party size.\n float t1_avg = 0; //Average number of deaths.\n\n //We don't need to calculate for t2 right now, because t2 is just monsters.\n //temp_size = fight_list.get(0).t2.members.size();\n //int[] t2_counter = new int[temp_size + 1];\n\n for(FightResult fig : this.fight_list){\n int i = 0;\n while(i != fig.t1_deaths){\n i++;\n }\n t1_counter[i]++;\n t1_avg += fig.t1_deaths;\n }//end for\n\n System.out.println(t1_avg);\n System.out.println(Float.toString(t1_avg/fight_list.size()) + \" / \" + Integer.toString(temp_size1));\n\n String axis = \"# of deaths: \\t\";\n int axis_int = 0;\n String t1_results = \"Happened: \\t\";\n for(int i : t1_counter){\n axis += Integer.toString(axis_int++) + \"\\t\";\n t1_results += Integer.toString(i) + \"\\t\";\n }//end for\n System.out.println(axis);\n System.out.println(t1_results);\n\n float tpk_amount = t1_counter[temp_size1]; //by taking the size, we take the item at the end of the array. In this case, the number where everyone dies.\n tpk_amount = (tpk_amount/fight_list.size())*100;\n System.out.println(\"Probability of TPK: \" + Float.toString(tpk_amount) + \" %.\");\n\n System.out.println(\"\\n--------\\n\");\n }", "private int tournament()\r\n {\r\n\tint out = spinTheWheel();\r\n\tdouble max = ff.evaluate(chromos.get(out),generation());\r\n\tdouble temp_fitness = 0;\r\n\tint temp_index = 0;\r\n\r\n\tfor(int i = 0; i < selPara - 1 + tourStep*generation(); i++)\r\n\t {\r\n\t\ttemp_index = spinTheWheel();\r\n\t\ttemp_fitness = ff.evaluate(chromos.get(temp_index),generation());\r\n\t\tif(temp_fitness > max)\r\n\t\t {\r\n\t\t\tmax = temp_fitness;\r\n\t\t\tout = temp_index;\r\n\t\t }\r\n\t }\r\n\treturn out;\r\n }", "private WeightedSampler<String> getPossibleLethalActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedOrderedSampler<>();\n List<Minion> minions = this.b.getMinions(team, false, true).collect(Collectors.toList());\n for (Minion m : minions) {\n if (p.canUnleashCard(m)) {\n double totalWeight = UNLEASH_TOTAL_WEIGHT + UNLEASH_WEIGHT_PER_PRESENCE * m.getTotalEffectValueOf(e -> e.getPresenceValue(5));\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n if (this.b.getMinions(team * -1, false, true).anyMatch(m -> m.finalStats.get(Stat.WARD) > 0)) {\n // find ways to break through the wards\n for (Minion m : minions) {\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n List<Minion> searchSpace = m.getAttackableTargets().collect(Collectors.toList());\n double weight = totalWeight / searchSpace.size();\n for (Minion target : searchSpace) {\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * weight);\n }\n }\n }\n } else {\n // just go face\n this.b.getPlayer(team * -1).getLeader().ifPresent(l -> {\n for (Minion m : minions) {\n if (m.canAttack(l)) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n poss.add(new OrderAttackAction(m, l).toString().intern(), totalWeight);\n }\n }\n });\n }\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "public void calcTroops() {\r\n\t\t//Based on how many troops the player owns this will add to their spendage with a minimum of 2\r\n\t\ttroopSpendage = (players.get(turnCounter).getCountries().size()) / 3;\r\n\t\tif (troopSpendage < 3) {\r\n\t\t\ttroopSpendage = 3;\r\n\t\t}\r\n\t\t//If a player owns an entire continent, they will get a continent bonus to their spendage\r\n\t\t//these counters record how much of a continent the player owns\r\n\t\tint Kjersia = 0;\r\n\t\tint Estoveria = 0;\r\n\t\tint Moa = 0;\r\n\t\tint Shilov = 0;\r\n\t\tint Tormudd = 0;\r\n\t\tint Eschilles = 0;\r\n\t\t\r\n\t\t//increment the corresponding continent counter based on the continent value stored in the country objects the player owns\r\n\t\tfor (Country c:players.get(turnCounter).getCountries()) {\r\n\t\t\tswitch (c.getContinent()) {\r\n\t\t\tcase \"Kjersia\": Kjersia++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Estoveria\": Estoveria++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Moa\": Moa++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Shilov\": Shilov ++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Tormudd\": Tormudd++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Eschilles\": Eschilles++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If the player owns all countries in a continent (each continent has different numbers of countries), give them a corresponding troop bonus as decided by the rules of the game\r\n\t\tif (Kjersia == 4) {\r\n\t\t\ttroopSpendage += 2;\r\n\t\t}\r\n\t\tif (Estoveria == 8) {\r\n\t\t\ttroopSpendage += 5;\r\n\t\t}\r\n\t\tif (Moa == 9) {\r\n\t\t\ttroopSpendage += 6;\r\n\t\t}\r\n\t\tif (Shilov == 4) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Tormudd == 5) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Eschilles == 12) {\r\n\t\t\ttroopSpendage += 7;\r\n\t\t}\r\n\r\n\t\t//If a player owns the card and owns the coresponding country on that card they get one extra troop\r\n\t\tfor(Card C: players.get(turnCounter).getCards()) \r\n\t\t\tfor(Country co: players.get(turnCounter).getCountries())\r\n\t\t\t\tif (C.getCountry().equals(co.getName()))\r\n\t\t\t\t\ttroopSpendage++;\t\t\r\n\t\t\r\n\t\t//Updates the display of how many troops the player has to deploy\r\n\t\ttroopsToDeploy.setText(\"Troops to Deploy: \" + troopSpendage);\r\n\t}", "@Override\n public boolean hasWonGame( int team ) {\n boolean canReach = false;\n if(team == 1){\n for(Dot sDot:board.getStartNodes1()){\n for(Dot eDot:board.getEndNodes1()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n else if(team ==2){\n for(Dot sDot:board.getStartNodes2()){\n for(Dot eDot:board.getEndNodes2()){\n if(canReachDFS(sDot,eDot)){\n canReach = true;\n }\n }\n }\n }\n return canReach;\n }", "public int size() {\r\n return team.size();\r\n }", "public void calculatePausedPlayers(Tournament tournament, Round round) {\r\n\t\t// this is the number of players in one match\r\n\t\tint numberOfMatchPlayers = tournament.getTeamSize() * 2; // home and away team\r\n\t\t// this is the maximum number of players in one round\r\n\t\tint maxNumberOfActivePlayers = tournament.getCourts() * numberOfMatchPlayers;\r\n\r\n\t\twhile (round.getPlayers().size() > maxNumberOfActivePlayers) {\r\n\t\t\taddPausedPlayer(tournament.getRounds(), round);\r\n\t\t}\r\n\r\n\t\twhile ((round.getPlayers().size() % numberOfMatchPlayers) != 0) {\r\n\t\t\taddPausedPlayer(tournament.getRounds(), round);\r\n\t\t}\r\n\t}", "public int tournament(int size) {\n\t\t\n\t\tint best = 0;\n\t\tfloat bestFitness = Float.NEGATIVE_INFINITY;\n\t\t\n\t\t//selects the best individual from randomly sampled tournament participants\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tint index = R.nextInt(populationSize);\n\t\t\tif(fitness[index] > bestFitness){\n\t\t\t\tbestFitness = fitness[index];\n\t\t\t\tbest = index;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn best;\n\t}", "public void addingPlayedMatch() throws IOException {\n\n displayStatistics();\n Scanner scn = new Scanner(System.in);\n System.out.println(\"Enter date (dd.mm.yyyy): \");\n String scanned = scn.nextLine();\n Date date;\n try {\n date = new SimpleDateFormat(\"dd.mm.yyyy\").parse(scanned);\n } catch (ParseException ex) {\n System.out.println(\"date should in this format!!! >> mm-dd-yyyy\");\n return;\n }\n System.out.println(\"Enter Team 1: \");\n scanned = scn.nextLine();\n FootballClub team1 = null;\n for (FootballClub club : footballClubArrayList) {\n if (club.getClubName().equals(scanned))\n team1 = club;\n }\n if (team1 == null) {\n System.out.println(\"Wrong club name!!!\");\n return;\n }\n System.out.println(\"Enter Team 2: \");\n scanned = scn.nextLine();\n FootballClub team2 = null;\n for (FootballClub club : footballClubArrayList) {\n if (club.getClubName().equals(scanned))\n team2 = club;\n }\n if (team2 == null) {\n System.out.println(\"Wrong club name!!!\");\n return;\n }\n\n System.out.println(\"Team 1 goals: \");\n scanned = scn.nextLine();\n int team1Goal = -1;\n try {\n team1Goal = Integer.parseInt(scanned);\n } catch (Exception e) {\n }\n if (team1Goal == -1) {\n System.out.println(\"Enter the number of goals\");\n return;\n }\n\n System.out.println(\"Team 2 goals: \");\n scanned = scn.nextLine();\n int team2Goal = -1;\n try {\n team2Goal = Integer.parseInt(scanned);\n } catch (Exception e) {\n }\n if (team2Goal == -1) {\n System.out.println(\"Enter the number of goals\");\n return;\n }\n\n\n Match match = new Match(date,team1,team2,team1Goal,team2Goal); //setting variables when user enter number of goals\n match.setDate(date);\n match.setTeam1(team1);\n match.setTeam2(team2);\n match.setTeam1Goal(team2Goal);\n match.setTeam2Goal(team1Goal);\n matchArrayList.add(match);\n team1.setNumOfGoalsScored(team1.getNumOfGoalsScored() + team1Goal);\n team2.setNumOfGoalsScored(team2.getNumOfGoalsScored() + team2Goal);\n team1.setNumOfGoalsReceived(team1.getNumOfGoalsReceived() + team2Goal);\n team2.setNumOfGoalsReceived(team2.getNumOfGoalsReceived() + team1Goal);\n team1.setNumOfMatchesPlayed(team1.getNumOfMatchesPlayed() + 1);\n team2.setNumOfMatchesPlayed(team2.getNumOfMatchesPlayed() + 1);\n\n if (team1Goal > team2Goal) {\n team1.setNumOfPoints(team1.getNumOfPoints() + 3);\n team1.setNumOfWins(team1.getNumOfWins() + 1);\n team2.setNumOfDefeats(team2.getNumOfDefeats() + 1);\n } else if (team1Goal < team2Goal) {\n team2.setNumOfPoints(team2.getNumOfPoints() + 3);\n team2.setNumOfWins(team2.getNumOfWins() + 1);\n team1.setNumOfDefeats(team1.getNumOfDefeats() + 1);\n } else {\n team1.setNumOfPoints(team1.getNumOfPoints() + 1);\n team2.setNumOfPoints(team2.getNumOfPoints() + 1);\n team1.setNumOfDraws(team1.getNumOfDraws() + 1);\n team2.setNumOfDraws(team2.getNumOfDraws() + 1);\n }\n\n FileOutputStream fis = new FileOutputStream(\"clubData.txt\");\n ObjectOutputStream oos = new ObjectOutputStream(fis);\n oos.writeObject(footballClubArrayList);\n oos.close();\n fis.close();\n\n displayStatistics();\n matchArrayList.add(new Match(date, team1, team2, team1Goal, team2Goal));\n\n\n try {\n FileOutputStream fileOut = new FileOutputStream(\"matchData.txt\");\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(matchArrayList);\n objectOut.close();\n fileOut.close();\n System.out.println(\"Match added Successfully\");\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }", "public void createTeams()\n {\n ArrayList<Student> teamCreator = new ArrayList<Student>();\n Integer[] teamSize = getTeamSizeArray();// Calculate all the sizes\n for (int i =0 ; i < teamSize.length ; i ++)\n {\n teamCreator = femaleHardConstraintApplicator(teamCreator, teamSize[i]);//Initial 4/ 3/ 2 students added to the ArrayList\n if(!Constraint.femaleHardConstraintCheck(teamCreator)) // Hard Constraint Check\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Maximum of one woman per team cannot be met currently\");\n break;\n }\n teamCreator = dislikedMembersRemover(teamCreator);\n for (int x = 0; x < Constraint.allSoftConstraints.size(); x++) // bubble sort outer loop\n {\n for (int y = 0; y < Constraint.allSoftConstraints.size() - x - 1; y++) {\n if (Constraint.allSoftConstraints.get(y).getWeightAge() > (Constraint.allSoftConstraints.get(y + 1).getWeightAge())) {\n Constraint temp = Constraint.allSoftConstraints.get(y);\n Constraint.allSoftConstraints.set(y, Constraint.allSoftConstraints.get(y + 1));\n Constraint.allSoftConstraints.set(y + 1, temp);\n }\n }\n }\n\n for(Constraint c: Constraint.allSoftConstraints){\n switch (Integer.parseInt(c.getConstraintId().substring(11,12))) {\n case 1:\n teamCreator = uniquePersonalityConstraintApplicator(teamCreator);\n break;\n case 2:\n teamCreator = requiredPersonalityApplicator(teamCreator);\n break;\n case 3:\n teamCreator = experienceSoftConstraintApplicator(teamCreator);\n break;\n default:\n break;\n }\n }\n\n teamCreator = teamAverageGPAConstraintApplicator(teamCreator);\n if(!Constraint.averageGPAHardConstraintCheck(teamCreator))\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Average team GPA should be less than 3.5.\");\n break;\n }\n teamCreator = teamMemberGPAConstraintApplicator(teamCreator);\n if(!Constraint.twoMembersWith3GPAHardConstraintCheck(teamCreator) && !Constraint.averageGPAHardConstraintCheck(teamCreator))\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Two Members needed with GPA 3 or Above.\");\n break;\n }\n Team team = setProjectForTeam(teamCreator);\n System.out.println(Constraint.ANSI_BLUE + \"\\nCongratulations! A team has been formed!!\\n\" +Constraint.ANSI_RESET +\n \"The team ID is \\t\\t\\t: \" + team.getTeamID() +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectTitle() +\n \"\\n\");\n System.out.print(\"The Students IDs of students in this team are: \\n\\n\");\n for (Student student : teamCreator)\n {\n System.out.print(student.getId() + \"\\t\\tName: \" + student.getFirstName() + \"\\t\\t\\t\\tGender : \" + student.getGender() + \"\\n\");\n }\n Team.allTeams.add(team);\n for (Student student : teamCreator)\n {\n for(Student student1 : Student.allStudents){\n if(student.getId().compareTo(student1.getId()) ==0){\n student.setAssignedTeam(team);\n student1.setAssignedTeam(team);\n }\n }\n }\n teamCreator.clear();\n team = null;\n\n int choice = 0;\n System.out.println(\"\\nDo you want to attempt to create another team ?\\n\" +\n \"1.Yes\\n\" +\n \"2.No \\n\");\n choice = InputTools.intChecker(1,2);\n if (choice == 2)\n {\n break;\n }\n }\n System.out.println(\"Exited\");\n }", "public void addTeam(Team team) {\n int maxTotalTeamsCurrentlyAllowed = getTotalPlayersInLeague();\n\n // If a team has been created\n if(getTeams().size() != 0) {\n\n float greatestPlayerCount;\n // if the number of players on the largest team is not equal to zero\n if((greatestPlayerCount = (float) getTeamWithMostPlayers().getPlayerCount()) != 0) {\n\n // Get the sum of all the players in the league\n float totalLeaguePlayers = (float) getTotalPlayersInLeague();\n\n // divide the total players in league by number of players in largest team, rounded down\n float totalTeamsAllowedFloat = totalLeaguePlayers / greatestPlayerCount;\n\n // cast into double for Math.floor method\n double totalTeamsAllowedDouble = (double) totalTeamsAllowedFloat;\n\n // cast into integer for comparison\n maxTotalTeamsCurrentlyAllowed = (int) Math.floor(totalTeamsAllowedDouble);\n }\n\n }\n\n // If we're requesting to make more teams than the current max allowed, throw exception\n if (getTeams().size() < maxTotalTeamsCurrentlyAllowed) {\n teams.add(team);\n } else {\n throw new IndexOutOfBoundsException(\"Not enough players for a new team\");\n }\n\n }", "private WeightedSampler<String> getPossibleActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedRandomSampler<>();\n // playing cards & selecting targets\n List<Card> hand = p.getHand();\n for (Card c : hand) {\n if (p.canPlayCard(c)) {\n double totalWeight = PLAY_CARD_TOTAL_WEIGHT + PLAY_CARD_COST_WEIGHT_MULTIPLIER * c.finalStats.get(Stat.COST);\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(c.getBattlecryTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n if (c instanceof BoardObject) {\n double weightPerPos = totalWeight / (p.getPlayArea().size() + 1);\n // rip my branching factor lol\n for (int playPos = 0; playPos <= p.getPlayArea().size(); playPos++) {\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new PlayCardAction(p, c, playPos, targets).toString().intern(), weightPerPos / targetSearchSpace.size());\n }\n }\n } else {\n // spells don't require positioning\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new PlayCardAction(p, c, 0, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n }\n this.b.getMinions(team, false, true).forEachOrdered(m -> {\n // unleashing cards & selecting targets\n if (p.canUnleashCard(m)) {\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), UNLEASH_TOTAL_WEIGHT / targetSearchSpace.size());\n }\n }\n // minion attack\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n double weight = totalWeight / m.getAttackableTargets().count();\n m.getAttackableTargets().forEachOrdered(target -> {\n double bonus = target instanceof Leader ? ATTACK_TARGET_LEADER_MULTIPLIER : 1;\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * bonus * weight);\n });\n }\n });\n // ending turn\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "public int computeDamageTo(Combatant opponent) { return 0; }", "public static void addPlayer(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Add Player---\");\r\n\t\ttheTeam.teamToString();\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"--Top 20 Free Agents--\");\r\n\t\ttheLeague.getFreeAgents(20);\r\n\r\n\t\tint playerChoice;\r\n\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\" 0 - Filter Free Agents by Position\");\r\n\t\t\t\tSystem.out.println(\" -1 - View All Free Agents\");\r\n\t\t\t\tSystem.out.println(\"1-\" + theLeague.playerList().size() + \" - Select a Player\");\r\n\t\t\t\tplayerChoice = Input.validInt(-1, theLeague.playerList().size(), keyboard);\r\n\t\t\t\t\r\n\t\t\t\tif (playerChoice == -1) {\r\n\t\t\t\t\ttheLeague.getFreeAgents();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (playerChoice == 0) {\r\n\t\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\t\tSystem.out.println(\"Which position would you like to view?\");\r\n\t\t\t\t\tSystem.out.println(\"1 - QB\");\r\n\t\t\t\t\tSystem.out.println(\"2 - WR\");\r\n\t\t\t\t\tSystem.out.println(\"3 - RB\");\r\n\t\t\t\t\tSystem.out.println(\"4 - TE\");\r\n\t\t\t\t\tswitch (Input.validInt(1, 4, keyboard)) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent QBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"QB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent WRs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"WR\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent RBs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"RB\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\tSystem.out.println(\"\\n--Top 20 Free Agent TEs--\\n\");\r\n\t\t\t\t\t\ttheLeague.getFreeAgents(20, \"TE\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\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} while (playerChoice < 1);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (theLeague.playerList().get(playerChoice - 1).getIsOwned()) {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(theLeague.playerList().get(playerChoice - 1).playerToString() + \" is not available\");\r\n\t\t\t}\r\n\t\t} while (theLeague.playerList().get(playerChoice - 1).getIsOwned());\r\n\r\n\t\tPlayer thePlayer = theLeague.playerList().get(playerChoice - 1);\r\n\t\tthePlayer.setIsOwned();\r\n\t\ttheTeam.getRoster().add(thePlayer);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***\" + theTeam.getManagerName() + \" has added \" + thePlayer.playerToString() + \"***\");\r\n\t}", "@Override\r\n\tpublic void calculateFinalData() {\n\t\tfor(TeamPO oneTeam:teams.getAllTeams()){\r\n\t\t\toneTeam.calculateTeamDataInOneSeason();\r\n\t\t}\r\n\t}", "public int numberOfTeams() {\n return noTeams;\n }", "public void summariseScore(Athletes[] competitors, Game gam) {\n\t\tint min = Integer.MAX_VALUE;\n\t\tAthletes winner1 = null;\n\t\tAthletes winner2 = null;\n\t\tAthletes winner3 = null;\n\t\t/* choosing the first winner and giving him his points */\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\twinner1 = competitors[i];\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner1(winner1);\n\t\twinner1.setPoints(5);\n\n\t\t/* choosing the second winner and giving him his points */\n\t\tmin = Integer.MAX_VALUE;\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tif (competitors[i] != winner1) {\n\t\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\t\twinner2 = competitors[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner2(winner2);\n\t\twinner2.setPoints(3);\n\n\t\t/* choosing the last winner and giving him his points */\n\t\tmin = Integer.MAX_VALUE;\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tif (competitors[i] != winner1 && competitors[i] != winner2) {\n\t\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\t\twinner3 = competitors[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner3(winner3);\n\t\twinner3.setPoints(1);\t\n\t\t\n\t\tsortCompetitors(competitors);\n\t}", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "protected abstract void gatherTeam();", "private void doMatchesStats(int week){\r\n \r\n \r\n List<FantasyMatch> fMatches = fmatchBean.findByWeek(week);\r\n for(int i = 0; i < fMatches.size(); i++){\r\n FantasyMatch fm = fMatches.get(i);\r\n FantasyTeam team1 = fm.getTeam1();\r\n FantasyTeam team2 = fm.getTeam2();\r\n int team1Points = 0, team2Points = 0;\r\n \r\n team1Points += retrievePoints(fm.getTeam1QB(), week);\r\n team2Points += retrievePoints(fm.getTeam2QB(), week);\r\n \r\n team1Points += retrievePoints(fm.getTeam1RB1(), week);\r\n team2Points += retrievePoints(fm.getTeam2RB1(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1RB2(), week);\r\n team2Points += retrievePoints(fm.getTeam2RB2(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1WR1(), week);\r\n team2Points += retrievePoints(fm.getTeam2WR1(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1WR2(), week);\r\n team2Points += retrievePoints(fm.getTeam2WR2(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1WRRB(), week);\r\n team2Points += retrievePoints(fm.getTeam2WRRB(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1TE(), week);\r\n team2Points += retrievePoints(fm.getTeam2TE(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1K(), week);\r\n team2Points += retrievePoints(fm.getTeam2K(), week);\r\n\r\n team1Points += retrievePoints(fm.getTeam1DEF(), week);\r\n team2Points += retrievePoints(fm.getTeam2DEF(), week);\r\n \r\n fm.setTeam1Points(team1Points);\r\n fm.setTeam2Points(team2Points);\r\n \r\n if(team1Points > team2Points){\r\n team1.setWins(team1.getWins() + 1);\r\n team2.setLosses(team2.getLosses() + 1);\r\n }\r\n if(team1Points == team2Points){\r\n team1.setDraws(team1.getDraws() + 1);\r\n team2.setDraws(team2.getDraws() + 1);\r\n }\r\n if(team1Points < team2Points){\r\n team1.setLosses(team1.getLosses() + 1);\r\n team2.setWins(team2.getWins() + 1);\r\n }\r\n \r\n team1.setPointsFor(team1.getPointsFor() + team1Points);\r\n team1.setPointsAgainst(team1.getPointsAgainst() + team2Points);\r\n \r\n team2.setPointsFor(team2.getPointsFor() + team2Points);\r\n team2.setPointsAgainst(team2.getPointsAgainst() + team1Points);\r\n \r\n fmatchBean.edit(fm);\r\n ftBean.edit(team1);\r\n ftBean.edit(team2);\r\n }\r\n \r\n List<FantasyLeague> leagues = flBean.findAll();\r\n for(int i = 0; i < leagues.size(); i++){\r\n List<FantasyTeam> teams = ftBean.findByLeague(leagues.get(i));\r\n \r\n //DO SORTING BY WINS\r\n Collections.sort(teams, new TeamWinComparator());\r\n \r\n for(int j = 0; j < teams.size(); j++){\r\n FantasyTeam team = teams.get(j);\r\n team.setPreviousRank(team.getRank());\r\n team.setRank(j + 1); \r\n }\r\n }\r\n \r\n }", "public ArrayList<CollegeFootballTeam> rankTeams();", "public int losses(String team) {\n\n return 0;\n }", "public int remaining(String team) {\n validate(team);\n int t = st.get(team);\n return matTeam[t][3];\n }", "static int calculateScore(Card[] winnings) {\n int score = 0;\n for (Card card : winnings)\n if (card != null)\n score++;\n else\n break;\n return score;\n }", "public static ArrayList<Integer> partitionTeam(ArrayList<Team> allTeams){\n int count = 0;\r\n ArrayList<Integer> all = new ArrayList<Integer>();\r\n Team prev = allTeams.get(0);\r\n ArrayList<Team> finalTeams = new ArrayList<Team>();\r\n finalTeams.add(prev);\r\n all.add(0);\r\n for(Team team: allTeams){\r\n if(prev.getTeamNum() != team.getTeamNum()){\r\n all.add(count);\r\n }\r\n prev = team;\r\n count++;\r\n }\r\n return all;\r\n }", "public int remaining(String team) {\n\n return 0;\n }", "public static int calc(int numbteams) {\n int randomSize = (int) (Math.random() * ((numbteams - 1) + 1)) + 1;\n return randomSize;\n }", "public int getPointsAgainst() {\n int pointsAgainst = 0;\n for (Game g : gameList) {\n pointsAgainst += g.getOtherTeamScore(this);\n }\n return pointsAgainst;\n }", "public static double evaluateMana(Board b, int team) {\n // basically calculates how much extra mana one side will eventually get to play with\n int localmax = b.getPlayer(team).maxmana;\n int localmaxmax = b.getPlayer(team).maxmaxmana;\n int enemymax = b.getPlayer(-team).maxmana;\n int enemymaxmax = b.getPlayer(-team).maxmaxmana;\n // assumes that team 1 starts\n if (b.getCurrentPlayerTurn() == 1) {\n // players went an uneven number of turns, counteract that so the\n // advantage value doesn't change crazily when players end their\n // turns, making the AI more stable\n if (team == 1) {\n enemymax = Math.min(enemymax + 1, enemymaxmax);\n } else {\n localmax = Math.min(localmax + 1, localmaxmax);\n }\n }\n return (localmax - enemymax) * Math.max(localmaxmax - localmax, enemymaxmax - enemymax);\n }", "private int get1(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getPenalties(); // sum of all penalty minutes\n curr = playerlist.next();\n }\n return t;\n }", "public int wins(String team) {\n return 0;\n }", "public double runSimulation(ArrayList<Rocket>list){\n int totalBudget = 0;\n int sentRocket = 0;\n int explodedRocket= 0;\n int successRocket = 0;\n for(Rocket rocket:list){\n if(!rocket.launch() || !rocket.land()) {\n sentRocket++;\n explodedRocket++;\n totalBudget += rocket.rocketCost;\n } else {\n sentRocket++;\n successRocket++;\n totalBudget += rocket.rocketCost;\n }\n }\n\n System.out.println(\"Total number of rockets sent \"+sentRocket);\n System.out.println(\"Total number of exploded rockets \"+explodedRocket);\n\n return totalBudget;\n\n }", "public static double sanityCheck(Match match)\n {\n Lane lane;\n Role role;\n \n int bot = 0;\n int bottom = 0;\n int jungle = 0;\n int mid = 0;\n int middle = 0;\n int top = 0;\n \n int solo = 0;\n int duo = 0;\n int duo_carry = 0;\n int duo_support = 0;\n int none = 0;\n \n\n \n for(int i = 0; i<10; i++)\n {\n lane = match.getParticipants().get(i).getTimeline().getLane();\n role = match.getParticipants().get(i).getTimeline().getRole();\n \n switch(lane)\n {\n case BOT:\n bot++;\n break;\n \n case BOTTOM:\n bottom++;\n break;\n \n case JUNGLE:\n jungle++;\n break;\n \n case MID:\n mid++;\n break;\n \n case MIDDLE:\n middle++;\n break;\n \n case TOP:\n top++;\n break;\n }\n \n switch(role)\n {\n case SOLO:\n solo++;\n break;\n \n case DUO:\n duo++;\n break;\n \n case DUO_CARRY:\n duo_carry++;\n break;\n \n case DUO_SUPPORT:\n duo_support++;\n break;\n \n case NONE:\n none++;\n break;\n }\n }\n \n double total = 0;\n \n if(top == 2)\n total++;\n if(mid+middle == 2)\n total++;\n if(jungle == 2)\n total++;\n if(bot + bottom == 4)\n total++;\n \n if(solo == 4)\n total++;\n if(duo + duo_carry + duo_support == 4);\n total++;\n if( duo_carry == 2);\n total++;\n if(duo_support == 2)\n total++;\n if(none == 2)\n total++;\n \n //it would be total =/ 9 but I figured every time one is wrong it makes another wrong, but there's really only 1 error \n total = ((total/18.0)+.5);\n \n \n //TestPrints\n //System.out.println(\"Sanity Check:\\nTop: \"+ top + \"\\nJungle: \"+ jungle + \"\\nMid: \" + (mid+middle) + \"\\nBot: \" + (bot+bottom)+ \"\\n\\nSolo: \"+solo + \"\\nDuo: \" + (duo+duo_carry+duo_support)\n //+ \"\\n\\\"Bot\\\": \"+ duo+\"\\nADC: \"+ duo_carry+ \"\\nSupport: \"+duo_support+ \"\\nNone: \" + none + \"\\nTotal Score: \" +total);\n \n \n \n return total;\n \n }", "public Team getTeam(Team enemyTeam) {\n\t\tArrayList<Character>battleArray = new ArrayList<Character>();\r\n\t\tboolean complete = false;\r\n\t\t\r\n\t\tfor(Character c : guildArray) {\r\n\t\t\tStudent s = (Student) c;\r\n\t\t\t//Choosing alive students whose KP is max thus they can perform stronger attacks\r\n\t\t\tif(s.MaxKPReached() && s.getHP() > 0){\r\n\t\t\t\tbattleArray.add(s);\r\n\t\t\t}\r\n\t\t\t//if the size of the team is 5, then the team is completed\r\n\t\t\tif(battleArray.size() == 5){\r\n\t\t\t\tcomplete = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//If the team still needs members search for members\r\n\t\tfor(int i = 0; i < guildArray.size() && complete == false; i++) {\r\n\t\t\t//Check if the student is not already in the battle team and alive\r\n\t\t\tStudent student = (Student)guildArray.get(i);\r\n\t\t\tif(!battleArray.contains(student) && student.getHP() > 0){ \r\n\t\t\t\tbattleArray.add(student);\r\n\t\t\t}\r\n\t\t\tif(battleArray.size() == 5) {\r\n\t\t\t\tcomplete = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tTeam battleTeam = new StudentTeam(\"BattleTeam\");\r\n\t\tfor(Character c : battleArray) {\r\n\t\t\tbattleTeam.addMember(c);\r\n\t\t}\r\n\r\n\t\treturn battleTeam;\r\n\t}", "@Override\n // report number of players on a given team (or all players, if null)\n\tpublic int numPlayers(String teamName) {\n\n int numPlayers = 0;\n\n\n if (teamName == null) {\n\n for (int i = 0; i < (stats.keySet()).toArray().length; i++) {\n\n numPlayers++;\n\n }\n\n return numPlayers;\n\n }\n\n else {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n for (SoccerPlayer sp: soccerPlayers) {\n\n if (sp.getTeamName().equals(teamName)){\n\n numPlayers++;\n }\n }\n\n return numPlayers;\n\n }\n\n\n\t}", "public int getKillsByTeam(Team team) {\n\t\tint kills = 0;\n\t\tfor (Player player : team.getPlayers()) {\n\t\t\tkills += getKillsOfPlayer(player);\n\t\t}\n\t\treturn kills;\n\t}", "public int getScoreTeamOne() throws ByeMatchException\r\n\t{\r\n\t\tif (isByeMatch)\r\n\t\t{\r\n\t\t\tthrow new ByeMatchException();\r\n\t\t}\r\n\t\treturn score1;\r\n\t}", "private static int experienceTally(int playerExperience, int monsterExperience){\r\n int totalExperience;\r\n totalExperience = playerExperience + monsterExperience;\r\n return totalExperience;\r\n }", "public void testAltScoring() throws Exception {\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n // alt1: 0 0 200\n \n String[] alt1rankData = {\n \"1,team1,1,200\",\n \"2,team2,1,200\", // tie-breaker causes rank 2\n };\n \n scoreboardTest (2, runsData, alt1rankData, alt1);\n // alt2: 30 5 0\n String[] alt2rankData = {\n \"1,team1,1,45\", // 1 no@30 each + 3 min * 5\n \"2,team2,1,150\", // 5*30\n };\n \n scoreboardTest (2, runsData, alt2rankData, alt2);\n \n // alt3: 0 10 0\n String[] alt3rankData = {\n \"1,team1,1,30\", // 3 min * 10\n \"2,team2,1,300\", // 30 min * 10\n };\n \n scoreboardTest (2, runsData, alt3rankData, alt3);\n \n // alt4: 5 0 20\n String[] alt4rankData = {\n \"1,team2,1,20\", // base yes\n \"2,team1,1,25\", // base yes + 1 no\n };\n \n scoreboardTest (2, runsData, alt4rankData, alt4);\n\n }", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(new FileReader(\"talent.in\"));// new InputStreamReader(System.in)); //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"talent.out\")));\n int N = sc.nextInt();\n int minWeight = sc.nextInt();\n int[] weight = new int[N];\n int[] value = new int[N];\n int totalTalent = 0;\n for (int i = 0; i < N; i++) {\n int wt = sc.nextInt();\n int val = sc.nextInt();\n weight[i] = wt;\n value[i] = val;\n totalTalent += val;\n }\n\n // Store, for a given talent, what is the smallest weight used to achieve it?\n int[] dp = new int[totalTalent + 1];\n Arrays.fill(dp, (int) 1e9);\n dp[0] = 0;\n // the min weight to produce 0 talent is 0. However,\n // it is necessary to make everything else big because we can only BUILD\n // from 0\n double bestRatio = 0;\n for (int cow = 0; cow < N; cow++) {\n // look at each cow, and go DOWN THROUGH THE dp array, updating the\n // best weight achievable BEHIND US. This countercurrent motion ensures no repeated\n // counting of a single cow's talents\n int contribution = value[cow];\n int wt = weight[cow];\n for (int talent = totalTalent; talent >= 0; talent--) {\n int boostedTalent = contribution + talent;\n int boostedWeight = dp[talent] + wt;\n // with the min weight of a certain talent,\n // is it possible to get a smaller boostedWeight for a boostedTalent\n if (boostedTalent <= totalTalent) {\n // If we are in bounds,\n if (boostedWeight < dp[boostedTalent]) {\n // and the attempted team has a better weight value\n // then update it!\n // Initially, when everything is 1 billion, this cannot\n // happen except for from the base cases, building outward\n dp[boostedTalent] = boostedWeight;\n\n // At the same time, we can be more efficient by constantly\n // checking if we had enough weight first of all, and\n // second of all had a better talent/weight ratio!\n double ratio = (double) boostedTalent / boostedWeight;\n if (ratio > bestRatio && boostedWeight >= minWeight) {\n bestRatio = ratio;\n }\n }\n }\n }\n }\n\n out.println((int) (1000 * bestRatio));\n out.close();\n }", "public ArrayList<Player> whoWins(ArrayList<Player> players) {\r\n\r\n // on créé un tableau pour stocker les gagnants\r\n ArrayList<Player> winners = new ArrayList<>();\r\n\r\n int bestScore = 0;\r\n\r\n for(Player player : players) {\r\n if( ! isBusted(player)) {\r\n if(total(player).max() > bestScore || (player.isDealer() && total(player).max() == bestScore)) {\r\n bestScore = total(player).max();\r\n winners.clear();\r\n winners.add(player);\r\n }\r\n else if(total(player).max() == bestScore) {\r\n winners.add(player);\r\n }\r\n } else {\r\n Logger.write(player.getName() + \" a perdu, il perd sa mise :\" + player.getStake());\r\n player.removeTokens(player.getStake());\r\n }\r\n }\r\n return winners;\r\n }", "public void testScoreboardCaseFour () throws Exception {\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 4 tests when all runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n \n// Team 1 -- 123 <-- Team 1 is winning again\n// Team 2 -- 130\n \n// String [] rankData = {\n// \"1,team1,1,123\",\n// \"2,team2,1,130\"\n// };\n \n scoreboardTest (2, runsData, rankData);\n }", "private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n totalGoalsScored2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored2 = totalGoalsScored2/numberItems;\n //Total and average received goals of team 1\n for (int i=1; i<40; i=i+4){\n totalGoalsReceived1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived1 = totalGoalsReceived1/numberItems;\n //Total and average received goals of team 2\n for (int i=3; i<40; i=i+4){\n totalGoalsReceived2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived2 = totalGoalsReceived2/numberItems;\n }", "private int evaluate(boolean maximizing) {\n int selfEval = getCountOfStonesFor(this);\n selfEval += countOfMills(this) * 5;\n selfEval += countOfPossibleMills(this) * 15;\n\n int opponentEval = getCountOfStonesFor(opponent);\n opponentEval += countOfMills(opponent) * 5;\n opponentEval += countOfPossibleMills(opponent) * 15;\n\n return (selfEval - opponentEval) * (maximizing ? 1 : -1);\n }", "private static void calculateTotalHitsRequired()\n {\n totalHitsRequired = 0;\n \n // add all the ship lengths together to get\n // the total number of hits required\n for (int length : SHIP_LENGTHS)\n {\n totalHitsRequired += length;\n }\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "int getTeam();", "private boolean findNextAvailableAgent(ArrayList<IAgent> arrayList) {\n\n for (IAgent agent : arrayList) {\n try {\n if (agent.checkIfOnSpawn()) {\n return false;\n }\n } catch (RemoteException e) {\n return false;\n }\n }\n\n for (IAgent agent : arrayList) {\n try {\n if (arrayList.size() < Integer.parseInt(String.valueOf(dialog.getCountAgents().getSelectedItem()))) {\n if (iPlayerList.get(agent.getName()).getPoints() >= agentsValue) {\n for (int[] spawn : playingField.getSpawnFields()) {\n if (playingField.requestField(spawn[0], spawn[1])) {\n IAgent newAgent = new AgentImpl(agent.getName(), agent.getStrategy(), playingField);\n newAgent.setColor(agent.getColor());\n newAgent.setPosx(spawn[0]);\n newAgent.setPosy(spawn[1]);\n newAgent.setCapacity(Integer.parseInt(dialog.getCapacityField().getText()));\n newAgent.getRememberField().setiPlayerList(playingField.getiPlayerList());\n playingField.setOccupancy(spawn[0], spawn[1], newAgent);\n ArrayList<IAgent> templist = new ArrayList<>();\n for (IAgent list : playersAgentsMap.get(agent.getName())) {\n templist.add(list);\n }\n templist.add(newAgent);\n playersAgentsMap.put(agent.getName(), templist);\n iPlayerList.get(agent.getName()).setPoints(iPlayerList.get(agent.getName()).getPoints() - agentsValue);\n return true;\n }\n\n }\n\n }\n }\n } catch (RemoteException e) {\n System.out.println(e.getMessage());\n return false;\n }\n }\n return false;\n\n }", "public List<PlayerTeam> display6() {\n List<PlayerTeam> l = new List<PlayerTeam>();\n List<PlayerTeam> all = build();\n int max = 0;\n PlayerTeam curr = all.first();\n while (curr != null) {\n int c = curr.getWinninggoals();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = all.next();\n }\n return l;\n }", "private List<Player> calculatePoints()\n\t{\n\t\tthis.systemDataInput.printMessage(\"Calculating points...\");\n\t\t\n\t\tArrayList<Player> winningPlayers = new ArrayList<Player>();\n\t\tint maxPoints = 0;\n\t\tint maxBuilding = 0;\n\t\t\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\tint points = 0;\n\t\t\tint bestBuilding = 0;\n\t\t\t\n\t\t\tfor(Area area : board.getAreaList())\n\t\t\t{\n\t\t\t\tif (!area.hasDemon())\n\t\t\t\t{\n\t\t\t\t\tif (area.hasBuilding(player))\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints += area.getCost();\n\t\t\t\t\t\tif (area.getCost() > bestBuilding)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbestBuilding = area.getCost();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpoints += 5 * area.getMinionList(player).size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint playerMoney = player.getMoneyAmount();\n\t\t\tpoints += playerMoney;\n\t\t\t\n\t\t\tfor(Card card : player.getInFrontOfHimDeck())\n\t\t\t{\n\t\t\t\tfor(Action action : card.getActions(BorrowMoneyFromTheBank.class))\n\t\t\t\t{\n\t\t\t\t\tint moneyToPayBack = ((BorrowMoneyFromTheBank)action).getMoneyToPayBack();\n\t\t\t\t\tif (playerMoney >= moneyToPayBack)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= moneyToPayBack;\n\t\t\t\t\t\tplayerMoney -= moneyToPayBack;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= ((BorrowMoneyFromTheBank)action).getPointsToLose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tplayer.addPoints(points);\n\t\t\tplayer.getDataInput().printMessage(points + \" points\");\n\t\t\t\n\t\t\tif (points > maxPoints || (points == maxPoints && bestBuilding > maxBuilding))\n\t\t\t{\n\t\t\t\tmaxPoints = points;\n\t\t\t\tmaxBuilding = bestBuilding;\n\t\t\t\twinningPlayers.clear();\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t\telse if (points == maxPoints && bestBuilding == maxBuilding)\n\t\t\t{\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn winningPlayers;\n\t}", "public static double evaluateBoard(Board b, int team) {\n double total = 0;\n for (BoardObject bo : b.getPlayer(team).getPlayArea()) {\n total += bo.getValue();\n }\n return total;\n }", "public int against(String team1, String team2) {\n\n return 0;\n }", "public void launchBall() {\n\n\t\tint contBlue = 0, contRed = 0, red = 0, blue = 0, maxScore = 0;\n\t\t// You can modify this value to play more matches (Important: Odd/Uneven value)\n\t\tint bestOf = 5;\n\n\t\tfor (int i = 0; i < bestOf; i++) {\n\n\t\t\tSystem.out.println(\"Red team launch\");\n\t\t\tred = (int) (Math.random() * (200 - 0));\n\t\t\tSystem.out.println(red);\n\t\t\tmaxScore = (red > maxScore) ? red : maxScore;\n\n\t\t\tSystem.out.println(\"Blue team launch\");\n\t\t\tblue = (int) (Math.random() * (200 - 0));\n\t\t\tSystem.out.println(blue);\n\t\t\t// Find the highest score between bluePoints and redPoints\n\t\t\tmaxScore = (blue > maxScore) ? blue : maxScore;\n\t\t\t// Count which team has more score than the other one\n\t\t\tif (red > blue)\n\n\t\t\t\tcontRed++;\n\n\t\t\telse\n\n\t\t\t\tcontBlue++;\n\n\t\t}\n\t\tint option;\n\t\t// Try: Throw error if you introduce a String or Char instead Integer\n\t\ttry {\n\t\t\tdo {\n\t\t\t\tSystem.out.println(\"What ratio was the highest score? (1.0-50/2.50-100/3.100-150/4.150-200)\");\n\t\t\t\toption = scanner.nextInt();\n\t\t\t\t// Minigame to hit the ratio of highest score\n\t\t\t\tswitch (option) {\n\n\t\t\t\tcase 1: {\n\n\t\t\t\t\tif (maxScore >= 0 && maxScore < 50)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 2: {\n\t\t\t\t\tif (maxScore >= 50 && maxScore < 100)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tcase 3: {\n\t\t\t\t\tif (maxScore >= 100 && maxScore < 150)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tcase 4: {\n\t\t\t\t\tif (maxScore >= 150 && maxScore <= 200)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tSystem.err.println(\"Insert valid value\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (option > 4 || option < 1);\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Please, insert an Intenger value\");\n\t\t\tscanner.next();\n\t\t}\n\t\tSystem.out.println(\"The highest score was \" + maxScore);\n\n\t\tSystem.out.println(\"The match is over Blue: \" + contBlue + \" wins, y Red: \" + contRed + \" wins\");\n\t\t// Show which team won\n\t\tif (contRed > contBlue) {\n\n\t\t\tSystem.out.println(\"Red wins\");\n\t\t\tthis.redWins = contRed;\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"Blue wins\");\n\t\t\tthis.blueWins = contBlue;\n\n\t\t}\n\t}", "public BattleSimulator findBattle(){\r\n\r\n List<Enemy> enemies = world.getEnemies();\r\n Character character = world.getCharacter();\r\n List<MovingEntity> activeStructures = world.getActiveStructures();\r\n List<MovingEntity> friendlyEntities = world.getFriendlyEntities();\r\n List<Ally> allies = world.getAllies();\r\n\r\n\r\n // Create potentialFighting list which begins with all enemies in the world\r\n ArrayList<MovingEntity> potentialFighting = new ArrayList<MovingEntity>(enemies);\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n List<Pair<MovingEntity, Double>> pairEnemyDistance = new ArrayList<Pair<MovingEntity, Double>>();\r\n ArrayList<MovingEntity> structures = new ArrayList<MovingEntity>();\r\n\r\n // For each enemy in potentialFighting, find the distance from enemy to character \r\n // If character is in battle radius of enemy, add enemy to a pairEnemyDistance list, remove them from potentialFighting list\r\n for(MovingEntity enemy: enemies) {\r\n double distanceSquaredBR = inRangeOfCharacter(character, enemy, enemy.getBattleRadius());\r\n if(distanceSquaredBR >= 0){\r\n potentialFighting.remove(enemy);\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredBR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n // if no enemies within battle radius, no battle happens\r\n if (pairEnemyDistance.size() == 0) {\r\n return null;\r\n \r\n // else a battle is about to begin!!!\r\n } else if(pairEnemyDistance.size() > 0) {\r\n // For remaining enemies in potentialFighting list, if fighters list size > 0 and if character is in support radius of that enemy\r\n // also add that enemy to pairEnemyDistance list\r\n for(MovingEntity enemy : potentialFighting){\r\n double distanceSquaredSR = inRangeOfCharacter(character, enemy, enemy.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredSR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n }\r\n\r\n // Sort pairEnemyDistance list by distance of enemy to character, so that the closest enemy is first, the furthest enemy is last\r\n Collections.sort(pairEnemyDistance, new Comparator<Pair<MovingEntity, Double>>() {\r\n @Override\r\n public int compare(final Pair<MovingEntity, Double> p1, final Pair<MovingEntity, Double> p2) {\r\n if(p1.getValue1() > p2.getValue1()) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n });\r\n\r\n // Take all enemies from sorted pairEnemyDistance and add to fighters list\r\n for(Pair<MovingEntity, Double> pairEnemy : pairEnemyDistance) {\r\n fighters.add(pairEnemy.getValue0());\r\n }\r\n \r\n // For each tower, find the distance from tower to character\r\n // If character is in the support radius of tower, add tower to structure list\r\n if(activeStructures.size() > 0){\r\n for(MovingEntity structure : activeStructures) {\r\n if(structure.getID().equals(\"TowerBattler\")) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, structure, structure.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n structures.add(structure);\r\n }\r\n }\r\n }\r\n }\r\n // If character is in the support radius of friendly entities, add to fighters\r\n if(friendlyEntities.size() > 0){\r\n for(MovingEntity friendly : friendlyEntities) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, friendly, friendly.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n fighters.add(friendly);\r\n }\r\n }\r\n }\r\n \r\n // Add all allies to fighters list\r\n for(Ally ally : allies) {\r\n fighters.add(ally);\r\n }\r\n\r\n // Construct BattleSimulator class with character, fighters, structures\r\n BattleSimulator battle = new BattleSimulator(character, fighters, structures);\r\n\r\n // battle is about to begin!\r\n return battle;\r\n }", "public void runTournament() {\n\t\t//ArrayList<Gene> tournament = new ArrayList<Gene>();\n\t\tPriorityQueue<Gene> tournament = new PriorityQueue<Gene>(Collections.reverseOrder());\n\t\tint numContenders = (int)(FRAC_IN_TOURNAMENT * geneNumber);\n\t\tSet<Integer> chosenOnes = new HashSet<Integer>();\n\t\t\n\t\twhile(chosenOnes.size() < numContenders) {\n\t\t\tint randIndex = (int) (Math.random() * geneNumber);\n\t\t\tchosenOnes.add(randIndex);\n\t\t}\n\t\tfor(int i : chosenOnes){\n\t\t\ttournament.add(genepool.get(i));\n\t\t}\n\t\t//int firstIndex = getMax(tournament, -1);\n\t\t//int secondIndex = getMax(tournament, firstIndex);\n\t\t//Gene parent1 = tournament.get(firstIndex);\n\t\t//Gene parent2 = tournament.get(secondIndex);\n\t\tGene parent1 = tournament.poll();\n\t\tGene parent2 = tournament.poll();\n\t\t// Create a new gene from the 2 fittest genes\n\t\tGene newGene = parent1.waCrossover(parent2);\n\t\t\n\t\t// Calculate fitness for the new gene\n\t\tPlayerSkeleton.runGames(numGames, newGene);\n\t\toffspringPool.add(newGene);\n\t}", "public float calcBattleListScore(GameState gm, List<Battle> bList) {\n\t\tList<Player> pList = gm.getPlayers();\n\t\tint index = pList.indexOf(this);\n\t\tindex = (index + 1) % gm.getPlayers().size();\n\t\tHashMap<Battle, Float[]> bMatrix = new HashMap<Battle, Float[]>();\n\t\tHashMap<Battle, Boolean> bDone = new HashMap<Battle, Boolean>();\n\t\tFloat[] fTemp = new Float[gm.getPlayers().size()];\n\t\t\n\t\tint outs = 0;\n\t\tint diff = 0;\n\t\tint activeMShipSum = 0;\n\t\tfloat fScore = 0;\n\t\tfloat fTempScore = 1.0f;\n\n\n\t\t//initiate bMatrix\n\t\tfor (Battle b: bList) {\n\t\t\tbMatrix.put(b, new Float[gm.getPlayers().size()]);\n\t\t\tbDone.put(b, false);\n\t\t\tfor (int i = 0; i< gm.getPlayers().size(); i++) {\n\t\t\t\tbMatrix.get(b)[i] = 1.0f;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint turn = 1;\n\t\twhile (turn <= pList.size()){\n\t\t\tactiveMShipSum = 0;\n\t\t\tfor (Battle b: bList) {\n\t\t\t\tif (!bDone.get(b)) {\n\t\t\t\t\tif (pList.get(index) == b.getWinningPlayer()) {\n\t\t\t\t\t\tif (b.getWinningPlayer() != this) {\n\t\t\t\t\t\t\tfTemp = bMatrix.get(b);\n\t\t\t\t\t\t\tfTemp[turn-1] = -1.0f*(float)b.getMerchantShip().getValue();\n\t\t\t\t\t\t\tbMatrix.put(b, fTemp);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfTemp = bMatrix.get(b);\n\t\t\t\t\t\t\tfTemp[turn-1] = (float)b.getMerchantShip().getValue();\n\t\t\t\t\t\t\tbMatrix.put(b, fTemp);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*if (sumOfPlayersPoints(pList) > 0) {\n\t\t\t\t\t\t\tfTemp[turn-1] *= (float)pList.get(index).getPoints()/(float)sumOfPlayersPoints(gm.getPlayers());\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\tbDone.put(b, true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// sum up the count of merchantship value\n\t\t\t\t\t\tactiveMShipSum += b.getMerchantShip().getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (Battle b: bList) {\n\t\t\t\touts = 0;\n\t\t\t\tif (!bDone.get(b)) {\n\t\t\t\t\tAttacker attacker = b.getAttackerByPlayerId(pList.get(index).getId());\n\t\t\t\t\tif (attacker != null && attacker.getScore() > 0) {\n\t\t\t\t\t\t// this player is already attacking, what are the chances that she'll attack again\n\t\t\t\t\t\tif (!b.isBattleUsingTrumps()) {\n\t\t\t\t\t\t\tdiff = b.getHighScore() - attacker.getScore();\n\t\t\t\t\t\t\touts += findGreaterNumCards(diff, attacker.getAttackerColor(), false).getCount();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (getUnknownCards().hasCard(new Trump(Color.Admiral)) &&\n\t\t\t\t\t\t\t\tb.getOwnerPlayerId() == pList.get(index).getId()) {\n\t\t\t\t\t\t\t\touts++; // add admiral\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (getUnknownCards().hasCard(new Trump(attacker.getAttackerColor()))){\n\t\t\t\t\t\t\t\touts++; // add regular trump\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// not attacking currently, what are the chances that she'll attack at all\n\t\t\t\t\t\tif (b.isBattleUsingTrumps()) {\n\t\t\t\t\t\t\tif (b.getOwnerPlayerId() == pList.get(index).getId()) {\n\t\t\t\t\t\t\t\t// could play admiral\n\t\t\t\t\t\t\t\tif (getUnknownCards().hasCard(new Trump(Color.Admiral))) {\n\t\t\t\t\t\t\t\t\t// calc prob of playing it\n\t\t\t\t\t\t\t\t\t// rough approx for now. TODO: revisit\n\t\t\t\t\t\t\t\t\t//f *= (float)pList.get(index).getHandCount()/(getUnknownCards().getCount());\n\t\t\t\t\t\t\t\t\touts++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t// this player can't compete in this battle\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\telse {\n\t\t\t\t\t\t\t// battle isn't using trumps\n\t\t\t\t\t\t\tif (b.getHighScore() <= 4) {\n\t\t\t\t\t\t\t\t// what's the probability that this player has a card worth this battle's highest score\n\t\t\t\t\t\t\t\t// in a different color?\n\t\t\t\t\t\t\t\t//f*= (float)pList\n\t\t\t\t\t\t\t\touts += findValidAttackCards(b, pList.get(index));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// this player can't compete\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"Outs found: \" + outs);\n\t\t\t\t\t//System.out.println(\"activeMShipSum: \" + activeMShipSum);\n\t\t\t\t\t\n\t\t\t\t\tfTemp = bMatrix.get(b);\n\t\t\t\t\t// trying to account for # of cards in a player's hands. Approximation at best.\n\t\t\t\t\t/*\n\t\t\t\t\tfloat outsProb = (float)outs*(float)pList.get(index).getHandCount()/(float)getUnknownCards().getCount();\n\t\t\t\t\tif (outsProb > 1){\n\t\t\t\t\t\toutsProb = 1.0f;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfTemp[turn-1] = 1.0f - (outsProb*(float)b.getMerchantShip().getValue()/(float)activeMShipSum);\n\t\t\t\t\t*/\n\t\t\t\t\tfTemp[turn-1] = 1.0f - ((float)outs/(float)getUnknownCards().getCount()*(float)b.getMerchantShip().getValue()/(float)activeMShipSum);\n\t\t\t\t\tbMatrix.put(b, fTemp);\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex = (index + 1) % gm.getPlayers().size();\n\t\t\tturn++;\n\t\t}\n\n\t\t// calculate final score per battle\n\t\t\n\t\tfor (Battle b: bList) {\n\t\t\tfTemp = bMatrix.get(b);\n\t\t\t//System.out.println(b);\n\t\t\tfTempScore = 1.0f;\n\t\t\tfor (int i = 0; i< gm.getPlayers().size(); i++) {\n\t\t\t\t//fTempScore *= fTemp[i];\n\t\t\t\tfTempScore *= fTemp[i];\n\t\t\t\t/*if (sumOfPlayersPoints(gm.getPlayers()) > 0) {\n\t\t\t\t\tfTempScore *= gm.getPlayers().get(i).getPoints()/sumOfPlayersPoints(gm.getPlayers());\n\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\tif (super.getVerbosity()) {\n\t\t\t\t\tSystem.out.print(fTemp[i] + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// to account for ties that I'm not part of \n\t\t\tif (b.getWinningAttacker() == null) {\n\t\t\t\tif (b.getAttackerByPlayerId(getId()) == null) {\n\t\t\t\t\tfTempScore *=-1.0f;\n\t\t\t\t}\n\t\t\t\telse if (b.getAttackerByPlayerId(getId()).getScore() != b.getHighScore()) {\n\t\t\t\t\tfTempScore *=-1.0f;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (super.getVerbosity()) {\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"Battle: \" + b + \" | Score: \" + fTempScore);\n\t\t\t}\n\t\t\tfScore += fTempScore;\n\t\t}\n\t\t\n\t\treturn fScore;\n\t}", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public PentagoMove alphabetaw(PentagoBoardState boardState){\n PentagoBoardState pbs = (PentagoBoardState) boardState.clone();\n ArrayList<PentagoMove> legalmoves = pbs.getAllLegalMoves();\n\n PentagoMove bestmove = legalmoves.get(0);\n PentagoMove bestopponentmove = new PentagoMove(0,0,0,0,0);\n int bestmovescore = -9999999;\n int bestwhitescore = 0;\n //ArrayList<Integer> scores = new ArrayList<Integer>();\n for(int i = 0;i<legalmoves.size()-1;i++){\n\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove next = legalmoves.get(i);\n\n newboard.processMove(next);\n\n int score = evaluate(newboard);\n //scores.add(score);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n\n if(score > 100000){\n newboard.getWinner();\n newboard.printBoard();\n System.out.println(\"FOUND A WINNER\" + score);\n return next;\n }\n\n\n PentagoMove currentopponentmove;\n ArrayList<PentagoMove> opponentlegalmoves = newboard.getAllLegalMoves();\n if (opponentlegalmoves.size()!=0){\n currentopponentmove = opponentlegalmoves.get(0);\n }\n\n int minopponentmovescore = 999999;\n int thismovescore = -9999;\n ArrayList<PentagoMove> bestopponentmoves = new ArrayList<PentagoMove>();\n PentagoMove currentbestopponentmove = new PentagoMove(0,0,0,0,0);\n\n for(int a = 0;a<opponentlegalmoves.size()-1;a++){\n\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove opponentnext = opponentlegalmoves.get(a);\n\n pbsopponent.processMove(opponentnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int opponentscore = evaluate(pbsopponent);\n\n\n\n\n\n if (minopponentmovescore>opponentscore){\n //currentopponentmove = opponentnext;\n minopponentmovescore = opponentscore;\n bestopponentmoves.add(opponentnext);\n currentbestopponentmove = opponentnext;\n }\n\n\n }\n bestopponentmove = currentbestopponentmove;\n //lvl 3\n /*\n\n int lvl3minscore =99999;\n PentagoMove currentmaxmove;\n for (int r = 0;r<bestopponentmoves.size()-1;r++) {\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n pbsopponent.processMove(bestopponentmoves.get(r));\n\n ArrayList<PentagoMove> maxlegalmoves = pbsopponent.getAllLegalMoves();\n if (maxlegalmoves.size() != 0) {\n currentmaxmove = maxlegalmoves.get(0);\n }\n int opponentscore = evaluate(pbsopponent);\n int findminmaxmovescore = -99999;\n for (int s = 0; s < maxlegalmoves.size() - 1; s++) {\n\n PentagoBoardState maxboard = (PentagoBoardState) pbsopponent.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove maxnext = maxlegalmoves.get(s);\n\n maxboard.processMove(maxnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int maxnextscore = evaluate(pbsopponent);\n if (findminmaxmovescore < maxnextscore) {\n currentmaxmove = maxnext;\n findminmaxmovescore = maxnextscore;\n }\n }\n if (thismovescore<findminmaxmovescore){\n //currentopponentmove = opponentnext;\n thismovescore = findminmaxmovescore;\n }\n\n //opponentscore = maxmovescore;\n }\n\n //end experiment\n\n\n\n\n if (mycolour ==1){\n lvl3minscore =minopponentmovescore;\n }\n */\n if (minopponentmovescore>bestmovescore){//minopponentmovescore\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n\n }\n else if (minopponentmovescore == bestmovescore){\n if (score > bestwhitescore){\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n }\n\n\n\n }\n\n\n }\n System.out.println(\"final max player move score: \"+ bestmovescore + \"\\n My best move: \"+bestmove.toPrettyString() + \"\\n My best move: \"+ bestopponentmove.toPrettyString());\n return bestmove;\n }", "public int against(String team1, String team2) {\n if (team1 == null || !st.contains(team1) || team2 == null || !st.contains(team2))\n throw new IllegalArgumentException(\"Invalid Arguments!\");\n return g[st.get(team1)][st.get(team2)];\n }", "public int computeRangedDamageTo(Combatant opponent) { return 0; }", "public static int cutOffValue(Node current, int nextTurn){\n /*\n New algo:\n - Make the 24 subsets possible. How?\n Make 6 columns, 6 diagonals (3 pos and 3 neg) - hard code, 12 from rows (3 from each)\n - Evaluate each. How?\n all 0's: reject.\n mix of 1 and 2: reject.\n just 2's: points = number of 2's multiply by 2. \n just 1's: points = number of 1's. \n - Return sum of all evaluation\n */\n int v_score = makeVerticalSubsets(current.board);\n int h_score = makeHorizontalSubsets(current.board);\n int d_score = makeDiagonalSubsets(current.board);\n \n printBoard(current.board);\n// System.out.println(\"Child depth: \"+ current.depth);\n int sum_score = v_score + h_score + d_score;\n //The player who has the next turn has an advantage so\n /*\n if(nextTurn==2)\n sum_score++;\n else if(nextTurn==1)\n sum_score--;\n */\n System.out.println(\"Evaluation cost: \"+sum_score);\n current.eval_cost=sum_score;\n return sum_score;\n }", "private int getTotalShareValue(Player player){\n return player.getShares().get(0) * game.apple.getSharePrice() + player.getShares().get(1) * game.bp.getSharePrice() +\n player.getShares().get(2) * game.cisco.getSharePrice() + player.getShares().get(3) * game.dell.getSharePrice() +\n player.getShares().get(4) * game.ericsson.getSharePrice();\n }", "public String winningTeam(String team1, String team2)\n {\n int r = new Random().nextInt(3 + 1);\n\n int team1Standing = -10;\n int team2Standing = -10;\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team1))\n {\n team1Standing = i;\n break;\n }\n }\n\n for (int i = 0 ; i < playoffs.length; i++)\n {\n if (playoffs[i].equals(team2))\n {\n team2Standing = i;\n break;\n }\n }\n\n if(team1Standing < team2Standing && r == 1)\n return team1;\n else if (team1Standing > team2Standing && r == 1)\n return team2;\n\n else\n {\n r = new Random().nextInt(1 + 1);\n if(r == 0)\n return team1;\n else\n return team2;\n }\n\n }", "public static int getMostMoney(String[] games, int[] time, int[] money){\n int l = time.length; //The lengths of the three lists should be same;\n int t = 120; //The total time\n int[] played = new int[l];\n int[][] val = new int[l][121];\n for(int i=1;i<l;i++){\n for(int j=1;j<121;j++){\n if(j<time[i]){\n val[i][j] = val[i-1][j];\n }else\n val[i][j]=Math.max(val[i-1][j],val[i-1][j-time[i]]+money[i]);\n }\n }\n for(int i = l-1;i>=1;i--){\n if(val[i][t] != val[i-1][t]){\n System.out.println(games[i]); //print the best combination of games\n t -= time[i];\n }\n }\n\n return val[l-1][120]; //In this question, Adam can earn $780 at most;\n }", "public int remaining(String team) {\n return getTeamByName(team).remaining;\r\n }", "public static void playTournament(\n\t\t ArrayList<MazePlayer> players,\n\t\t int width, int depth, \n\t\t int reps, int steps) {\n\t System.out.println(\"Playing tournament!\");\n\n\t int[][] winners = new int[players.size()][players.size()];\n\t for (MazePlayer p1:players)\n\t\t for (MazePlayer p2:players)\n\t\t if (!p1.equals(p2))\n\t\t for (int k=0;k<reps;k++){\n\t\t\t MazeGame g = new MazeGame(width,depth);\n\t\t\t g.addPlayer(p1);\n\t\t\t g.addPlayer(p2);\n\n\t\t\t for(int i=0;i<steps;i++){\n\t\t\t\t\tif (MazeGame.debugging) System.out.println(\"\\n\\n************\\nround \"+i);\n\t\t\t\t\tif (MazeGame.debugging) System.out.println(g.theBoard.drawBoard(g.playerPosition,g.jewelPosition));\n\t\t\t\t for (MazePlayer p: g.player.values()){\n\t\t\t\t\t\t Direction d = p.nextMove(g.playerPosition,g.jewelPosition,g.theBoard);\n\t\t\t\t\t\t g.movePlayer(p,d);\n\t\t\t\t\t }\n\t\t\t }\n\t\t\t int scoreDiff = g.score.get(p1.name)-g.score.get(p2.name);\n\t\t\t System.out.println(p1.name+\" vs \"+p2.name+\" = \"+scoreDiff);\n\t\t\t if (scoreDiff>0){\n\t\t\t\t winners[players.indexOf(p1)][players.indexOf(p2)] += 1;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t winners[players.indexOf(p2)][players.indexOf(p1)] += 1;\t\t\t \n\t\t\t }\n\t\t }\n\t System.out.println(\"Results\");\n\t for (int i=0;i<players.size();i++){\n\t\t int sum=0;\n\t\t for(int j=0;j<players.size();j++){\n\t\t\t sum += winners[i][j];\n\t\t\t System.out.print(\"\\t\"+winners[i][j]);\n\t\t }\n\t\t System.out.println(\"\\t\"+sum+\"\\t\"+players.get(i).name);\n\t }\n\t for (int j=0;j<players.size();j++){\n\t\t int losses=0;\n\t\t for (int i=0;i<players.size();i++) {\n\t\t\t losses += winners[i][j];\n\t\t }\n\t\t System.out.print(\"\\t\"+losses);\n\t }\n\t System.out.println();\n }", "public int getEnergy(){\n\t\tEnumeration students = table.keys(); \n\t\tint totalEnergy=0;\n\t\tHashtable<String,String> assignedProjects= new Hashtable<String,String>();\n\t\tint totalpenalties =0;\n\t while(students.hasMoreElements()) {\n\t CandidateAssignment cand = table.get((String) students.nextElement()); \n\t totalEnergy+=cand.getEnergy();\n\t \n\t String project = cand.getAssignedProject(); \n\t if(!assignedProjects.containsKey(project)){\n\t \t assignedProjects.put(project, project);\n\t }else{\n\t \t totalpenalties+=penalty; \n\t }\n\t }\n\t\treturn totalEnergy+ totalpenalties;\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner teamScanner = new Scanner(new File(\"teamInfo.txt\"));\n teamScanner.useDelimiter(\",\");\n ArrayList<Team> teams = new ArrayList<Team>();\n String teamName = teamScanner.next();\n String temp = teamScanner.next();\n double winLoss = Double.parseDouble(temp);\n String temp2 = teamScanner.next();\n double SRS = Double.parseDouble(temp2);\n teams.add(new Team(teamName, winLoss, SRS));\n while (teamScanner.hasNext()) {\n teamName = teamScanner.next();\n temp = teamScanner.next();\n temp2 = teamScanner.next();\n //System.out.println(\"t\" + temp);\n //System.out.println(\"x\" + teamName);\n winLoss = Double.parseDouble(temp);\n SRS = Double.parseDouble(temp2);\n\n\n teams.add(new Team(teamName.substring(2), winLoss, SRS));\n }\n\n // System.out.println(teams.get(0).name);\n //\n\n ArrayList<String> TeamsList = new ArrayList<String>();\n Scanner teamsListScanner = new Scanner(new File(\"competingTeams.txt\"));\n while(teamsListScanner.hasNextLine()){\n TeamsList.add(teamsListScanner.nextLine());\n }\n // System.out.println(TeamsList);\n //String names = teamsListScanner.next();\n//\n // ArrayList<String> competingString = new ArrayList<>();\n ArrayList<Team> competingTeams = new ArrayList<>();\n // System.out.println(teams.get(0).name);\n for (int i = 0; i < TeamsList.size(); i++)\n {\n for(int j = 0; j < teams.size(); j++)\n {\n // System.out.println(TeamsList.get(i));\n // System.out.println(teams.get(j).name);\n if (TeamsList.get(i).equalsIgnoreCase(teams.get(j).name))\n {\n competingTeams.add(teams.get(j));\n break;\n }\n }\n }\n for (int j = 1; j < 7; j++) {\n System.out.println(\"Winning Teams Round \" + j + \":\");\n ArrayList<Team> tempTeams = BracketRunner.RunRound(competingTeams);\n for (int i = 0; i < tempTeams.size(); i++) {\n System.out.println(tempTeams.get(i).name);\n }\n competingTeams = tempTeams;\n System.out.println(tempTeams.size());\n }\n // for (int i = 0; i < teams.size(); i++) {\n // System.out.println(teams.get(i).SRS);\n //}\n //g\n }", "public String countScore() {\n String str =\"\";\n System.out.println(\"Game has ended\");\n int playerOneCount = 0;\n int playerTwoCount = 0;\n System.out.println(\"this is size of computer board\" + player2.playerTwoDomino.size());\n System.out.println(\"this is size of boneyard \" + allElements.size());\n System.out.println(\"this is size of human board \" + human1.playerOneDomino.size());\n System.out.println(\"this is size of game board \" + gameBoard.size());\n for (int i = 0; i < human1.playerOneDomino.size(); i++) {\n playerOneCount = playerOneCount + human1.playerOneDomino.get(i).getX() + human1.playerOneDomino.get(i).getX();\n }\n for (int j = 0; j < player2.playerTwoDomino.size(); j++) {\n playerTwoCount = playerTwoCount + player2.playerTwoDomino.get(j).getX() + player2.playerTwoDomino.get(j).getY();\n }\n\n if (playerOneCount < playerTwoCount) {\n str = \"Winner is Human by \" + (playerTwoCount - playerOneCount) + \" points\";\n\n\n } else {\n str = \"Winner is Computer by \" + (playerOneCount - playerTwoCount) + \" points\";\n\n }\n\n return str;\n }", "public static void AutoTransferForTeam(Team t, Team playersTeam, Library library) {\n\t\t\n\t\tArrayList<Player> allplayers = new ArrayList<Player>();\n\t\tfor (int i=0;i<library.getLibrary().size();i++) {\n\t\t\tTeam team = library.getLibrary().get(i);\n\t\t\tfor (int j=0;j<team.getTeam().size();j++) {\n\t\t\t\tallplayers.add(team.getTeam().get(j));\n\t\t\t}\n\t\t}\n\t\t\n\t\tString type=\"\";\n\t\tTeamRating tr = TeamRating.calculateTeamRating(t);\n\t\tif (tr.getFinishing()<=tr.getDribbling() && tr.getFinishing()<=tr.getDefending() && tr.getFinishing()<=tr.getStamina() && tr.getFinishing() <=tr.getGoalkeeping()) {\n\t\t\ttype=\"Attacker\";\n\t\t}\n\t\telse if (tr.getDefending()<=tr.getFinishing() && tr.getDefending()<=tr.getStamina() && tr.getDefending()<=tr.getDribbling() && tr.getDefending()<=tr.getGoalkeeping()) {\n\t\t\ttype=\"Defender\";\n\t\t}\n\t\telse if (tr.getGoalkeeping()<=tr.getFinishing() && tr.getGoalkeeping()<=tr.getDribbling() && tr.getGoalkeeping()<=tr.getStamina() && tr.getGoalkeeping()<=tr.getDefending()) {\n\t\t\ttype=\"Goalkeeper\";\n\t\t} else {\n\t\t\ttype = \"Midfielder\";\n\t\t}\n\t\t\n\t\tArrayList<Player> options = new ArrayList<Player>();\n\t\tfor (Player p:allplayers) {\n\t\t\tif ((!(playersTeam.getTeam().contains(p) || t.getTeam().contains(p)) && p.getPlayerType().equals(type) && p.getPrice().doubleValue()*1.1<=t.getBudget())) {\n\t\t\t\toptions.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\tPlayer[] players = new Player[options.size()];\n\t\tfor (int i=0;i<players.length;i++) {\n\t\t\tplayers[i]=options.get(i);\n\t\t}\n\t\t\n\t\tPlayer temp;\n\t\tif(players.length==0) {\n\t\t\t\n\t\t}\n\t\tfor (int j=0;j<players.length;j++) {\n\t\t\tfor (int i=1;i<players.length;i++) {\n\t\t\t\tif (players[i-1].getPrice().doubleValue()>players[i].getPrice().doubleValue()) {\n\t\t\t\t\ttemp=players[i];\n\t\t\t\t\tplayers[i]=players[i-1];\n\t\t\t\t\tplayers[i-1]=temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tPlayer[] players2 = new Player[players.length];\n\t\tfor (int i=0;i<players2.length;i++) {\n\t\t\tplayers2[i]=players[players.length-1-i];\n\t\t}\n\t\t\n\t\tif (players2.length!=0) {\n\t\t\n\t\t\tPlayer theplayer = null;\n\t\t\tint random = GameLogic.randomGenerator(1, 1000);\n\t\t\tint random2=0;\n\t\t\tif (random<=500) {\n\t\t\t\trandom2=GameLogic.randomGenerator(0,(int) (players2.length*0.2));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer = players2[random2];\n\t\t\t} if (random >500 && random <=750) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.2), (int) (players2.length*0.4));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t} if (random>750 && random<=875) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.4), (int) (players2.length*0.7));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t} if (random>875) {\n\t\t\t\trandom2=GameLogic.randomGenerator((int) (players2.length*0.7), (int) (players2.length-1));\n\t\t\t\tif (random2<0) {\n\t\t\t\t\trandom2=0;\n\t\t\t\t}\n\t\t\t\tif (random2>=players2.length){\n\t\t\t\t\trandom2=players2.length-1;\n\t\t\t\t}\n\t\t\t\ttheplayer=players2[random2];\n\t\t\t}\n\t\t\t\n\t\t\tTeam t2 = library.getTeamForName(theplayer.getTeam());\n\t\t\tTransferLogic.requestTransfer(theplayer, t, 1.1*theplayer.getPrice().doubleValue(), library, new TransferList());\n\t\t\t\n\t\t}\n\t}", "private int findBidders() {\r\n try {\r\n agents = new ArrayList<AMSAgentDescription>();\r\n //definisce i vincoli di ricerca, in questo caso tutti i risultati\r\n SearchConstraints searchConstraints = new SearchConstraints();\r\n searchConstraints.setMaxResults(Long.MAX_VALUE);\r\n //tutti gli agenti dell'AMS vengono messi in un array\r\n AMSAgentDescription [] allAgents = AMSService.search(this, new AMSAgentDescription(), searchConstraints);\r\n //scorre la lista degli agenti trovati al fine di filtrare solo quelli di interesse\r\n for (AMSAgentDescription a: allAgents) {\r\n //aggiunge l'agente partecipante all'ArrayList se e' un partecipante\r\n if(a.getName().getLocalName().contains(\"Participant\")) {\r\n agents.add(a);\r\n } \r\n }\r\n } catch (Exception e) {\r\n System.out.println( \"Problema di ricerca dell'AMS: \" + e );\r\n e.printStackTrace();\r\n }\r\n return agents.size();\r\n }", "private void calculate(int[][] turns) throws Exception {\n int score = 0;\n for (int i = 0; i < round; i++) {\n int[] t = turns[i];\n if (t[0] == maxSroce) {\n score += (maxSroce + getNext(turns, i, 2));\n situation[i] = Status.STRIKE;\n } else if (t[0] + t[1] == maxSroce) {\n score += (maxSroce + getNext(turns, i, 1));\n situation[i] = Status.SPARE;\n } else {\n score += (t[0] + t[1]);\n situation[i] = Status.MISS;\n }\n this.score[i] = score;\n }\n }", "private void calculatePlayerStats(int pos) {\r\n\r\n initializeStatisticVariables();\r\n StatistisDAO statDAO = new StatistisDAO(Statistics.this);\r\n DAOUtilities daoUtil = new DAOUtilities(Statistics.this);\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n BagDAO bagDAO = new BagDAO(Statistics.this);\r\n\r\n Player player = new Player();\r\n long id = playerDAO.readIDFromName(players.get(pos));\r\n player.setID(id);\r\n\r\n averageScore = daoUtil.getAverageAdjustedScorePlayer(player);\r\n averagePlusMinus = averageScore - 72;\r\n averageFront9Score = daoUtil.getAverageAdjustedFrontNineScorePlayer(player);\r\n averageFront9PlusMinus = averageFront9Score - 36;\r\n averageBack9Score = daoUtil.getAverageAdjustedBackNineScorePlayer(player);\r\n averageBack9PlusMinus = averageBack9Score - 36;\r\n averageHoleScore = averageScore / 18;\r\n averageHolePlusMinus = averageHoleScore - 4;\r\n\r\n\r\n // get the number of each holes\r\n numberOfPar3Holes = statDAO.getNHolesPar(3, player);\r\n numberOfPar4Holes = statDAO.getNHolesPar(4, player);\r\n numberOfPar5Holes = statDAO.getNHolesPar(5, player);\r\n numberOfHoles = numberOfPar3Holes\r\n + numberOfPar4Holes\r\n + numberOfPar5Holes;\r\n\r\n // get the hole stats\r\n float nfairwayholes = numberOfPar4Holes + numberOfPar5Holes;\r\n fairways = nfairwayholes<=0 ? 0 : statDAO.getNFairways(player) / nfairwayholes * 100.;\r\n if (numberOfHoles > 0) {\r\n girs = statDAO.getNGiR(player) / (float) numberOfHoles * 100.;\r\n chips = statDAO.getNumofChips(player) / (float) numberOfHoles;\r\n putts = statDAO.getNumofPutts(player) / (float) numberOfHoles;\r\n penalties = statDAO.getNumofPenalties(player) / (float) numberOfHoles * 18.;\r\n }\r\n\r\n // get the counts for par 3's\r\n if (numberOfPar3Holes > 0) {\r\n par3Girs = statDAO.getNGiR(3, player) / (float)numberOfPar3Holes * 100.;\r\n par3Chips = statDAO.getNumofChips(3, player) / (float) numberOfPar3Holes;\r\n par3Putts = statDAO.getNumofPutts(3, player) / (float) numberOfPar3Holes;\r\n par3Penalties = statDAO.getNumofPenalties(3, player) / (float) numberOfPar3Holes;\r\n }\r\n par3EagleCount = statDAO.getNHolesParScore(3, -2, player);\r\n par3BirdieCount = statDAO.getNHolesParScore(3, -1, player);\r\n par3ParCount = statDAO.getNHolesParScore(3, 0, player);\r\n par3BogeyCount = statDAO.getNHolesParScore(3, 1, player);\r\n par3DoubleBogeyCount = statDAO.getNHolesParScore(3, 2, player);\r\n par3TripleBogeyCount = statDAO.getNHolesParScore(3, 3, player);\r\n par3QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(3, 4, player);\r\n\r\n // get the counts for par 4's\r\n if (numberOfPar4Holes > 0) {\r\n par4Fairways = statDAO.getNFairways(4, player) / (float) numberOfPar4Holes * 100.;\r\n par4Girs = statDAO.getNGiR(4, player) / (float) numberOfPar4Holes * 100.;\r\n par4Chips = statDAO.getNumofChips(4, player) / (float) numberOfPar4Holes;\r\n par4Putts = statDAO.getNumofPutts(4, player) / (float) numberOfPar4Holes;\r\n par4Penalties = statDAO.getNumofPenalties(4, player) / (float) numberOfPar4Holes;\r\n }\r\n par4AlbatrossCount = statDAO.getNHolesParScore(4, -3, player);\r\n par4EagleCount = statDAO.getNHolesParScore(4, -2, player);\r\n par4BirdieCount = statDAO.getNHolesParScore(4, -1, player);\r\n par4ParCount = statDAO.getNHolesParScore(4, 0, player);\r\n par4BogeyCount = statDAO.getNHolesParScore(4, 1, player);\r\n par4DoubleBogeyCount = statDAO.getNHolesParScore(4, 2, player);\r\n par4TripleBogeyCount = statDAO.getNHolesParScore(4, 3, player);\r\n par4QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(4, 4, player);\r\n\r\n // get the counts for the par 5's\r\n if (numberOfPar5Holes > 0) {\r\n par5Fairways = statDAO.getNFairways(5, player) / (float) numberOfPar5Holes * 100.;\r\n par5Girs = statDAO.getNGiR(5, player) / (float) numberOfPar5Holes * 100.;\r\n par5Putts = statDAO.getNumofPutts(5, player) / (float) numberOfPar5Holes;\r\n par5Chips = statDAO.getNumofChips(5, player) / (float) numberOfPar5Holes;\r\n par5Penalties = statDAO.getNumofPenalties(5, player) / (float) numberOfPar5Holes;\r\n }\r\n par5AlbatrossCount = statDAO.getNHolesParScore(5, -3, player);\r\n par5EagleCount = statDAO.getNHolesParScore(5, -2, player);\r\n par5BirdieCount = statDAO.getNHolesParScore(5, -1, player);\r\n par5ParCount = statDAO.getNHolesParScore(5, 0, player);\r\n par5BogeyCount = statDAO.getNHolesParScore(5, 1, player);\r\n par5DoubleBogeyCount = statDAO.getNHolesParScore(5, 2, player);\r\n par5TripleBogeyCount = statDAO.getNHolesParScore(5, 3, player);\r\n par5QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(5, 4, player);\r\n\r\n // sum various scores\r\n albatrossCount = par4AlbatrossCount + par5AlbatrossCount;\r\n eagleCount = par3EagleCount + par4EagleCount + par5EagleCount;\r\n birdieCount = par3BirdieCount + par4BirdieCount + par5BirdieCount;\r\n parCount = par3ParCount + par4ParCount + par5ParCount;\r\n bogeyCount = par3BogeyCount + par4BogeyCount + par5BogeyCount;\r\n doubleBogeyCount = par3DoubleBogeyCount\r\n + par4DoubleBogeyCount\r\n + par5DoubleBogeyCount;\r\n tripleBogeyCount = par3TripleBogeyCount\r\n + par4TripleBogeyCount\r\n + par5TripleBogeyCount;\r\n quadBogeyPlusCount = par3QuadBogeyPlusCount\r\n + par4QuadBogeyPlusCount\r\n + par5QuadBogeyPlusCount;\r\n\r\n\r\n clubs = bagDAO.readClubsInBag(player);\r\n // Remove the putter\r\n int idx = 0;\r\n int pidx = -1;\r\n for (Club club : clubs) {\r\n if (club.getClub().equals(\"Putter\"))\r\n pidx = idx;\r\n idx++;\r\n }\r\n if (pidx >= 0)\r\n clubs.remove(pidx);\r\n // Fill the distances and accuracy\r\n for (Club club : clubs) {\r\n club.setAvgDist(statDAO.getClubAvgDist(player, club));\r\n club.setAccuracy(statDAO.getClubAccuracy(player, club, (float) 10));\r\n }\r\n\r\n\r\n // get the number of rounds played\r\n int courseCount = 0;\r\n\t\t//Calls the method that displays the stats on the screen\r\n\t\tfillInList(courseCount++);\r\n\t}", "public int against(String team1, String team2) {\n return games[getTeamByName(team1).order][getTeamByName(team2).order];\r\n }", "public int against(String team1, String team2) {\n validateTeam(team1);\n validateTeam(team2);\n return gamesLeft[teamsMap.get(team1)][teamsMap.get(team2)];\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int cases = scanner.nextInt();\n\n for (int i = 0; i < cases; i++) {\n int contestants = scanner.nextInt();\n\n if (contestants <= 1) {\n System.out.println(contestants);\n continue;\n }\n\n int [] skillList = new int[contestants];\n\n for (int j = 0; j < contestants; j++) {\n skillList[j] = scanner.nextInt();\n }\n\n Arrays.sort(skillList);\n Map<Integer, Integer> skillLevelFrequency = new LinkedHashMap<Integer, Integer>();\n int skillLevel = skillList[0];\n int frequency = 1;\n\n for (int j = 1; j < contestants; j++) {\n if (skillLevel == skillList[j]) {\n frequency++;\n }\n else {\n skillLevelFrequency.put(skillLevel, frequency);\n skillLevel = skillList[j];\n frequency = 1;\n }\n }\n\n List<Integer> team = new ArrayList<Integer>();\n int minGroupSize = Integer.MAX_VALUE;\n }\n }", "@Override\n public Matching stableMarriageGaleShapley_hospitaloptimal(Matching marriage) {\n int m = marriage.getHospitalCount();\n int n = marriage.getResidentCount();\n\n ArrayList<ArrayList<Integer>> hospital_preference = marriage.getHospitalPreference();\n ArrayList<ArrayList<Integer>> resident_preference = marriage.getResidentPreference();\n\n ArrayList<Integer> hospitalSlots = marriage.getHospitalSlots();\n\n ArrayList<Integer> residentMatching = new ArrayList<Integer>();\n arrlistInit(residentMatching, n, -1, false);\n\n /*list of residents that each hospital can propose to\n * Initially equals the hospital_preference list*/\n ArrayList<ArrayList<Integer>> residentsToProposeTo = new ArrayList<ArrayList<Integer>>();\n for (int i = 0; i < m; i++) //O(m)\n residentsToProposeTo.add(new ArrayList<Integer>(hospital_preference.get(i)));\n\n /*list of hospitals that still can propose(has free spots and hasn't proposed to every resident)*/\n ArrayList<Integer> proposing = new ArrayList<Integer>();\n arrlistInit(proposing, m, 0, true); //O(n)\n\n /*Keep track of each hospital matched residents*/\n ArrayList<ArrayList<Integer>> hospitalResidents = new ArrayList<ArrayList<Integer>>(0);\n for (int i = 0; i < m; i++) //O(m)\n hospitalResidents.add(new ArrayList<Integer>(0));\n\n /*Looping through each hospital in the proposing list\n * Even though some hospital may be added again in the proposing list, each hospital can propose at most once to each resident\n * So total running time of the loop will be O(m*n)*/\n while (!proposing.isEmpty()) {\n for (int hospitalIndex = 0; hospitalIndex < proposing.size(); hospitalIndex++) {\n /*Get the head of the proposing Arraylist*/\n int hospital = proposing.get(0);\n int residentIndex;\n int resident = 0;\n for (residentIndex = 0; residentIndex < residentsToProposeTo.get(hospital).size() && proposing.contains(hospital); hospitalIndex++) {\n /*Get the next resident the hospital hasn't proposed to yed*/\n resident = residentsToProposeTo.get(hospital).get(0);\n int hospitalRank = resident_preference.get(resident).indexOf(hospital);\n\n /*resident is matched, compare the hospitals rank*/\n if (residentMatching.get(resident) != -1) {\n int matchedHospital = residentMatching.get(resident);\n int matchedHospitalRank = resident_preference.get(resident).indexOf(matchedHospital);\n if (hospitalRank < matchedHospitalRank) {\n /*1.Add/remove to hospitalResidents\n * 2.Add in resident-matching\n * 3.Add matchedHospital to the proposing list if it's not in it\n */\n hospitalResidents.get(hospital).add(resident);\n hospitalResidents.get(matchedHospital).remove(hospitalResidents.get(matchedHospital).indexOf(resident));\n residentMatching.set(resident, hospital);\n if (!proposing.contains(matchedHospital))\n proposing.add(matchedHospital);\n\n }\n }\n /*resident is free, match with the hospital*/\n else {\n /*1.Add in hospitalResidents\n * 2.Add in resident-matching\n */\n hospitalResidents.get(hospital).add(resident);\n residentMatching.set(resident, hospital);\n }\n\n /*1.Remove resident from the hospital's list of residentsToProposeTo\n * 2.If hospital's slots are full, remove hospital from the proposing list\n */\n residentsToProposeTo.get(hospital).remove(residentsToProposeTo.get(hospital).indexOf(resident));\n if (hospitalResidents.get(hospital).size() >= hospitalSlots.get(hospital))\n proposing.remove(proposing.indexOf(hospital));\n }\n }\n }\n marriage.setResidentMatching(residentMatching);\n return marriage;\n }", "public void testScoreboardCaseThree () throws Exception {\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (first Yes counts only Min.Pts)\n \"3,1,A,5,No\", // 20\n \"4,1,A,7,Yes\", // 20 (all runs count!)\n \"5,1,A,9,No\", // 20\n\n \"6,1,B,11,No\", // zero (not solved)\n \"7,1,B,13,No\", // zero (not solved)\n\n \"8,2,A,30,Yes\", // 30\n\n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 3 tests when all runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n \n// String [] rankData = {\n// \"1,team2,1,30\"\n// \"2,team1,1,83\",\n// };\n \n scoreboardTest (2, runsData, rankData);\n }", "public abstract void distributeTeamsPointsNormalGame(Announce normalAnnounce);", "public ReadOnlyIntegerProperty totalPointsProperty(TeamId team) {\n return (team == TeamId.TEAM_1) ? totalPoints1 : totalPoints2;\n }", "public int[] calculateScore(Player[] players){\n players = board.getPlayers();\n int[] scores = new int[board.getPlayerCount()];\n for(int i = 0; i < players.length; i++){\n scores[i] = players[i].getMoney() + players[i].getCredits() + (players[i].getRank() * 5);\n }\n return scores;\n }", "public void aFieldGoal(View view) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void calculateEarnings(){\n if (wages.size() > expenses.size()){\n //check size difference\n int sizeUp = wages.size() - expenses.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no expenses for the week(s))\n expenses.add(BigDecimal.ZERO);\n }\n }\n\n if(expenses.size() > wages.size()){\n //check size difference\n int sizeUp = expenses.size() - wages.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no income for the week(s))\n wages.add(BigDecimal.ZERO);\n }\n }\n for(int i=0; i < wages.size(); i++){\n BigDecimal profits;\n profits = wages.get(i).subtract(expenses.get(i));\n BigDecimal roundUp = profits.setScale(2, RoundingMode.HALF_UP);\n earningsList.add(roundUp);\n }\n }", "public int wins(String team) {\n return getTeamByName(team).wins;\r\n }", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint T = s.nextInt(); //number of tests\n\t\t\n\t\tfor(int i = 0; i < T; i++) {\n\t\t\tint N = s.nextInt(); //number of students\n\t\t\tint P = s.nextInt(); //number of students to pick\n\t\t\t\n\t\t\t//Get all skill scores\n\t\t\tint[] skillOfAllStudents = new int[N];\n\t\t\tfor(int j = 0; j < N; j++) {\n\t\t\t\tskillOfAllStudents[j] = s.nextInt();\n\t\t\t}\n\t\t\t\n\t\t\t//Sort\n\t\t\tArrays.sort(skillOfAllStudents);\n\t\t\t\n\t\t\t//Find min number of hours to get a fair team\n\t\t\t//Go from largest down to smallest. take however many needed from the right and calculate amount needed for fair team\n\t\t\tint numHours = Integer.MAX_VALUE;\n\t\t\t\n\t\t\tfor(int l = N-1; l > P-2; l--) {\n\t\t\t\tint tempSkill = 0;\n\t\t\t\t\n\t\t\t\tint highest = skillOfAllStudents[l];\n\t\t\t\tfor(int k = l-1; k > l - P; k--) {\n\t\t\t\t\ttempSkill += (highest - skillOfAllStudents[k]);\n\t\t\t\t\t//System.out.println(\"intermediate #1: \" + tempSkill );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(tempSkill < numHours) {\n\t\t\t\t\tnumHours = tempSkill;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Print solution\n\t\t\tSystem.out.println(\"Case #\" + (i+1) + \": \" + numHours);\n\t\t}\n\t}", "void start() throws Exception {\n\t\tSystem.out.println(readLine(110));\n\n\t\tint teamsCount = Integer.parseInt(readLine(5));\n\n\t\tArrayList teams = new ArrayList(teamsCount+1);\n\t\tHashtable teamsTable = new Hashtable();\n\t\twhile(teamsCount--!=0) {\n\t\t\tTeam t = new Team();\n\t\t\tt.name = readLine(100);\n\t\t\tteams.add(t);\n\t\t\tteamsTable.put(t.name,t);\n\t\t}\n\n\t\tint gamesCount = Integer.parseInt(readLine(5));\n\t\twhile(gamesCount--!=0) {\n\t\t\tString line = readLine(100);\n\t\t\tint arroba = line.indexOf('@');\n\t\t\tTeam t1 = (Team) teamsTable.get(line.substring(0,line.indexOf('#')));\n\t\t\tint goals1 = Integer.parseInt(line.substring(line.indexOf('#')+1,arroba));\n\t\t\tt1.goals += goals1;\n\t\t\tline = line.substring(arroba);\n\t\t\tTeam t2 = (Team) teamsTable.get(line.substring(line.indexOf('#')+1));\n\t\t\tint goals2 = Integer.parseInt(line.substring(1,line.indexOf('#')));\n\t\t\tt2.goals += goals2;\n\t\t\tt1.against += goals2;\n\t\t\tt2.against += goals1;\n\n\t\t\tt1.games++;\n\t\t\tt2.games++;\n\n\t\t\tif(goals1>goals2) {\n\t\t\t\tt1.won++;\n\t\t\t\tt2.lost++;\n\t\t\t\tt1.points+=3;\n\t\t\t} else if(goals1<goals2) {\n\t\t\t\tt2.won++;\n\t\t\t\tt1.lost++;\n\t\t\t\tt2.points+=3;\n\t\t\t} else {\n\t\t\t\tt1.draw++;\n\t\t\t\tt2.draw++;\n\t\t\t\tt1.points+=1;\n\t\t\t\tt2.points+=1;\n\t\t\t}\n\n\t\t}\n\n\t\tTreeSet h = new TreeSet(new CompareTeams());\n\t\th.addAll(teams);\n\n\t\tint i=1;\n\t\tfor(Iterator it = h.iterator();it.hasNext();i++) {\n\t\t\tTeam t = (Team) it.next();\n\t\t\tSystem.out.println(\n\t\t\t\ti + \") \" + t.name + \" \" + t.points + \"p, \" + t.games + \"g (\"\n\t\t\t\t+ t.won + \"-\" + t.draw + \"-\" + t.lost + \"), \" + (t.goals-t.against) + \"gd (\"\n\t\t\t\t+ t.goals + \"-\" + t.against + \")\"\n\t\t\t);\n\t\t}\n\n\t}", "@Override\n\tpublic int compareTo(Team team) {\n\n\t\tif (this.numOfPlayer == team.numOfPlayer) {\n\t\t\tSystem.out.println(\"Both teams have same number of players\");\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "private void makeStat(int nbrParties){\n\t\tint indexTemps=0;//position à laquelle ajouter un temps de partie dans le tableaux tempsPartie\n\t\twhile(nbrParties >0){//tant qu'il reste des parties à faire\n\n\t\t\tboolean gagne=false;\n\t\t\tPlayer joueurAjouer=null;\n\t\t\tlong beforeTime=System.currentTimeMillis();\n\t\t\twhile(!gagne){//tant qu'aucun joueur n'a gagné on joue\n\t\t\t\tjoueurAjouer=jeu.whichPlayer();\n\t\t\t\t\n\t\t\t\tint value=joueurAjouer.play(jeu.getGameboard(),joueurs, null, null);\n\t\t\t\tgagne=jeu.win(joueurAjouer);\n\t\t\t\t\n\t\t\t\twhile(gagne==false &&value!=GameBoard.OK){\n\t\t\t\t\tvalue=joueurAjouer.play(jeu.getGameboard(),joueurs, null, null);\n\t\t\t\t\tgagne=jeu.win(joueurAjouer);\n\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\tlong afterTime=System.currentTimeMillis();\n\t\t\ttempsPartie[indexTemps]=afterTime-beforeTime;\n\t\t\tindexTemps++;\n\t\t\t\n\t\t\tif(joueurAjouer==joueur1){\n\t\t\t\tif(joueur1.getNbrJoueur()==1){// signifie que c'est lui qui a commence la partie\n\t\t\t\t\tstatJ1[0]+=1;//on incremente le nombre de parties gagnées en tant que J1\n\t\t\t\t}else{\n\t\t\t\t\tstatJ1[1]+=1;//on incremente le nombre de parties gagnées en tant que J2\n\t\t\t\t}\n\t\t\t\tstatJ1[2]+=1;// on incremente le nombre de parties totales\n\t\t\t}\n\t\t\t\n\t\t\tif(joueurAjouer==joueur2){\n\t\t\t\tif(joueur2.getNbrJoueur()==1){// signifie que c'est lui qui a commence la partie\n\t\t\t\t\tstatJ2[0]+=1;//on incremente le nombre de parties gagnées en tant que J1\n\t\t\t\t}else{\n\t\t\t\t\tstatJ2[1]+=1;//on incremente le nombre de parties gagnées en tant que J2\n\t\t\t\t}\n\t\t\t\tstatJ2[2]+=1;// on incremente le nombre de parties totales\n\t\t\t}\n\t\t\t\n\t\t\tstatJ1[3]+=Player.getNbrMurDepart()-joueur1.getNombreMur();\n\t\t\tstatJ1[4]+=joueur1.getNbrDeplacement();\n\t\t\t\n\t\t\tstatJ2[3]+=Player.getNbrMurDepart()-joueur2.getNombreMur();\n\t\t\tstatJ2[4]+=joueur2.getNbrDeplacement();\n\t\t\tresetGame();\n\t\t\tnbrParties--;\n\t\t}\n\t\tstatJ1[5]+=statJ1[3]+statJ1[4];\n\t\tstatJ2[5]+=statJ2[3]+statJ2[4];\n\t}" ]
[ "0.5724718", "0.56593645", "0.56338286", "0.56025505", "0.5518539", "0.54204535", "0.5406214", "0.5391417", "0.536307", "0.5338635", "0.5324652", "0.5303264", "0.5295944", "0.52710575", "0.52707994", "0.5246081", "0.52413696", "0.51967967", "0.51714164", "0.5171364", "0.5165695", "0.51600575", "0.5158965", "0.51390874", "0.5117441", "0.50995696", "0.507886", "0.507017", "0.50684965", "0.50610787", "0.5058364", "0.5057915", "0.5050523", "0.50504535", "0.50478923", "0.5032174", "0.5028636", "0.5009907", "0.50015604", "0.5000395", "0.49987328", "0.4980155", "0.49698606", "0.49586782", "0.4955116", "0.495235", "0.49467438", "0.4943313", "0.49356377", "0.49354067", "0.49353296", "0.4931273", "0.4924791", "0.49208787", "0.491461", "0.4909899", "0.49082297", "0.49072188", "0.4898218", "0.4895592", "0.48908004", "0.4887934", "0.48859933", "0.4879654", "0.48711365", "0.48583546", "0.4846157", "0.4841162", "0.48355156", "0.48302662", "0.48151454", "0.48146573", "0.4814138", "0.48135945", "0.48124203", "0.48110285", "0.4809818", "0.4807745", "0.4792658", "0.47921005", "0.47874612", "0.47824413", "0.47824162", "0.47815546", "0.47808483", "0.47801694", "0.47783956", "0.47770387", "0.47758532", "0.47684598", "0.47678012", "0.47667417", "0.47649708", "0.47578982", "0.4756616", "0.4754093", "0.4750582", "0.47489005", "0.47488034", "0.4747195" ]
0.7164743
0
Provides a service for managing Exchange instances.
public interface ExchangeService extends ICrudService<Exchange, String, ExchangeSearchCriteria, ExchangeSort> { boolean isNameUnique(String name, String excludeId); void cleanupDocumentFiles(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EmailService() throws IOException {\r\n system = ActorSystem.create(\"awacsystem\");\r\n emailActorRef = system.actorOf(new Props(EmailServiceActor.class).withRouter\r\n (new SmallestMailboxRouter(1)), \"emailService\");\r\n }", "public Exchange getExchange() {\r\n return exchange;\r\n }", "public void setExchange(Exchange exchange) {\r\n this.exchange = exchange;\r\n }", "public static EmailManager getInstance(){\n if (instance == null) {\n instance = new EmailManager();\n }\n return instance;\n }", "private void createExchange(RoutingContext routingContext) {\n LOGGER.debug(\"Info: createExchange method started;\");\n JsonObject requestJson = routingContext.getBodyAsJson();\n LOGGER.info(\"request ::: \" + requestJson);\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/exchange\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson.copy(), authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n LOGGER.debug(\"Info: Authenticating response ;\".concat(authHandler.result().toString()));\n LOGGER.debug(\"Info: databroker :: ;\" + databroker);\n Future<Boolean> isValidNameResult =\n isValidName(requestJson.copy().getString(JSON_EXCHANGE_NAME));\n isValidNameResult.onComplete(validNameHandler -> {\n if (validNameHandler.succeeded()) {\n Future<JsonObject> brokerResult =\n managementApi.createExchange(requestJson, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Creating exchange\");\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request;\" + brokerResultHandler.cause());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized;\" + validNameHandler.cause().getMessage());\n handleResponse(response, ResponseType.BadRequestData, MSG_INVALID_EXCHANGE_NAME);\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n\n }", "public interface IEnterpriseService {\n\n int create(Enterprise enterprise) throws ServiceException;\n\n int delete(long id) throws ServiceException;\n\n int update(Enterprise enterprise) throws ServiceException;\n\n List<Enterprise> getAll() throws ServiceException;\n\n Enterprise getEnterprise(long id) throws ServiceException;\n\n}", "public ExchangeDesk(){\n }", "Exchange getSingleExchange(IdentifierBundle identifierBundle);", "Exchange getExchange(UniqueIdentifier uniqueId);", "@Override\n public void exchange(String exchangeName, String type, boolean autoDelete) {\n synchronized (this) {\n try {\n Exchange exchange;\n AMQShortString exchangeNameSS = new AMQShortString(exchangeName);\n exchange = _virtualHost.getExchangeRegistry().getExchange(exchangeNameSS);\n if (exchange == null) {\n exchange = _virtualHost.getExchangeFactory().createExchange(exchangeNameSS,\n new AMQShortString(type), true, autoDelete, 0);\n _virtualHost.getExchangeRegistry().registerExchange(exchange);\n if(_logger.isDebugEnabled()) {\n _logger.debug(\"Added Exchange: \" + exchangeName\n + \", Type: \" + type + \", autoDelete: \" + autoDelete);\n }\n }\n } catch (AMQException e) {\n log.error(\"Error while creating Exchanges\", e);\n throw new RuntimeException(e);\n }\n }\n }", "@PublicSPI\npublic interface ExchangeSource {\n\n /**\n * Finds a specific exchange by unique identifier.\n * \n * @param uniqueId the unique identifier, null returns null\n * @return the exchange, null if not found\n * @throws IllegalArgumentException if the identifier is invalid\n */\n Exchange getExchange(UniqueIdentifier uniqueId);\n\n /**\n * Finds a specific exchange by identifier.\n * <p>\n * This should only be used when you know there is a single result.\n * For example, a search by MIC should return one result.\n * \n * @param identifier the identifier, null returns null\n * @return the exchange, null if not found\n * @throws IllegalArgumentException if the identifier is invalid\n */\n Exchange getSingleExchange(Identifier identifier);\n\n /**\n * Finds a specific exchange by identifier bundle.\n * <p>\n * This should only be used when you know there is a single result.\n * For example, a search by MIC should return one result.\n * \n * @param identifierBundle the identifier bundle, null returns null\n * @return the exchange, null if not found\n * @throws IllegalArgumentException if the identifier is invalid\n */\n Exchange getSingleExchange(IdentifierBundle identifierBundle);\n\n}", "@Override\n protected String getExchangeName() {return _exchangeName;}", "public interface EnterpriseService extends GenericManager<Enterprise> {\n\n public Result saveEnterprise(Enterprise enterprise);\n\n}", "public EmailService() {\n }", "protected ExchangeConverter createExchangeConverter() {\n return new DefaultExchangeConverter();\n }", "public InMemoryServiceInstancePersistence() {\n this.serviceInstances = new HashMap<>(); \n }", "public static IInventoryService getInstance() {\n if(mInstance == null) {\n mInstance = new InventoryService<>(IInventoryApiService.class);\n }\n \n return mInstance;\n }", "public interface EmailAccountService {\n\n RestfulResponse<PageDatas> listAccount(Integer pageNo, Integer pageSize, String search, String sortBy, Boolean isAscending);\n\n RestfulResponse<Long> addAccount(EmailHostAccountDto emailHostAccountDto);\n\n RestfulResponse<Long> updateAccount(EmailHostAccountDto emailHostAccountDto);\n\n RestfulResponse<Long> deleteAccount(Long id);\n\n EmailAccount getEmailAccount(String hostCode, Long hostSizeLimit);\n\n}", "public int getExchangeId() {\n return exchangeId_;\n }", "public int getExchangeId() {\n return exchangeId_;\n }", "Exchange getSingleExchange(Identifier identifier);", "public interface ElectiveService {\r\n\t/**\r\n\t * Creates or updates an elective without collision check\r\n\t * \r\n\t * @param id\r\n\t * Set <code>null</code> in order to create a new elective\r\n\t * @param meetingName\r\n\t * Name of the exam\r\n\t * @param lecturerId\r\n\t * Id of the lecturer\r\n\t * @param roomIds\r\n\t * List of room ids\r\n\t * @param cohortId\r\n\t * Id of the cohort\r\n\t * @param numberOfAppointments\r\n\t * Number of weekly recurring appointments\r\n\t * @param startDate\r\n\t * Start date/time\r\n\t * @param endDate\r\n\t * End date/time\r\n\t */\r\n\tvoid saveOrUpdateElective(Long id, String meetingName, Long lecturerId,\r\n\t\t\tList<Long> roomIds, Long cohortId, int numberOfAppointments,\r\n\t\t\tDate startDate, Date endDate);\r\n\r\n\t/**\r\n\t * Collision check for an Elective. Returns a list with all found\r\n\t * CollisionTypes\r\n\t * \r\n\t * @param id\r\n\t * Set <code>null</code> in order to create a new elective\r\n\t * @param meetingName\r\n\t * Name of the exam\r\n\t * @param lecturerId\r\n\t * Id of the lecturer\r\n\t * @param roomIds\r\n\t * List of room ids\r\n\t * @param cohortId\r\n\t * Id of the cohort\r\n\t * @param numberOfAppointments\r\n\t * Number of weekly recurring appointments\r\n\t * @param startDate\r\n\t * Start date/time\r\n\t * @param endDate\r\n\t * End date/time\r\n\t */\r\n\tList<ECollisionType> getCollisions(Long id, Long lecturerId,\r\n\t\t\tList<Long> roomIds, Long cohortId, int numberOfAppointments,\r\n\t\t\tDate startDate, Date endDate);\r\n\r\n\t/**\r\n\t * Loads all existing electives\r\n\t * \r\n\t * @return a List of Electives\r\n\t */\r\n\tList<Elective> loadAllElectives();\r\n\r\n\t/**\r\n\t * deletes an Elective.\r\n\t *\r\n\t * @param elective\r\n\t * The elective.\r\n\t */\r\n\tvoid deleteElective(Elective elective);\r\n\r\n\t/**\r\n\t * deletes an Elective by a given ID.\r\n\t *\r\n\t * @param elective\r\n\t * The elective.\r\n\t */\r\n\tvoid deleteElective(Long id);\r\n\r\n\t/**\r\n\t * loads an Elective by a given ID.\r\n\t *\r\n\t * @param elective\r\n\t * The elective.\r\n\t */\r\n\tElective loadElective(Long id);\r\n}", "@Bean\n public DirectExchange orderExchange(){\n return new DirectExchange(orderExchange);\n }", "@Inject\n\tpublic StoreManagement(Store store) {\n\t\tsuper(store.shardId(), store.indexSettings());\n\t\tthis.store = store;\n\t}", "public void ejbStore() {\n }", "public void ejbStore() {\n }", "public ExchangeInfo() {\n super();\n }", "public interface EzService {\n}", "public interface IExchange {\r\n}", "public interface EmployeeService {\n List<Employee> getAll();\n void create(Employee employee);\n}", "public interface PersistenceAdapter extends Service {\n\n /**\n * Returns a set of all the\n * {@link org.apache.activemq.command.ActiveMQDestination} objects that the\n * persistence store is aware exist.\n *\n * @return active destinations\n */\n Set<ActiveMQDestination> getDestinations();\n\n /**\n * Factory method to create a new queue message store with the given\n * destination name\n *\n * @param destination\n * @return the message store\n * @throws IOException\n */\n MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException;\n\n /**\n * Factory method to create a new topic message store with the given\n * destination name\n *\n * @param destination\n * @return the topic message store\n * @throws IOException\n */\n TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException;\n\n /**\n * Creates and returns a new Job Scheduler store instance.\n *\n * @return a new JobSchedulerStore instance if this Persistence adapter provides its own.\n *\n * @throws IOException If an error occurs while creating the new JobSchedulerStore.\n * @throws UnsupportedOperationException If this adapter does not provide its own\n * scheduler store implementation.\n */\n JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException;\n\n /**\n * Cleanup method to remove any state associated with the given destination.\n * This method does not stop the message store (it might not be cached).\n *\n * @param destination\n * Destination to forget\n */\n void removeQueueMessageStore(ActiveMQQueue destination);\n\n /**\n * Cleanup method to remove any state associated with the given destination\n * This method does not stop the message store (it might not be cached).\n *\n * @param destination\n * Destination to forget\n */\n void removeTopicMessageStore(ActiveMQTopic destination);\n\n /**\n * Factory method to create a new persistent prepared transaction store for\n * XA recovery\n *\n * @return transaction store\n * @throws IOException\n */\n TransactionStore createTransactionStore() throws IOException;\n\n /**\n * This method starts a transaction on the persistent storage - which is\n * nothing to do with JMS or XA transactions - its purely a mechanism to\n * perform multiple writes to a persistent store in 1 transaction as a\n * performance optimization.\n * <p/>\n * Typically one transaction will require one disk synchronization point and\n * so for real high performance its usually faster to perform many writes\n * within the same transaction to minimize latency caused by disk\n * synchronization. This is especially true when using tools like Berkeley\n * Db or embedded JDBC servers.\n *\n * @param context\n * @throws IOException\n */\n void beginTransaction(ConnectionContext context) throws IOException;\n\n /**\n * Commit a persistence transaction\n *\n * @param context\n * @throws IOException\n *\n * @see PersistenceAdapter#beginTransaction(ConnectionContext context)\n */\n void commitTransaction(ConnectionContext context) throws IOException;\n\n /**\n * Rollback a persistence transaction\n *\n * @param context\n * @throws IOException\n *\n * @see PersistenceAdapter#beginTransaction(ConnectionContext context)\n */\n void rollbackTransaction(ConnectionContext context) throws IOException;\n\n /**\n *\n * @return last broker sequence\n * @throws IOException\n */\n long getLastMessageBrokerSequenceId() throws IOException;\n\n /**\n * Delete's all the messages in the persistent store.\n *\n * @throws IOException\n */\n void deleteAllMessages() throws IOException;\n\n /**\n * @param usageManager\n * The UsageManager that is controlling the broker's memory\n * usage.\n */\n void setUsageManager(SystemUsage usageManager);\n\n /**\n * Set the name of the broker using the adapter\n *\n * @param brokerName\n */\n void setBrokerName(String brokerName);\n\n /**\n * Set the directory where any data files should be created\n *\n * @param dir\n */\n void setDirectory(File dir);\n\n /**\n * @return the directory used by the persistence adaptor\n */\n File getDirectory();\n\n /**\n * checkpoint any\n *\n * @param cleanup\n * @throws IOException\n *\n */\n void checkpoint(boolean cleanup) throws IOException;\n\n /**\n * A hint to return the size of the store on disk\n *\n * @return disk space used in bytes of 0 if not implemented\n */\n long size();\n\n /**\n * return the last stored producer sequenceId for this producer Id used to\n * suppress duplicate sends on failover reconnect at the transport when a\n * reconnect occurs\n *\n * @param id\n * the producerId to find a sequenceId for\n * @return the last stored sequence id or -1 if no suppression needed\n */\n long getLastProducerSequenceId(ProducerId id) throws IOException;\n\n void allowIOResumption();\n}", "public interface TransportService {\n\n /**\n * Create and persist a new transport.\n *\n * @param request the new transport data\n *\n * @return the new transport object, if successful\n */\n Transport storeTransport(@NotNull EezerStoreTransportRequest request);\n\n /**\n * Remove an existing transport by it's transportId.\n *\n * !!! NOTE: USUALLY WE DON'T DO THIS !!!\n *\n * @param transportId the transportId to remove\n */\n void removeTransport(@NotNull String transportId);\n\n /**\n * Fetch all existing transports in the system.\n * We don't return coordinates here, there is a\n * separate call for that.\n *\n * @return a list of all existing transports\n */\n List<Transport> getTransports();\n\n /**\n * Fetch all coordinates associated with a\n * specific transport.\n *\n * @param transportId the transportId\n *\n * @return a list of all coordinates\n */\n List<Coordinate> getCoordinates(@NotNull String transportId);\n\n}", "@Override\n default ManagerPrx ice_oneway()\n {\n return (ManagerPrx)_ice_oneway();\n }", "public interface EmailService {\n\n void sendCandidateAccountCreation(String email, String name, String key);\n\n void sendCandidatePasswordChange(String email, String name, String key);\n\n void sendCompanyAccountCreation(String email, String name, String key);\n\n void sendCompanyPasswordChange(String email, String name, String key);\n\n void sendCandidateInvitation(String email, String name, String body);\n\n void sendUserPasswordChange(String email, String name, String body);\n\n void sendUserReceiveMessage(String email, String name, String body);\n}", "void xsetExchange(com.unitedtote.schema.totelink._2008._06.program.ExchangeWagers exchange);", "public interface MnemeService\n{\n\t/** The type string for this application: should not change over time as it may be stored in various parts of persistent entities. */\n\tstatic final String APPLICATION_ID = \"sakai:mneme\";\n\n\t/** Event tracking event for deleting an assessment. */\n\tstatic final String ASSESSMENT_DELETE = \"mneme.assessment.delete\";\n\n\t/** Event tracking event for changing an assessment. */\n\tstatic final String ASSESSMENT_EDIT = \"mneme.assessment.edit\";\n\n\t/** Event tracking event for creating an assessment. */\n\tstatic final String ASSESSMENT_NEW = \"mneme.assessment.new\";\n\n\t/** Event tracking event for publishing an assessment. */\n\tstatic final String ASSESSMENT_PUBLISH = \"mneme.assessment.publish\";\n\n\t/** The sub-type for assessment in references (/mneme/assessment/...) */\n\tstatic final String ASSESSMENT_TYPE = \"assessment\";\n\n\t/** Event tracking event for un-publishing an assessment. */\n\tstatic final String ASSESSMENT_UNPUBLISH = \"mneme.assessment.unpublish\";\n\n\t/** The security function used to check if users can setup a formal course evaluation. */\n\tstatic final String COURSE_EVAL_PERMISSION = \"mneme.course.eval\";\n\n\t/** Event tracking event for download submissions for question. */\n\tstatic final String DOWNLOAD_SQ = \"mneme.download.sq\";\n\n\t/** The number of ms we allow answers and completions of submissions after hard deadlines. */\n\tstatic final long GRACE = 2 * 60 * 1000;\n\n\t/** The security function used to check if users can grade tests. */\n\tstatic final String GRADE_PERMISSION = \"mneme.grade\";\n\n\t/** The security function used to check if users have guest access. */\n\tstatic final String GUEST_PERMISSION = \"mneme.guest\";\n\n\t/** The security function used to check if users can manage tests. */\n\tstatic final String MANAGE_PERMISSION = \"mneme.manage\";\n\n\t/** Event tracking event for deleting a pool. */\n\tstatic final String POOL_DELETE = \"mneme.pool.delete\";\n\n\t/** Event tracking event for changing a pool. */\n\tstatic final String POOL_EDIT = \"mneme.pool.edit\";\n\n\t/** Event tracking event for creating a pool. */\n\tstatic final String POOL_NEW = \"mneme.pool.new\";\n\n\t/** The sub-type for pool in references (/mneme/pool/...) */\n\tstatic final String POOL_TYPE = \"pool\";\n\n\t/** Event tracking event for deleting a question. */\n\tstatic final String QUESTION_DELETE = \"mneme.question.delete\";\n\n\t/** Event tracking event for changing a question. */\n\tstatic final String QUESTION_EDIT = \"mneme.question.edit\";\n\n\t/** Event tracking event for creating a question. */\n\tstatic final String QUESTION_NEW = \"mneme.question.new\";\n\n\t/** The sub-type for question in references (/mneme/question/...) */\n\tstatic final String QUESTION_TYPE = \"question\";\n\n\t/** This string starts the references to resources in this service. */\n\tstatic final String REFERENCE_ROOT = \"/mneme\";\n\n\t/** Event tracking event for adding a submission. */\n\tstatic final String SUBMISSION_ADD = \"mneme.submit\";\n\n\t/** Event tracking event for answering a question in a submission. */\n\tstatic final String SUBMISSION_ANSWER = \"mneme.answer\";\n\n\t/** Event tracking event for the system automatically completing a submission. */\n\tstatic final String SUBMISSION_AUTO_COMPLETE = \"mneme.auto_complete\";\n\n\t/** Event tracking event for completing a submission. */\n\tstatic final String SUBMISSION_COMPLETE = \"mneme.complete\";\n\n\t/** Event tracking event for re-entering a submission. */\n\tstatic final String SUBMISSION_CONTINUE = \"mneme.continue\";\n\n\t/** Event tracking event for entering a submission. */\n\tstatic final String SUBMISSION_ENTER = \"mneme.enter\";\n\n\t/** Event tracking event for grading a submission. */\n\tstatic final String SUBMISSION_GRADE = \"mneme.grade\";\n\n\t/** Event tracking event for reviewing a submission. */\n\tstatic final String SUBMISSION_REVIEW = \"mneme.review\";\n\n\t/** The sub-type for submissions in references (/mneme/submission/...) */\n\tstatic final String SUBMISSION_TYPE = \"submission\";\n\n\t/** The security function used to check if users can submit to an assessment. */\n\tstatic final String SUBMIT_PERMISSION = \"mneme.submit\";\n\n\t/**\n\t * Find a question plugin for this question type.\n\t * \n\t * @param type\n\t * The question type.\n\t * @return The question plugin for this question type, or null if none found.\n\t */\n\tQuestionPlugin getQuestionPlugin(String type);\n\n\t/**\n\t * Access all the quesiton plugins, sorted by the (localized) type name.\n\t * \n\t * @return A List of all the quesiton plugins, sorted by the (localized) type name.\n\t */\n\tList<QuestionPlugin> getQuestionPlugins();\n\n\t/**\n\t * Register a question plugin.\n\t * \n\t * @param plugin\n\t * The question plugin.\n\t */\n\tvoid registerQuestionPlugin(QuestionPlugin plugin);\n}", "public PersistenceServiceXStream() {\n storageServiceClassName = ConfigurationProperties.getConfiguredStorageService();\n }", "public interface EquipoService {\n\n\tpublic EquipoModel saveTeam(EquipoModel equipo);\n\tpublic List<EquipoModel> getAllTeams();\n\tpublic EquipoModel getById(Integer id);\n\tpublic List<EquipoModel> getByFilter(EquipoModel filter);\n\tpublic EquipoModel updateTeam(EquipoModel equipo);\n\tpublic void deleteById(Integer id);\n\t\n}", "public interface ExerciseService {\n\n\tList<Activity> findAllActivities();\n\n\tExercise save(Exercise exercise);\n\n}", "public static EmployeeStorageManager getInstance() {\n\t\tif (instance == null) {\n\t\t\tsynchronized (EmployeeStorageManager.class) {\n\t\t\t\tinstance = new EmployeeStorageManager();\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "public interface SendService {\n\n void send(String exchange,String routingKey,String content);\n}", "public static OrderFacade getInstance(){\n\t \tif (INSTANCE == null)\n\t { \n\t \tINSTANCE = new OrderFacade(); \n\t } \n\t return INSTANCE;\n\t }", "PubService getService() {\n return PubService.this;\n }", "public void setExchangeChannelProvider(ChannelProvider exchangeChannelProvider) {\n this.exchangeChannelProvider = exchangeChannelProvider;\n }", "public String[] getExchangeNames() {\n return exchangeNames;\n }", "public interface EmailService {\n\n void sendMail(MailPO mailPO) throws MessagingException;\n}", "public interface MultiDepartsService {\n\n int insertMultiDeparts(MultiDeparts multiDeparts);\n\n int countByEcode(String eCode);\n\n int deleteByEcode(String eCode);\n}", "public interface ExpenseService {\n\n List<Expense> getExpenses();\n void addExpense(Expense newExpense);\n\tvoid remove(Expense expenseId);\n\n}", "public checkUserExpiration() {\n memberBroker = new membersBroker();\naccountBroker= new accountsBroker();\n }", "public Builder setExchangeId(int value) {\n \n exchangeId_ = value;\n onChanged();\n return this;\n }", "public interface PortPairGroupService extends ListenerService<PortPairGroupEvent, PortPairGroupListener> {\n\n /**\n * Returns if the port pair group is existed.\n *\n * @param portPairGroupId port pair group identifier\n * @return true or false if one with the given identifier exists.\n */\n boolean exists(PortPairGroupId portPairGroupId);\n\n /**\n * Returns the number of port pair groups known to the system.\n *\n * @return number of port pair groups.\n */\n int getPortPairGroupCount();\n\n /**\n * Returns an iterable collection of the currently known port pair groups.\n *\n * @return collection of port pair groups.\n */\n Iterable<PortPairGroup> getPortPairGroups();\n\n /**\n * Returns the portPairGroup with the given identifier.\n *\n * @param portPairGroupId port pair group identifier\n * @return PortPairGroup or null if port pair group with the given identifier is not\n * known.\n */\n PortPairGroup getPortPairGroup(PortPairGroupId portPairGroupId);\n\n /**\n * Creates a PortPairGroup in the store.\n *\n * @param portPairGroup the port pair group to create\n * @return true if given port pair group is created successfully.\n */\n boolean createPortPairGroup(PortPairGroup portPairGroup);\n\n /**\n * Updates the portPairGroup in the store.\n *\n * @param portPairGroup the port pair group to update\n * @return true if given port pair group is updated successfully.\n */\n boolean updatePortPairGroup(PortPairGroup portPairGroup);\n\n /**\n * Deletes portPairGroup by given portPairGroupId.\n *\n * @param portPairGroupId id of port pair group to remove\n * @return true if the give port pair group is deleted successfully.\n */\n boolean removePortPairGroup(PortPairGroupId portPairGroupId);\n}", "public interface ExamService {\n void dealExam(ExamBean examBean);\n\n List<ExamBean> getById(Long id);\n\n List<Exam> getByUser(User user);\n\n void delete(Long id);\n\n}", "public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }", "public static ESPProvisionManager getInstance(Context context) {\n\n if (provision == null) {\n provision = new ESPProvisionManager(context);\n }\n return provision;\n }", "public interface EmployeeService {\n\n List<Employee> findAllEmployees();\n Employee findOneEmployee(String idEmployee);\n void deleteOneEmployee(String idEmployee);\n String addOneEmployee();\n\n}", "public InMemoryServiceInstancePersistence(Duration delay) {\n this.serviceInstances = new HashMap<>();\n this.delay = delay;\n }", "void setExchange(com.unitedtote.schema.totelink._2008._06.program.ExchangeWagers.Enum exchange);", "public interface OrderService {\n Order create(Order order);\n Order update(Order order);\n boolean delete(Order order);\n Order get(int id);\n Collection<Order> get();\n}", "@Override\n\tpublic void editExchange() {\n\t\t\n\t}", "public interface ArchiveService {\n// 返回所有的Archive对象\n public ArrayList<Archive> getAllArchive();\n}", "public interface StoreManager {\n ConfigurationStore getConfigurationStore();\n EventStore getEventStore();\n}", "public interface IEmployeeService {\n\n List<Employee> getAll();\n\n Employee get(int id);\n\n void save(Employee employee);\n\n void delete(int id);\n\n}", "@Override\r\n protected Set<Object> serviceInstances(Injector injector) {\r\n return Sets.newHashSet(\r\n injector.getInstance(RabbitMQAPI.class));\r\n }", "public interface EmailService {\n\n void sendEmail(String to, String attachmentName) throws MessagingException, IOException;\n}", "public interface InventoryService {\n\n /**\n * Lists the inventory.\n * @return List of the inventory\n */\n List<Inventory> getInventoryList();\n\n /**\n * Executes an order using an OrderForm.\n * @param orderForm\n * @return\n * @throws Exception\n */\n List<Inventory> executeOrder(OrderForm orderForm) throws Exception;\n\n /**\n * Resets the data.\n */\n void reset();\n\n}", "com.unitedtote.schema.totelink._2008._06.program.ExchangeWagers xgetExchange();", "public DigestListService() {\r\n parserRssService = new ParserRss();\r\n generalDao = new GeneralDao();\r\n }", "public DocumentumCoreServicesImpl() {\r\n\r\n\t\tIObjectService iObjService = null;\r\n\r\n\t\tif (this.objectService == null) {\r\n\r\n\t\t\tlogger.info(INFO_INICIANDO_EMC);\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tRepositoryIdentityConstants repositoryIdentityConstants = EMCDocumentumFactory\r\n\t\t\t\t\t\t.getConstants(RepositoryIdentityConstants.class);\r\n\r\n\t\t\t\tthis.setRepositoryIdentityConstants(repositoryIdentityConstants);\r\n\r\n\t\t\t\tContextFactory contextFactory = ContextFactory.getInstance();\r\n\r\n\t\t\t\tIServiceContext serviceContext = contextFactory.getContext();\r\n\t\t\t\tserviceContext.setRuntimeProperty(IServiceContext.USER_TRANSACTION_HINT, IServiceContext.TRANSACTION_REQUIRED);\r\n\t\t\t\tserviceContext.setRuntimeProperty(IServiceContext.PAYLOAD_PROCESSING_POLICY, \"PAYLOAD_FAIL_ON_EXCEPTION\");\r\n\r\n\t\t\t\tsetServiceContext(serviceContext);\r\n\r\n\t\t\t\tRepositoryIdentity repoId = new RepositoryIdentity();\r\n\r\n\t\t\t\trepoId.setRepositoryName(REPOSITORY_NAME);\r\n\r\n\t\t\t\trepoId.setUserName(USER_NAME);\r\n\r\n\t\t\t\trepoId.setPassword(USER_PASSWORD);\r\n\r\n\t\t\t\tgetServiceContext().addIdentity(repoId);\r\n\r\n\t\t\t\t//\t\tcontextFactory.register(getServiceContext());\r\n\r\n\t\t\t\t//iObjectService = ServiceFactory.getInstance().getRemoteService(IObjectService.class, serviceContext, MODULE_NAME, DFS_SERVICE_URL);\r\n\t\t\t\tiObjService = ServiceFactory.getInstance().getLocalService(IObjectService.class, serviceContext);\r\n\r\n\t\t\t\tlogger.info(INFO_CONEXAO_EMC);\r\n\r\n\t\t\t\tthis.objectService = iObjService;\r\n\r\n\t\t\t} catch (ServiceInvocationException e) {\r\n\r\n\t\t\t\tlogger.error(ERROR_CONEXAO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tthis.setObjectService(iObjService);\r\n\t\t}\r\n\r\n\t}", "public interface InvitationService {\n\n Invitation createInvitation(String email);\n\n Invitation addInvitation(Invitation invitation);\n\n void addInvitations(List<Invitation> invitationList);\n\n //get records from db\n Invitation getInvitationById(int invitationId);\n\n List<Invitation> getAllInvitations();\n\n List<Invitation> getInvitationsByEvent(int eventId);\n\n List<Invitation> getInvitationsByUser(int userId);\n\n //update record in db\n boolean editInvitation(Invitation invitation);\n\n void editInvitationList(Event event);\n\n boolean respondToInvitation(int eventId, int userId, int responseId);\n\n //delete records from db\n boolean deleteInvitation(int invitationId);\n\n void deleteInvitationsByEvent(int eventId);\n\n void deleteInvitationsByUser(int userId);\n\n void deleteAllInvitations();\n}", "private Store getStore() throws MessagingException {\n\t\t// create properties field\n\t\tProperties properties = getProtocolProporties(PROTOCOL_RECEIVE);\n\t\tSession emailSession = Session.getDefaultInstance(properties);\n\t\treturn connectSessionStore(emailSession);\n\t}", "public interface EnterpriseAbbreviationService {\n\n boolean save(EnterpriseAbbreviation entity);\n\n boolean delete(Long id);\n\n boolean batchDelete(Set<Long> ids);\n\n Page<EnterpriseAbbreviation> findPageList(EnterpriseAbbreviation entity);\n\n boolean isExist(String enterpriseId, String shortName);\n\n EnterpriseAbbreviation findByEnterpriseNameAndAbbreviation(String enterpriseName, String abbreviation);\n\n List<EnterpriseAbbreviation> findAllByEnterpriseName(String enterpriseName);\n\n List<EnterpriseAbbreviation> findAll();\n\n EnterpriseAbbreviation findById(Long id);\n\n boolean update(EnterpriseAbbreviation entity);\n\n}", "public synchronized static Store getInstance(String uri, Application application) throws MessagingException {\n Store store = mStores.get(uri);\n if (store == null) {\n if (uri.startsWith(STORE_SCHEME_IMAP)) {\n store = new ImapStore(uri);\n } else if (uri.startsWith(STORE_SCHEME_POP3)) {\n store = new Pop3Store(uri);\n } else if (uri.startsWith(STORE_SCHEME_LOCAL)) {\n store = new LocalStore(uri, application);\n }\n\n if (store != null) {\n mStores.put(uri, store);\n }\n }\n\n if (store == null) {\n throw new MessagingException(\"Unable to locate an applicable Store for \" + uri);\n }\n\n return store;\n }", "public IComponentRepository createExtensionService(Hashtable properties){\n\t\textSvc = new ESComponentLoader();\n\t\t\n\t\treturn extSvc;\n\t}", "private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}", "public IMailService getMailService() {\n\n return mailService;\n }", "public FWMSStockExchangeVOImpl() {\r\n }", "public interface ProvisioningService {\n\n StorageEntity registerStorage(String name, List<String> tags, Map<String, String> details);\n\n ZoneEntity registerZone(String zoneUuid, String name, String owner, List<String> tags, Map<String, String> details);\n\n PodEntity registerPod(String podUuid, String name, String owner, String zoneUuid, List<String> tags, Map<String, String> details);\n\n ClusterEntity registerCluster(String clusterUuid, String name, String owner, List<String> tags, Map<String, String> details);\n\n HostEntity registerHost(String uuid, String name, String owner, List<String> tags, Map<String, String> details);\n\n void deregisterStorage(String uuid);\n\n void deregisterZone(String uuid);\n\n void deregisterPod(String uuid);\n\n void deregisterCluster(String uuid);\n\n void deregisterHost(String uuid);\n\n void changeState(String type, String entity, Status state);\n\n List<Host> listHosts();\n\n List<PodEntity> listPods();\n\n List<ZoneEntity> listZones();\n\n List<StoragePool> listStorage();\n\n ZoneEntity getZone(String id);\n}", "public interface AMQPIntegratorService {\n\n\tvoid queueMessage(MailStructure email);\n}", "public static ProductsService getInstance() {\n\t\treturn productsService;\n\t}", "public static @Nullable OfficeManager getInstance() {\n\n synchronized (InstalledOfficeManagerHolder.class) {\n return instance;\n }\n }", "public interface OfferService extends SimpleService<Offer> {\n List<Offer> getMyOffers();\n}", "@Bean\n DirectExchange updateTmsFormAexchange() {\n return new DirectExchange(updateTmsFormAExchangeName);\n }", "public interface SubmissionService {\n List<Submission> getAll();\n\n Submission get(long id);\n\n Submission create(Submission submission);\n\n Submission update(Submission submission);\n}", "@Test\n void testRegisterTopicExchange() {\n final var exchange = new TopicExchange(\"testExchange\");\n\n // When we call registry method\n contextUtils.registerTopicExchange(exchange);\n\n // Then we expect the correct exchange to be available in the context\n final var actual = context.getBean(\"testExchange\", TopicExchange.class);\n assertNotNull(actual);\n assertEquals(exchange.getName(), actual.getName());\n assertEquals(exchange.getType(), actual.getType());\n }", "public interface IPeerManager\r\n{\r\n /**\r\n * Add a new PeerEndpoint to the list of peers\r\n * \r\n * @param peer\r\n */\r\n void addPeerEndpoint(PeerEndpoint peer);\r\n\r\n /**\r\n * Returns a current snapshot of all known peers\r\n * \r\n * @return An iterable list of all the peers\r\n */\r\n Set<String> getPeerSnapshot();\r\n\r\n /**\r\n * Returns the PeerEnpoint matching the key\r\n * \r\n * @param key\r\n * @return the requested PeerEndpoint\r\n */\r\n PeerEndpoint getPeerEndpoint(String key);\r\n\r\n /**\r\n * Deletes the PeerEndpoint matching the provided key\r\n * \r\n * @param key\r\n */\r\n void removePeerEndpoint(String key);\r\n\r\n /**\r\n * Returns the number of currentlyn known peers\r\n * \r\n * @return number of currently known peers\r\n */\r\n int getPeerCount();\r\n}", "public interface InvitationsDatabaseService extends InvitationsDatabaseServiceSubject, DatabaseService {\n\n /**\n * Create an invitation document for the receiving user's received invitations in\n * this service's provider database.\n *\n * <p>Updates the invitation's ID to that of the newly created document</p>\n * @param invitation the invitation being sent to the user.\n * @return a task containing the result of trying to create the invitation document.\n */\n Task<?> addInvitationForReceivingUser(Invitation invitation);\n\n /**\n * Create an invitation document for the sending user's sent invitations in\n * this service's provider database.\n * @param invitation the invitation being sent by the user.\n * @return a task containing the result of trying to create the invitation document.\n */\n Task<?> addInvitationForSendingUser(Invitation invitation);\n\n /**\n * Update the given invitation's document for the receiving user in this service's provider\n * database.\n * @param invitation the invitation that is being updated. Must have an invitation ID.\n */\n void updateInvitationForReceivingUser(Invitation invitation);\n\n /**\n * Update the given invitation's document for the sending user in this service's provider\n * database.\n * @param invitation the invitation that is being updated. Must have an invitation ID.\n */\n void updateInvitationForSendingUser(Invitation invitation);\n\n /**\n * Query this service's provider database for the given user's received invitations that have\n * {@link InvitationStatus} equal to PENDING.\n * <p>On complete, calls {@link InvitationsDatabaseServiceSubject#notifyObserversPendingInvitations(List)} to\n * notify observers that the invitations are ready to read.</p>\n * @param user\n */\n void getUserPendingInvitations(IUser user);\n void addInvitationsSnapshotListener(IUser user);\n}", "@Override\n default ManagerPrx ice_endpoints(com.zeroc.Ice.Endpoint[] newEndpoints)\n {\n return (ManagerPrx)_ice_endpoints(newEndpoints);\n }", "public static MessageBusImpl getInstance() \r\n\t{\r\n\t\treturn MessageBusImplHolder.instance;\r\n\t}", "PersistenceServiceXStream(XStreamPersistence xstreamPersistence) {\n this.xstreamPersistence = xstreamPersistence;\n }", "public interface ActionCardService {\n}", "public static synchronized TwitchEmotesContainer setInstance(int capacity) {\n\t\tif (singleton == null) {\n\t\t\tsingleton = new TwitchEmotesContainer(capacity);\n\t\t}\n\t\treturn singleton;\n\t}", "public interface StoreService {\n\n void registerOrder(Order order);\n Order getRecievedOrder(String id);\n\n}", "public interface CommunityPostItemService extends Service<CommunityPostItem> {\n\n}", "public interface CompanyService {\n void addEmployee(CompanyId companyId, Employee employee);\n\n void removeEmployee(CompanyId companyId, Employee employee);\n\n Employee getEmployee(CompanyId companyId, EmployeeId employeeId);\n\n List<Employee> getCompanyEmployees(CompanyId companyId);\n}", "@Bean(destroyMethod = \"close\")\n\tpublic IESHttpEventStore getESHttpEventStore(final QryConfig config) {\n\t\tfinal String url = config.getEventStoreProtocol() + \"://\" + config.getEventStoreHost() + \":\"\n\t\t\t\t+ config.getEventStoreHttpPort();\n\t\ttry {\n\t\t\tfinal CredentialsProvider credentialsProvider = new BasicCredentialsProvider();\n\t\t\tfinal UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(config.getEventStoreUser(),\n\t\t\t\t\tconfig.getEventStorePassword());\n\t\t\tcredentialsProvider.setCredentials(AuthScope.ANY, credentials);\n\t\t\tfinal SerDeserializerRegistry registry = SharedUtils.createRegistry();\n\t\t\tfinal ESHttpEventStore es = new ESHttpEventStore(Executors.defaultThreadFactory(), new URL(url),\n\t\t\t\t\tESEnvelopeType.JSON, registry, registry, credentialsProvider);\n\t\t\tes.open();\n\t\t\treturn es;\n\t\t} catch (final MalformedURLException ex) {\n\t\t\tthrow new RuntimeException(\"Failed to create URL: \" + url, ex);\n\t\t}\n\t}", "public interface ExchangeRateService {\n BigDecimal exchange(Currency curr1, Currency curr2, BigDecimal amount);\n}", "private void deleteExchange(RoutingContext routingContext) {\n LOGGER.debug(\"Info: deleteExchange method started;\");\n JsonObject requestJson = new JsonObject();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/exchange\");\n String exchangeId = request.getParam(EXCHANGE_ID);\n requestJson.put(JSON_INSTANCEID, instanceID);\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson, authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.deleteExchange(exchangeId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Deleting exchange\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request;\" + brokerResultHandler.cause().getMessage());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n\n }", "public interface ExportableServiceConduit\r\n{\r\n /**\r\n * Register a service as added.\r\n * \r\n * @param serviceID an identifier for the service which should be unique within the meem server.\r\n * @param service the object providing the service.\r\n * @param itemList a list of Jini Entry objects.\r\n */\r\n public void serviceAdded(String serviceID, Remote service, List<?> itemList);\r\n\r\n /**\r\n * Register a service as removed.\r\n * \r\n * @param serviceID an identifier for the service which should be unique within the meem server.\r\n */\r\n public void serviceRemoved(String serviceID);\r\n}", "public interface StockExchangeService {\n\n void addSellOrder(String orderId, String stockName, Double price, int quantity, LocalTime time);\n\n void matchAndExecuteBuyOrder(String orderId, String stockName, Double price, int quantity, LocalTime time);\n}", "@Service\npublic interface IMessageService {\n List<SyndEntry> getFeedMessages(Feed feed);\n\n void addMessages(Feed feed, List<SyndEntry> entries);\n\n List<Message> getAllMessagesByFeedId(long feedId);\n\n long countMessagesForFeedId(long feedId);\n}" ]
[ "0.5755199", "0.55017984", "0.54605216", "0.52371234", "0.52351266", "0.52041847", "0.5099189", "0.5071303", "0.50350237", "0.50291383", "0.50052667", "0.49645612", "0.49329248", "0.49181178", "0.49108395", "0.49084324", "0.49076438", "0.490302", "0.48856512", "0.4856455", "0.48201108", "0.4795583", "0.4793957", "0.47887877", "0.47851047", "0.47851047", "0.47768646", "0.4770744", "0.47641253", "0.47593224", "0.4713792", "0.47017166", "0.4696021", "0.46887946", "0.46836084", "0.46756586", "0.46559027", "0.4633976", "0.46024984", "0.46017778", "0.46005324", "0.45991728", "0.4584016", "0.4580287", "0.4572902", "0.4560274", "0.4558885", "0.45579", "0.45576358", "0.45571136", "0.45557943", "0.45531914", "0.45434412", "0.45421758", "0.453735", "0.4533049", "0.45315057", "0.45274097", "0.45263612", "0.45248547", "0.4511941", "0.45116547", "0.4508886", "0.450231", "0.4492507", "0.4485604", "0.44851524", "0.44827235", "0.4460719", "0.4458401", "0.44579977", "0.44571707", "0.44565937", "0.44530958", "0.4448267", "0.44464737", "0.4443222", "0.44408116", "0.44375643", "0.4433006", "0.44178972", "0.44157085", "0.44125956", "0.4408283", "0.44060177", "0.4405222", "0.4400414", "0.43995306", "0.43944916", "0.43886542", "0.4385647", "0.43836555", "0.43817943", "0.43789995", "0.43677", "0.4365255", "0.43584552", "0.4350108", "0.4349803", "0.4347446" ]
0.5350523
3
saves the content of the editTexts in Sharedpreference
public void save(View view){ String name = editTextname.getText().toString(); String host = editTexthost.getText().toString(); if(name !=null && name.length()>0 && host != null && host.length() >0){ SharedPreferences pref = getSharedPreferences(MainActivity.MY_PREFS_NAME,MODE_PRIVATE); int size = pref.getInt("size", 0); SharedPreferences.Editor e = pref.edit(); e.putString("name_" + size, name); e.putString("hostPort_" + size, host); e.putInt("size", size + 1); e.commit(); finish(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "public void saveDataToSharedPreference(View view) {\n email = emailEditText.getText().toString();\n name = nameEditText.getText().toString();\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(\"name\",name);\n editor.putString(\"email\",email);\n editor.apply();\n\n Toast.makeText(context, \"Data saved successfully into SharedPreferences!\", Toast.LENGTH_SHORT).show();\n clearText();\n }", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }", "private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }", "public void savingPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n\n //tao doi tuong editer\n SharedPreferences.Editor editor = sharedPreferences.edit();\n String user = txtUserName.getText().toString();\n String pass = txtPassWord.getText().toString();\n\n boolean bchk = chkSave.isChecked();\n\n\n if(!bchk)\n {\n //xoa du lieu luu truoc do\n editor.clear();\n }\n else\n {\n editor.putString(\"user\",user);\n editor.putString(\"pass\",pass);\n editor.putBoolean(\"checked\",bchk);\n }\n\n editor.commit();\n\n\n }", "private void saveData() {\r\n\t\tif(mFirstname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmLastname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmEmail.getText().toString().trim().length() > 0) {\r\n\t\t\tmPrefs.setFirstname(mFirstname.getText().toString().trim());\r\n\t\t\tmPrefs.setLastname(mLastname.getText().toString().trim());\r\n\t\t\tmPrefs.setEmail(mEmail.getText().toString().trim());\r\n\t\t\tif(mMaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(0);\r\n\t\t\telse if(mFemaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(1);\r\n\t\t\tif(!mCalendarSelected.after(mCalendarCurrent)) \r\n\t\t\t\tmPrefs.setDateOfBirth(mCalendarSelected.get(Calendar.YEAR), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.MONTH), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.DAY_OF_MONTH));\r\n\t\t\tToast.makeText(getActivity(), R.string.msg_changes_saved, Toast.LENGTH_LONG).show();\r\n\t\t} else \r\n\t\t\tToast.makeText(getActivity(), R.string.msg_registration_empty_field, Toast.LENGTH_LONG).show();\r\n\t}", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userinfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n\n editor.apply();\n Toast.makeText(this,\"Saved!\",Toast.LENGTH_LONG).show();\n }", "public void save(View view) {\n if (!editText.getText().toString().matches(\"\")) { //editText'e herhangi bir değer girilmişse\n int userAge = Integer.parseInt(editText.getText().toString()); //yazılan değer userAge şeklinde bir değişkene alınır.\n textView.setText(\"Your age: \" + userAge); //Yazılan değer alttaki textView'a yazdırılır.\n sharedPreferences.edit().putInt(\"storedAge\", userAge).apply(); //Yazdırılan değer saklanan SharedPreference'ta da değiştirilerek güncellenir.\n }\n }", "@Override\n public void onClick(View v) {\n if (etOne.getText().toString().trim().equalsIgnoreCase(\"\") ||\n etTwo.getText().toString().trim().equalsIgnoreCase(\"\")){\n Toast.makeText(SettingsActivity.this, \"Custom messages cannot be empty\", Toast.LENGTH_SHORT).show();\n }\n //use .comit() to save onto app's SharedPreferences\n else {\n saveBtn.setVisibility(View.INVISIBLE);\n etOne.setVisibility(View.INVISIBLE);\n etTwo.setVisibility(View.INVISIBLE);\n tvOne.setVisibility(View.INVISIBLE);\n tvTwo.setVisibility(View.INVISIBLE);\n editBtn.setEnabled(true);\n editBtn.setVisibility(View.VISIBLE);\n\n SharedPreferences sharedPref = getSharedPreferences(\"pref\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"value1\", etOne.getText().toString());\n editor.putString(\"value2\", etTwo.getText().toString());\n editor.commit();\n Toast.makeText(SettingsActivity.this, \"Custom messages saved\", Toast.LENGTH_SHORT).show();\n }\n\n }", "private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }", "public void saveInfo(View view) {\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n usernameInput.setText(\"\");\n passwordInput.setText(\"\");\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "@Override\n\n public void onClick(View arg0) {\n\n File f=new File(e1.getText().toString());\n\n FileWriter fw = null;\n\n try {\n fw = new FileWriter(f);\n } catch (IOException e3) {\n\n//\tTODO Auto-generated catch block\n\n e3.printStackTrace();\n }\n try {\n\n fw.write(e2.getText().toString());\n } catch (IOException e2) {\n// TODO Auto-generated catch block\n e2.printStackTrace();\n }\n try {\n\n fw.close();\n } catch (IOException e2) {\n\n//\tTODO Auto-generated catch block\n\n e2.printStackTrace();\n }\n SharedPreferences.Editor\n\n e=getPreferences(MODE_PRIVATE).edit();\n e.putString(\"fpath\", f.getPath());\n e.commit();\n Toast.makeText(getApplicationContext(), \"Saved Successfully\", Toast.LENGTH_LONG).show();\n\n }", "private void saveValues() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n // If the field is disabled, add the DEACTIVATED marker to the value of the field\n if (e.getKey().isEnabled())\n Pref.put(this, e.getValue(), e.getKey().getText().toString());\n else\n Pref.put(this, e.getValue(), Data.DEACTIVATED_MARKER + e.getKey().getText().toString());\n }\n\n }", "@Override\r\n public void onClick(View view) {\n String message = enterMessage.getText().toString().trim();\r\n\r\n //create the SharedPrefference instantiations, so that we are able to save the data:\r\n //primul arg e key, apoi mode (we can limit the accesibility from other apps with mode):\r\n// MODE_PRIVATE = ONLY THIS APP IS ABLE TO ACCESS THIS...(xml file)\r\n SharedPreferences sharedPreferences = getSharedPreferences(MESSAGE_ID, MODE_PRIVATE );\r\n\r\n\r\n //invoke the SharedPreferences editor:\r\n //ony \"editor\" will be able to access..\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.putString(\"key_message\", message);\r\n\r\n editor.apply(); //this saves to disk;\r\n\r\n }", "public void saveSettings(View v) {\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE); // get shared preferences\n SharedPreferences.Editor editor = sharedPref.edit();\n int seconds_rec = Integer.parseInt(time_recording.getText().toString());\n int notif_occ = Integer.parseInt(time_occurance.getText().toString());\n\n editor.putInt(getString(R.string.time_recording_seconds), seconds_rec); // save values to a sp\n editor.putInt(getString(R.string.time_notification_minutes), notif_occ);\n editor.commit(); // commit the differences\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "private void guardarPreferences() {\n\n\t\t// se capturan aqui, solo es leer los editText, no tienen metodos\n\t\t// propios en esta clase\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameEditText);\n\t\tEditText emailText = (EditText) findViewById(R.id.emailEditText);\n\n\t\tstrNickname = nicknameText.getText().toString();\n\t\tstrEmail = emailText.getText().toString();\n\t\t\n\t\t\n\t\tEditor editor = mGameSettings.edit();\n\t\t\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_NICKNAME, strNickname);\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_EMAIL, strEmail);\n\t\t\t\t\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_PASSWORD, strPassword);\n\t\t\t\t//editor.putLong(Constants.GAME_PREFERENCES_DOB, dayOfBirth);\n\t\t\t\teditor.putInt(Constants.GAME_PREFERENCES_GENDER, gender);\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_AVATAR, strAvatar);\n\n\t\t//Se cierra la edicion y guarda el archivo\n\t\teditor.commit();\n\t}", "@Override\n public void onSaveInstanceState(Bundle savedInstanceState) {\n savedInstanceState.putString(SAVED_STATE, \"Saved\");\n savedInstanceState.putString(SAVED_EDIT_TEXT, editText.getText().toString());\n // Always call the superclass so it can save the view hierarchy state\n super.onSaveInstanceState(savedInstanceState);\n }", "public void save() {\n savePrefs();\n }", "public void saveOnClick(View view) {\n final EditText nameET = (EditText) findViewById(R.id.name_et);\n final EditText titleET = (EditText) findViewById(R.id.title_et);\n final EditText emailET = (EditText) findViewById(R.id.email_et);\n final EditText addressET = (EditText) findViewById(R.id.address_et);\n user.setName(nameET.getText().toString());\n user.setTitle(titleET.getText().toString());\n user.setEmailAddress(emailET.getText().toString());\n user.setHomeAddress(addressET.getText().toString());\n\n RegistrationData.editUserData(db, user);\n finish();\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void saveSettings(View view){\n SharedPreferences.Editor editor = settings.edit();\n\n // Write the values from the views to the editor\n editor.putInt(\"vocablesNumber\",Integer.parseInt(vocablesNumber.getSelectedItem().toString()));\n editor.putBoolean(\"screenOn\", screenOnSwitch.isChecked());\n editor.putFloat(\"delayBetweenVocables\",Float.valueOf(editTextDelay.getText().toString()));\n // Commit the edits\n editor.commit();\n\n // Send the user a message of success\n Toast.makeText(Settings.this,\"Settings saved!\",Toast.LENGTH_SHORT).show();\n // Go back to previous activity\n finish();\n }", "public void save() {\n\t\tpreferences().flush();\n\t}", "public void UpdatePrefs()\r\n {\r\n \t\r\n \t// Data from the first name field is being stored into persistent storage\r\n \teditor.putString\r\n \t(\"name\", \r\n \tfNameField.getText()\r\n \t.toString());\r\n \t\r\n \t// Data from the last name field is being stored into persistent storage\r\n editor.putString\r\n (\"lName\",\r\n lNameField.getText()\r\n .toString());\r\n \r\n // Data from the phone number field is being stored into persistent storage\r\n editor.putString\r\n (\"phoneNum\"\r\n , phoneNumField.getText()\r\n .toString());\r\n \r\n // Data from the address field is being stored into persistent storage\r\n editor.putString\r\n (\"address\"\r\n , homeAddressField.getText()\r\n .toString());\r\n \r\n // Push all fields data to persistent storage forever\r\n editor.commit();\r\n }", "public void onClick(DialogInterface dialog, int id) {\n edit_btn_val.clearComposingText();\n edit_btn_val.setText(userInput.getText());\n preferencesEditor.putString(sw_no,edit_btn_val.getText().toString());\n preferencesEditor.commit();\n\n }", "protected void saveInput() {\r\n value = valueText.getText();\r\n }", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE); //This means the info is private and hence secured\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "private void saveData() {\n // Save data to ReminderData class\n reminderData.setMinutes(timePicker.getMinute());\n reminderData.setDataHours(timePicker.getHour());\n reminderData.setNotificationText(reminderText.getText().toString());\n reminderData.saveDataToSharedPreferences();\n }", "@Override\n public void onPause(){\n super.onPause();\n\n if(artistName.getText().toString().equals(\"\")){\n //puts the last entered artist's name into pref if nothing is currently written in the EditText\n SharedPreferences.Editor edit = pref.edit();\n edit.putString(Artist, artist);\n edit.commit();\n }else {\n //puts whatever is currently written in the EditText into pref\n String artistEditText = artistName.getText().toString();\n SharedPreferences.Editor edit = pref.edit();\n edit.putString(Artist, artistEditText);\n edit.commit();\n }\n }", "private void saveState() {\r\n \tSharedPreferences settings = getSharedPreferences(TEMP, 0);\r\n \tEditor editor = settings.edit();\r\n \tif (mRowId != null)\r\n \t\teditor.putLong(DbAdapter.KEY_ROWID, mRowId);\r\n \teditor.putLong(DbAdapter.KEY_DATE, mTime);\r\n \teditor.putString(DbAdapter.KEY_PAYEE, mPayeeText != null && \r\n \t\t\tmPayeeText.getText() != null ? mPayeeText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_AMOUNT, mAmountText != null && \r\n \t\t\tmAmountText.getText() != null ? mAmountText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_CATEGORY, mCategoryText != null && \r\n \t\t\tmCategoryText.getText() != null ? mCategoryText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_MEMO, mMemoText != null && \r\n \t\t\tmMemoText.getText() != null ? mMemoText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_TAG, mTagText != null && \r\n \t\t\tmTagText.getText() != null ? mTagText.getText().toString() : null);\r\n \teditor.commit();\r\n }", "public void salvarDadosNaTela(){\n SharedPreferences sharedPreferences = this.getActivity().getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(TVHORAUM, tvHoraUm.getText().toString());\n editor.putString(TVHORADOIS, tvHoraDois.getText().toString());\n editor.putString(TVHORATRES, tvHoraTres.getText().toString());\n editor.putString(TVHORAQUATRO, tvHoraQuatro.getText().toString());\n\n editor.apply();\n\n }", "public void saveData(){\n String name = editTextName.getText().toString();\n if(!name.isEmpty()){\n DataManager.getInstance().addName(name);\n }\n\n finish();\n }", "public void retrieveDataFromSharedPreference(View view) {\n\n name = sharedPreferences.getString(\"name\",\"no data\");\n email = sharedPreferences.getString(\"email\",\"no data\");\n\n nameEditText.setText(name);\n emailEditText.setText(email);\n\n }", "public void save(View view){\n\t\tIntent saveIntent = new Intent(this, SaveActivity.class);\n\t\t//First Name\n\t\tEditText firstName = (EditText) findViewById(R.id.first_name_edit);\n \tString sFirstName = firstName.getText().toString();\n \t\n \t//Last Name\n \tEditText lastName = (EditText) findViewById(R.id.last_name_edit);\n \tString sLastName = lastName.getText().toString();\n \t\n \t//Address\n \tEditText address = (EditText) findViewById(R.id.address_edit);\n \tString sAddress = address.getText().toString();\n \t\n \t//Credit Details\n \tEditText creditDetails = (EditText) findViewById(R.id.credit_details_edit);\n \tString sCreditDetails = creditDetails.getText().toString();\n \t\n \t//Attach Strings to Intent\n \tsaveIntent.putExtra(FIRST_NAME, sFirstName);\n \tsaveIntent.putExtra(LAST_NAME, sLastName);\n \tsaveIntent.putExtra(ADDRESS, sAddress);\n \tsaveIntent.putExtra(CREDIT_DETAILS, sCreditDetails);\n \t\n \t//Start Activity\n \tstartActivity(saveIntent);\n\t}", "private void saveInfoHelper(){\n\n if(!isAnyEmpty()) {\n boolean firstSave = (prefs.getString(\"email\", null) == null);\n //store first name\n editor.putString(\"fname\", fname.getText().toString());\n // store last name\n editor.putString(\"lname\", lname.getText().toString());\n // store email\n editor.putString(\"email\", email.getText().toString());\n // store password\n editor.putString(\"password\", password.getText().toString());\n // store currency\n editor.putInt(\"curr\", spinner_curr.getSelectedItemPosition());\n // store stock\n editor.putInt(\"stock\", spinner_stock.getSelectedItemPosition());\n // store date\n editor.putString(\"date\", new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(Calendar.getInstance().getTime()));\n\n editor.putString(\"token\", \"\");\n\n editor.commit();\n\n Toast.makeText(this, R.string.data_saved, Toast.LENGTH_SHORT).show();\n\n loadInfo(); //to show new data immediately without refreshing the page\n\n requestToken();\n\n if(firstSave){\n finish();\n }\n\n }else{\n Toast.makeText(this, R.string.data_empty, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void saveData() {\n\t\tthis.dh = new DataHelper(this);\n\t\tthis.dh.updateData(String.valueOf(mData.getText()), i.getId());\n\t\tthis.dh.close();\n\t\tToast\n\t\t\t\t.makeText(ctx, \"Changes saved successfully...\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\tIntent myIntent = new Intent(EditActivity.this, StartActivity.class);\n\t\tEditActivity.this.startActivity(myIntent);\n\t\tfinish();\n\t}", "private void save() {\n Toast.makeText(ContactActivity.this, getString(R.string.save_contact_toast), Toast.LENGTH_SHORT).show();\n\n String nameString = name.getText().toString();\n String titleString = title.getText().toString();\n String emailString = email.getText().toString();\n String phoneString = phone.getText().toString();\n String twitterString = twitter.getText().toString();\n \n if (c != null) {\n datasource.editContact(c, nameString, titleString, emailString, phoneString, twitterString);\n }\n else {\n \tc = datasource.createContact(nameString, titleString, emailString, phoneString, twitterString);\n }\n }", "protected void saveDatos() {\r\n\r\n myNombre = (TextView) findViewById(R.id.spinNombre);\r\n myPrecio = (TextView) findViewById(R.id.spinPrecio);\r\n myMarca = (TextView) findViewById(R.id.spinMarca);\r\n myId_juego = (TextView) findViewById(R.id.spinID);\r\n\r\n String id = myId_juego.getText().toString();\r\n String precio = myPrecio.getText().toString();\r\n String marca = myMarca.getText().toString();\r\n String nombre = myNombre.getText().toString();\r\n\r\n try {\r\n MainActivity.myDbHelper.open();\r\n MainActivity.myDbHelper.insertJuegos(nombre, precio, marca, id);\r\n MainActivity.myDbHelper.close();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void saveSettings() {\n \tLog.i(\"T4Y-Settings\", \"Save mobile settings\");\n \t\n \tmobileSettings.setAllowAutoSynchronization(autoSynchronizationCheckBox.isChecked());\n mobileSettings.setAllowAutoScan(autoScanCheckBox.isChecked());\n mobileSettings.setAllowAutoSMSNotification(autoSMSNotificationCheckBox.isChecked());\n \n \tmainApplication.setMobileSettings(mobileSettings);\n }", "private void saveOption() {\n SharedPreferences filterSetting = getSharedPreferences(\"filterSetting\",0);\n SharedPreferences.Editor editor = filterSetting.edit();\n editor.putBoolean(\"myMostRecent\",myMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"myDisplayAll\",myDisplayAllCheckbox.isChecked());\n editor.putBoolean(\"foMostRecent\",foMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"foDisplayAll\",foDisplayAllCheckbox.isChecked());\n editor.putString(\"myReason\",myReasonEditText.getText().toString());\n editor.putString(\"foReason\",foReasonEditText.getText().toString());\n editor.putInt(\"mySpinner\",myEmotionalStateSpinner.getSelectedItemPosition());\n editor.putInt(\"foSpinner\",foEmotionalStateSpinner.getSelectedItemPosition());\n\n editor.commit();\n }", "@Override\n public void onSaveInstanceState(Bundle savedInstanceState) {\n \tfinal EditText edittext = (EditText) findViewById(R.id.edittext);\n \tsavedInstanceState.putString(\"square\",edittext.getText().toString());\n \tsuper.onSaveInstanceState(savedInstanceState);\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "public void shared() {\n\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n String username = userstring;\n\n SharedPreferences sharedlog = getSharedPreferences(\"usernamelast\" , MODE_PRIVATE);\n SharedPreferences.Editor editorlogin = sharedlog.edit();\n editorlogin.putString(\"usernamelast\", username);\n editorlogin.apply();\n\n SharedPreferences sharedPref = getSharedPreferences(\"email\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"email\", Email);\n editor.apply();\n //Los estados los podemos setear en la siguiente actividad\n SharedPreferences sharedPref2 = getSharedPreferences(\"password\", MODE_PRIVATE);\n SharedPreferences.Editor editor2 = sharedPref2.edit();\n editor2.putString(\"password\", Password);\n editor2.apply();\n\n\n }", "private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t str1=editText1.getText().toString();\n\t\t\t\t\tSharedPreferences preferences=getSharedPreferences(\"user\",Context.MODE_PRIVATE);\n\t\t\t Editor editor=preferences.edit();\n\t\t\t editor.putString(\"str1\", str1);\n\t\t\t editor.commit();\n\t\t\t \n\t\t\t}", "private void save() {\n if (!mAverageConsumption.equals(\"\")) {\n saveResults();\n\n TextView averageText = (TextView) findViewById(R.id.averageText);\n EditText distanceEdit = (EditText) findViewById(R.id.distanceEdit);\n EditText fuelEdit = (EditText) findViewById(R.id.fuelEdit);\n\n mAverageConsumption = \"\";\n\n averageText.setText(mAverageConsumption);\n distanceEdit.setText(\"\");\n fuelEdit.setText(\"\");\n } else {\n makeToast(getResourceString(R.string.err_empty));\n }\n }", "private void saveSettings()\n {\n try\n {\n // If remember information is true then save the ip and port\n // properties to the projects config.properties file\n if ( rememberLoginIsSet_ )\n {\n properties_.setProperty( getString( R.string.saved_IP ), mIP_ );\n properties_.setProperty( getString( R.string.saved_Port ),\n mPort_ );\n }\n\n // Always save the remember login boolean\n properties_.setProperty( getString( R.string.saveInfo ),\n String.valueOf( rememberLoginIsSet_ ) );\n\n File propertiesFile =\n new File( this.getFilesDir().getPath().toString()\n + \"/properties.txt\" );\n FileOutputStream out =\n new FileOutputStream( propertiesFile );\n properties_.store( out, \"Swoop\" );\n out.close();\n }\n catch ( Exception ex )\n {\n System.err.print( ex );\n }\n }", "@Override\n protected void onSaveInstanceState(Bundle savedInstanceState) {\n savedInstanceState.putString(\"Search\",editTextSearchPlace.getText().toString());\n super.onSaveInstanceState(savedInstanceState);\n }", "public void buttonSave(View view) {\n\n Map<String, String> params = new HashMap();\n params.put(\"name\", editTextName.getText().toString());\n params.put(\"email\", editTextEmail.getText().toString());\n\n JSONObject jsonParams = new JSONObject(params);\n String stringParams = jsonParams.toString();\n\n new BackgroundEditTask(stringParams).execute();\n }", "private void saveToSharedPreferences(String babyName) {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"babyName\", babyName);\n\n // commit changes made by the editor\n if (editor.commit()) {\n // update a TextView?\n } else {\n makeToast(\"Unable to set baby.\");\n }\n\n }", "@Override\n protected void onResume() {\n super.onResume();\n SharedPreferences preferences = getSharedPreferences(luuthongtin, MODE_PRIVATE);\n String username = preferences.getString(\"UserName\", \"\");\n String password = preferences.getString(\"PassWord\", \"\");\n Boolean save = preferences.getBoolean(\"Save\",false);\n if(save)\n {\n edtUserName.setText(username);\n edtPassword.setText(password);\n checkBox.setChecked(save);\n }\n }", "public void UniversitySelected(View view) {\n\n SharedPreferences storeduniversity = getSharedPreferences(\"universityfile\",Activity.MODE_PRIVATE);\n SharedPreferences.Editor editor=storeduniversity.edit();\n\n EditText editText = (EditText) findViewById(R.id.enterDescription);\n String uni=editText.getText().toString();\n\n editor.putString(\"university\",uni);\n editor.apply();\n\n\n \n\n\n Intent intent = new Intent(this, ClassAdder.class);\n //String message = String.valueOf(id.UniversitySelect);\n //intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }", "public void saveSettings(View v) {\n EditText apikeytext = (EditText) findViewById(R.id.editapi);\n EditText redcapurltext = (EditText) findViewById(R.id.editredcapurl);\n UserDBHelper udb = new UserDBHelper(this);\n User currentUser = udb.getActiveUser();\n\n String inputApiKey = apikeytext.getText().toString().trim();\n currentUser.setAPIKEY(inputApiKey);\n\n String inputRedcapURL = redcapurltext.getText().toString().trim();\n currentUser.setRedcapURL(inputRedcapURL);\n\n udb.updateUser(currentUser);\n\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration config = res.getConfiguration();\n\n String targetLanguage;\n\n CheckBox cb_en = (CheckBox) findViewById(R.id.cb_english);\n CheckBox cb_pt = (CheckBox) findViewById(R.id.cb_port);\n\n if( cb_en.isChecked() ) {\n targetLanguage = \"en-US\";\n } else {\n targetLanguage = \"pt\";\n }\n\n Locale newLang = new Locale(targetLanguage);\n\n config.locale = newLang;\n res.updateConfiguration(config, dm);\n\n try {\n Intent i = new Intent(getBaseContext(), MainActivity.class);\n startActivity(i);\n finish();\n } catch (Exception e) {}\n }", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n String aaString = sharedPreferences.getString(getString(R.string.pref_antalAktier_key), getString(R.string.pref_antalAktier_default));\n// float aaFloat = Float.parseFloat(aaString);\n editTextAntalAktier.setText(aaString);\n\n String kk = sharedPreferences.getString(getString(R.string.pref_koebskurs_key), getString(R.string.pref_koebskurs__default));\n editTextKoebskurs.setText(kk);\n\n String k = sharedPreferences.getString(getString(R.string.pref_kurtage_key), getString(R.string.pref_kurtage_default));\n editTextKurtage.setText(k);\n\n// float minSize = Float.parseFloat(sharedPreferences.getString(getString(R.string.pref_size_key),\n// getString(R.string.pref_size_default)));\n// mVisualizerView.setMinSizeScale(minSize);\n\n // Register the listener\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "public void onClick(View v) {\n\t\t\t\t\tSharedPreferences.Editor editor = getPreferences(0).edit();\r\n\t\t\t\t\tString s=extractedsample.getText().toString();\r\n\t\t\t\t\teditor.putString(\"Name\", s);\r\n\t\t\t\t\tString s1=primerpair.getText().toString();\r\n\t\t\t\t\teditor.putString(\"Name1\", s1);\r\n\t\t\t\t\tString s2=date1.getText().toString();\r\n\t\t\t\t\teditor.putString(\"Name2\", s2);\r\n\t\t\t\t\tString s3=successfull.getText().toString();\r\n\t\t\t\t\teditor.putString(\"Name3\", s3);\r\n\t\t\t\t\tString s4=date2.getText().toString();\r\n\t\t\t\t\teditor.putString(\"Name4\", s4);\r\n\t\t\t\t\tString s5=tbtn.getText().toString();\r\n\t\t\t\t\teditor.putString(\"Name5\", s5);\r\n\t\t\t\t\teditor.commit();\r\n\t\t\t\t}", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }", "public void savePreferences(SharedPreferences preferences){\r\n\t\tSharedPreferences.Editor editor = preferences.edit();\r\n editor.putBoolean(\"initialSetupped\", initialSetuped);\r\n editor.putString(\"username\", userName);\r\n editor.putString(\"useremail\", userEmail);\r\n editor.putString(\"recipientemail\", recipientEmail);\r\n editor.putBoolean(\"option\", option.isPound());\r\n\r\n // Commit the edits!\r\n editor.commit();\r\n\t}", "private void save() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null) ) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.insert(nama_pasien2,\n nama_dokter2,\n tgl_pengobatanField.getText().toString().trim(),\n waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),\n hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "public void onClick(View v) {\n\t\t\t\t((EditText) findViewById(R.id.d4et1)).setText(\"\");\r\n\t\t\t\t((EditText) findViewById(R.id.d4et2)).setText(\"\");\r\n\t\t\t\t((Button) findViewById(R.id.d4date1)).setText(\"DD/MM/YY\");\r\n\t\t\t\t((Button) findViewById(R.id.d4date2)).setText(\"DD/MM/YY\");\r\n\t\t\t\t((EditText) findViewById(R.id.d4et4)).setText(\"\");\r\n\t\t\t\t\r\n\t\t\t\tSharedPreferences.Editor editor = getPreferences(0).edit();\r\n\t\t\t\tString s=extractedsample.getText().toString();\r\n\t\t\t\teditor.putString(\"Name\", s);\r\n\t\t\t\tString s1=primerpair.getText().toString();\r\n\t\t\t\teditor.putString(\"Name1\", s1);\r\n\t\t\t\tString s2=date1.getText().toString();\r\n\t\t\t\teditor.putString(\"Name2\", s2);\r\n\t\t\t\tString s3=successfull.getText().toString();\r\n\t\t\t\teditor.putString(\"Name3\", s3);\r\n\t\t\t\tString s4=date2.getText().toString();\r\n\t\t\t\teditor.putString(\"Name4\", s4);\r\n\t\t\t\tString s5=tbtn.getText().toString();\r\n\t\t\t\teditor.putString(\"Name5\", s5);\r\n\t\t\t\teditor.commit();\r\n\t\t\t}", "@Override\n public void saveValue(String key, Object value) {\n SharedPreferences.Editor editor = preferences.edit();\n if (value instanceof String) {\n editor.putString(key, (String) value);\n } else if (value instanceof Boolean) {\n editor.putBoolean(key, (Boolean) value);\n } else if (value instanceof Integer) {\n editor.putInt(key, (Integer) value);\n } else if (value instanceof Float) {\n editor.putFloat(key, (Float) value);\n } else if (value instanceof Long) {\n editor.putLong(key, (Long) value);\n }\n editor.apply();\n }", "public void goToSave(TextView text){\n\n if (Validation.validateStartDate(dateTextView, getContext())) {\n\n // Url\n String url = ServiceUrls.KEY_HEALTHBOOK_ALLERGIES.concat(StringConstants.KEY_CREATE);\n\n // Shut off keypad\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(text.getWindowToken(), 0);\n\n // Set data\n final HashMap<String, Object> postData = new HashMap<>();\n postData.put(StringConstants.KEY_PATIENT_ID, SharedPreferenceService.getValue(getActivity(), StringConstants.KEY_PATIENT_ID));\n postData.put(StringConstants.KEY_ALLERGY_ID, mAllergyId);\n postData.put(StringConstants.KEY_ALLERGY_NAME, problemNameTextView.getText().toString());\n postData.put(StringConstants.KEY_SEARCH_LIST_HYPERLINK, problemHyperlinkTextView.getText().toString());\n postData.put(StringConstants.KEY_ALLERGY_TYPE, mAllergyTypeName);\n postData.put(StringConstants.KEY_ALLERGY_KIND_OF_REACTION, kindOfReactionSpinner.getSelectedItem().toString());\n postData.put(StringConstants.KEY_START_DATE,\n DateTimeUtils.convertTimestampToUTC(DateTimeUtils.convertDateSimpleToTimestamp(dateTextView.getText().toString())));\n postData.put(StringConstants.KEY_ALLERGY_COMMENTS, commentsTextView.getText().toString());\n\n // Set Headers\n final HashMap<String, String> headers = new HashMap<>();\n headers.put(StaticConstants.KEY_AUTHORIZATION,\n StaticConstants.KEY_BEARER\n .concat(\" \")\n .concat(SharedPreferenceService.getValue(getActivity(), StringConstants.KEY_TOKEN)));\n\n if (Validation.isConnected(getActivity())) {\n\n /**\n * API Call\n */\n APICallService.PostAPICall(getActivity(), getActivity(), url, postData, headers, new APIInterface() {\n\n @Override\n public void onSuccess(JSONObject response) {\n try {\n\n // Create in Local Database\n Allergy mAllergyModel = new Allergy(SharedPreferenceService.getValue(getActivity(), StringConstants.KEY_PATIENT_ID),\n response.getString(StringConstants.KEY_P_ID),\n mAllergyId,\n problemNameTextView.getText().toString(),\n problemHyperlinkTextView.getText().toString(),\n mAllergyTypeName,\n kindOfReactionSpinner.getSelectedItem().toString(),\n dateTextView.getText().toString(),\n commentsTextView.getText().toString());\n\n mAllergyModel.save();\n addMainRelativeLayout.setVisibility(View.GONE);\n fab.setVisibility(View.VISIBLE);\n readAllergyList(getActivity());\n\n } catch (Exception e) {\n\n // Log error\n ErrorHandlers.handleAPIError(getActivity());\n Crashlytics.logException(e);\n }\n }\n\n @Override\n public void onError(VolleyError error) {\n\n }\n });\n } else {\n\n ErrorHandlers.handleInternetConnectionFailure(getActivity());\n }\n\n }\n }", "private void savePreferences(String key, String value) {\n\t\tSharedPreferences sp = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tEditor edit = sp.edit();\n\t\tedit.putString(key, value);\n\t\tedit.commit();\n\t}", "private void savePlace() {\n\t\tString title = edtTitle.getText().toString();\n\t\tString address = edtAddress.getText().toString();\n\t\tString notes = edtNotes.getText().toString();\n\n\t\tcallPublishPlace(mLocation, title, address, notes);\n\n\t\tsetResult(RESULT_OK);\n\t\tfinish();\n\t}", "private void storeInLocal(){\n\t\t\t question = questionTxt.getText().toString();\n\t\t\t \n\t\t\t if (question.length() == 0) {\n\t\t\t\t\tif (TextUtils.isEmpty(question)) {\n\t\t\t\t\t\tquestionTxt.setError(getString(R.string.error_field_required));\n\t\t\t\t\t\tfocusView = questionTxt;\n\t\t\t\t\t\tcancel = true;\n\t\t\t\t\t}\n\t\t }\n\t\t\t else{\n\t\t\t ContentValues values = new ContentValues();\n\t\t values.put(QuestionsTable.QUESTION, question);\n\t\t\t values.put(QuestionsTable.NURSE_ID, NurseLogin.mUsername);\n\t\t\t \n\t\t todoUri = getContentResolver().insert(QuestionsContentProvider.CONTENT_URI, values);\n\t\t\t }\n\t\t }", "public void save() {\n SharedPreferences settings = activity.getSharedPreferences(\"Preferences\", 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putLong(\"bestDistance\", values.bestDistance);\n\n // Commit the edits!\n editor.commit();\n\n }", "@Override\n public void onPause() {\n SharedPreferences.Editor editor = savedValues.edit();\n editor.putInt(\"num1\", num1);\n editor.putInt(\"num2\", num2);\n editor.commit();\n\n super.onPause();\n }", "public void saveTextBoxs(){\n dni[indice] = Long.parseLong(txtDni.getText());\n nombre[indice] = txtNombre.getText();\n apellido[indice] = txtApellido.getText();\n direccion[indice] = txtDireccion.getText();\n telefono[indice] = txtTelefono.getText();\n fNacimiento[indice] = txtFechaNacimiento.getText();\n loadTextBoxs();\n }", "public void save() {\n if (AppUtil.isEmpty(txtName.getText().toString())) {\n AppUtil.alertMessage(mainActivity,\"Please enter valid recipe name.\");\n txtName.requestFocus();\n } else if (AppUtil.isEmpty(txtDesc.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter recipe description.\");\n txtDesc.requestFocus();\n } else if (AppUtil.isEmpty(txtIng.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter ingredient/s.\");\n txtIng.requestFocus();\n } else if (AppUtil.isEmpty(txtSteps.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter preparation steps.\");\n txtSteps.requestFocus();\n } else {\n try {\n if (MainActivity.checkNetwork(mainActivity)) {\n SaveAsyncTask task = new SaveAsyncTask();\n task.execute();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void saveAction() {\n\t\tresult.setValue(convertPairsToText());\n\t\tcloseDialog();\n\t}", "public void saveString(String key,String value)\n {\n preference.edit().putString(key,value).apply();\n }", "private void saveSharedPrefs(String a, boolean b) {\n SharedPreferences.Editor editor = sp.edit();\n if (b) editor.putString(\"searchField\", a);\n else editor.putString(\"ingredientsField\", a);\n editor.commit();\n }", "private void savePreferenceData(String role){\n if (getIntent()!=null){\n SharedPreferences preferences = getSharedPreferences(detailPreference, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(preferenceKey, role);\n editor.apply();\n }\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "private void saveNote()\n\t{\n\t\tString text = ((EditText) findViewById(R.id.note_edittext)).getText().toString();\n\t\tNoteDbWorker worker = new NoteDbWorker(this);\n\t\tworker.updateNote(user.userName, text);\n\t\tworker.close();\n\t\tToast.makeText(this, getString(R.string.note_saved), Toast.LENGTH_LONG).show();\n\t}", "private void writeAccount() {\n SharedPreferences pref = getSharedPreferences(\"ACCOUNT\", Context.MODE_PRIVATE);\n SharedPreferences.Editor edt = pref.edit();\n\n edt.putString(\"email\", Me.getInstance().getEmail());\n edt.putString(\"password\", txtPassword.getText().toString().trim());\n\n edt.commit();\n }", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "public void saveAction (){\n\t \tif(dayNum ==7){\n\t \t\tintPhaseCompletes = intPhaseCompletes +1;\n\t \t\tdb.execSQL(\"UPDATE Phases SET Completions= \"+ intPhaseCompletes + \" WHERE PhaseID = \" + \"'\" + phaseID + \"'\");\n\t \t}\n \tcontent = timerTextView.getText().toString();\n \tstrDate = functions.getDate();\n \tintCompletes = intCompletes +1;\n \tdb.execSQL(\"INSERT INTO results (ExerciseName,time,date) VALUES(\"+ \"'\" + dayName +\"'\" + \",\" \n \t\t\t+ \"'\" + content + \"'\" + \",\"+ \"'\" + strDate +\"'\"+ \")\");\n \tdb.execSQL(\"UPDATE Days SET LastDate= \"+ \"'\" + strDate + \"'\" + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.execSQL(\"UPDATE Days SET Completions= \"+ intCompletes + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.close();\n \tdialogShare();\n }", "public void onClickEditAppDetails(View view)\r\n {\r\n inflater = LayoutInflater.from(ManagerMode.this);\r\n popUpView = inflater.inflate(R.layout.edit_app_popup, null, false);\r\n\r\n final EditText app_in =(EditText) popUpView.findViewById(R.id.ManagerModePasswordInput);\r\n final EditText api_in =(EditText) popUpView.findViewById(R.id.apiVersionInput);\r\n final EditText os_in =(EditText) popUpView.findViewById(R.id.osInput);\r\n\r\n Button saveButton =(Button) popUpView.findViewById(R.id.btn_i_understand);\r\n\r\n SharedPreferences appVersion = view.getContext().getSharedPreferences(\"appVersion\", Context.MODE_PRIVATE);\r\n SharedPreferences apiVersion = view.getContext().getSharedPreferences(\"apiVersion\", Context.MODE_PRIVATE);\r\n SharedPreferences osVersion = view.getContext().getSharedPreferences(\"os\", Context.MODE_PRIVATE);\r\n\r\n final SharedPreferences.Editor appEditor = appVersion.edit();\r\n final SharedPreferences.Editor apiEditor = apiVersion.edit();\r\n final SharedPreferences.Editor osEditor = osVersion.edit();\r\n\r\n final Dialog dialog = new Dialog(view.getContext());\r\n\r\n dialog.setCanceledOnTouchOutside(true);\r\n\r\n saveButton.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n\r\n try{\r\n appEditor.putString(\"appVersion\", app_in.getText().toString());\r\n appEditor.apply();\r\n appEditor.commit();\r\n\r\n apiEditor.putString(\"apiVersion\", api_in.getText().toString());\r\n apiEditor.apply();\r\n apiEditor.commit();\r\n\r\n osEditor.putString(\"os\", os_in.getText().toString());\r\n osEditor.apply();\r\n osEditor.commit();\r\n\r\n Toast.makeText(ManagerMode.this, \"App Details Saved!\", Toast.LENGTH_SHORT).show();\r\n popUpView.setVisibility(View.GONE);\r\n dialog.dismiss();\r\n }\r\n catch(Exception e)\r\n {\r\n Toast.makeText(ManagerMode.this, \"Error: Details not saved!\", Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n });\r\n\r\n dialog.setContentView(popUpView);\r\n dialog.show();\r\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putString(\"NAME_KEY\", name.getText().toString());\n outState.putString(\"METHOD_KEY\", method.getText().toString());\n outState.putString(\"INGREGIENTS_KEY\", ingredients.getText().toString());\n outState.putString(\"DESCRIPTION_KEY\", description.getText().toString());\n outState.putString(\"CHEF_KEY\", chef.getText().toString());\n }", "public void updatePreferences() {\n\n Toast.makeText(this, \"enter your data\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(this, SipSettingsActivity.class));\n\n }", "public void ruleengine_saveSetting(View v){\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"ruleengine_fromsetting_rulesensorname\", sensorname);\n returnIntent.putExtra(\"ruleengine_fromsetting_rulesensorgenerateid\", ruleengine_rulesensorgenerateid);\n returnIntent.putExtra(\"ruleengine_fromsetting_value\", ruleengine_setting_edittext.getText().toString());\n returnIntent.putExtra(\"ruleengine_fromsetting_operator\", button.getText().toString());\n\n //returnIntent.putExtra(\"result\",result);\n setResult(Activity.RESULT_OK,returnIntent);\n finish();\n //---close the activity---\n finish();\n\n\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "private void saveInfoFields() {\n\n\t\tString name = ((EditText) getActivity().findViewById(R.id.profileTable_name))\n\t\t\t\t.getText().toString();\n\t\tint weight = Integer\n\t\t\t\t.parseInt(((EditText) getActivity().findViewById(R.id.profileTable_weight))\n\t\t\t\t\t\t.getText().toString());\n\t\tboolean isMale = ((RadioButton) getActivity().findViewById(R.id.profileTable_male))\n\t\t\t\t.isChecked();\n\t\tboolean smoker = ((CheckBox) getActivity().findViewById(R.id.profileTable_smoker))\n\t\t\t\t.isChecked();\n\t\tint drinker = (int) ((RatingBar) getActivity().findViewById(R.id.profileTable_drinker))\n\t\t\t\t.getRating();\n\n\t\tif (!name.equals(storageMan.PrefsName)) {\n\t\t\tstorageMan = new StorageMan(getActivity(), name);\n\t\t}\n\n\t\tstorageMan.saveProfile(new Profile(weight, drinker, smoker, isMale));\n\t\t\n\t\ttoast(\"pref saved\");\n\t}", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t setContentView(R.layout.set_layout);\n\t preferences = this.getApplicationContext().getSharedPreferences(\"configInfo\", Context.MODE_PRIVATE);\n\t editor = preferences.edit();\n\t\tButton save = (Button) findViewById(R.id.save);\n\t\tsave.setOnClickListener(new OnClickListener() {\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\t\n\t\t\t\t\n\t \teditor.putInt(\"button1\",getUnicode(((EditText)findViewById(R.id.up_edit)).getText().toString()));\n\t \teditor.putInt(\"button2\",getUnicode(((EditText)findViewById(R.id.left_edit)).getText().toString()));\n\t \teditor.putInt(\"button3\",getUnicode(((EditText)findViewById(R.id.right_edit)).getText().toString()));\n\t \teditor.putInt(\"button4\",getUnicode(((EditText)findViewById(R.id.down_edit)).getText().toString()));\n\t \teditor.putInt(\"buttonR1C1\",getUnicode(((EditText)findViewById(R.id.purple_edit)).getText().toString()));\n\t \teditor.putInt(\"buttonR1C2\",getUnicode(((EditText)findViewById(R.id.green_edit)).getText().toString()));\n\t \teditor.putInt(\"buttonR1C3\",getUnicode(((EditText)findViewById(R.id.orange_edit)).getText().toString()));\n\t \teditor.putInt(\"buttonR2C1\",getUnicode(((EditText)findViewById(R.id.red_edit)).getText().toString()));\n\t \teditor.putInt(\"buttonR2C2\",getUnicode(((EditText)findViewById(R.id.blue_edit)).getText().toString()));\n\t \teditor.putInt(\"buttonR2C3\",getUnicode(((EditText)findViewById(R.id.white_edit)).getText().toString()));\n\t \teditor.commit();\n\t \tToast.makeText(SetActivity.this, \"保存成功\", Toast.LENGTH_SHORT).show();\n\t \n\t\t\t}\n\t\t});\n\t\t\n\t\tButton cancel = (Button) findViewById(R.id.cancel);\n\t\tcancel.setOnClickListener(new OnClickListener() {\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\tdata.get(position).setTejia(viewHolder.et_tejia.getText().toString());\n\t\t\tsavemodel.SaveMod(data);\n\t\t}", "public void storeChoicePrefs(ResultDetail restaurant) {\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(restaurant);\n editor.putString(RESTAURANTS, json);\n //close the file\n editor.apply();\n }", "public void btnNextClicked(){\n\n fname = etFName.getText().toString();\n lname = etLName.getText().toString();\n country = spcountry.getSelectedItem().toString();\n description = etDescription.getText().toString();\n phone = etPhone.getText().toString();\n\n controller.setData(fname,lname,country,description,phone);\n\n controller.putStringData(this);\n\n /*editorPreferences.putString(\"First Name: \",user.getFirstName());\n editorPreferences.putString(\"Last Name: \",user.getLastName());\n editorPreferences.putString(\"Country : \",user.getCountry());\n editorPreferences.putString(\"Description : \",user.getDescription());\n editorPreferences.putString(\"Phone Number : \",user.getPhone());\n editorPreferences.apply();*/\n\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "private void savedeatils() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tgetFromDate = MainActivity.fromdate;\n\t\tgetToDate = MainActivity.todate;\n\t\tgetAddr = etGetAddr.getText().toString();\n\t\tgetPin = sGetPostal.getText().toString();\n\t\teGetTelNo = eGetPhone.getText().toString();\n\t\teGetFaxNO = eGetFax.getText().toString();\n\t\tetGetWeb = etGetWebSite.getText().toString();\n\t\teGetEmail = eGetEmailid.getText().toString();\t\n\t\tetPan = etPanNo.getText().toString();\n\t\tetMVATno = etMVATnum.getText().toString();\n\t\tetServiceTaxno = etServiceTaxnum.getText().toString();\n\t\tetRegNo = etRegNum.getText().toString();\n\t\tRegDate = btnRegDate.getText().toString();\n\t\tetFcraNo = etFcraNum.getText().toString();\n\t\tFcraDate = btnFcraDate.getText().toString();\n\t\t\n\t\torgparams = new Object[]{orgcode,getAddr,selectedCounrty,selectedStateName,selectedCityName,getPin, \n\t\t\t\t\t\teGetTelNo,eGetFaxNO,eGetEmail,etGetWeb,etMVATno,etServiceTaxno,etRegNo,RegDate,etFcraNo,FcraDate ,\n\t\t\t\t\t\tetPan};\n\t\t\t\t\n\t\tsave_edit = (String)org.updateOrg(orgparams, client_id);\n\t\t\n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\t\tbuilder.setMessage(\"Organisation \"+getOrgName+\" with details saved successfully\")\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\"Ok\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\tif(editDetailsflag==false){\n\t\t\t\t\t//To pass on the activity to the next page\n\t\t\t\t\tIntent intent = new Intent(context, menu.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tAlertDialog alert = builder.create();\n\t\t\t\talert.show();\n\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tString text_from_search = text_search.getText().toString();\n\t\tToast.makeText(SearchActivity.this,text_from_search,Toast.LENGTH_SHORT).show();\n\t\t\n\t\t\n\t\t\n//\t\tSharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n// pref.edit().putString(\"autoSave\", text_search.getText().toString()).commit();\n//\t\ttext_search=;\n\t}", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void saveData(){\n\n if(addFieldstoLift()) {\n Intent intent = new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }else{\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Invalid Entry\");\n builder.setMessage(\"Entry is invalid. If you continue your changes will not be saved\");\n builder.setPositiveButton(\"Continue\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n }", "public void save(View v,String name) {\n String question = \"Question:\" + mQuestionView.getText().toString();\n String choice1 = \"Choice1:\" + mButtonChoice1.getText().toString();\n String choice2 = \"Choice2:\" + mButtonChoice2.getText().toString();\n String choice3 = \"Choice3:\" + mButtonChoice3.getText().toString();\n String choice4 = \"Choice4:\" + mButtonChoice4.getText().toString();\n String correctAnswer = \"correct answer:\" +mAnswer;\n File file = new File(getFilesDir() + \"/\" + name); //path where it is save\n String lineSeparator = System.getProperty(\"line.separator\"); //new line\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file, true);\n fos = openFileOutput(name, MODE_APPEND);\n fos.write(question.getBytes());//display the questions\n fos.write(lineSeparator.getBytes());//creates a new line\n fos.write(choice1.getBytes());//display the choices\n fos.write(lineSeparator.getBytes());\n fos.write(choice2.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(choice3.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(choice4.getBytes());\n fos.write(lineSeparator.getBytes());\n fos.write(correctAnswer.getBytes());\n fos.write(lineSeparator.getBytes());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n outState.putStringArray(\"numbers\", getTime().replace(\":\", \"\").split(\"(?!^)\"));\n outState.putString(\"comment\", commentBox.getText().toString());\n super.onSaveInstanceState(outState);\n }", "public void save() {\n MainActivity.db.updateWord(this);\n }" ]
[ "0.77124345", "0.7641513", "0.7585918", "0.7319896", "0.7289851", "0.7251989", "0.7155215", "0.7134206", "0.7036023", "0.70094407", "0.7006081", "0.69781727", "0.69763297", "0.68712646", "0.6847733", "0.68448526", "0.67959654", "0.6771181", "0.67706186", "0.67460966", "0.67322737", "0.6731871", "0.6717186", "0.6689974", "0.66860604", "0.6660385", "0.6629883", "0.6613658", "0.66107935", "0.6606292", "0.65849936", "0.657804", "0.65566814", "0.6536494", "0.6534642", "0.64995605", "0.6496971", "0.64520353", "0.64258504", "0.63992774", "0.63980883", "0.6388293", "0.63854355", "0.637732", "0.6369094", "0.63474816", "0.6316316", "0.63065666", "0.63061774", "0.6253741", "0.6253484", "0.62335086", "0.62316304", "0.62264115", "0.62252015", "0.6222895", "0.62224483", "0.6221071", "0.6220407", "0.62190634", "0.6218918", "0.6202848", "0.6197003", "0.6178299", "0.6175645", "0.61691946", "0.61687374", "0.6163579", "0.61618567", "0.61610305", "0.6153839", "0.61441004", "0.61404246", "0.61308956", "0.6118867", "0.6110906", "0.61058396", "0.6099007", "0.60924876", "0.60896146", "0.60889304", "0.60851", "0.6074302", "0.60728085", "0.6066856", "0.60568464", "0.6055686", "0.6054455", "0.60395044", "0.60381526", "0.6037277", "0.6036566", "0.60349447", "0.60321665", "0.6029233", "0.6023004", "0.6014876", "0.60133934", "0.6013333", "0.60104185" ]
0.7427835
3
TODO Autogenerated method stub
public static void main(String[] args) { int num = 70; //type casting char ch = (char)num; System.out.println(ch); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Metodos getters e setters
private JDialogProcurarCliente getjDialogProcurarCliente() { if(jDialogProcurarCliente == null) { jDialogProcurarCliente = new JDialogProcurarCliente(null, false); } return jDialogProcurarCliente; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void get() {}", "static void setPropertiesFromGetters(TableEntity entity, ClientLogger logger) {\n Class<?> myClass = entity.getClass();\n\n // Do nothing if the entity is actually a `TableEntity` rather than a subclass\n if (myClass == TableEntity.class) {\n return;\n }\n\n for (Method m : myClass.getMethods()) {\n // Skip any non-getter methods\n if (m.getName().length() < 3\n || TABLE_ENTITY_METHODS.contains(m.getName())\n || (!m.getName().startsWith(\"get\") && !m.getName().startsWith(\"is\"))\n || m.getParameterTypes().length != 0\n || void.class.equals(m.getReturnType())) {\n continue;\n }\n\n // A method starting with `is` is only a getter if it returns a boolean\n if (m.getName().startsWith(\"is\") && m.getReturnType() != Boolean.class\n && m.getReturnType() != boolean.class) {\n continue;\n }\n\n // Remove the `get` or `is` prefix to get the name of the property\n int prefixLength = m.getName().startsWith(\"is\") ? 2 : 3;\n String propName = m.getName().substring(prefixLength);\n\n try {\n // Invoke the getter and store the value in the properties map\n entity.getProperties().put(propName, m.invoke(entity));\n } catch (ReflectiveOperationException | IllegalArgumentException e) {\n logger.logThrowableAsWarning(new ReflectiveOperationException(String.format(\n \"Failed to get property '%s' on type '%s'\", propName, myClass.getName()), e));\n }\n }\n }", "public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "private GetProperty(Builder builder) {\n super(builder);\n }", "public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "protected abstract Set method_1559();", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public Value restrictToGetterSetter() {\n checkNotPolymorphicOrUnknown();\n if (!isMaybePrimitive() && !isMaybeObjectOrSymbol())\n return this;\n Value r = new Value(this);\n r.flags &= ~PRIMITIVE;\n r.num = null;\n r.str = null;\n r.object_labels = null;\n r.excluded_strings = r.included_strings = null;\n return canonicalize(r);\n }", "public Value restrictToGetter() {\n checkNotPolymorphicOrUnknown();\n if (getters == null)\n return theNone;\n Value r = new Value();\n r.getters = getters;\n return canonicalize(r);\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public Punto getCentro() {\r\n\treturn centro;\r\n}", "protected T getManusia(){\r\n return Manusia;\r\n }", "public interface SaleRowDTOProperties {\n\n Vehicle.KapschVehicle getVehicle();\n\n void setVehicle(Vehicle.KapschVehicle vehicle);\n\n}", "@Test\n public void gettersAndSettersShouldWorkForEachProperty() {\n assertThat(AssignForceBatch.class, hasValidGettersAndSetters());\n }", "public void get() {\n }", "@FameProperty(name = \"accessors\", derived = true)\n public Collection<TWithAccesses> getAccessors() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "@Test\r\n\tpublic void gettersSettersTest() {\r\n\t\tItem item = new Item();\r\n\t\titem.setCount(NUMBER);\r\n\t\tassertEquals(item.getCount(), NUMBER);\r\n\t\titem.setDescription(\"word\");\r\n\t\tassertEquals(item.getDescription(), \"word\");\r\n\t\titem.setId(NUMBER);\r\n\t\tassertEquals(item.getId(), NUMBER);\r\n\t\titem.setName(\"word\");\r\n\t\tassertEquals(item.getName(), \"word\");\r\n\t\titem.setPicture(\"picture\");\r\n\t\tassertEquals(item.getPicture(), \"picture\");\r\n\t\titem.setPrice(FLOATNUMBER);\r\n\t\tassertEquals(item.getPrice(), FLOATNUMBER, 0);\r\n\t\titem.setType(\"word\");\r\n\t\tassertEquals(item.getType(), \"word\");\r\n\t\titem.setSellerId(NUMBER);\r\n\t\tassertEquals(item.getSellerId(), NUMBER);\r\n\t\titem.setDeleted(false);\r\n\t\tassertEquals(item.isDeleted(), false);\r\n\t\titem.setDeleted(true);\r\n\t\tassertEquals(item.isDeleted(), true);\t\t\r\n\t}", "public int getSet() {\n return set;\n }", "@Override\n String get();", "private ReadProperty()\r\n {\r\n\r\n }", "public void setNombre(String nombre) {this.nombre = nombre;}", "@Override\n protected void updateProperties() {\n }", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}", "private Get() {}", "private Get() {}", "@Mixin(EntityPlayerSP.class)\npublic interface AccessorEntityPlayerSP {\n\n @Accessor(\"handActive\")\n void gsSetHandActive(boolean value);\n\n}", "public abstract void set(M newValue);", "@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }", "private static void collectReadableProperties(Map<String, PojoProperty> map,\n Class<?> cls) {\n for (final Method m : cls.getDeclaredMethods()) {\n //if (isStaticOrPrivate(m)) continue;\n if (isStatic(m.getModifiers())) continue;\n if (1 != m.getParameterTypes().length)// get=0,set=1\n continue;\n Class<?> returnType = m.getReturnType();\n if (returnType == Object.class || returnType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n Class<?> propType = m.getParameterTypes()[0];\n if (returnType == Void.TYPE && propType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n\n String name = m.getName();\n String propName = null;\n String originalPropName = null;\n boolean isBool = false;\n if (name.startsWith(\"set\") && name.length() > 3) {\n originalPropName = name.substring(3);\n propName = decapitalize(originalPropName, true);\n if (propType == Boolean.TYPE) {\n isBool = true;\n }\n }\n if (propName == null) continue;\n\n String getMethodName = (isBool ? \"is\" : \"get\") + originalPropName;\n try {\n Field field;\n try {\n field = cls.getDeclaredField(propName);\n } catch (NoSuchFieldException e) {\n propName = decapitalize(originalPropName, false);\n field = cls.getDeclaredField(propName);\n }\n if (map.containsKey(propName))\n continue;\n\n m.setAccessible(true);\n Method getMethod;\n getMethod = cls.getDeclaredMethod(getMethodName);\n getMethod.setAccessible(true);\n\n PojoProperty rp = new PojoProperty(propName, propType);\n rp.setGetMethod(getMethod);\n rp.setSetMethod(m);\n rp.setField(field);\n map.put(propName, rp);\n } catch (NoSuchMethodException | NoSuchFieldException e) {\n //e.printStackTrace();\n logger.warn(String.format(\"实体方法:%s 或 字段:%s 不存在\", getMethodName, propName));\n }\n }\n\n for (final Field m : cls.getDeclaredFields()) {\n //if (isStaticOrPrivate(m)) continue;\n if(isStatic(m.getModifiers())) continue;\n String propName = m.getName();\n if (map.containsKey(propName)) continue;\n Class<?> returnType = m.getType();\n m.setAccessible(true);\n PojoProperty rp = new PojoProperty(propName, returnType);\n rp.setField(m);\n map.put(propName, rp);\n }\n }", "public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}", "@Override\npublic void setAttributes() {\n\t\n}", "public int getAge() {return age;}", "@Override\n Derived get();", "public abstract String get();", "public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}", "@Test\r\n public void testSetMicentro() {\r\n System.out.println(\"setMicentro\");\r\n CentroEcu_Observado micentro = new CentroEcu_Observado();\r\n micentro.setCiudad(\"Loja\");\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMicentro(micentro);\r\n assertEquals(instance.getMicentro().ciudad, \"Loja\");\r\n }", "public interface Meta {\r\n\r\n /**\r\n * Get the Type of the OSM object\r\n * \r\n * @return the Type\r\n */\r\n @NotNull\r\n default Type getType() {\r\n throw new IllegalArgumentException(\"getType is unsupported\");\r\n }\r\n\r\n /**\r\n * Get the OSM elements tags\r\n * \r\n * @return a Map of KV tupels\r\n */\r\n @Nullable\r\n default Map<String, String> getTags() {\r\n throw new IllegalArgumentException(\"getTags is unsupported\");\r\n }\r\n\r\n /**\r\n * Get the OSM display name\r\n * \r\n * @return the OSM display name\r\n */\r\n String getUser();\r\n\r\n /**\r\n * Get the OSM id of the object\r\n * \r\n * @return the OSM id of the object\r\n */\r\n long getId();\r\n\r\n /**\r\n * Get the version of the object\r\n * \r\n * @return the version of the object\r\n */\r\n long getVersion();\r\n\r\n /**\r\n * Get the changeset id for this object\r\n * \r\n * @return the changeset id for this object\r\n */\r\n long getChangeset();\r\n\r\n /**\r\n * Get the timestamp (when this version of the object was created)\r\n * \r\n * @return the timestamp in seconds since the Unic EPOCH\r\n */\r\n long getTimestamp();\r\n\r\n /**\r\n * Get the state of the object\r\n * \r\n * @return a State\r\n */\r\n @NotNull\r\n State getState();\r\n\r\n /**\r\n * If the object is a Way check if it is closed\r\n * \r\n * @return true if the way is closed\r\n */\r\n boolean isClosed();\r\n\r\n /**\r\n * If the object is a Way return the number of way nodes\r\n * \r\n * @return the number of way nodes\r\n */\r\n int getNodeCount();\r\n\r\n /**\r\n * If the object is a Node return the number of ways it is a member of\r\n * \r\n * @return the number of ways the Node is a member of\r\n */\r\n int getWayCount();\r\n\r\n /**\r\n * If the object is a Relation return the number of members it has\r\n * \r\n * If not implemented this returns -1 which should always evaluate to false\r\n * \r\n * @return the number of members the Relation has\r\n */\r\n default int getMemberCount() {\r\n return Range.UNINITALIZED;\r\n }\r\n\r\n /**\r\n * If the object is a Way and closed return the area it covers\r\n * \r\n * @return the area it covers in m^2\r\n */\r\n int getAreaSize();\r\n\r\n /**\r\n * If the object is a Way return its length\r\n * \r\n * @return the the length in m\r\n */\r\n int getWayLength();\r\n\r\n /**\r\n * Get any roles the element has in Relations\r\n * \r\n * @return a Collection containing the roles\r\n */\r\n @NotNull\r\n Collection<String> getRoles();\r\n\r\n /**\r\n * Check if the element is selected\r\n * \r\n * @return true if selected\r\n */\r\n boolean isSelected();\r\n\r\n /**\r\n * Check if a relation has a member with role\r\n * \r\n * @param role the role\r\n * @return true if there is a member with the role\r\n */\r\n boolean hasRole(@NotNull String role);\r\n\r\n /**\r\n * Get a preset from a path specification\r\n * \r\n * @param presetPath the path\r\n * @return an Object that should be a instance of a preset for the syste,\r\n */\r\n @Nullable\r\n Object getPreset(@NotNull String presetPath);\r\n\r\n /**\r\n * Check if the object matches with a preset or a preset group\r\n * \r\n * @param preset the path to the preset or group\r\n * @return true if the object matches\r\n */\r\n boolean matchesPreset(@NotNull Object preset);\r\n\r\n /**\r\n * Check if the element is incomplete (this is not defined in the documentation)\r\n * \r\n * @return true if incomplete\r\n */\r\n boolean isIncomplete();\r\n\r\n /**\r\n * Check if the element is in the current view\r\n * \r\n * @return true if in view\r\n */\r\n boolean isInview();\r\n\r\n /**\r\n * Check if the element and all member elements is in the current view\r\n * \r\n * @return true if in view\r\n */\r\n boolean isAllInview();\r\n\r\n /**\r\n * Check if the element is in the downloaded areas\r\n * \r\n * @return true if in view\r\n */\r\n boolean isInDownloadedArea();\r\n\r\n /**\r\n * Check if the element and all member elements is in the downloaded areas\r\n * \r\n * @return true if in view\r\n */\r\n boolean isAllInDownloadedArea();\r\n\r\n /**\r\n * Check if the current element is a child of an element\r\n * \r\n * @param type type of the element\r\n * @param element the meta interface to the element\r\n * @param parents a List of elements\r\n * @return true if element is a child\r\n */\r\n default boolean isChild(@NotNull Type type, @NotNull Meta element, @NotNull List<Object> parents) {\r\n return false;\r\n }\r\n\r\n /**\r\n * Check if the current element is a parent of an element\r\n * \r\n * @param type type of the element\r\n * @param meta the meta interface to the element\r\n * @param children a List of elements\r\n * @return true if element is a parent\r\n */\r\n default boolean isParent(@NotNull Type type, @NotNull Meta meta, @NotNull List<Object> children) {\r\n return false;\r\n }\r\n\r\n /**\r\n * Return a List of Elements that match the condition c\r\n * \r\n * This is necessary so that we can cache these results in the caller\r\n * \r\n * @param c the Condition\r\n * @return a List of elements\r\n */\r\n @NotNull\r\n default List<Object> getMatchingElements(@NotNull Condition c) {\r\n return new ArrayList<>();\r\n }\r\n \r\n /**\r\n * Get an Meta implementing object \r\n * \r\n * @param o imput object\r\n * @return returns something that implements this interface\r\n */\r\n @NotNull\r\n Meta wrap(Object o);\r\n}", "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "PropertyRealization createPropertyRealization();", "public Person getDoctor(){\n return doctor;\n }", "public Value restrictToSetter() {\n checkNotPolymorphicOrUnknown();\n if (setters == null)\n return theNone;\n Value r = new Value();\n r.setters = setters;\n return canonicalize(r);\n }", "public void setModified();", "private SetProperty(Builder builder) {\n super(builder);\n }", "public void setAge(int age) { this.age = age; }", "public int getTipoAtaque(){return tipoAtaque;}", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "public AbstractEstProxy(Est dto) {\n super(dto);\n\n // Setter arrays\n readObjectSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n }", "public int getAge(){\n return age;\n }", "@Test @DisplayName(\"Injector - setting (direct)\")\n void injectorSetters() throws Exception {\n val injector = injector(inj -> {\n inj.set(\"text\", \"some text\");\n inj.set(\"label\", \"a label\");\n inj.set(\"attrs\", Map.of(\"alpha\", \"one\"));\n });\n\n val injected = injector.inject(new OtherObject());\n assertEquals(\"some text\", injected.getText());\n assertEquals(\"a label\", injected.label);\n assertEquals(Map.of(\"alpha\", \"one\"), injected.getAttrs());\n }", "protected abstract MethodDescription accessorMethod();", "@Test\n\tpublic static void testGetters() {\n\t\tCompoundMadeOfElementDTO idk = new CompoundMadeOfElementDTO(1, 3, 20);\n\t\tassertEquals(1, idk.getCompoundID());\n\t\tassertEquals(3, idk.getElementID());\n\t\tassertEquals(20, idk.getElementQuantity());\n\t}", "public String get();", "private Map getSetters(Object object) {\n Map result = new HashMap();\n\n Method[] metodos = object.getClass().getMethods();\n String nombre = null;\n String propiedad = null;\n\n for (int i = 0; i < metodos.length; i++) {\n nombre = metodos[i].getName();\n\n //Sólo nos interesan los \"setters\", siguiendo la especificacion JavaBean\n if (nombre.startsWith(\"set\") && (nombre.length() > 3)) {\n //Quitamos el prefijo \"set\"\n propiedad = nombre.substring(3, nombre.length());\n\n //ponemos la primera letra en minuscula\n propiedad = Character.toLowerCase(propiedad.charAt(0)) +\n propiedad.substring(1, propiedad.length());\n\n //Añadimos el setter con el nombre de la propiedad como key\n result.put(propiedad, metodos[i]);\n }\n }\n\n return result;\n }", "@Test\r\n public void testGetterMethodSucess() throws Exception {\r\n Method m = GetterMethod.getGetter(Tumor.class, \"tumorId\");\r\n assertNotNull(m);\r\n assertEquals(\"getTumorId\", m.getName());\r\n }", "public Method getGetter() {\n return this.getter;\n }", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "public abstract Object getCustomData();", "public interface BatchEventStatusModel\r\n{\r\n\t/**\r\n\t * @return Current value of the property <em>operation</em>.\r\n\t */\r\n\tpublic String getOperation();\r\n\r\n\t/**\r\n\t * @param operation\r\n\t * New value of the property <em>operation</em>.\r\n\t */\r\n\tpublic void setOperation(String operation);\r\n\r\n\t/**\r\n\t * @return Current value of the property <em>count</em>.\r\n\t */\r\n\tpublic Integer getCount();\r\n\r\n\t/**\r\n\t * @param count\r\n\t * New value of the property <em>count</em>.\r\n\t */\r\n\tpublic void setCount(Integer count);\r\n}", "@Test\n\tpublic void testGettersAndSetters() {\n\t\tnew BeanTester().testBean(LeastCommonNodeInput.class, configuration);\n\n\t}", "public interface SmooksTransformModel extends TransformModel {\n\n /** The \"smooks\" name. */\n public static final String SMOOKS = \"smooks\";\n\n /** The \"config\" name. */\n public static final String CONFIG = \"config\";\n \n /** The \"type\" name. */\n public static final String TYPE = \"type\";\n\n /** The \"reportPath\" name. */\n public static final String REPORT_PATH = \"reportPath\";\n \n /**\n * Gets the type attribute.\n * @return the type attribute\n */\n public String getTransformType();\n\n /**\n * Sets the type attribute.\n * @param type the type attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setTransformType(String type);\n\n /**\n * Gets the config attribute.\n * @return the config attribute\n */\n public String getConfig();\n\n\n /**\n * Sets the config attribute.\n * @param config the config attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setConfig(String config);\n\n /**\n * Gets the reportPath attribute.\n * @return the reportPath attribute\n */\n public String getReportPath();\n\n /**\n * Sets the reportPath attribute.\n * @param reportPath the reportPath attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setReportPath(String reportPath);\n\n}", "public V get() {\n return value;\n }", "public interface Currency extends Model {\n String getCode();\n void setCode(String strCode);\n String getCurrencyName();\n void setCurrenyName(String strCurrencyName);\n String getCurrencySymbol();\n void setCurrencySymbol(String strCurrencySymbol);\n String getIsDefault();\n void setIsDefault(String strIsDefault);\n double getCurrencyRate();\n void setCurrencyRate(double dCurrencyRate);\n}", "public void testGetterAndSetter() {\n UDDIOperationInput uddiOperationInput = new UDDIOperationInput();\n\n //Test Get and Set ElementType\n QName qName = new QName(UDDI_NS_URI, \"input\");\n assertNotNull(\"getElementType was null\",\n uddiOperationInput.getElementType());\n assertTrue(\"getElementType was incorrect\",\n uddiOperationInput.getElementType().equals(qName));\n\n //Test Get and Set Required\n uddiOperationInput.setRequired(isRequired);\n assertFalse(\"getRequired returned true\",\n uddiOperationInput.getRequired());\n isRequired = true;\n uddiOperationInput.setRequired(isRequired);\n assertTrue(\"getRequired returned false\",\n uddiOperationInput.getRequired());\n\n //Test Get and Set BusinessName\n uddiOperationInput.setBusinessName(businessName);\n assertTrue(\"getBusinessName incorrect\",\n uddiOperationInput.getBusinessName().equals(businessName));\n\n //Test Get and Set ServiceName\n uddiOperationInput.setServiceName(serviceName);\n assertTrue(\"getServiceName incorrect\",\n uddiOperationInput.getServiceName().equals(serviceName));\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public Property getProperty() {\n\treturn commonproperty;\r\n}", "public interface Timestampable {\r\n \r\n /**\r\n * Property which represents createdDate.\r\n */\r\n static final String PROP_CREATED_DATE = \"createdDate\";\r\n \r\n /**\r\n * Property which represents modifiedDate.\r\n */\r\n static final String PROP_MODIFIED_DATE = \"modifiedDate\";\r\n \r\n\r\n \r\n Date getCreatedDate();\r\n \r\n void setCreatedDate(Date createdDate);\r\n \r\n Date getModifiedDate();\r\n \r\n void setModifiedDate(Date modifiedDate);\r\n\r\n}", "public void setPrice(double price){this.price=price;}", "public interface IModelTamanho {\r\n\t\r\n\tpublic void setCodigo(String cCodigo);\r\n\tpublic void setDescricao(String cDescricao);\r\n\tpublic void setPeso(double nPeso);\r\n\tpublic void setAltura(double nAltura);\r\n\tpublic void setLargura (double nLargura);\r\n\tpublic void setComprimento (double nComprimento);\r\n\tpublic String getCodigo();\r\n\tpublic String getDescricao();\r\n\tpublic double getPeso();\r\n\tpublic double getAltura();\r\n\tpublic double getLargura();\r\n\tpublic double getComprimento();\r\n\tpublic String toString();\r\n\t\r\n}", "public void setTelefono(String telefono) {\r\n\tthis.telefono = telefono;\r\n}", "@JsonGetter(\"price_money\")\r\n public Money getPriceMoney() {\r\n return priceMoney;\r\n }", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "public abstract M getValue();", "public void setDataGetter(Object instance, Method method) {\n this.instance = instance;\n this.method = method;\n }", "public Value joinGettersSetters(Value v) {\n if (getters != null || setters != null)\n throw new AnalysisException(\"Value already has getters/setters\");\n Value r = new Value(this);\n r.getters = v.getters;\n r.setters = v.setters;\n return canonicalize(r);\n }", "String attributeToGetter(String name);", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public int getArmadura(){return armadura;}", "public String getTelefono() {\r\n\treturn telefono;\r\n}", "public T set(T obj);", "@Test\n\tpublic static void testConstructorAndGetters() {\n\t\tMetalDTO m = new MetalDTO(1, 2, 3, 4.0, \"Name\", 3.7, 8.4);\n\t\tassertEquals(m.getAtomicMass(), 4.0, 0.01);\n\t\tassertEquals(m.getAtomicNumber(), 2);\n\t\tassertEquals(m.getDissolvedBy(), 3);\n\t\tassertEquals(m.getID(), 1);\n\t\tassertEquals(m.getName(), \"Name\");\n\t\tassertEquals(m.getMoles(), 3.7, 0.01);\n\t\tassertEquals(m.getMolesOfAcidToDissolve(), 8.4, 0.01);\n\t}", "@Test\r\n public void testSetMiservicio() {\r\n System.out.println(\"setMiservicio\");\r\n Servicio miservicio = new Servicio();\r\n miservicio.descripcion=\"gestion de vigilancia\";\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMiservicio(miservicio);\r\n assertEquals(instance.getMiservicio().descripcion, \"gestion de vigilancia\");\r\n }", "public Movie getMovie() { return movie; }", "@JsonProperty(\"etc\")\n @Valid\n public Date getEtc() {\n return etc;\n }", "public abstract IAccessor getAccessor(IContext context);", "public interface DataAccessor {\n}", "public String getSetter() {\n return \"set\" + getCapName();\n }", "Object getOtherprops();", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public interface PropertiesModel {\n\n /**\n * Clears all defined properties from this model, but does not modify the set of observers.\n */\n void clear();\n\n /**\n * Adds a new {@link Property} to this model.\n * <p>\n * All properties must have case insensitive unique names and aliases. If a property with the same name (or names)\n * exists, it will be replaced by this property.\n *\n * @param property The property to be added.\n */\n void add(Property property);\n\n /**\n * Sets the value bound to the identified property without notifying observers that the value has been changed. This\n * method is intended to handle cases where setting a value could cause a cycle in the notification chain or\n * otherwise produce unintended side effects.\n * <p>\n * In most situations, {@link #set(ExecutionContext, String, Value)} is more appropriate.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property\n * @param propertyValue The value to set the property to.\n * @throws HtUncheckedSemanticException Thrown if no such property exists.\n */\n void setQuietly(ExecutionContext context, String propertyName, Value propertyValue);\n\n /**\n * Sets the value bound to the identified property. This method is intended for WyldCard-internal (i.e., not\n * scripted) access to properties.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property\n * @param propertyValue The value to set the property to.\n * @throws HtUncheckedSemanticException Thrown if no such property exists.\n */\n void set(ExecutionContext context, String propertyName, Value propertyValue);\n\n /**\n * Attempts to set the value bound to the identified property, throwing an {@link HtException} when the value cannot\n * by set, either because it doesn't exist, it isn't writable, or an error occurred writing it. This method is\n * intended for use by script/programmatic-access to property values.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property to be set\n * @param propertyValue The value to be written into the property\n * @throws HtException Thrown if the property doesn't exist, cannot be written, or an error occurs writing to it.\n */\n void trySet(ExecutionContext context, String propertyName, Value propertyValue) throws HtException;\n\n /**\n * Gets the value bound to the identified property. This method is intended for WyldCard-internal (i.e., not\n * scripted) access to properties.\n *\n * @param context The execution context\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return The value bound to the property\n * @throws IllegalStateException Thrown if an error occurs while evaluating the property.\n * @throws IllegalArgumentException Thrown if the property does not exist.\n */\n Value get(ExecutionContext context, String propertyName);\n\n /**\n * Attempts to get the value bound to the identified property, throwing an {@link HtException} when the value\n * cannot be retrieved. This method is intended for use by script/programmatic-access to property values.\n *\n * @param context The execution context.\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return The value bound to this property.\n * @throws HtException Thrown if the property cannot be retreived, perhaps because it doesn't exist or an error\n * occurred while trying to evaluate it.\n */\n Value tryGet(ExecutionContext context, String propertyName) throws HtException;\n\n /**\n * Returns the property identified by the given name, or null, if no such property exists.\n *\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return The identified property, or null if it doesn't exist.\n */\n Property findProperty(String propertyName);\n\n /**\n * Determines if a property identified by a given name exists.\n *\n * @param propertyName The case insensitive name of the property (or one of its aliases).\n * @return True if the property exists, false otherwise.\n */\n boolean hasProperty(String propertyName);\n\n /**\n * Adds an observer of property value changes. Note that observers are always notified of property changes on the\n * Swing dispatch thread.\n *\n * @param observer The observer\n */\n void addPropertyChangedObserver(PropertyChangeObserver observer);\n\n /**\n * Adds an observer of property value changes and immediately fires the\n * {@link PropertyChangeObserver#onPropertyChanged(ExecutionContext, PropertiesModel, String, Value, Value)} method\n * for each property defined in the model.\n * <p>\n * This is a convenience method to use instead of {@link #addPropertyChangedObserver(PropertyChangeObserver)}\n * followed immediately by {@link #notifyPropertyChangedObserver(ExecutionContext, PropertyChangeObserver, boolean)}.\n *\n * @param context The execution context\n * @param observer The property change observer.\n */\n void addPropertyChangedObserverAndNotify(ExecutionContext context, PropertyChangeObserver observer);\n\n /**\n * Invokes the {@link PropertyChangeObserver#onPropertyChanged(ExecutionContext, PropertiesModel, String, Value, Value)} method for\n * all properties on the provided observer. Useful for listeners that wish to initialize themselves with the current\n * state of the model.\n *\n * @param context The execution context.\n * @param observer This listener to be notified; does not have to be an active listener of this model.\n * @param includeComputedGetters When false, do not notify computed/synthesized properties\n */\n void notifyPropertyChangedObserver(ExecutionContext context, PropertyChangeObserver observer, boolean includeComputedGetters);\n\n /**\n * Removes an observer of property value changes; this listener will not be notified of future changes.\n *\n * @param observer The property change observer\n */\n void removePropertyChangedObserver(PropertyChangeObserver observer);\n}", "public interface IGQLDynamicAttributeGetterSetter<ENTITY_TYPE, GETTER_ATTRIBUTE_TYPE, SETTER_ATTRIBUTE_TYPE>\n\t\textends\n\t\t\tIGQLDynamicAttributeGetter<ENTITY_TYPE, GETTER_ATTRIBUTE_TYPE>,\n\t\t\tIGQLDynamicAttributeSetter<ENTITY_TYPE, SETTER_ATTRIBUTE_TYPE> {\n\n}", "default <T> T setAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) continue;\n\n try {\n set(field.getName(), field.get(object));\n } catch (IllegalAccessException e) {\n //hopefully we will be fine\n e.printStackTrace();\n }\n }\n\n return object;\n }", "public interface Property {\n\n\t/**\n\t * Returns the name of the property.\n\t * @return property name\n */\n\tString getName();\n\n\t/**\n\t * Returns the cost to buy the property if it is unowned.\n\t * @return cost in dollars\n */\n\tint getCost();\n\n\t/**\n\t * Returns true if the property is mortgaged.\n\t * @return true if mortgaged\n */\n\tboolean getMortgaged();\n\n\t/**\n\t * Controls whether the property is mortgaged or not.\n\t * @param mortgaged whether or not the property is mortgaged\n */\n\tvoid setMortgaged(boolean mortgaged);\n\n\t/**\n\t * Returns the mortgage rate of the property.\n\t * @return mortgage rate in dollars\n */\n\tint getMortgageRate();\n\n\t/**\n\t * Returns the rent the given player should pay.\n\t * @param owner player that owns the property\n\t * @param tenantDiceRoll the roll the tenant made to get to this space\n\t * @return rent cost in dollars\n */\n\tint getRent(Player owner, int tenantDiceRoll);\n\n}", "public Age getAge() {\n return age;\n }", "public Value restrictToNotGetterSetter() {\n checkNotUnknown();\n if (getters == null && setters == null)\n return this;\n Value r = new Value(this);\n r.getters = r.setters = null;\n return canonicalize(r);\n }", "public interface IBodyMods {\n\n\n /**\n * Return the value associated with the column: body.\n *\n * @return A Body object (this.body)\n */\n Body getBody();\n\n\n /**\n * Set the value related to the column: body.\n *\n * @param body the body value you wish to set\n */\n void setBody(final Body body);\n\n /**\n * Return the value associated with the column: bodyModType.\n *\n * @return A Bodymodtype object (this.bodyModType)\n */\n Bodymodtype getBodyModType();\n\n\n /**\n * Set the value related to the column: bodyModType.\n *\n * @param bodyModType the bodyModType value you wish to set\n */\n void setBodyModType(final Bodymodtype bodyModType);\n\n /**\n * Return the value associated with the column: id.\n *\n * @return A Integer object (this.id)\n */\n Integer getId();\n\n\n /**\n * Set the value related to the column: id.\n *\n * @param id the id value you wish to set\n */\n void setId(final Integer id);\n\n // end of interface\n}", "public String getNombre(){\n return nombre;\n }", "public interface Getter<T>\n{\n /**\n * Returns the data.\n * \n * @return data\n */\n public T get();\n}", "public interface Property {\n /**\n * @return Type of the property.\n */\n PropertyType getPropertyType();\n\n /**\n * Gets propertyInfo of this property.\n *\n * @return PropertyInfo or null, if the property is not part of any model; and thus it has no info associated\n */\n PropertyInfo getPropertyInfo();\n\n /**\n * Casts the property value safely, possibly to more specific type.\n *\n * @param <T> expected type of a value (must be same type or supertype of the type defined in the propertyInfo of this property)\n * @param clazz clazz which represents type of a property value\n * @return property value\n * @throws UnsupportedPropertyException if this property represents another than requested, thus it is not possible to cast property\n * to the requested type.\n */\n <T extends Property> T cast(Class<T> clazz) throws UnsupportedPropertyException;\n\n void setPropertyInfo(PropertyInfo propertyInfo);\n\n /**\n * Gets Model which owns this property.\n *\n * @return Model which owns this property or null, if the preperty is not part of any model; and thus it has no model associated.\n */\n Model getModel();\n\n /**\n * Sets a model which owns this property.\n *\n * @param model model which owns this property.\n */\n void setModel(Model model);\n\n /**\n * This method performs validation of this property and determines if property is valid.\n *\n * @return true if and only if the content of a property is valid.\n */\n boolean isValid();\n\n /**\n * This method performs validation of this property and in case that property is invalid it returns error\n * description.\n *\n * @return validation error object or null if this property is valid.\n */\n ValidationError getValidationError();\n\n /**\n * Adds a listener for this property.\n *\n * @param listener listener of the property.\n */\n void addPropertyListener(PropertyListener listener);\n\n /**\n * Removes a listener for this property.\n *\n * @param listener listener to be removed\n */\n void removePropertyListener(PropertyListener listener);\n}", "public interface Poulet {\n /*DEFINIT le nombre de like effectué par ce poulet */\n public void setnombreLike(int nombre_like);\n\n /*DEFINIT le nombre de match de ce poulet */\n public void setnombreMatch(int nombre_match);\n\n}" ]
[ "0.6148816", "0.6116435", "0.6104058", "0.6040833", "0.6037541", "0.5927346", "0.5846738", "0.5842899", "0.5842899", "0.5826831", "0.5821938", "0.5821374", "0.58112055", "0.58045155", "0.5797861", "0.57684374", "0.5737721", "0.5734181", "0.57295537", "0.5679865", "0.566", "0.5656359", "0.5649998", "0.56427276", "0.5617623", "0.5612085", "0.5612085", "0.56102103", "0.5607236", "0.56040794", "0.55784297", "0.5575764", "0.5563134", "0.5559447", "0.5559433", "0.55592334", "0.5558991", "0.5533429", "0.55294156", "0.55235493", "0.55096096", "0.549892", "0.54960465", "0.54871315", "0.5481501", "0.5480805", "0.54778665", "0.5476153", "0.54744154", "0.54709965", "0.54653263", "0.54474956", "0.54459995", "0.5445973", "0.5444268", "0.54437834", "0.5438417", "0.5437304", "0.5434551", "0.54304403", "0.542998", "0.5427329", "0.5424517", "0.54210746", "0.5414044", "0.5408124", "0.5406122", "0.5403434", "0.53968465", "0.53925765", "0.539208", "0.53898597", "0.5389645", "0.5378928", "0.5372259", "0.5367236", "0.5362186", "0.5349657", "0.5348592", "0.5346986", "0.53466064", "0.5346504", "0.53451204", "0.5344299", "0.5339381", "0.5338688", "0.5334709", "0.5328403", "0.53167474", "0.53166753", "0.53146636", "0.5314272", "0.5313674", "0.5313079", "0.5312782", "0.5306164", "0.5305651", "0.5305125", "0.5303489", "0.53021973", "0.5302096" ]
0.0
-1
Loads the main menu scene
@Override public void start(Stage primaryStage) { try { Parent root = FXMLLoader.load(getClass().getResource("scenes/main_menu.fxml")); primaryStage.setTitle("Führerschein Theorieprüfung"); primaryStage.setScene(new Scene(root)); primaryStage.setResizable(false); primaryStage.show(); new FadeIn(root).play(); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mainMenu() {\n Game.stage.setScene(mainMenuScene);\n Game.stage.show();\n }", "@FXML\n private void loadMainMenu() throws IOException {\n Parent parent = FXMLLoader.load(getClass().getResource(MAIN_MENU_FXML));\n Stage mainStage = StageInitializer.parentStage;\n mainStage.getScene().setRoot(parent);\n }", "public void loadMainMenuView()\n\t{\n\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Onitama\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/MainMenu.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tMainMenuViewController viewController = (MainMenuViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\t\t\t\n\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@FXML\n protected void handleMenuButtonAction(ActionEvent event) {\n SceneLoader.loadScene(\"/mainScreen.fxml\");\n }", "public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }", "public void mainMenu(ActionEvent e) throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/FXML/SelectGameFXML.fxml\"));\n Parent root = loader.load();\n gameroot.getScene().setRoot(root);\n }", "private void loadMenu() {\n theView.getGamePanel().removeAll();\n Menu menu = new Menu(theView);\n menu.revalidate();\n menu.repaint();\n theView.getGamePanel().add(menu);\n menu.requestFocusInWindow();\n theView.setVisible(true);\n }", "public static void loadMainMenu()\n\t{\n\t\tinSubMenu = false;\n\t\t\n\t\tframe.getContentPane().remove(newGamePanel);\n\t\t\n\t\tmainLabel.setVisible(true);\n\t\t\n\t\tframe.getContentPane().add(mainPanel);\n\t\tframe.getContentPane().repaint();\n\t\tframe.setVisible(true);\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception {\n\n // set up window.\n primaryStage.setWidth(600);\n primaryStage.setHeight(400);\n primaryStage.setResizable(false);\n\n // set up scenes.\n FXMLLoader mainMenuLoader = new FXMLLoader(getClass().getResource(\"FXML/mainMenuLayout.fxml\"));\n Scene mainMenuScene = new Scene(mainMenuLoader.load());\n FXMLLoader gameLoader = new FXMLLoader(getClass().getResource(\"FXML/gameLayout.fxml\"));\n Scene gameScene = new Scene(gameLoader.load());\n\n // set the main menu to load into the game.\n MainMenuController mainMenuController = (MainMenuController) mainMenuLoader.getController();\n mainMenuController.setGameScene(gameScene);\n\n primaryStage.setScene(mainMenuScene);\n\n primaryStage.show();\n\n }", "public Scene getMainMenuScene() {\n return scene;\n }", "@Override\n public void start(Stage primaryStage) throws Exception\n {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/main/mainMenu.fxml\"));\n Pane root = loader.load();\n\n MainMenuController controller = loader.getController();\n controller.start(primaryStage);\n\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.setTitle(\"RU Cafe: Main Menu\");\n primaryStage.setResizable(false);\n primaryStage.show();\n }", "private void loadMainAdminScene(javafx.event.ActionEvent event) throws Exception {\n stageManager.switchScene(FxmlView.ADMIN);\n }", "private Scene createMainMenuScene() {\n VBox root = new VBox();\n root.setId(\"pane\");\n root.setAlignment(Pos.CENTER);\n root.setSpacing(BUTTON_DISTANCE);\n\n Label lTitle = new Label(\"2048 Fx\");\n lTitle.setId(\"title-label\");\n root.getChildren().add(lTitle);\n\n Button bNewGame = new Button(\"New game\");\n bNewGame.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n Game.board.init();\n }\n });\n bNewGame.setId(\"c16\");\n root.getChildren().add(bNewGame);\n\n Button bLoadGame = new Button(\"Load game\");\n bLoadGame.setId(\"c256\");\n bLoadGame.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Load saving\");\n File directory = new File(\"./savegames\");\n if (!directory.exists()) {\n directory = new File(\"./\");\n }\n fileChooser.setInitialDirectory(directory);\n FileChooser.ExtensionFilter extFilter =\n new FileChooser.ExtensionFilter(\"Saved 2048 games\", \"*.saving\");\n fileChooser.getExtensionFilters().add(extFilter);\n File file = fileChooser.showOpenDialog(Game.stage);\n if (file != null) {\n Game.board.replay(file);\n }\n }\n });\n root.getChildren().add(bLoadGame);\n\n Button bSettings = new Button(\"Settings\");\n bSettings.setId(\"c4096\");\n bSettings.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n settingsMenu();\n }\n });\n root.getChildren().add(bSettings);\n\n Button bGenerate = new Button(\"Also\");\n bGenerate.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n\tGame.statBoard.statMenu();\n }\n });\n bGenerate.setId(\"c1024\");\n root.getChildren().add(bGenerate);\n\n Button bQuit = new Button(\"Quit\");\n bQuit.setId(\"c65536\");\n bQuit.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n FileHandler.saveSettings(Game.settings);\n Game.stage.close();\n }\n });\n root.getChildren().add(bQuit);\n Scene menuScene = new Scene(root, Game.WINDOW_SIZE_X, Game.WINDOW_SIZE_Y);\n menuScene.getStylesheets().\n addAll(this.getClass().getResource(\"menu.css\").toExternalForm());\n return menuScene;\n }", "public void backToMainMenu() throws IOException {\n logLoadGame.log(Level.INFO, \"Switching Scene to Main Menu\");\n Parent mainMenu = FXMLLoader.load(getClass().getResource(\"/Gui_View/fxmlFiles/MainMenu.fxml\"));\n Main.primaryStage.setScene(new Scene(mainMenu));\n Main.primaryStage.show();\n }", "@FXML\n private void loadMainScreen(ActionEvent event) {\n\t\tSystem.out.println(\"loading MainScreen \" + getClass().getResource(RESOURCE_PATH + \"MainScreen.fxml\"));\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(RESOURCE_PATH + \"MainScreen.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tscene.getStylesheets().add(getClass().getResource(RESOURCE_PATH + \"application.css\").toExternalForm());\n\t\t\tStage window = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t \n\t window.setScene(scene);\n\t window.show();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadGameView() {\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Spiel Laden\");\n\t\t\tBorderPane root = new BorderPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/LoadGame.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tLoadGameViewController loadGameViewController = (LoadGameViewController) loader.getController();\n\t\t\tloadGameViewController.setOnitamaController(onitamaController);\n\t\t\tloadGameViewController.init();\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void goToMainScene() {\n\n scenesSeen.clear();\n this.window.setScene(firstScene.createAndReturnScene());\n scenesSeen.add(firstScene);\n }", "@FXML\n void returnMainMenu(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/MainMenu.fxml\"));\n loader.load();\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n }", "private void createMenuChildScene() {\n\t\tmenuChildScene = new MenuScene(camera);\n\t\tmenuChildScene.setPosition(0, 0);\n\n\t\tfinal IMenuItem profile02MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE02,\n\t\t\t\t\t\tresourcesManager.btProfile02TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile24MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE24,\n\t\t\t\t\t\tresourcesManager.btProfile24TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile4MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE4,\n\t\t\t\t\t\tresourcesManager.btProfile4TR, vbom), 1f, .8f);\n\n\t\tmenuChildScene.addMenuItem(profile02MenuItem);\n\t\tmenuChildScene.addMenuItem(profile24MenuItem);\n\t\tmenuChildScene.addMenuItem(profile4MenuItem);\n\n\t\tmenuChildScene.buildAnimations();\n\t\tmenuChildScene.setBackgroundEnabled(false);\n\n\t\tprofile02MenuItem.setPosition(150, 280);\n\t\tprofile24MenuItem.setPosition(400, 280);\n\t\tprofile4MenuItem.setPosition(650, 280);\n\n\t\tmenuChildScene.setOnMenuItemClickListener(this);\n\t\t\n\t\t//-- change language button -----------------------------------------------------------------------------\n\t\t\n\t\tchangLang = new TiledSprite(400,60, resourcesManager.btLangTR, vbom){\n\t\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\tswitch(pSceneTouchEvent.getAction()){\n\t\t\tcase TouchEvent.ACTION_DOWN:\n\t\t\t\tbreak;\n\t\t\tcase TouchEvent.ACTION_UP:\n\t\t\t\tplaySelectSound();\n\t\t\t\tif(localLanguage==0){\n\t\t\t\t\tchangeLanguage(\"UK\");\n\t\t\t\t\tthis.setCurrentTileIndex(1);\n\t\t\t\t\tlocalLanguage=1;\n\t\t\t\t}else if (localLanguage==1) {\n\t\t\t\t\tchangeLanguage(\"FR\");\n\t\t\t\t\tthis.setCurrentTileIndex(0);\n\t\t\t\t\tlocalLanguage=0;\n\t\t\t\t}\n\t\t\t\tupdateTexts();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tif(localLanguage==0){\t\t\t\n\t\t\tchangLang.setCurrentTileIndex(0);\n\t\t}else{\t\t\n\t\t\tchangLang.setCurrentTileIndex(1);\n\t\t}\n\t\t\n\t\tthis.attachChild(changLang);\n\t\tthis.registerTouchArea(changLang);\n\t\t//-----------------------------------------------------------------------------------------------------\n\n\n\t\tsetChildScene(menuChildScene);\n\t}", "@FXML protected void MainMenuButtonClicked(ActionEvent event) {\n this.mainMenuCB.launchMainMenu();\r\n }", "public void goToMainMenuReservations() throws IOException {\n ApplicationDisplay.changeScene(\"/MainMenuReservations.fxml\");\n }", "public void Load() {\n\t\tsceneLoaded = false;\n\n\t\tfor (int i = 0 ; i < gameObjects.size();i++) {\n\t\t\tGameObject gO = gameObjects.get(i);\n\t\t\tEngine.Instance.AddObject(gO);\n\n\t\t}\n\t\tEngine.Instance.currentScenes.add(this);\n\t\tsceneLoaded = true;\n\t}", "private void loadScene() throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"CurriculumDisplaySE.fxml\"));\n loader.setController(this);\n Parent root = loader.load();\n scene = new Scene(root);\n }", "@FXML\r\n void returnToMainMenu(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"MainMenu\", \"MainMenu\");\r\n }", "public void gotoMenu() {\n try {\n MenuClienteController menu = (MenuClienteController) replaceSceneContent(\"MenuCliente.fxml\");\n menu.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@FXML\n private void menu(){\n\n // Runs mid menu\n MidGameMenu.menuMethod();\n\n Main.gang.setMoving(false);\n Main.main.getMenuWindow().showAndWait();\n }", "public void loadContent()\r\n\t{\r\n\t\t// Load the current scene's content.\r\n\t\tif (_CurrentScene != null)\r\n\t\t{\r\n\t\t\t_CurrentScene.loadContent();\r\n\t\t}\r\n\t}", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "@FXML\n private void showMenu(){\n Main.setPane(0);\n }", "@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"app_layout.fxml\"));\n\t\tVBox rootNode = loader.load();\n\n\t\tScene scene = new Scene(rootNode);\n \n Pane menuPane= (Pane) rootNode.getChildren().get(0);\n\t\tmenuPane.getChildren().add(createMenubar());\n\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.setTitle(\"Temperature Convertor\");\n\t\t//primaryStage.setResizable(false); to make sure application is not resizable\n\t\tprimaryStage.show();\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception{\n\n Music.playBackGroundMusic();\n\n try {\n SpellingListData.getInstance();\n _revisionData.loadFailed();\n _overallStats.loadStats();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n _primaryStage = primaryStage;\n\n Parent root = FXMLLoader.load(getClass().getResource(\"MainMenuV2.fxml\"));\n primaryStage.setTitle(\"VOXSPELL\");\n primaryStage.setScene(new Scene(root, 1200, 800));\n primaryStage.setResizable(false);\n primaryStage.show();\n\n\n }", "public void loadNewGameView()\n\t{\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Neues Spiel\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/NewGame.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tNewGameViewController viewController = (NewGameViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void openMainMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new MainMenu(), true);\r\n\t}", "protected void loadScene(\r\n ) {\r\n // Remove the old scene as needed\r\n \tif ( mLastScene != null ) {\r\n \t\tif ( mPhysicsState != null ) {\r\n \t\t\tmPhysicsState.getPhysicsSpace().removeAll( mLastScene );\r\n \t\t}\r\n \t\trootNode.detachChild( mLastScene );\r\n \t\tmLastScene = null;\r\n \t\t\r\n \t\tif ( !mPostText.isEmpty() ) mPostText.pop();\r\n \t}\r\n \tString sceneName = mSceneList.get( mSceneIndex );\r\n \tif ( sceneName != null ) synchronized( this ) {\r\n \t\tif ( mLoadingScene == null ) {\r\n \t\t\tmLoadingScene = sceneName;\r\n \t\t\tCSGTestDriver.postText( this, mTextDisplay, \"** LOADING ==> \" + mLoadingScene, false );\r\n \t\t\tthis.notifyAll();\r\n \t\t}\r\n \t} else {\r\n \t\tCSGTestDriver.postText( this, mTextDisplay, mNullSceneMsg, true );\r\n \t}\r\n }", "@FXML\n private void initialize() {\n \tassert getMainMenu() != null : \"fx:id=\\\"mainMenu\\\" was not injected: check your FXML file 'RootLayout.fxml'.\";\n \tmessages = Messages.getMessages();\n \tMenu settingsMenu = new Menu(messages.getString(\"menu_settings\"));\n \tMenu menuLanguage = new Menu(messages.getString(\"menu_language\"));\n \t\n \tfinal ToggleGroup groupLanguage = new ToggleGroup();\n \tfinal Entry<String, Locale>[] languages = new Entry [] {\n \t\t\tnew SimpleEntry<String, Locale>(\"English\", Messages.enLocale),\n \t\t\tnew SimpleEntry<String, Locale>(\"Slovak\", Messages.skLocale)\n \t};\n \tfor (Entry<String, Locale> language : languages) {\n \t RadioMenuItem itemEffect = new RadioMenuItem(language.getKey());\n \t itemEffect.setSelected((language.getValue()).equals(messages.getLocale()));\n \t itemEffect.setOnAction(handleLanguage(language.getValue()));\n \t itemEffect.setToggleGroup(groupLanguage);\n \t menuLanguage.getItems().add(itemEffect);\n \t}\n \t\n \tsettingsMenu.getItems().add(menuLanguage);\n \tsettingsMenu.getItems().add(new SeparatorMenuItem());\n \t\n \tMenuItem aboutItem = new MenuItem(messages.getString(\"menu_about\"));\n \taboutItem.setOnAction(handleAbout());\n\n \tsettingsMenu.getItems().add(aboutItem);\n \tgetMainMenu().getMenus().add(settingsMenu);\n \n }", "@Override\n public void start(Stage primaryStage) throws Exception{\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/application/views/MainMenu.fxml\")); //open up the menu on start up\n Parent root = loader.load();\n MainMenuController controller = loader.getController();\n NameModelManager model = new NameModelManager(); //construct the list of name models1\n CSSManager cssManager = new CSSManager();\n controller.initialise(model, cssManager);\n primaryStage.setTitle(\"Name Sayer\");\n primaryStage.setScene(new Scene(root, 1200, 700));\n primaryStage.show();\n primaryStage.setResizable(false);\n\n primaryStage.setOnCloseRequest(e ->{ //confirmation box for exiting program\n e.consume();\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Quit?\");\n alert.setHeaderText(\"Are you sure you want to exit?\");\n alert.setContentText(\"Hit OK to quit\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n primaryStage.close();\n System.exit(0);\n }\n });\n }", "public void startScene()\r\n\t{\r\n\t\tthis.start();\r\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"mainMenu/mainMenu.fxml\"));\n primaryStage.setTitle(\"Hello World\");\n Scene s =new Scene(root, defaultWindowWidth, defaultWindowHight);\n s.getStylesheets().add(getClass().getResource(\"css/main.css\").toExternalForm());\n primaryStage.setScene(s);\n primaryStage.setMinHeight(480);\n primaryStage.setMinWidth(480);\n primaryStage.show();\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\n\t\thome = new MenuItem(\"Home Page\");\n\t\thome.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.CREDENTIALS);\n\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tnewuser = new MenuItem(\"New User\");\n\t\tnewuser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Calling New User window\");\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.NEWUSER);\n\t\t\t}\n\t\t}); \n\t\t\n\t\t\n\t\texit = new MenuItem(\"Exit Application\");\n\t\texit.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"quitting\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tMain.getItems().add(home);\n\t\n\t\tMain.getItems().add(newuser);\n\n\t\tMain.getItems().add(exit);\n\t\t\n\n\t\t//---------------------------- Actions Menu Drop down --------------------------------\n\n\t\thistory = new MenuItem(\"View History\");\n\t\thistory.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) { \t\n\t\t\t\t// open the default web browser for the HTML page\n\t\t\t\ttry {\n\t\t\t\t\tURL webURL = new URL(\"http://webdevelopmentdev.azurewebsites.net/\");\n\t\t\t\t\tDesktop.getDesktop().browse(webURL.toURI());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (URISyntaxException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(history);\n\n\t\tbrowser = new MenuItem(\"View Browser\");\n\t\tbrowser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Inside the browser\");\n\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.BROWSER);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(browser);\n\t\tbrowser.setDisable(true);\n\t\t\n\t\tissue = new MenuItem(\"Report Issue\");\n\t\tissue.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.ISSUE);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(issue);\n\n\t\tStartConnection();\n\t}", "public ScreenMainMenu() {\n\t\tsuper(AdapterInputMainMenu.class);\n\t\tobj.add(new MainMenuInteractObjTest<>(gRef,200,200,new Rectangle(0,0,32,32)));\n\t\tChartset.detect(\"resources\\\\Charts\");\n\t}", "public MenuScene getMenu() { return menu; }", "@FXML\r\n\tpublic void goToMain() {\r\n\t\tViewNavigator.loadScene(\"Welcome to WatchPlace\", ViewNavigator.HOME_SCENE);\r\n\t}", "@Override\r\n\tpublic void onPopulateScene(Scene pScene,\r\n\t\t\tOnPopulateSceneCallback pOnPopulateSceneCallback) throws Exception {\r\n\t\t\r\n\t\t// We will create a timer-handler to handle the duration\r\n\t\t// in which the splash screen is shown\r\n\t\tmEngine.registerUpdateHandler(new TimerHandler(4, new ITimerCallback(){\r\n\t\t\r\n\t\t// Override ITimerCallback's 'onTimePassed' method to allow\r\n\t\t// us to control what happens after the timer duration ends\r\n\t\t@Override\r\n\t\tpublic void onTimePassed(TimerHandler pTimerHandler) {\r\n\t\t\t// When 4 seconds is up, switch to our menu scene\r\n\t\t\tmEngine.setScene(mMenuScene);\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tpOnPopulateSceneCallback.onPopulateSceneFinished();\t\r\n\t}", "private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}", "@Override\n public void start(Stage primaryStage) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/MainMenuLayout.fxml\"));\n primaryStage.setTitle(\"Pairs\");\n primaryStage.setMinHeight(600);\n primaryStage.setMinWidth(600);\n primaryStage.setScene(new Scene(root));\n primaryStage.show();\n }", "public void settingsMenu() {\n /*\n * we need to create new settings scene because settings may be changed and\n * we need to show those changes\n */\n Game.stage.setScene(createSettingsMenuScene());\n Game.stage.show();\n }", "public void switchScene(javafx.event.ActionEvent event) throws IOException {\n //clicking this button will go to main menu with all the command for the application.\n setscence(event,\"Main Menu.fxml\");\n\n\n }", "void loadFXMLElements () {\n Parent menuRoot = menuScene.getRoot();\n Parent mainRoot = mainScene.getRoot();\n\n// all ScrollPanes\n mainPane = (ScrollPane) mainScene.getRoot().lookup(\"#main_scrollPane\");\n menuPane = (ScrollPane) menuScene.getRoot().lookup(\"#menu_scrollPane\");\n persistentPane = (ScrollPane) mainScene.getRoot().lookup(\"#main_persistentScrollPane\");\n\n// top bar controls\n mainBarClose = (Button) mainRoot.lookup(\"#main_barClose\");\n mainBarMaximise = (Button) mainRoot.lookup(\"#main_barMaximise\");\n mainBarMinimise = (Button) mainRoot.lookup(\"#main_barMinimise\");\n\n menuBarClose = (Button) menuRoot.lookup(\"#menu_barClose\");\n menuBarMaximise = (Button) menuRoot.lookup(\"#menu_barMaximise\");\n menuBarMinimise = (Button) menuRoot.lookup(\"#menu_barMinimise\");\n\n// all Nodes in Menu\n messageLabel = (Label) menuRoot.lookup(\"#menu_messageLabel\");\n exitButton = (Button) menuRoot.lookup(\"#menu_goToMain\");\n addTimelineButton = (Button) menuRoot.lookup(\"#menu_addTimeline\");\n addEventButton = (Button) menuRoot.lookup(\"#menu_addEvent\");\n saveButton = (Button) menuRoot.lookup(\"#menu_save\");\n deleteButton = (Button) menuRoot.lookup(\"#menu_delete\");\n\n cancelTimelineButton = (Button) menuRoot.lookup(\"#menu_exitAddTimeline\");\n cancelEventButton = (Button) menuRoot.lookup(\"#menu_exitAddEvent\");\n confirmDeleteButton = (Button) menuRoot.lookup(\"#menu_confirmDelete\");\n cancelDeleteButton = (Button) menuRoot.lookup(\"#menu_cancelDelete\");\n\n// new Timeline Nodes\n timeline_nameField = (TextField) addTimelineScene.lookup(\"#timeline_nameField\");\n timeline_addButton = (Button) addTimelineScene.lookup(\"#timeline_createButton\");\n timeline_editButton = (Button) addTimelineScene.lookup(\"#timeline_editButton\");\n timeline_addLabel = (Label) addTimelineScene.lookup(\"#timeline_addLabel\");\n timeline_editLabel = (Label) addTimelineScene.lookup(\"#timeline_editLabel\");\n\n// new Event Nodes\n timelineChoice = (ChoiceBox) addEventScene.lookup(\"#event_timelineChoice\");\n event_nameField = (TextField) addEventScene.lookup(\"#event_nameField\");\n event_startDayField = (TextField) addEventScene.lookup(\"#event_startDayField\");\n event_startMonthField = (TextField) addEventScene.lookup(\"#event_startMonthField\");\n event_startYearField = (TextField) addEventScene.lookup(\"#event_startYearField\");\n event_endDayField = (TextField) addEventScene.lookup(\"#event_endDayField\");\n event_endMonthField = (TextField) addEventScene.lookup(\"#event_endMonthField\");\n event_endYearField = (TextField) addEventScene.lookup(\"#event_endYearField\");\n event_notesField = (TextField) addEventScene.lookup(\"#event_notesField\");\n event_addButton = (Button) addEventScene.lookup(\"#event_createButton\");\n event_editButton = (Button) addEventScene.lookup(\"#event_editButton\");\n event_addLabel = (Label) addEventScene.lookup(\"#event_addLabel\");\n event_editLabel = (Label) addEventScene.lookup(\"#event_editLabel\");\n }", "IMenu getMainMenu();", "public void initMenu(){\n\t}", "@FXML\n private void switchToMainMenu() throws IOException {\n // TODO = possibly set other menu switchers\n pause();\n mainMenuSwitcher.switchMenu();\n }", "public void mostrarMenuPrincipal() {\r\n try {\r\n FXMLLoader loader = new FXMLLoader(Main.class.getResource(\"../Vista/UIMenuPrincipal.fxml\"));\r\n rootPane=(AnchorPane) loader.load();\r\n Scene scene = new Scene(rootPane);\r\n stagePrincipal.setTitle(\"Aplicacion de Donantes y Donaciones\");\r\n stagePrincipal.setScene(scene);\r\n /*\r\n * Añadidos las llamadas del main al Controlador y del controlador al main ***/\r\n ControladoraUIMenuPrincipal controller = loader.getController();\r\n controller.setMnPrincipal(this);\r\n\r\n stagePrincipal.show();\r\n } catch (IOException e) {\r\n \tSystem.out.println(e);\r\n //tratar la excepción.\r\n }\r\n }", "public void Scene() {\n Scene scene = new Scene(this.root);\n this.stage.setScene(scene);\n this.stage.show();\n }", "public void returnToMainMenu() {\n AppStateManager stateManager = getStateManager();\n setEnabled(false);\n\n EnginePowerGraphState enginePowerGraphState\n = getState(EnginePowerGraphState.class);\n stateManager.detach(enginePowerGraphState);\n\n TireDataState tireDataState = getState(TireDataState.class);\n stateManager.detach(tireDataState);\n\n VehicleEditorState vehicleEditorState\n = getState(VehicleEditorState.class);\n stateManager.detach(vehicleEditorState);\n\n DebugTabState debugTabState = getState(DebugTabState.class);\n stateManager.detach(debugTabState);\n\n getState(DriverHud.class).setEnabled(false);\n\n Vehicle vehicle = MavDemo1.getVehicle();\n Vehicle newVehicle;\n try {\n Class<? extends Vehicle> clazz = vehicle.getClass();\n newVehicle = clazz.getDeclaredConstructor().newInstance();\n } catch (ReflectiveOperationException exception) {\n throw new RuntimeException(exception);\n }\n MavDemo1 main = MavDemo1.getApplication();\n AssetManager assetManager = main.getAssetManager();\n newVehicle.load(assetManager);\n MavDemo1.setVehicle(newVehicle);\n\n stateManager.attach(new MainMenu());\n getState(CameraInputMode.class).orbit();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n User.setText(UserService.userStatic.getUsername());\n\n if (UserService.userStatic.getRole().equals(\"ROLE_ADMIN\")) {\n Role.setText(\"Administrateur\");\n menu_bar.getChildren().remove(nav_menu);\n menu_bar.getChildren().remove(nav_orders);\n menu_bar.getChildren().remove(nav_info_club);\n menu_bar.getChildren().remove(nav_recettes);\n }\n if (UserService.userStatic.getRole().equals(\"ROLE_RESPONSABLE\")) {\n Role.setText(\"Responsable Buvette\");\n menu_bar.getChildren().remove(nav_clubs);\n menu_bar.getChildren().remove(nav_docs);\n menu_bar.getChildren().remove(nav_revisions);\n menu_bar.getChildren().remove(nav_objetPerdus);\n menu_bar.getChildren().remove(nav_events);\n menu_bar.getChildren().remove(nav_info_club);\n menu_bar.getChildren().remove(nav_Professeur);\n menu_bar.getChildren().remove(nav_utilisateur);\n\n }\n\n try {\n if (UserService.userStatic.getRole().equals(\"ROLE_ADMIN\")) {\n clubs = FXMLLoader.load(getClass().getResource(\"/gui/BackOfficeClubFXML.fxml\"));\n setNode(clubs);\n currentselectedButton = nav_clubs;\n nav_clubs.setStyle(\" -fx-background-color: #ffffff;\\n\"\n + \" -fx-text-fill: #000000;\");\n }\n if (UserService.userStatic.getRole().equals(\"ROLE_RESPONSABLE\")) {\n menus = FXMLLoader.load(getClass().getResource(\"/gui/BackOfficeMenusFXML.fxml\"));\n\n setNode(menus);\n currentselectedButton = nav_menu;\n nav_clubs.setStyle(\" -fx-background-color: #ffffff;\\n\"\n + \" -fx-text-fill: #000000;\");\n }\n\n } catch (IOException ex) {\n Logger.getLogger(BackOfficeFXMLController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public void initAccueil() {\n\t\ttry {\n\t\t\tfinal FXMLLoader loader = ViewUtils.prepareFXMLLoader(getClass().getResource(\"/fxml/Home.fxml\"));\n\n\t\t\tfinal Parent root = loader.load();\n\t\t\tthis.changeSceneTo(root);\n\n\t\t\tstage.setResizable(false);\n\n\t\t\tfinal HomeView controller = loader.getController();\n\t\t\tcontroller.setMainApp(this);\n\t\t} catch (final IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void show() {\n\n skin = new Skin(Gdx.files.internal(\"menu/menu.json\"),new TextureAtlas(\"menu/menu.pack\"));\n\n Image background = new Image(skin, \"menuscreen\");\n background.setPosition(0,0);\n stage.addActor(background);\n\n Image gameOver = new Image(skin,\"gameOver\");\n gameOver.setPosition( ( 800 - 484)/2 , (480 - 345)/2 ) ;\n stage.addActor(gameOver);\n\n Button gameOverSim = new Button(skin,\"gameOverSim\");\n gameOverSim.setPosition(265,100);\n stage.addActor(gameOverSim);\n\n Button gameOverNao = new Button(skin,\"gameOverNao\");\n gameOverNao.setPosition(425,100);\n stage.addActor(gameOverNao);\n\n gameOverSim.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n // TO DO passar o level como parametro no construtor\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }\n });\n\n gameOverNao.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new MenuScreen(game));\n dispose();\n }\n });\n\n }", "private void init()\n {\n btnUser.setOnAction(buttonHandler);\n btnHome.setOnAction(event -> changeScene(\"store/fxml/home/home.fxml\"));\n btnCategories.setOnAction(event -> changeScene(\"store/fxml/category/categories.fxml\"));\n btnTopApps.setOnAction(buttonHandler);\n btnPurchased.setOnAction(buttonHandler);\n btnMenu.setOnAction(buttonHandler);\n btnSearch.setOnAction(buttonHandler);\n btnFeatured.setOnAction(buttonHandler);\n\n itmLogout = new MenuItem(\"Logout\");\n itmAddApp = new MenuItem(\"Add app\");\n itmUsers = new MenuItem(\"Manage users\");\n itmCategories = new MenuItem(\"Manage categories\");\n\n itmAddApp.setOnAction(itemHandler);\n itmLogout.setOnAction(itemHandler);\n itmUsers.setOnAction(itemHandler);\n itmCategories.setOnAction(itemHandler);\n\n if (user.getId() != null)\n {\n btnMenu.setVisible(true);\n if (user.getAdmin())\n btnMenu.getItems().addAll(itmAddApp, itmCategories, itmUsers, itmLogout);\n else\n btnMenu.getItems().add(itmLogout);\n\n ImageView imageView = new ImageView(user.getPicture());\n imageView.setFitHeight(25);\n imageView.setFitWidth(25);\n\n btnUser.setText(user.getUsername());\n }\n else\n btnMenu.setVisible(false);\n }", "@Override\r\n\tpublic void handle(ActionEvent event) {\n\t\ttry {\r\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"Roomless\"));\r\n\t\t\tMain.stage.setScene (new Scene(root, 700, 500));\r\n\t\t\tMain.stage.show();\r\n\t\t} catch (Exception exception) {\r\n\t\t\texception.printStackTrace();\r\n\t\t}\r\n\t}", "public void openLoadSelection() {\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/LoadSelectionView.fxml\"));\n\t\t\tfxmlLoader.setResources(bundle);\n\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\tStage stage = new Stage();\n\t\t\tLoadSelectionController lsc = fxmlLoader.getController();\n\t\t\tlsc.setMainController(this);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\tstage.setTitle(bundle.getString(\"lSTitle\"));\n\t\t\tstage.setScene(new Scene(root1));\n\t\t\tstage.show();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void displayInitialScene() {\n stageManager.switchScene(FxmlView.SPLASH, StageStyle.UNDECORATED);\n }", "public void init() {\n\t\tmenuTimer.start();\n\t\tmainMenuAnimation = new Animation(100,Assets.mainMenu);\n\t}", "@FXML\n\tpublic void handleMenuClick(ActionEvent event) throws IOException {\n\t\tMenuItem MenuItem = ((MenuItem) event.getSource());\n\t\tStage stage = (Stage) myMenuButton.getScene().getWindow();\n\t\t\n\t\tswitch (MenuItem.getId()) {\n\t\tcase \"punkte3d\":\n//\t\t\tthis.dreiDPunkteView = new dreiDPunkteView(\"../view/3dpunkte.fxml\", \"3D Punkte\");\n\t\t\tthis.dreiDPunkteView.changeScene(stage);\n\t\t\tbreak;\n\t\tcase \"home\":\n//\t\t\tthis.homeview = new home(\"../view/home.fxml\", \"Home\");\n\t\t\tthis.homeview.changeScene(stage);\n\t\t\tbreak;\n\t\tcase \"tictactoe\":\n//\t\t\tthis.TicTacToeView = new TicTacToeView(\"../view/tictactoe.fxml\", \"Tic Tac Toe\");\n\t\t\tthis.TicTacToeView.changeScene(stage);\n\t\t\tbreak;\n\t\tcase \"textverschluesselung\":\n\t\t\tthis.verschluesselungsView.changeScene(stage);\n\t\t\tbreak;\n\t\tcase \"benzinrechner\":\n//\t\t\tthis.BenzinRechnerView = new BenzinRechnerView(\"../view/benzinrechner.fxml\", \"Benzin Rechner\");\n\t\t\tthis.BenzinRechnerView.changeScene(stage);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void initStage(Stage primaryStage) throws Exception {\n FXMLLoader loader = new FXMLLoader();\n Parent root = loader.load(getClass().getResourceAsStream(ROOT_PATH));\n Scene scene = new Scene(root);\n scene.getStylesheets().add(getClass().getResource(STYLE_PATH).toExternalForm());\n\n //add resize listener to main scene\n ResizeListener resizeListener = new ResizeListener(primaryStage, scene);\n scene.setOnMouseMoved(resizeListener);\n scene.setOnMousePressed(resizeListener);\n scene.setOnMouseDragged(resizeListener);\n\n //add close listener\n Button exit = (Button) scene.lookup(EXIT_SELECTOR);\n exit.setOnAction(new ExitListener(primaryStage));\n\n //add expand listener\n Button expand = (Button) scene.lookup(EXPAND_SELECTOR);\n expand.setOnAction(new ExpandListener(primaryStage));\n\n //add hide listener\n Button hide = (Button) scene.lookup(HIDE_SELECTOR);\n hide.setOnAction(new HideListener(primaryStage));\n\n //add menu listener\n Button menuOpen = (Button) scene.lookup(MENU_OPEN_SELECTOR);\n Button menuClose = (Button) scene.lookup(MENU_CLOSE_SELECTOR);\n NavigatorListener navigatorListener = new NavigatorListener(scene);\n menuOpen.setOnAction(navigatorListener);\n menuClose.setOnAction(navigatorListener);\n\n //add move listener\n Label title = (Label) scene.lookup(TITLE_SELECTOR);\n MoveWindowListener moveWindowListener = new MoveWindowListener(primaryStage);\n title.setOnMousePressed(moveWindowListener);\n title.setOnMouseDragged(moveWindowListener);\n\n //add icon for history button\n Button history = (Button) scene.lookup(HISTORY_SELECTOR);\n Image historyImage = new Image(getClass().getResourceAsStream(HISTORY_ICON_PATH));\n ImageView imageView = new ImageView(historyImage);\n history.setGraphic(imageView);\n\n //add icon for menuOpen button\n Image menuImage = new Image(Launcher.class.getResourceAsStream(MENU_ICON_PATH));\n imageView = new ImageView(menuImage);\n menuOpen.setGraphic(imageView);\n\n //add icon for menuClose button\n imageView = new ImageView(menuImage);\n menuClose.setGraphic(imageView);\n\n //add icon for about button\n ImageView about = (ImageView) scene.lookup(ABOUT_SELECTOR);\n Image aboutImage = new Image(Launcher.class.getResourceAsStream(ABOUT_ICON_PATH));\n about.setImage(aboutImage);\n\n //init menu list of items\n ListView<String> listView = (ListView<String>) scene.lookup(LIST_SELECTOR);\n listView.setItems(MenuAdapter.init());\n\n //add button font resize\n scene.heightProperty().addListener(new ButtonResizeListener(scene));\n\n //add numeric field font resize\n Label numericLabel = (Label) scene.lookup(NUMERIC_FIELD_SELECTOR);\n numericLabel.textProperty().addListener(new NumericResizeListener(scene));\n\n primaryStage.setTitle(TITLE);\n primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(APP_ICON_PATH)));\n primaryStage.setScene(scene);\n primaryStage.initStyle(StageStyle.TRANSPARENT);\n primaryStage.show();\n }", "private void setup() {\n this.primaryStage.setTitle(Constants.APP_NAME);\n\n this.root = new VBox();\n root.setAlignment(Pos.TOP_CENTER);\n root.getChildren().addAll(getMenuBar());\n\n Scene scene = new Scene(root);\n this.primaryStage.setScene(scene);\n\n // set the default game level.\n setGameLevel(GameLevel.BEGINNER);\n\n // fix the size of the game window.\n this.primaryStage.setResizable(false);\n this.primaryStage.show();\n }", "@FXML\n\tvoid returnAdministratorMenu(ActionEvent event) throws IOException {\n\t\tTheWerewolvesOfMillersHollow.setScene(getClass().getResource(\"../view/AdministratorMenuView.fxml\"));\t\n\t}", "public startingMenu() {\r\n initComponents();\r\n }", "public MainMenu() {\n super();\n }", "public void initMainLayout() {\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApp.class.getResource(\"view/MainLayout.fxml\"));\n\t\t\trootLayout = (BorderPane) loader.load();\n\n\t\t\t// Show the scene containing the root layout.\n\t\t\tScene scene = new Scene(rootLayout);\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\n\t\t\tMainLayoutController mainLayoutController = loader.getController();\n\t\t\tmainLayoutController.setMainApp(this);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t\n\t\t}\n\t}", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tMain.stg = stage;\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"/stylesheets/MainMenu.fxml\"));\n\t\tstage.setTitle(BowmanConstants.GAME_TITLE);\n\t\tstage.setScene(new Scene(root, BowmanConstants.MENU_WIDTH, BowmanConstants.MENU_HEIGHT));\n\t\tstage.show();\n\t\tinit_settings();\n\t}", "public void start(Stage s) {\n\t\ts.setTitle(\"SpaceY | Menu principal\");\n\t\ts.setScene(scene);\n\t\ts.setResizable(true);\n//\t\ts.setMaximized(true);\n\t\ts.getIcons().add(Sprite.LOGO.getImage());\n\t\ts.show();\n\t}", "@Override\n\tpublic void onLoadScene(OnLoadSceneCallBack pOnLoadSceneCallBack) {\n\t\t//this.setOnAreaTouchListener(this);\n\t\tsuper.onLoadScene(pOnLoadSceneCallBack);\n\t\t\n\t\tVertexBufferObjectManager vertexBufferObjectManager = ResourceManager.getInstance().getBaseGameActivity().getVertexBufferObjectManager();\n\t\tTexturePackTextureRegionLibrary menuTexturePackTextureRegionLibrary = ResourceManager.getInstance().getMenuSpriteSheetTexturePackTextureRegionLibrary();\n\t\t\n\t\t// Panel\n\t\tthis.mPanel = new Rectangle((Constants.CAMERA_WIDTH - Constants.MENU_RESULT_WIDTH) * 0.5f, 0, \n\t\t\t\tConstants.MENU_RESULT_WIDTH, Constants.CAMERA_HEIGHT, vertexBufferObjectManager);\n\t\tthis.mPanel.setColor(Color.BLACK);\n\t\t\n\t\t// Level Cleared Text\n\t\tthis.mLevelClearedText = new Text(this.mPanel.getWidth() * 0.5f, Constants.MENU_RESULT_MARGIN_TOP, \n\t\t\t\tResourceManager.getInstance().getAngrybirdFont48(), \"LEVEL CLEARED!\", \n\t\t\t\tnew TextOptions(HorizontalAlign.CENTER),\n\t\t\t\tvertexBufferObjectManager);\n\t\tthis.mLevelClearedText.setX((this.mPanel.getWidth() - this.mLevelClearedText.getWidth()) * 0.5f);\n\t\t\n\t\t// ScoreText\n\t\tthis.mScoreText = new Text(this.mPanel.getWidth() * 0.5f, this.mPanel.getHeight() * 0.6f, \n\t\t\t\tResourceManager.getInstance().getAngrybirdFont48(), \"0\", \n\t\t\t\t9,\n\t\t\t\tvertexBufferObjectManager);\n\t\tthis.mScoreText.setX((this.mPanel.getWidth() - this.mScoreText.getWidth()) * 0.5f);\n\t\t\n\n\t\t// Stars\n\t\tITiledTextureRegion centerStarTextureRegion = menuTexturePackTextureRegionLibrary.get(MenuConstants.CENTER_STAR_ID, 2, 1);\n\t\tthis.mCenterStarMenu = new TiledSprite((this.mPanel.getWidth() - centerStarTextureRegion.getWidth()) * 0.5f, \n\t\t\t\tthis.mLevelClearedText.getY() + this.mLevelClearedText.getHeight() + Constants.MENU_RESULT_LINE_HEIGHT, \n\t\t\t\tcenterStarTextureRegion, vertexBufferObjectManager);\n\t\tthis.mCenterStarMenu.setCurrentTileIndex(1);\n\t\t\n\t\tITiledTextureRegion leftStarTextureRegion = menuTexturePackTextureRegionLibrary.get(MenuConstants.LEFT_STAR_ID, 2, 1);\n\t\tthis.mLeftStarMenu = new TiledSprite(this.mCenterStarMenu.getX() - Constants.MENU_RESULT_ELEMENT_MARGIN - leftStarTextureRegion.getWidth(), \n\t\t\t\tthis.mCenterStarMenu.getY(),\n\t\t\t\tleftStarTextureRegion, vertexBufferObjectManager);\n\t\tthis.mLeftStarMenu.setCurrentTileIndex(1);\n\t\t\n\t\tITiledTextureRegion rightStarTextureRegion = menuTexturePackTextureRegionLibrary.get(MenuConstants.RIGHT_STAR_ID, 2, 1);\n\t\tthis.mRighStarMenu = new TiledSprite(this.mCenterStarMenu.getX() + this.mCenterStarMenu.getWidth() + Constants.MENU_RESULT_ELEMENT_MARGIN, \n\t\t\t\tthis.mCenterStarMenu.getY(), \n\t\t\t\trightStarTextureRegion, vertexBufferObjectManager);\n\t\t\n\t\t// Buttons\n\t\tTextureRegion replayButtonTextureRegion = ResourceManager.getInstance().getButtonSpriteSheetTexturePackTextureRegionLibrary().get(ButtonConstants.BUTTON_REPLAY_ID);\n\t\tSprite replayButtonSprite = new Sprite((this.mPanel.getWidth() - replayButtonTextureRegion.getWidth()) * 0.5f, \n\t\t\t\tConstants.CAMERA_HEIGHT - Constants.MENU_RESULT_MARGIN_BOTTOM - replayButtonTextureRegion.getHeight(), \n\t\t\t\treplayButtonTextureRegion, vertexBufferObjectManager);\n\t\tthis.mRePlayButton = new BaseButton<Sprite>(replayButtonSprite.getX(), replayButtonSprite.getY(), 1.0f, replayButtonSprite) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onButtonClick() {\n\t\t\t\thideScene();\n\t\t\t\tGameLevelManager.getInstance().replayCurrentGameLevel();\n\t\t\t}\n\t\t};\n\t\t\n\t\tTextureRegion menuButtonTextureRegion = ResourceManager.getInstance().getButtonSpriteSheetTexturePackTextureRegionLibrary().get(ButtonConstants.BUTTON_MENU_ID);\n\t\tSprite menuButtonSprite = new Sprite(this.mRePlayButton.getEntity().getX() - Constants.MENU_RESULT_ELEMENT_MARGIN - menuButtonTextureRegion.getWidth(), \n\t\t\t\tthis.mRePlayButton.getEntity().getY(), \n\t\t\t\tmenuButtonTextureRegion, vertexBufferObjectManager);\n\t\tthis.mMenuButton = new BaseButton<Sprite>(menuButtonSprite.getX(), menuButtonSprite.getY(), 1.0f, menuButtonSprite) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onButtonClick() {\n\t\t\t\thideScene();\n\t\t\t\tSceneManager.getInstance().showLevelSelectorScene();\n\t\t\t}\n\t\t};\n\t\t\n\t\tTextureRegion nextLevelButtonTextureRegion = ResourceManager.getInstance().getButtonSpriteSheetTexturePackTextureRegionLibrary().get(ButtonConstants.BUTTON_NEXT_LEVEL_ID);\n\t\tSprite nextLevelButtonSprite = new Sprite(this.mRePlayButton.getEntity().getX() + this.mRePlayButton.getEntity().getWidth() + Constants.MENU_RESULT_ELEMENT_MARGIN, \n\t\t\t\tthis.mRePlayButton.getEntity().getY(), \n\t\t\t\tnextLevelButtonTextureRegion, vertexBufferObjectManager);\n\t\tthis.mNextLevelButton = new BaseButton<Sprite>(nextLevelButtonSprite.getX(), nextLevelButtonSprite.getY(), 1.0f, nextLevelButtonSprite) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onButtonClick() {\n\t\t\t\thideScene();\n\t\t\t\tGameLevelManager.getInstance().showNextGameLevel();\n\t\t\t}\n\t\t};\n\t\t\n\t\tHUD hud = ResourceManager.getInstance().getHUD();\n\t\thud.setOnAreaTouchListener(this);\n\t\t\n\t\thud.registerTouchArea(this.mMenuButton.getEntity());\n\t\thud.registerTouchArea(this.mRePlayButton.getEntity());\n\t\thud.registerTouchArea(this.mNextLevelButton.getEntity());\n\t\t\n\t\tpOnLoadSceneCallBack.onLoadSceneFinish();\n\t}", "public static void updateMainMenu() {\n instance.updateMenu();\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.scenes_list, menu);\n\t\treturn true;\n\t}", "private void initializeMenu(){\n\t\troot = new TreeField(new TreeFieldCallback() {\n\t\t\t\n\t\t\tpublic void drawTreeItem(TreeField treeField, Graphics graphics, int node,\n\t\t\t\t\tint y, int width, int indent) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString text = treeField.getCookie(node).toString(); \n\t graphics.drawText(text, indent, y);\n\t\t\t}\n\t\t}, Field.FOCUSABLE){\n\t\t\tprotected boolean navigationClick(int status, int time) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\treturn super.navigationClick(status, time);\n\t\t\t}\n\t\t\t\n\t\t\tprotected boolean keyDown(int keycode, int time) {\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tif(keycode == 655360){\n\t\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\treturn super.keyDown(keycode, time);\n\t\t\t}\n\t\t};\n\t\troot.setDefaultExpanded(false);\n\n\t\t//home\n\t\tMenuModel home = new MenuModel(\"Home\", MenuModel.HOME, true);\n\t\thome.setId(root.addChildNode(0, home));\n\t\t\n\t\tint lastRootChildId = home.getId();\n\t\t\n\t\t//menu tree\n\t\tif(Singleton.getInstance().getMenuTree() != null){\n\t\t\tJSONArray menuTree = Singleton.getInstance().getMenuTree();\n\t\t\tif(menuTree.length() > 0){\n\t\t\t\tfor (int i = 0; i < menuTree.length(); i++) {\n\t\t\t\t\tif(!menuTree.isNull(i)){\n\t\t\t\t\t\tJSONObject node;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnode = menuTree.getJSONObject(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//root menu tree (pria, wanita)\n\t\t\t\t\t\t\tboolean isChild = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString name = node.getString(\"name\");\n\t\t\t\t\t\t\tString url = node.getString(\"url\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMenuModel treeNode = new MenuModel(\n\t\t\t\t\t\t\t\t\tname, url, MenuModel.JSON_TREE_NODE, isChild);\n\t\t\t\t\t\t\ttreeNode.setId(root.addSiblingNode(lastRootChildId, treeNode));\n\t\t\t\t\t\t\tlastRootChildId = treeNode.getId();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif(!node.isNull(\"child\")){\n\t\t\t\t\t\t\t\t\tJSONArray childNodes = node.getJSONArray(\"child\");\n\t\t\t\t\t\t\t\t\tif(childNodes.length() > 0){\n\t\t\t\t\t\t\t\t\t\tfor (int j = childNodes.length() - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\t\t\t\tif(!childNodes.isNull(j)){\n\t\t\t\t\t\t\t\t\t\t\t\taddChildNode(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttreeNode.getId(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchildNodes.getJSONObject(j));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif(Singleton.getInstance().getIsLogin()){\n\t\t\t//akun saya\n\t\t\tMenuModel myAccount = new MenuModel(\"Akun Saya\", MenuModel.MY_ACCOUNT, false);\n\t\t\tmyAccount.setId(root.addSiblingNode(lastRootChildId, myAccount));\n\t\t\t\n\t\t\tlastRootChildId = myAccount.getId();\n\t\t\t\n\t\t\t//akun saya->detail akun\n\t\t\tMenuModel profile = new MenuModel(\"Detail Akun\", MenuModel.PROFILE, true);\n\t\t\tprofile.setId(root.addChildNode(myAccount.getId(), profile));\n\t\t\t\n\t\t\t//akun saya->daftar pesanan\n\t\t\tMenuModel myOrderList = new MenuModel(\n\t\t\t\t\t\"Daftar Pesanan\", MenuModel.MY_ORDER, true);\n\t\t\tmyOrderList.setId(root.addSiblingNode(profile.getId(), myOrderList));\t\t\n\t\t\t\n\t\t\t//logout\n\t\t\tMenuModel logout = new MenuModel(\"Logout\", MenuModel.LOGOUT, true);\n\t\t\tlogout.setId(root.addSiblingNode(lastRootChildId, logout));\n\t\t\tlastRootChildId = logout.getId();\n\t\t} else{\n\t\t\t//login\n\t\t\tMenuModel login = new MenuModel(\"Login\", MenuModel.LOGIN, false);\n\t\t\tlogin.setId(root.addSiblingNode(lastRootChildId, login));\n\t\t\t\n\t\t\tlastRootChildId = login.getId();\n\t\t\t\n\t\t\t//login->login\n\t\t\tMenuModel loginMenu = new MenuModel(\"Login\", MenuModel.LOGIN_MENU, true);\n\t\t\tloginMenu.setId(root.addChildNode(login.getId(), loginMenu));\n\t\t\t\n\t\t\t//login->register\n\t\t\tMenuModel register = new MenuModel(\"Register\", MenuModel.REGISTER, true);\n\t\t\tregister.setId(root.addSiblingNode(loginMenu.getId(), register));\n\t\t}\n\t\t\n\t\tMenuUserModel menu = Singleton.getInstance().getMenu();\n\t\tif(menu != null){\n\t\t\t//sales\n\t\t\tif(menu.getMenuSalesOrder() || menu.isMenuSalesRetur()){\n\t\t\t\tMenuModel sales = new MenuModel(\"Sales\", MenuModel.SALES, false);\n\t\t\t\tsales.setId(root.addSiblingNode(lastRootChildId, sales));\n\t\t\t\tlastRootChildId = sales.getId();\n\t\t\t\t\n\t\t\t\t//sales retur\n\t\t\t\tif(menu.isMenuSalesRetur()){\n\t\t\t\t\tMenuModel salesRetur = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Retur\", MenuModel.SALES_RETUR, true);\n\t\t\t\t\tsalesRetur.setId(root.addChildNode(sales.getId(), salesRetur));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//sales order\n\t\t\t\tif(menu.getMenuSalesOrder()){\n\t\t\t\t\tMenuModel salesOrder = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Order\", MenuModel.SALES_ORDER, true);\n\t\t\t\t\tsalesOrder.setId(root.addChildNode(sales.getId(), salesOrder));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//cms product\n\t\t\tif(menu.getMenuCmsProduct() || menu.getMenuCmsProductGrosir()){\n\t\t\t\tMenuModel cmsProduct = new MenuModel(\n\t\t\t\t\t\t\"Produk\", MenuModel.CMS_PRODUCT, false);\n\t\t\t\tcmsProduct.setId(\n\t\t\t\t\t\troot.addSiblingNode(lastRootChildId, cmsProduct));\n\t\t\t\tlastRootChildId = cmsProduct.getId();\n\t\t\t\t\n\t\t\t\t//product retail\n\t\t\t\tif(menu.getMenuCmsProduct()){\n\t\t\t\t\tMenuModel productRetail = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Retail\", MenuModel.CMS_PRODUCT_RETAIL, true);\n\t\t\t\t\tproductRetail.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productRetail));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//product grosir\n\t\t\t\tif(menu.getMenuCmsProductGrosir()){\n\t\t\t\t\tMenuModel productGrosir = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Grosir\", MenuModel.CMS_PRODUCT_GROSIR, true);\n\t\t\t\t\tproductGrosir.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productGrosir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//service\n\t\tMenuModel service = new MenuModel(\"Layanan\", MenuModel.SERVICE, false);\n\t\tservice.setId(root.addSiblingNode(lastRootChildId, service));\n\t\tlastRootChildId = service.getId();\n\t\tVector serviceList = Singleton.getInstance().getServices();\n\t\ttry {\n\t\t\tfor (int i = serviceList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) serviceList.elementAt(i);\n\t\t\t\tMenuModel serviceMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(),\n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\tserviceMenu.setId(root.addChildNode(service.getId(), serviceMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\t\n\t\t//about\n\t\tMenuModel about = new MenuModel(\"Tentang Y2\", MenuModel.ABOUT, false);\n\t\tabout.setId(root.addSiblingNode(service.getId(), about));\n\t\tlastRootChildId = service.getId();\n\t\tVector aboutList = Singleton.getInstance().getAbouts();\n\t\ttry {\n\t\t\tfor (int i = aboutList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) aboutList.elementAt(i);\n\t\t\t\tMenuModel aboutMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(), \n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\taboutMenu.setId(root.addChildNode(service.getId(), aboutMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tcontainer.add(root);\n\t}", "private void registerMainMenu() {\n\t\ttry {\n//\t\t\tif (FMLCommonHandler.instance().getSide().isClient())\n//\t\t\t\tnet.aetherteam.mainmenu_api.MainMenuAPI.registerMenu(\"TurretMod3Menu\", sanandreasp.mods.TurretMod3.client.gui.mainMenu.MainMenuTM3.class);\n\t\t} catch (Exception e) {\n\t\t\tFMLLog.log(TM3ModRegistry.modID, Level.INFO, \"kingbdogz' Main Menu API not found. Skipping Main Menu registration!\");\n\t\t} catch (NoClassDefFoundError error) {\n\t\t\tFMLLog.log(TM3ModRegistry.modID, Level.INFO, \"kingbdogz' Main Menu API not found. Skipping Main Menu registration!\");\n\t\t}\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"Scene.fxml\"));\n primaryStage.setTitle(\"Project 3\");\n primaryStage.setScene(new Scene(root, 600, 600));\n primaryStage.show();\n }", "public MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "@FXML\n final void btnLoadGamePress() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.GAME)).start();\n }", "public static void activateMenu() {\n instance.getMenu().show();\n }", "public void loadGameCanvasView()\n\t{\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Onitama\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/GameCanvas.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tGameCanvasViewController viewController = (GameCanvasViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\n\t\t\tScene scene = new Scene(root);\n\t \t// this fixes java bug when change scnene after dialog\n\t\t\t// javafx bug https://bugs.openjdk.java.net/browse/JDK-8140491\n\t\t\tPlatform.runLater(() -> { \n\t\t\t\tLoadViewController.primaryStage.setScene(scene);\n\t\t\t});\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n InitStart.Init();\r\n new MainMenuView().displayMenu();\r\n\r\n }", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // Repartos\n// initializeMainMenu();\n connectMainMenuClickActions();\n \n initFirstMenu();\n }", "public void initScenes()\n {\n CCSize s = CCDirector.sharedDirector().getWinSize();\n m_pInScene.setPosition(new CCPoint(-(s.width - 0.5f), 0));\n }", "private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }", "public void createMainStage(){\n mainStage = new Stage();\n BorderPane mainPageBp = new BorderPane();\n \n String headerTextMain = \"Main menu\";\n setBorderPaneTop(mainPageBp, headerTextMain, mainStage);\n setBorderPaneCenterMain(mainPageBp);\n setBorderPaneBottomMain(mainPageBp);\n \n Scene sceneMain = new Scene(mainPageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneMain.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n mainStage.setTitle(bankName);\n mainStage.setScene(sceneMain);\n }", "private void loadGUI() {\n JMenuItem tmp;\n Font font = new Font(\"Arial\", Font.ITALIC, 10);\n \n // Project menu\n projectMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected project\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n projectMenu.add(tmp);\n projectMenu.addSeparator();\n \n properties = new JMenuItem(\"Properties\");\n properties.addActionListener(this);\n projectMenu.add(properties);\n \n reimport = new JMenuItem(\"Re-Import Files\");\n reimport.addActionListener(this);\n projectMenu.add(reimport);\n \n removeProject = new JMenuItem(\"Remove project\");\n removeProject.addActionListener(this);\n projectMenu.add(removeProject);\n \n // Directory menu\n dirMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected directory\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n dirMenu.add(tmp);\n dirMenu.addSeparator();\n \n removeDir = new JMenuItem(\"Remove from project\");\n removeDir.addActionListener(this);\n dirMenu.add(removeDir);\n \n deleteDir = new JMenuItem(\"Delete from disk\");\n deleteDir.addActionListener(this);\n dirMenu.add(deleteDir);\n \n renameDir = new JMenuItem(\"Rename\");\n renameDir.addActionListener(this);\n dirMenu.add(renameDir);\n \n // File menu\n fileMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected file\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n fileMenu.add(tmp);\n fileMenu.addSeparator();\n \n removeFile = new JMenuItem(\"Remove from project\");\n removeFile.addActionListener(this);\n fileMenu.add(removeFile);\n \n deleteFile = new JMenuItem(\"Delete from disk\");\n deleteFile.addActionListener(this);\n fileMenu.add(deleteFile);\n \n renameFile = new JMenuItem(\"Rename\");\n renameFile.addActionListener(this);\n fileMenu.add(renameFile);\n\t\n\t // sutter2k: need to tap in here for preview in browser\n miLaunchBrowser= new JMenuItem(\"Preview in Browser\");\n miLaunchBrowser.addActionListener(this);\n fileMenu.add(miLaunchBrowser);\n\t\n // Menu to show when multiple nodes are selected\n multipleSelMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Multiple selection\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n multipleSelMenu.add(tmp);\n multipleSelMenu.addSeparator();\n \n removeMulti = new JMenuItem(\"Remove from project\");\n removeMulti.addActionListener(this);\n multipleSelMenu.add(removeMulti);\n \n deleteMulti = new JMenuItem(\"Delete from disk\");\n deleteMulti.addActionListener(this);\n multipleSelMenu.add(deleteMulti);\n \n }", "@FXML\n public void MainWindowScene(ActionEvent e) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"MainWindow.fxml\"));\n Main.mainWindow.setScene(new Scene(root));\n } catch (IOException el) {\n el.printStackTrace();\n }\n }", "public void start() {\n BorderPane borderPane = new BorderPane();\n VBox centerPane = new VBox();\n\n borderPane.setTop(lobbyMenu());\n\n String TITLE = \"Connect 4\";\n Text title = new Text(TITLE);\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 30));\n centerPane.getChildren().add(title);\n centerPane.getChildren().add(lobbyButtons());\n centerPane.setAlignment(Pos.CENTER);\n\n borderPane.setCenter(centerPane);\n\n Scene scene = new Scene(borderPane, 520, 360);\n\n stage.setTitle(TITLE);\n stage.setScene(scene);\n }", "private void loadMapScene() {\n mapView.getMapScene().loadScene(MapScheme.NORMAL_DAY, new MapScene.LoadSceneCallback() {\n\n @Override\n public void onLoadScene(@Nullable MapError mapError) {\n if (mapError == null) {\n positioningExample = new BackgroundPositioningExample();\n positioningExample.onMapSceneLoaded(mapView, MainActivity.this);\n positioningExample.startForegroundService();\n } else {\n Log.d(TAG, \"Loading map failed: mapError: \" + mapError.name());\n }\n }\n });\n }", "private void loadJavaFXScene(){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n BorderPane borderPane = new BorderPane();\n webComponent = new WebView();\n \n webComponent.getEngine().loadContent(URLDecoder.decode(module.getData().toString()));\n\n borderPane.setCenter(webComponent);\n Scene scene = new Scene(borderPane,320,480);\n javafxPanel.setScene(scene);\n\n }\n });\n }", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "public void loadHighscoreView() {\n\t\ttry {\n\n\t\t\tBorderPane root = new BorderPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/Highscore.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tHighscoreViewController highscoreController = (HighscoreViewController) loader.getController();\n\t\t\thighscoreController.setOnitamaController(onitamaController);\n\t\t\thighscoreController.setStage(primaryStage);\n\t\t\thighscoreController.init();\n\t\t\t\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}" ]
[ "0.8217433", "0.811332", "0.79047036", "0.77804476", "0.76562405", "0.73979753", "0.73705345", "0.73504055", "0.7090876", "0.70620245", "0.70332986", "0.7026406", "0.6972631", "0.6972124", "0.6956185", "0.6888976", "0.68279773", "0.67961246", "0.6787751", "0.676011", "0.67317885", "0.67065626", "0.670192", "0.6650641", "0.6647563", "0.66438997", "0.6635239", "0.6619657", "0.6599119", "0.6548329", "0.6547897", "0.65466666", "0.6542779", "0.650864", "0.6504058", "0.6494951", "0.6461956", "0.64521956", "0.64472705", "0.6441177", "0.6430566", "0.6428747", "0.64238596", "0.64204955", "0.64144874", "0.6383725", "0.63822895", "0.6374025", "0.6365172", "0.63437414", "0.6327504", "0.6320797", "0.6317063", "0.6310241", "0.6296821", "0.6291937", "0.62895626", "0.62887764", "0.6286919", "0.6281822", "0.62651557", "0.6260625", "0.6259471", "0.6251862", "0.62223864", "0.62191767", "0.62064457", "0.6203677", "0.6201784", "0.62015426", "0.6193681", "0.61932987", "0.61919045", "0.6190742", "0.61895293", "0.61859226", "0.61761093", "0.6158457", "0.6158457", "0.6158457", "0.6154937", "0.61369234", "0.61233234", "0.61187243", "0.61135674", "0.6113279", "0.6112739", "0.61097217", "0.6105603", "0.6102546", "0.610131", "0.6098543", "0.6095374", "0.6094793", "0.6084093", "0.60812724", "0.60687673", "0.60686904", "0.6056573", "0.6050875" ]
0.66593987
23
Stop any ongoing timer if app was interrupted
@Override public void stop() { GameManager.getInstance().stopTimer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void stopTime()\n {\n timer.stop();\n }", "public void stopTimer() {\n\t\trunFlag = false;\n\t\tses.shutdown();\n\t\tSystem.err.println(\"TIMER SHUTDOWN\");\n\t\tinstance = null;\n\t}", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "public void stop() {timer.stop();}", "public void stopTime() {\n if (isRunning) {\n timer.cancel();\n timer.purge();\n }\n isRunning = false;\n }", "private void stop() {\n timer.cancel();\n timer = null;\n }", "protected void stopTimeTask() {\n\t\tif (chatAsyncTask!=null) {\n\t\t\tchatAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (liveAsyncTask!=null) {\n\t\t\tliveAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (timerTask!=null) {\n\t\t\ttimerTask.cancel();\n\t\t\ttimerTask = null;\n\t\t}\n\t\t\n\t\tif (timer!=null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t\t\n\t\t\n\t}", "public void\nstopTimer() {\n\t\n\tSystemDesign.logInfo(\"MetroParams.stopTimer: Killing annealing timer.\");\n\t\n\tif (metroTimer_ != null) {\n metroTimer_.stopPlease();\n\t metroTimer_ = null;\n }\n\tmetroThread_ = null;\n}", "public void stopTimer()\n {\n timer.cancel();\n }", "public void cancelTimers() {\n this.impressionTimer.cancel();\n this.autoDismissTimer.cancel();\n }", "public void cancel() {\n\t\tif(hasStarted) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"An alarm has not been started\");\n\t\t}\n\t}", "public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}", "public void stop(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\tmakeTimer();\n\t}", "public void stopTimer(){\n this.timer.cancel();\n }", "void cancelTimeout() {\n timer.cancel();\n }", "public void stopTimer() {\n if (mHandler != null) {\n mHandler.removeCallbacks(mStatusChecker);\n }\n }", "public void stop() {\n\t\tthis.timer.cancel();\n\t}", "public void stop() {\n timer.stop();\n }", "public void stop() {\n\t\t_timer.cancel();\n\t}", "TimeInstrument stop();", "public void stopTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" timer stopped\");\n if(newTimer != null && timerTask != null){\n timerTask.cancel();\n newTimer.purge();\n timerTask = null;\n }\n }", "private void cancelTimer() {\n Timer.cancelTimeout(this);\n responded = true;\n }", "public void timerInterrupt() {\n \tboolean istr = Machine.interrupt().disable();\n \t\n \twhile (sleepingThreads.size()>0 && sleepingThreads.peek().time <= Machine.timer().getTime()) {\n \t\tsleepingThreads.remove().ready();\n \t}\n \n \tKThread.yield();\n \t\n \t//Machine.interrupt().enable();\n \tMachine.interrupt().restore(istr);\n \n }", "public void stopTimerTask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stop() {\n if (timer != null) {\n timer.cancel();\n }\n }", "public void endTimer(){\n timer.cancel();\n }", "@Override\r\n\tpublic void stopped() {\r\n\r\n\t\t// Stop timers\r\n\t\tsuper.stopped();\r\n\r\n\t\t// Disconnect\r\n\t\tdisconnect();\r\n\t}", "public void stopTimer() {\r\n running = false;\r\n try {\r\n if (timerThread != null && timerThread.isAlive()) {\r\n timerThread.join();\r\n }\r\n } catch (Exception ie) {\r\n }\r\n }", "private void stop() {\n if (pollTimer != null) {\n pollTimer.cancel();\n pollTimer = null;\n }\n }", "private void cancelTimeout(){\n\t\tSharedPreferences timeout = mContext.getSharedPreferences(\"Timeout\"+Integer.toString(mRid), Context.MODE_PRIVATE);\n\t SharedPreferences.Editor editor = timeout.edit();\n\t editor.putLong(\"start\", 0);\n\t editor.apply();\n\t}", "public void stopAlarm(View view) {\n timer.cancel();\n ringring.stop();\n vibri.cancel();\n finish();\n }", "public void cancel() {\n timer.cancel();\n timer = new Timer();\n }", "@Override\n\tpublic void stopLocalTimer() {\n\t\tthis.isAppRunning = false;\n\t\tlocalBeatSocket.close();\n\t}", "public void stopTimer() {\n maxAccelOutput.setText(String.valueOf(maxAccel));\n timeHandler.removeCallbacks(startTimer);\n startButton.setText(R.string.go_button);\n isRunning = false;\n }", "public void stop() {\n if (this.timer != null) {\n this.timer.cancel();\n }\n }", "public void stop(){\n if (this.isActive()) {\n this.setEndTime(Calendar.getInstance());\n this.setTotalSeconds();\n this.setActive(false);\n }\n \n }", "@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tif(!gameOverBool){\n\t\t\ttry{\n\t\t\t\tsoundHandler.getSoundPool().autoPause();\n\t\t\t\tsoundHandler.getSoundPool().release();\n\t\t\t\tgarbagegame.stopGame();\n\t\t\t\tLog.d(\"On Stop\", \"Called cancel timers\");\n\t\t\t} catch(Exception e) {\n\t\t\t\tLog.d(\"On Stop\", \"exception caught\");\n\t\t\t}\n\t\t}else{\n\t\t\toverDialog.dismiss();\n\t\t}\n\t\tfinish();\n\t\t\n\t\t\n\t}", "private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}", "private static void stopCleanUp() {\n\n if (isEventTrackerRunning && timer != null) {\n timer.cancel();\n timer.purge();\n debugLogger.info(\"Timer stopped: {}\", new Date());\n } else {\n debugLogger.info(\"Timer was already stopped : {}\", new Date());\n\n }\n isEventTrackerRunning = false;\n\n }", "private void cancelSchedule() {\n\n if (timer == null)\n return;\n // timer.cancel();\n }", "private synchronized void cancelScanTimer() {\n if (mScanTimerFuture != null) {\n mScanTimerFuture.cancel(true);\n mScanTimerFuture = null;\n }\n }", "void stopUpdateTimer();", "private void stopCountTime() {\n\t\tendTimer();\n\t\tif(this.gameTimeThread != null) {\n try {\n this.gameTimeThread.join();\n } catch (InterruptedException ignored) {\n }\n }\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\t try\n {\n context.unregisterReceiver(receiver);\n }\n catch (Exception e)\n {\n\n }\n\n\t\tif(timer!=null)\n\t\t{\n\n\t\t\ttimer.cancel();\n\t\t}\n\t}", "public void onStop();", "public void stopTimer() {\n if (animationTimer != null) {\n animationTimer.stop();\n }\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (roomController.isConfigured()) {\n roomController.closeController();\n }\n timeLogController.closeController();\n videoController.closeController();\n }", "public synchronized void postDeregister() {\n if (timer != null) {\n try {\n timer.cancel();\n } catch (Exception x) {\n if (LOG.isLoggable(Level.FINEST))\n LOG.log(Level.FINEST,\"Failed to cancel timer\",x);\n else if (LOG.isLoggable(Level.FINE))\n LOG.fine(\"Failed to cancel timer: \"+x);\n } finally {\n timer = null;\n }\n }\n }", "@Override\n\tpublic void onDestroy() {\n\t\ttimer.cancel();\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tif (timerTask!=null) {\n\t\t\ttimerTask.cancel();\n\t\t\ttimerTask = null;\n\t\t}\n\t\t\n\t\tif (timer!=null) {\n\t\t\ttimer.cancel(); \n\t\t\ttimer = null;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsuper.onDestroy();\n\t}", "private void stopCountdown() {\n if (countDownTimer != null) {\n countDownTimer.cancel();\n countDownTimer = null;\n }\n }", "@Override\n protected void onPause() {\n super.onPause();\n timer.cancel();\n timer.purge();\n }", "public void stoptimertask() {\n if (timer != null) {\r\n timer.cancel();\r\n timer = null;\r\n }}", "public int stopTimer() {\n timerTask.cancel();\n timerTask = null;\n return counts;\n }", "@Override\n protected void onPause() {\n super.onPause();\n// timer.cancel();\n }", "protected void cancelTimerTask() {\n ScheduledTimerTask scheduledTimerTask = this.scheduledTimerTask;\n if (null != scheduledTimerTask) {\n this.scheduledTimerTask = null;\n scheduledTimerTask.cancel();\n }\n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tif (timer != null) {\r\n\t\t\ttimer.cancel();\r\n\t\t}\r\n\t}", "public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}", "public void endTimer()\n\t{\n\t\ttimer.stopTimer();\n\t}", "void stop(long timeout);", "public void stop()\r\n {\r\n debug(\"stop() all timers\");\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n\r\n debug(\"stop() all timers - complete\");\r\n }", "public void stopClick (View view){\n \tmHandler.removeCallbacks(startTimer);\n \tstopped = true;\n \thideStopButton();\n }", "public void stop() {\n cancelCallback();\n mStartTimeMillis = 0;\n mCurrentLoopNumber = -1;\n mListener.get().onStop();\n }", "public void stop()\n\t{\n\t\t//get the time information as first part for better precision\n\t\tlong systemMs = SystemClock.elapsedRealtime();\n\n\t\t//if it was already stopped or did not even run, do nothing\n\t\tif (!m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tm_elapsedMs += (systemMs - m_lastMs);\n\n\t\tm_running = false;\n\t}", "private void stopUpdateTimer() {\n\t\tif (completionUpdateTimer != null) {\n\t\t\tcompletionUpdateTimer.cancel();\n\t\t\tcompletionUpdateTimer = null;\n\t\t}\n\t}", "private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }", "public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }", "private void cleanUp() {\n timer_.cancel();\n countdownTask_.cancel();\n vibrator_.cancel();\n }", "public void stop(){\n\t\tthis.timer.stop();\n\t\t//whenever we stop the entire game, also calculate the endTime\n\t\tthis.endTime = System.nanoTime();\n\t\tthis.time = this.startTime - this.endTime;\t//calculate the time difference\n\t\t\n\t\tthis.stop = true;\n\t}", "public void stop()\n{\n // If animator is running, stop it\n if(isRunning()) {\n \n // Stop timer\n _timer.stop();\n \n // Reset time to play start time\n if(getPlayStartTime()>=0 && getResetTimeOnStop())\n setTime(getPlayStartTime());\n else setTime(getMaxTime());\n \n // Send animatorStopped notification\n for(Listener listener : getListeners(Listener.class)) listener.animatorStopped(this);\n }\n}", "public static void cancelAlarmElapsed() {\n if (alarmManagerElapsed!= null) {\n alarmManagerElapsed.cancel(alarmIntentElapsed);\n }\n }", "public void onApplicationEvent(ApplicationEvent event) {\r\n if(event instanceof ContextClosedEvent) {\r\n timer.cancel();\r\n }\r\n }", "protected void aTimerInterrupt()\r\n {\r\n \t\tSystem.out.println(\"|aTimerInterrupt| : time out.\");\r\n \t\tstartTimer(0,RxmtInterval);\r\n \t\tSystem.out.println(\"|aTimerInterrupt| : timer is started\");\r\n \t\t\r\n \t\tfor(int i=window_base% LimitSeqNo;i<next_seq_num % LimitSeqNo;i++)\r\n \t\t{\r\n \t\t\tif(packetBufferAry[i]!=null)\r\n \t\t\t{\r\n \t\t\t\tcount_retransmissions_by_A++;\r\n \t\t\t\tSystem.out.println(\"|aTimerInterrupt| : packet with seq number:\"+Integer.toString(packetBufferAry[i].getSeqnum())+\" is resent.\");\r\n \t\t\t\ttoLayer3(0,packetBufferAry[i]);\r\n \t\t\t}\r\n \t\t}\r\n \t\t/*\r\n \t\tif(state_sender == STATE_WAIT_FOR_ACK_OR_NAK_0)\r\n \t\t{\r\n \t\t\tSystem.out.println(\"aTimerInterrupt: time up for STATE_WAIT_FOR_ACK_OR_NAK_0\");\r\n \t\t\tresendPacket(packetBuffer);\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aTimerInterrupt: start sender timer\");\r\n \t\t\t\r\n \t\t}\r\n \t\telse if(state_sender == STATE_WAIT_FOR_ACK_OR_NAK_1)\r\n \t\t{\r\n \t\t\tSystem.out.println(\"aTimerInterrupt: time up for STATE_WAIT_FOR_ACK_OR_NAK_1\");\r\n \t\t\tresendPacket(packetBuffer);\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aTimerInterrupt: start sender timer\");\r\n \t\t}\r\n \t\t*/\r\n }", "void cancel() {\n\tsleepThread.interrupt();\n }", "public void stop() {\n clockThread = null;\n }", "@Override\n protected void appStop() {\n }", "public void restartRobotUI() {\r\n\t\tt.cancel();\r\n\t\tt.purge();\r\n\t\tt = new Timer();\r\n\t}", "public long stop() {\n return timer.stop(task);\n }", "private void StopTime() {\n timer.stop();\n currentHora = 0;\n currentMinuto = 0;\n currentSegundo = 0;\n lbcronometro.setText(\"00:00:00\");\n }", "public void stop(){\n executor.shutdown();\n active = false;\n \n tSec.setEditable(true);\n tMin.setEditable(true);\n tHours.setEditable(true);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}", "public void stop() {}", "@Override\n\tprotected void onStop() {\n\t\tif(videoviewer != null)\n\t\t\tvideoviewer.stopPlayback();\n\t\tif (timer != null) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\tsuper.onStop();\n\t}", "public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}", "public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }", "public void deactivate () {\n\t\tif (_timer!=null) {\n\t\t\t_timer.cancel ();\n\t\t\t_timer.purge ();\n\t\t\t_timer = null;\n\t\t}\n\t}", "void stopTone(){\n t.interrupt();\n isRunning = false;\n try {\n t.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n t = null;\n }", "private void stopStopHolder() {\n Log.d(TAG, \"Stop the stop holder!\");\n try {\n if (mStopHandler != null) {\n mStopHandler.removeCallbacksAndMessages(null);\n }\n } catch (NullPointerException e) {\n CordovaPluginLog.e(TAG, \"Error: \", e);\n }\n }", "@Override\r\n protected void onStop() {\n }", "public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}", "public void stopTimerPool() {\n timerPool.stopTimerPool();\n }", "public void stopInitTimer() {\n try {\n if (this.mInitTimer != null) {\n this.mInitTimer.cancel();\n }\n } catch (Exception e) {\n logException(\"stopInitTimer\", e.getLocalizedMessage());\n } catch (Throwable th) {\n this.mInitTimer = null;\n throw th;\n }\n this.mInitTimer = null;\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tstopTimer();\r\n\t}", "private void stopGame() {\n\t\ttimer.cancel();\n\t\tboard.stopGame();\n\t\treplayButton.setEnabled(true);\n\t\t// to do - stopGame imp\n\t}", "public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }", "@Override\n public void onStop() {\n Object object = this.mw;\n synchronized (object) {\n if (this.tV != null) {\n this.tV.cancel(true);\n }\n return;\n }\n }", "@Override\n protected void onResume() {\n super.onResume();\n timer = new Timer();\n TimerTask timeOutTask = new TimerTask() {\n @Override\n public void run() {\n timeOut(); }\n };\n timer.schedule(timeOutTask, main_screen.logoutTime);\n }", "public void stopChronometer(View view) throws IOException {\n timer.stop();\n timer_running = false;\n saveData();\n\t\tIntent intent = new Intent(this, MainActivity.class);\n\t\tstartActivity(intent);\n \n }", "public void stop() {\n endTime = System.currentTimeMillis();\n }", "@Override\n\tpublic void leave() {\n\t\ttimer.stop();\n\t\ttimer = null;\n\t}", "public void stopAlarm() {\n\n // Stop the media player and alarm timer if they are not null\n if (mediaPlayer != null) {\n if (mediaPlayer.isPlaying()) {\n mediaPlayer.stop();\n }\n mediaPlayer.release();\n }\n mediaPlayer = null;\n\n if (alarmTimer != null) {\n alarmTimer.cancel();\n }\n alarmTimer = null;\n\n alarmStartTime = null;\n alertOverlay.setVisibility(View.INVISIBLE);\n sleepAlert.setVisibility(View.INVISIBLE);\n }" ]
[ "0.731225", "0.72933286", "0.72831815", "0.72669464", "0.7137756", "0.7126405", "0.70888686", "0.70836014", "0.7056194", "0.70237124", "0.69990486", "0.69519234", "0.69440967", "0.6936647", "0.69313943", "0.6901685", "0.68976897", "0.6894052", "0.6883265", "0.6883253", "0.6871184", "0.68437576", "0.68365335", "0.6826314", "0.67936003", "0.6765175", "0.67541647", "0.67516196", "0.67446685", "0.6725384", "0.66971344", "0.66960233", "0.6684712", "0.6671669", "0.6657896", "0.6648434", "0.66146564", "0.6609873", "0.6609699", "0.65789294", "0.6568672", "0.6537551", "0.6510853", "0.64847624", "0.64820695", "0.6481776", "0.64758706", "0.6460553", "0.64152867", "0.6409851", "0.6402418", "0.63932645", "0.6392148", "0.6385187", "0.63847744", "0.63455087", "0.633889", "0.631658", "0.63159853", "0.63145053", "0.62952936", "0.6284659", "0.6265226", "0.6264727", "0.6244175", "0.62345386", "0.6233973", "0.6227569", "0.6225414", "0.62195367", "0.6206249", "0.61972344", "0.6190909", "0.6189131", "0.61855024", "0.61802965", "0.61750865", "0.616913", "0.6164197", "0.6162678", "0.61626464", "0.6158767", "0.6150456", "0.6130177", "0.6129791", "0.61282367", "0.61220556", "0.61152637", "0.6114894", "0.61140007", "0.61114925", "0.6105668", "0.6086192", "0.6086055", "0.6083665", "0.6080918", "0.6074603", "0.60620046", "0.6050507", "0.6047606" ]
0.6853376
21
Instantiates a new panel fils.
public PanelFils() { this.setLayout(new GridLayout(0, 1)); this.setBorder(BorderFactory.createEmptyBorder(14, 14, 14, 14)); JLabel titreEvent = new JLabel("Titre"); titreEvent.setFont(new Font("Tahoma", Font.BOLD, 13)); add(titreEvent); chTitreEvent = new JTextArea(); chTitreEvent.setBorder(BorderFactory.createLineBorder(Color.BLACK)); chTitreEvent.setColumns(70); add(chTitreEvent); // JLabel labelDebut = new JLabel("Ann\u00E9e"); // labelDebut.setFont(new Font("Tahoma", Font.BOLD, 12)); // add(labelDebut); // chDateEvent = new JTextArea(); // chDateEvent.setColumns(70); // add(chDateEvent); chImageBouton = new JButton("Ajouter une image"); chImageBouton.addActionListener(this); add(chImageBouton); JLabel labelImportance = new JLabel("Importance: "); labelImportance.setFont(new Font("Tahoma", Font.BOLD, 12)); String[] laListe = {"1", "2", "3", "4", "5"}; chImportance = new JComboBox<String>(laListe); chImportance.setSelectedIndex(chRow); add(labelImportance); add(chImportance); JLabel descriptionEvent = new JLabel("Description"); descriptionEvent.setFont(new Font("Tahoma", Font.BOLD, 12)); add(descriptionEvent); chDescEvent = new JTextArea(""); chDescEvent.setRows(10); chDescEvent.setColumns(70); chDescEvent.setBorder(BorderFactory.createLineBorder(Color.BLACK)); add(chDescEvent); add(Box.createRigidArea(new Dimension(0,10))); add(Box.createRigidArea(new Dimension(0,10))); chValidation.setBackground(new Color(222, 184, 135)); chValidation.addActionListener(leControleur); add(chValidation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Panel() {\n }", "public NewJPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "public LocalPanel() {\r\n\t\tinitComponents();\r\n\t}", "public Panel() {\n initComponents();\n\n\n }", "public ComandaPanel() {\n\n initComponents();\n // comanda = new Comanda();\n }", "@AutoGenerated\r\n\tprivate Panel buildPnlFondos() {\n\t\tpnlFondos = new Panel();\r\n\t\tpnlFondos.setImmediate(false);\r\n\t\tpnlFondos.setWidth(\"-1px\");\r\n\t\tpnlFondos.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// layoutFondo\r\n\t\tlayoutFondo = buildLayoutFondo();\r\n\t\tpnlFondos.setContent(layoutFondo);\r\n\t\t\r\n\t\treturn pnlFondos;\r\n\t}", "public CreateNewEventJPanel() {\n }", "public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }", "public PanelAmigo() {\n initComponents();\n \n }", "void addPanel() {\n \tPanel panel = new Panel();\r\n\r\n panel.setLayout(new GridLayout(4, 1));\r\n jSliderBrightness = makeTitledSilder(\"Helligkeit\", 0, 256, 128); // werte veraendert\r\n jSliderContrast = makeTitledSilder(\"Kontrast\", 0, 10, 5);\r\n jSliderSaturation = makeTitledSilder(\"Sättigung\", 0, 9, 4);\r\n jSliderHue = makeTitledSilder(\"Hue\", 0, 360, 0);\r\n //jSliderContrast = makeTitledSilder(\"Slider2-Wert\", 0, 100, 50);\r\n panel.add(jSliderBrightness);\r\n panel.add(jSliderContrast);\r\n panel.add(jSliderSaturation);\r\n panel.add(jSliderHue);\r\n \r\n add(panel);\r\n \r\n pack();\r\n }", "public FreimapVisualPanel2() {\n initComponents();\n }", "public DrawPanel() {\n initComponents();\n }", "public PrintsPanel() {\n initComponents();\n createPanels();\n\n }", "private void setUpPanel() {\n this.panel = new JPanel();\n functions = new JPanel();\n panel.setPreferredSize(new Dimension(Screen.screenWidth, Screen.screenHeight));\n\n int borderBottom = Screen.screenHeight / 8;\n if (Screen.screenHeight > 1400) {\n borderBottom = Screen.screenHeight / 7;\n }\n\n panel.setBorder(BorderFactory.createEmptyBorder(80, Screen.border, borderBottom, Screen.border));\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n functions.setPreferredSize(new Dimension(600, 500));\n functions.setLayout(cardLayout);\n }", "public DemoPanel() {\n }", "public PanelIconos() {\n initComponents();\n }", "public vistaPanelPelicula() {\r\n initComponents();\r\n }", "public ControladorPanel() { }", "public Panel()\n/* */ {\n/* 56 */ this(new FlowLayout());\n/* */ }", "private void initPanels() {\r\n\t\r\n\tpanel = new JPanel();\r\n\tpanel.setBounds(0, 0, ScreenSize.WIDTH + 25, ScreenSize.HEIGHT + 50);\r\n\tpanel.setLayout(new BorderLayout());\r\n\tpanel.addComponentListener(this);\r\n\r\n\tbord = new BordPanel();\r\n\tbord.setBounds(0 ,0 ,ScreenSize.WIDTH, ScreenSize.HEIGHT);\r\n\tbord.setOpaque(true);\r\n\r\n\tlabel = new JLabel();\r\n\tlabel.setText(\"Text\");\r\n\r\n\tpanel.add(label, BorderLayout.SOUTH);\r\n\tpanel.add(bord, BorderLayout.CENTER);\r\n\t\r\n\tframe.add(panel);\r\n }", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}", "public PanelSgamacView1()\n {\n }", "public DoilyPanel() {\n\t\tthis(new DoilySettings());\n\t}", "public JavaPanel() {\n\t\tsuper();\n\t}", "public WFSLayerPanel()\n {\n initComponents();\n }", "public TemporizadorPanel() {\n initComponents();\n }", "public static JPanel newPanel() {\n\t\treturn null;\n\t}", "public GraphPanel()\n\t{\n\t\t// instantiates graphArray to hold list of names to graph \n\t\tgraphArray = new ArrayList<NameRecord>();\n\t\t\n\t\t// sets the size of the panel\n\t\tsetPreferredSize(new Dimension(600,600));\n\t}", "private void addToPanel(){\n getContentPane().add(jdpFondo);\n jtpcContenedor.add(jtpPanel);\n\tjtpcContenedor.add(jtpPanel2);\n jdpFondo.add(jtpcContenedor, BorderLayout.CENTER);\n jdpFondo.add(jpnlPanelPrincilal);\n }", "public PanelSobre() {\n initComponents();\n }", "public PanelSobre() {\n initComponents();\n }", "public ControlPanel() {\n\t\tpanelName = null;\n\t}", "public PanelIniciarSesion() {\n initComponents();\n }", "private void setupPanels() {\n\t\tsplitPanel.addEast(east, Window.getClientWidth() / 5);\n\t\tsplitPanel.add(battleMatCanvasPanel);\n\t\tpanelsSetup = true;\n\t}", "public NewFetureKeyPanel() {\n initComponents();\n }", "public PrincipalPanel() {\n\t\tinitialize();\n\t}", "private JPanel createFilmPanel() {\n\t\tJPanel filmPanel = new JPanel();\n\t\tfilmPanel.setLayout(new BorderLayout());\n\t\tfilmPanel.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tJPanel filmTitlePanel = new JPanel();\n\t\tfilmTitlePanel.setLayout(new BorderLayout());\n\t\tJLabel films = new JLabel(\"Films\");\n\t\tfilmTitlePanel.add(films, BorderLayout.WEST);\n\t\tfilmComboBox = new JComboBox(filmCBContent);\n\t\tfilmComboBox.setName(\"filmComboBox\");\n\t\tfilmTitlePanel.add(filmComboBox, BorderLayout.EAST);\n\t\tfilmPanel.add(filmTitlePanel, BorderLayout.NORTH);\n\n\t\tfilmContents = new JPanel();\n\t\tfilmContents.setLayout(new FlowLayout());\n\t\tfilmPanel.add(filmContents, BorderLayout.CENTER);\n\t\tfilmPanel.add(createJScrollPane(filmContents), BorderLayout.CENTER);\n\n\t\treturn filmPanel;\n\t}", "private void initializePanels() {\n queueInfoPanel.setBackground(new Color(236, 125, 51));\n queueButtonsPanel.setBackground(new Color(93, 118, 161));\n createLabelForPanel(queueInfoPanel);\n createButtonsForPanel(queueButtonsPanel);\n }", "private PanelManager(FlowClient frame) {\r\n\t\t// Swing necessities\r\n\t\tlayout = new CardLayout();\r\n\t\tthis.frame = frame;\r\n\t\tthis.setLayout(layout);\r\n\t\tsetBorder(FlowClient.EMPTY_BORDER);\r\n\r\n\t\t// Creates new panels and adds them to the cardlayout stack\r\n\t\teditTabs = new EditTabs();\r\n\r\n\t\tloginPane = new LoginPane(this);\r\n\t\tadd(loginPane, \"loginPane\");\r\n\r\n\t\tCreateAccountPane createAccountPane = new CreateAccountPane(this);\r\n\t\tadd(createAccountPane, \"createPane\");\r\n\r\n\t\teditPane = new EditPane(this);\r\n\t\tadd(editPane, \"editPane\");\r\n\r\n\t\tdebugPane = new DebugPane(this);\r\n\t\tadd(debugPane, \"debugPane\");\r\n\r\n\t\tSettingsPane settingsTabs = new SettingsPane(this);\r\n\t\tadd(settingsTabs, \"settingsPane\");\r\n\r\n\t\thistoryPane = new HistoryPane(this);\r\n\t\tadd(historyPane, \"historyPane\");\r\n\t}", "public WithdrawPanel() {\n initComponents();\n }", "public void createPartyPanel()\n {\n setPartyLabel(game.getPartyPane(), 0);\n //setPartyLabel(\"EMPTY\", 1);\n //setPartyLabel(\"EMPTY\", 2);\n //setPartyLabel(\"EMPTY\", 3);\n reloadPartyPanel();\n }", "public void setupPanel() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new ModifiedFlowLayout(FlowLayout.LEFT));\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setOpaque(true);\n\t}", "public DashBoardPanel() {\n initComponents();\n }", "private void createFunctionPanel()\n\t{\n\t\tGridLayout funcGrid = new GridLayout(2,5);\n\t\tfuncGrid.setHgap (5);\n\t\tfuncGrid.setVgap (5);\n\t\tfunctionPanel.setLayout(funcGrid);\n\t\tfunctionPanel.add (eToPower);\n\t\tfunctionPanel.add (ln);\n\t\tfunctionPanel.add (twoPower);\n\t\tfunctionPanel.add (xCube);\n\t\tfunctionPanel.add (xSquare);\n\t\tfunctionPanel.add (del);\n\t\tfunctionPanel.add (C);\n\t\tfunctionPanel.add (negate);\n\t\tfunctionPanel.add (cubeRoot);\t\t\n\t\tfunctionPanel.add (squareRoot);\n\t\t\n\t}", "public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}", "private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}", "private org.gwtbootstrap3.client.ui.Panel get_f_Panel28() {\n return build_f_Panel28();\n }", "private org.gwtbootstrap3.client.ui.Panel get_f_Panel16() {\n return build_f_Panel16();\n }", "private void createpanel1() {\r\n\t\theader = new JLabel();\r\n\t\theader.setText(\"Type in Userinformation\");\r\n\t\theader.setFont(customFont.deriveFont(25f));\r\n\t\theader.setForeground(Color.WHITE);\r\n\r\n\t\tpanels[0].add(header);\r\n\t\tpanels[0].setOpaque(false);\r\n\t\tallComponents.add(panels[0]);\r\n\r\n\t}", "public Records_Panel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\ttitleFieldImage = new JLabel();\r\n\t\t\ttitleFieldImage.setBounds(new Rectangle(480, 75, 280, 60));\r\n\t\t\ttitleFieldImage.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldImage.setText(\"Image\");\r\n\t\t\ttitleFieldImage.setBackground(new Color(255, 204, 204));\r\n\t\t\tpageInfoLbl = new JLabel();\r\n\t\t\tpageInfoLbl.setBounds(new java.awt.Rectangle(224,480,315,30));\r\n\t\t\tpageInfoLbl.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\tpageInfoLbl.setText(\"\");\r\n\t\t\ttitleFieldName = new JLabel();\r\n\t\t\ttitleFieldName.setBounds(new Rectangle(190, 75, 170, 60));\r\n\t\t\ttitleFieldName.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldName.setBackground(new Color(255,204,204));\r\n\t\t\ttitleFieldName.setText(\"Field name\");\r\n\t\t\ttitleFieldId = new JLabel();\r\n\t\t\ttitleFieldId.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleFieldId.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldId.setBackground(new Color(255,160,204));\r\n\t\t\ttitleFieldId.setText(\"Field ID\");\r\n\t\t\tlblPageName = new JLabel();\r\n\t\t\tlblPageName.setBounds(new Rectangle(10, 40, 120, 20));\r\n\t\t\tlblPageName.setText(\"Page Name\");\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setBounds(new java.awt.Rectangle(10,10,500,24));\r\n\t\t\tjLabel.setText(\"Select the field you want to add\");\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.add(jLabel, null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getPageSheet(), null);\r\n\t\t\tjPanel.add(getPreButton(), null);\r\n\t\t\tjPanel.add(getAfterButton(), null);\r\n\t\t\tjPanel.add(lblPageName, null);\r\n\t\t\tjPanel.add(titleFieldId, null);\r\n\t\t\tjPanel.add(titleFieldName, null);\r\n\t\t\tjPanel.add(pageInfoLbl, null);\r\n\t\t\tjPanel.add(titleFieldImage, null);\r\n\t\t\t\r\n\t\t\tJLabel titleFiledType = new JLabel();\r\n\t\t\ttitleFiledType.setText(\"Field Type\");\r\n\t\t\ttitleFiledType.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFiledType.setBounds(new Rectangle(10, 75, 90, 60));\r\n\t\t\ttitleFiledType.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleFiledType.setBounds(360, 75, 120, 60);\r\n\t\t\tjPanel.add(titleFiledType);\r\n\t\t\t\r\n\t\t\tJButton btnSelect = new JButton();\r\n\t\t\tbtnSelect.addActionListener(new ActionListener() {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\treturnValue.clear();\r\n\t\t\t\t\tgrid.freshData();\r\n\t\t\t\t\tList<Map<String, String>> valueList = grid.getValueList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tSelectBean bean = (SelectBean)pageIdSelect.getSelectedItem();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Map<String, String> map : valueList) {\r\n\t\t\t\t\t\tString strSelect = map.get(\"SELECT\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Boolean.valueOf(strSelect)) {\r\n\t\t\t\t\t\t\tMap<String, String> temp = new HashMap<String, String>(map);\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_ID\", bean.getCode());\r\n\t\t\t\t\t\t\tString strName = bean.getName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (strName.indexOf(\":\") > 0 && strName.length() > strName.indexOf(\":\") + 2) {\r\n\t\t\t\t\t\t\t\tstrName = strName.substring(strName.indexOf(\":\") + 2);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_NAME\", strName);\r\n\t\t\t\t\t\t\treturnValue.add(temp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (returnValue.size() > 0) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t\t_parent.addSelectFields(PageSelectDialog.this);\r\n\t\t\t\t\t\tUtils.removeWindow(PageSelectDialog.this);\r\n\t\t\t\t\t\t_parent.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PageSelectDialog.this, \"Plese select field!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\tbtnSelect.setText(\"Select\");\r\n\t\t\tbtnSelect.setSize(new Dimension(90, 30));\r\n\t\t\tbtnSelect.setLocation(new Point(10, 480));\r\n\t\t\tbtnSelect.setBounds(10, 520, 120, 30);\r\n\t\t\tjPanel.add(btnSelect);\r\n\t\t\t\r\n\t\t\ttitleSelect = new JLabel();\r\n\t\t\ttitleSelect.setText(\"Select\");\r\n\t\t\ttitleSelect.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleSelect.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleSelect.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleSelect.setBounds(10, 75, 80, 60);\r\n\t\t\tjPanel.add(titleSelect);\r\n\t\t\t\r\n\t\t\tpageIdSelect = new JComboBox<DefaultComboBoxModel>();\r\n\t\t\tpageIdSelect.addItemListener(new ItemListener() {\r\n\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\t\tsearchDetailList();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tpageIdSelect.setBounds(140, 40, 300, 20);\r\n\t\t\tjPanel.add(pageIdSelect);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}", "private void initializePanels()\r\n\t{\r\n\t\tthis.subscribersPanel = new SubscribersPanel(DIMENSIONS);\r\n\t\tthis.consolePanel = new ConsolePanel(DIMENSIONS);\r\n\r\n\t\tthis.parametersPanel = new ParametersPanel(DIMENSIONS);\r\n\t\tthis.parametersPanel.setSize(DIMENSIONS);\r\n\r\n\t\tthis.mainPanel = new MainPanel(parametersPanel, this);\r\n\t\tthis.mainPanel.setSize(DIMENSIONS);\r\n\r\n\t\tshowParametersPanel();\r\n\t}", "public JJPanel() {\n\n\t}", "public FDRSettingsPanel() {\n initComponents();\n }", "public AppoinmentPanel() {\n initComponents();\n }", "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Panel() {\n listaKul = new ArrayList<>();\n setBackground(Color.BLACK);\n addMouseListener(new Event());\n addMouseWheelListener(new Event());\n timer = new Timer(DELAY, new Event());\n timer.start();\n }", "private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }", "void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.setTitle(gebruikersBeheerModel.getTitle());\n }", "public abstract void init(JPanel panel);", "public HoaDonJPanel() {\n initComponents(); \n this.init();\n }", "private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "public DataSetPanel() {\n initComponents();\n }", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "private Panel designPanel() {\n Panel panel = new Panel();\n contentLayout = new FormLayout();\n wrapperLayout = new VerticalLayout();\n numberOfDatasetsBox = new ComboBox<>();\n numberOfReplicatesBox = new ComboBox<>(\"Select number of Replicates\");\n\n\n List<Integer> possibleDatasetNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfDatasetsBox.setItems(possibleDatasetNumber);\n\n List<Integer> possibleReplicateNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfReplicatesBox.setItems(possibleReplicateNumber);\n\n datasetAccordion = new Accordion();\n datasetAccordion.setWidth(\"100%\");\n\n panel.setContent(wrapperLayout);\n return panel;\n }", "public VirtualPanel() {}", "private void createPanelContent() {\n FragmentActivity activity = getActivity();\n if (this.mLayoutView == null) {\n activity.finish();\n }\n ViewGroup.LayoutParams layoutParams = this.mLayoutView.getLayoutParams();\n layoutParams.height = -2;\n this.mLayoutView.setLayoutParams(layoutParams);\n this.mPanelSlices = (RecyclerView) this.mLayoutView.findViewById(C0010R$id.panel_parent_layout);\n this.mSeeMoreButton = (TextView) this.mLayoutView.findViewById(C0010R$id.see_more);\n this.mDoneButton = (TextView) this.mLayoutView.findViewById(C0010R$id.done);\n this.mTitleView = (TextView) this.mLayoutView.findViewById(C0010R$id.panel_title);\n this.mPanelHeader = (LinearLayout) this.mLayoutView.findViewById(C0010R$id.panel_header);\n this.mTitleIcon = (ImageView) this.mLayoutView.findViewById(C0010R$id.title_icon);\n this.mHeaderTitle = (TextView) this.mLayoutView.findViewById(C0010R$id.header_title);\n this.mHeaderSubtitle = (TextView) this.mLayoutView.findViewById(C0010R$id.header_subtitle);\n this.mFooterDivider = this.mLayoutView.findViewById(C0010R$id.footer_divider);\n this.mPanelSlices.setVisibility(8);\n Bundle arguments = getArguments();\n String string = arguments.getString(\"PANEL_CALLING_PACKAGE_NAME\");\n PanelContent panel = FeatureFactory.getFactory(activity).getPanelFeatureProvider().getPanel(activity, arguments);\n this.mPanel = panel;\n if (panel == null) {\n activity.finish();\n }\n this.mPanel.registerCallback(new LocalPanelCallback());\n if (this.mPanel instanceof LifecycleObserver) {\n getLifecycle().addObserver((LifecycleObserver) this.mPanel);\n }\n this.mMetricsProvider = FeatureFactory.getFactory(activity).getMetricsFeatureProvider();\n this.mPanelSlices.setLayoutManager(new LinearLayoutManager(activity));\n this.mLayoutView.getViewTreeObserver().addOnPreDrawListener(this.mOnPreDrawListener);\n loadAllSlices();\n IconCompat icon = this.mPanel.getIcon();\n CharSequence title = this.mPanel.getTitle();\n if (icon == null) {\n this.mTitleView.setVisibility(0);\n this.mPanelHeader.setVisibility(8);\n this.mTitleView.setText(title);\n } else {\n this.mTitleView.setVisibility(8);\n this.mPanelHeader.setVisibility(0);\n this.mPanelHeader.setAccessibilityPaneTitle(title);\n this.mTitleIcon.setImageIcon(icon.toIcon(getContext()));\n this.mHeaderTitle.setText(title);\n this.mHeaderSubtitle.setText(this.mPanel.getSubTitle());\n if (this.mPanel.getHeaderIconIntent() != null) {\n this.mTitleIcon.setOnClickListener(getHeaderIconListener());\n this.mTitleIcon.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));\n } else {\n int dimensionPixelSize = getResources().getDimensionPixelSize(C0007R$dimen.output_switcher_panel_icon_size);\n this.mTitleIcon.setLayoutParams(new LinearLayout.LayoutParams(dimensionPixelSize, dimensionPixelSize));\n }\n }\n if (this.mPanel.getViewType() == 2) {\n this.mFooterDivider.setVisibility(0);\n } else {\n this.mFooterDivider.setVisibility(8);\n }\n this.mSeeMoreButton.setOnClickListener(getSeeMoreListener());\n this.mDoneButton.setOnClickListener(getCloseListener());\n if (this.mPanel.isCustomizedButtonUsed()) {\n CharSequence customizedButtonTitle = this.mPanel.getCustomizedButtonTitle();\n if (TextUtils.isEmpty(customizedButtonTitle)) {\n this.mSeeMoreButton.setVisibility(8);\n } else {\n this.mSeeMoreButton.setVisibility(0);\n this.mSeeMoreButton.setText(customizedButtonTitle);\n }\n } else if (this.mPanel.getSeeMoreIntent() == null) {\n this.mSeeMoreButton.setVisibility(8);\n }\n this.mMetricsProvider.action(0, 1, this.mPanel.getMetricsCategory(), string, 0);\n }", "public void preparePanelPoder(){\n\t\tpanelNombrePoder = new JPanel();\n\t\tpanelNombrePoder.setLayout( new GridLayout(3,1,0,0 ));\n\t\t\n\t\tString name = ( game.getCurrentSorpresa() == null )?\" No hay sorpresa\":\" \"+game.getCurrentSorpresa().getClass().getName();\n\t\tn1 = new JLabel(\"Sorpresa actual:\"); \n\t\tn1.setForeground(Color.WHITE);\n\t\t\n\t\tn2 = new JLabel();\n\t\tn2.setText(name.replace(\"aplicacion.\",\"\"));\n\t\tn2.setForeground(Color.WHITE);\n\t\t\n\t\tpanelNombrePoder.add(n1);\n\t\tpanelNombrePoder.add(n2);\n\t\tpanelNombrePoder.setBounds( 34,200 ,110,50);\n\t\tpanelNombrePoder.setOpaque(false);\n\t\tthis.add( panelNombrePoder);\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Panneaux(){\n this.infoPane = new InfoPane();\n this.leftPanel = new LeftPanel();\n this.catalogue = leftPanel.getCatatalogue();\n this.panier = leftPanel.getPanier();\n }", "TabbelPane() {\r\n\t\t\tpanelDB = new JPanelCluster(\"mine\", new EventFromDb());\r\n\t\t\tpanelFile = new JPanelCluster(\"store from file\", new EventFromFile());\r\n\t\t\tImageIcon icon = new ImageIcon(\"database.png\");\r\n\t\t\tImage image = icon.getImage();\r\n\t\t\tImage newimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"DB\", icon, panelDB);\r\n\t\t\ticon = new ImageIcon(\"file.png\");\r\n\t\t\timage = icon.getImage();\r\n\t\t\tnewimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"file\", icon, panelFile);\r\n\t\t\tsetVisible(true);\r\n\t\t}", "public EOProductPanel2() {\n initComponents();\n }", "public LayerViewPanel()\r\n {\r\n \r\n }", "private void init() {\r\n\t\tthis.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));\r\n\t\tthis.labelTitle = new JLabel(\"Edit your weapons\");\r\n\t\tthis.labelTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.initFilter();\r\n\t\tthis.initList();\r\n\t\tthis.list.setSelectedIndex(0);\r\n\t\tthis.initInfo();\r\n\t\tthis.initButton();\r\n\r\n\t\tJPanel panelWest = new JPanel();\r\n\t\tpanelWest.setLayout(new BoxLayout(panelWest, BoxLayout.PAGE_AXIS));\r\n\t\tJPanel panelCenter = new JPanel();\r\n\t\tpanelCenter.setLayout(new BoxLayout(panelCenter, BoxLayout.LINE_AXIS));\r\n\r\n\t\tpanelWest.add(this.panelFilter);\r\n\t\tpanelWest.add(Box.createRigidArea(new Dimension(0, 5)));\r\n\t\tpanelWest.add(this.panelInfo);\r\n\t\tpanelCenter.add(panelWest);\r\n\t\tpanelCenter.add(Box.createRigidArea(new Dimension(10, 0)));\r\n\t\tthis.panelList.setPreferredSize(new Dimension(300, 150));\r\n\t\tpanelCenter.add(this.panelList);\r\n\r\n\t\tthis.panel.add(this.labelTitle);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(panelCenter);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(this.panelButton);\r\n\r\n\t}", "private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }", "public JPanel buildPanel() {\n\t\tsetLayout(new BorderLayout());\n\t\tsetBackground(ClientConstants.LIGHT_YELLOW);\n\t\tJLabel graphPlotLabel = new JLabel(ClientConstants.GRAPH_PLOT, JLabel.CENTER);\n\t\tgraphPlotLabel.setFont(ClientConstants.TEXT_FONT);\n\t\tadd(graphPlotLabel, BorderLayout.NORTH);\n\t\tsetLayout(new BorderLayout());\n\t\taffectiveGraphPlot = new AffectivePlot();\n\t\tClientDataSingleton.getInstance().setAffectivePlot(affectiveGraphPlot);\n\t\taffectiveGraphPlot.setBackground(Color.WHITE);\n\t\tadd(affectiveGraphPlot);\n\t\treturn this;\n\t}", "public ImagePanel() {\n\t\ttry {\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigorest.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigono.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigolow.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigohigh.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigocondensation.png\").getPath())));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}", "private void crearPanel() {\r\n\t\tJLabel lbl_Empresa = new JLabel(\"Empresa:\");\r\n\t\tlbl_Empresa.setBounds(10, 52, 72, 14);\r\n\t\tadd(lbl_Empresa);\r\n\r\n\t\ttxField_Empresa = new JTextField();\r\n\t\ttxField_Empresa.setBounds(116, 49, 204, 20);\r\n\t\tadd(txField_Empresa);\r\n\t\ttxField_Empresa.setColumns(10);\r\n\r\n\t\tlbl_Oferta = new JLabel(\" \");\r\n\t\tlbl_Oferta.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlbl_Oferta.setBounds(10, 11, 742, 20);\r\n\t\tadd(lbl_Oferta);\r\n\r\n\t\tJLabel lbl_sueldoMin = new JLabel(\"Sueldo Minimo:\");\r\n\t\tlbl_sueldoMin.setBounds(10, 83, 96, 14);\r\n\t\tadd(lbl_sueldoMin);\r\n\r\n\t\ttxField_sueldoMin = new JTextField();\r\n\t\ttxField_sueldoMin.setColumns(10);\r\n\t\ttxField_sueldoMin.setBounds(116, 80, 93, 20);\r\n\t\tadd(txField_sueldoMin);\r\n\r\n\t\tJLabel lbl_sueldoMax = new JLabel(\"Sueldo Maximo:\");\r\n\t\tlbl_sueldoMax.setBounds(10, 115, 96, 14);\r\n\t\tadd(lbl_sueldoMax);\r\n\r\n\t\ttxField_sueldoMax = new JTextField();\r\n\t\ttxField_sueldoMax.setColumns(10);\r\n\t\ttxField_sueldoMax.setBounds(116, 112, 93, 20);\r\n\t\tadd(txField_sueldoMax);\r\n\r\n\t\tJLabel lbl_experiencia = new JLabel(\"A\\u00F1os de experiencia minimos:\");\r\n\t\tlbl_experiencia.setBounds(10, 143, 185, 14);\r\n\t\tadd(lbl_experiencia);\r\n\r\n\t\ttxField_experiencia = new JTextField();\r\n\t\ttxField_experiencia.setColumns(10);\r\n\t\ttxField_experiencia.setBounds(205, 140, 93, 20);\r\n\t\tadd(txField_experiencia);\r\n\r\n\t\tJLabel lbl_aspectosValorar = new JLabel(\"Aspectos a valorar:\");\r\n\t\tlbl_aspectosValorar.setBounds(10, 178, 137, 14);\r\n\t\tadd(lbl_aspectosValorar);\r\n\r\n\t\ttxArea_aspectosValorar = new JTextArea();\r\n\t\ttxArea_aspectosValorar.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosValorar.setBounds(157, 172, 253, 41);\r\n\t\tadd(txArea_aspectosValorar);\r\n\r\n\t\tJLabel lbl_aspectosImpres = new JLabel(\"Aspectos imprescindibles:\");\r\n\t\tlbl_aspectosImpres.setBounds(10, 238, 133, 14);\r\n\t\tadd(lbl_aspectosImpres);\r\n\r\n\t\ttxArea_aspectosImpres = new JTextArea();\r\n\t\ttxArea_aspectosImpres.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosImpres.setBounds(157, 232, 253, 41);\r\n\t\tadd(txArea_aspectosImpres);\r\n\r\n\t\tJLabel lbl_descripcion = new JLabel(\"Descripcion:\");\r\n\t\tlbl_descripcion.setBounds(10, 302, 107, 14);\r\n\t\tadd(lbl_descripcion);\r\n\r\n\t\ttxArea_descripcion = new JTextArea();\r\n\t\ttxArea_descripcion.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_descripcion.setBounds(10, 328, 465, 149);\r\n\t\tadd(txArea_descripcion);\r\n\r\n\t\tJLabel lbl_conocimientos = new JLabel(\"Conocimientos requeridos:\");\r\n\t\tlbl_conocimientos.setBounds(537, 125, 169, 14);\r\n\t\tadd(lbl_conocimientos);\r\n\r\n\t\tpa_conocimientos = new PanelListaDoble(Usuario.getConocimientosTotales(), miOferta.getConocimientos());\r\n\t\tpa_conocimientos.setBounds(537, 174, 215, 180);\r\n\t\tadd(pa_conocimientos);\r\n\r\n\t\ttxField_buscarCono = new JTextField();\r\n\t\ttxField_buscarCono.setBounds(537, 140, 135, 20);\r\n\t\tadd(txField_buscarCono);\r\n\t\ttxField_buscarCono.setColumns(10);\r\n\r\n\t\tJButton btn_buscar = new JButton(\"\");\r\n\t\tbtn_buscar.setBounds(682, 138, 24, 23);\r\n\t\tadd(btn_buscar);\r\n\r\n\t\tbtn_crear = new JButton(\"\");\r\n\t\tbtn_crear.setBounds(716, 138, 24, 23);\r\n\t\tadd(btn_crear);\r\n\r\n\t\ttxField_lugar = new JTextField();\r\n\t\ttxField_lugar.setEditable(false);\r\n\t\ttxField_lugar.setColumns(10);\r\n\t\ttxField_lugar.setBounds(506, 49, 234, 20);\r\n\t\tadd(txField_lugar);\r\n\r\n\t\tJLabel lbl_lugar = new JLabel(\"Lugar de trabajo:\");\r\n\t\tlbl_lugar.setBounds(392, 52, 104, 14);\r\n\t\tadd(lbl_lugar);\r\n\r\n\t\tJLabel lbl_contrato = new JLabel(\"Tipo de contrato:\");\r\n\t\tlbl_contrato.setBounds(392, 83, 104, 14);\r\n\t\tadd(lbl_contrato);\r\n\r\n\t\tcombo_contrato = new JComboBox<Contrato>();\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORAL_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORTAL_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.setBounds(506, 83, 159, 20);\r\n\t\tadd(combo_contrato);\r\n\t\t// d\r\n\t\tinicializar(miOferta);\r\n\t\tdesHabCampos(false);\r\n\t\tif (miOferta.getEmpresa().getNumID().compareToIgnoreCase(Aplicacion.getUsuario().getNumID()) == 0) {\r\n\t\t\tbtnEliminar = new JButton(\"Eliminar\");\r\n\t\t\tbtnEliminar.setToolTipText(\"Eliminar\");\r\n\t\t\tbtnEliminar.setBounds(492, 384, 125, 41);\r\n\t\t\tadd(btnEliminar);\r\n\r\n\t\t\tbtnRetirar = new JButton(\"\\uD83D\\uDC40\");\r\n\t\t\tbtnRetirar.setToolTipText(\"Retirar Oferta\");\r\n\t\t\tbtnRetirar.setBounds(627, 384, 125, 41);\r\n\t\t\tadd(btnRetirar);\r\n\r\n\t\t\tbutton_Editar = new JButton(\"Editar\");\r\n\t\t\tbutton_Editar.setToolTipText(\"Editar\");\r\n\t\t\tbutton_Editar.setBounds(627, 436, 125, 41);\r\n\t\t\tadd(button_Editar);\r\n\r\n\t\t\tbutton_Editar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\tdesHabCampos(true);\r\n\t\t\t\t\tbutton_Editar.setVisible(false);\r\n\t\t\t\t\tbtnEliminar.setVisible(false);\r\n\t\t\t\t\tbtnRetirar.setVisible(false);\r\n\t\t\t\t\tbtn_crear.setVisible(false);\r\n\r\n\t\t\t\t\tbtn_guardar = new JButton(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setToolTipText(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setBounds(627, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_guardar);\r\n\r\n\t\t\t\t\tbtn_cancelar = new JButton(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setToolTipText(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setBounds(492, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_cancelar);\r\n\r\n\t\t\t\t\tbtn_cancelar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tbtn_guardar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.setVisible(false);\r\n\t\t\t\t\t\t\tbtn_guardar.setVisible(false);\r\n\t\t\t\t\t\t\tbtnEliminar.setVisible(true);\r\n\t\t\t\t\t\t\tbutton_Editar.setVisible(true);\r\n\t\t\t\t\t\t\tbtnRetirar.setVisible(true);\r\n\t\t\t\t\t\t\tbtn_crear.setVisible(true);\r\n\t\t\t\t\t\t\tinicializar(miOferta);\r\n\t\t\t\t\t\t\tdesHabCampos(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tbtn_guardar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tEmergenteCambios.createWindow(\"┐Desea guardar los cambios?\", (TieneEmergente) padre);\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}", "private void constructAnimationPanel() {\n animationPanel = new EAPanel(model);\n animationPanel.setLayout(new FlowLayout());\n animationPanel.setPreferredSize(new Dimension(model.getWidth(), model.getHeight()));\n mainPanel.add(animationPanel);\n }", "public void init() {\r\n\t\t/*\r\n\t\t * Initialize panel for base\r\n\t\t */\r\n\t\tbaseList = GameMap.getBaseList();\r\n\t\tthis.add(new BaseInfoPanel(baseList.getFirst(), controlPanel));\r\n\t}", "private void createSchedulePanel()\n\t{\n\t\t//newWeek=new Week(selectedId);\n\t\t//contentPane.add(newWeek,BorderLayout.SOUTH);\n\t\t//System.out.println(\"first time load:\"+selectedId);\n\t\tschedule=new Schedule(selectedId, isSprinklerSelected);\n\t\tschedulePane=new JPanel();\n\t\tschedulePane.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\tschedulePane.add(schedule);\n\t\tcontentPane.add(schedulePane,BorderLayout.CENTER);//add to content pane\n\t}", "public MenuPanel() {\n initComponents();\n }", "public ControlPanel(String propFile) {\n super(propFile);\n frame = new JFrame(\"Control Panel\");\n frame.setPreferredSize(new Dimension(900, 500));\n frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);\n }", "public kinpanel() {\n initComponents();\n }", "public CarFuelPanel() {\n this(false, null);\n }", "public AnimationPanel() {\n initComponents();\n // create a new game board\n game = new GameOfLife(gridSize);\n }", "public void onModuleLoad() {\n\t\t//create our main panel\n\t\tfinal DeckPanel panels = new DeckPanel(); \n\t\tRootPanel.get(\"panel\").add(panels);\n\t\t//create our stage panels\n\t\tfinal LoginPanel login = new LoginPanel(panels,wwwordzService);\n\t\tfinal GamePanel game = new GamePanel(panels,wwwordzService); \n\t\tfinal RankingPanel ranking = new RankingPanel(panels,wwwordzService);\n\t\t//add stage panels to main panel\n\t\tpanels.add(login);\n\t\tpanels.add(game);\n\t\tpanels.add(ranking);\n\t\tpanels.showWidget(0);\n\t\t\n\n\t}", "public PanelImage( )\r\n {\r\n JLabel image = new JLabel( );\r\n ImageIcon icon = new ImageIcon( \"./data/img/header.png\" );\r\n image = new JLabel( \"\" );\r\n image.setIcon( icon );\r\n add( image );\r\n }", "private JPanel initializePanel() {\n JPanel myPanel = new JPanel();\n //myPanel.setPreferredSize(new Dimension(600,600));\n\n myPanel.setLayout(new GridLayout(8,8));\n myPanel.setSize(600,600);\n myPanel.setLocation(100,100);\n myPanel.setBorder(new LineBorder(Color.BLACK));\n return myPanel;\n }", "public FrameCadastro(String tipo[]){\r\n\t\tsuper(\"ApartManager-Cadastro\");\r\n\t\t\r\n\t\tPanelCadastro panelC = new PanelCadastro(tipo);\r\n\t\t\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetSize(700, 700);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t\tsetResizable(false);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tsetContentPane(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\tpanelC.setBounds(0, 0, 700, 700);\r\n\t\tpanel.add(panelC);\r\n\t\tpanel.setVisible(true);\r\n\t}", "public TMCropperPanel() {\n initComponents();\n this.setBorder(new WorkflowModuleBorder(WorkflowModuleBorder.BLUE_SHADOW));\n }", "public WeaponPanel() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 600, 600);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcard = new CardLayout(0, 0);\n\t\tframe.getContentPane().setLayout(card);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.WHITE);\n\t\tframe.getContentPane().add(panel, \"name_6126640247321\");\n\n\t\tpanel.add(cdFilmePanel);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBackground(Color.WHITE);\n\t\tframe.getContentPane().add(panel_1, \"name_6128366176959\");\n\n\t\tpanel_1.add(fdFilmePanel);\n\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tJMenu mnNewMenu = new JMenu(\"Filmes\");\n\t\tmenuBar.add(mnNewMenu);\n\n\t\tJMenuItem mntmNewMenuItem_1 = new JMenuItem(\"New menu item\");\n\t\tmntmNewMenuItem_1.setAction(action);\n\t\tmnNewMenu.add(mntmNewMenuItem_1);\n\n\t\tJMenuItem mntmNewMenuItem = new JMenuItem(\"New menu item\");\n\t\tmntmNewMenuItem.setAction(action_1);\n\t\tmnNewMenu.add(mntmNewMenuItem);\n\t}", "public Principal() {\r\n initComponents();\r\n setLocationRelativeTo(null); \r\n panel_Compras = new Compras();\r\n panel_Ventas = new Ventas();\r\n }", "private JPanel makePanel()\n {\n JPanel mainPanel = new JPanel();\n mainPanel.add(myLoginPanel);\n\n return mainPanel;\n }", "private Panel buildPanelImg() {\n\t\tpanelImg = new Panel();\r\n\t\tpanelImg.setImmediate(false);\r\n\t\tpanelImg.setWidth(\"-1px\");\r\n\t\tpanelImg.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// gridImg\r\n\t\tgridImg = new HorizontalLayout();\r\n\t\tgridImg.setImmediate(false);\r\n\t\tgridImg.setWidth(\"128px\");\r\n\t\tgridImg.setHeight(\"128px\");\r\n\t\tgridImg.setMargin(false);\r\n\t\tpanelImg.setContent(gridImg);\r\n\t\t\r\n\t\treturn panelImg;\r\n\t}", "public PanelJuego() {\r\n\t\tsetLayout(new GridLayout(3, 3, 20, 20));// Se crea una matriz 3x3 con un\r\n\t\t\t\t\t\t\t\t\t\t\t\t// espaciado tanto horizontal\r\n\t\t\t\t\t\t\t\t\t\t\t\t// como vertical.\r\n\t\tposicion = new JTextField[9];\r\n\t\tllenarPanel();\r\n\t\tsetBackground(Color.BLACK);// Se pinta el fondo de negro.\r\n\t\tsetVisible(true);\r\n\t}", "public Panel(LayoutManager paramLayoutManager)\n/* */ {\n/* 65 */ setLayout(paramLayoutManager);\n/* */ }", "private MusicPlayer()\n {\n panel = new JFXPanel();\n }", "private void createWidgets() {\n\n\t\tJPanel filmPanel = createFilmPanel();\n\t\tJPanel musicPanel = createMusicPanel();\n\t\tJPanel unclassPanel = createUnclassifiedPanel();\n\n\t\tthis.add(filmPanel);\n\t\tthis.add(musicPanel);\n\t\tthis.add(unclassPanel);\n\t}" ]
[ "0.7372396", "0.6996672", "0.6996672", "0.6947476", "0.69182575", "0.6803465", "0.68031687", "0.677602", "0.6767688", "0.6761164", "0.6710466", "0.66977525", "0.66848844", "0.6680828", "0.66687506", "0.6651727", "0.657802", "0.65490156", "0.65427446", "0.652928", "0.65290475", "0.65216756", "0.65027916", "0.6452892", "0.64495707", "0.6432186", "0.64198494", "0.6394693", "0.63828075", "0.6366382", "0.6357661", "0.6357661", "0.63460803", "0.6310407", "0.6300649", "0.6297514", "0.6296833", "0.6251481", "0.6240355", "0.62393415", "0.6222448", "0.6214468", "0.621042", "0.6210044", "0.6208405", "0.62051564", "0.6203582", "0.620283", "0.6202209", "0.6201539", "0.6201479", "0.618799", "0.61830986", "0.61792094", "0.61767465", "0.6174167", "0.6173912", "0.6172777", "0.6172129", "0.6168285", "0.61628234", "0.61564016", "0.6150946", "0.6146302", "0.6144773", "0.61407214", "0.6134344", "0.61291367", "0.61283416", "0.61203617", "0.61147374", "0.6103086", "0.6096267", "0.60889083", "0.6087141", "0.6086299", "0.60854715", "0.6081073", "0.6080387", "0.607548", "0.6069028", "0.60685575", "0.60679656", "0.6059622", "0.60563725", "0.6055393", "0.6055183", "0.60510516", "0.6043141", "0.60412526", "0.6039119", "0.60376126", "0.60348076", "0.60303754", "0.60233265", "0.60217905", "0.601796", "0.60140896", "0.6008335", "0.6006653", "0.600206" ]
0.0
-1
Gets the image U rl.
public String getImageURl(){ return this.lePanel.chEventImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getIMG(){\n return profile.getImg();\n }", "public String getUserImg() {\r\n return userImg;\r\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public Rectangle getImage() {\n\t\treturn image;\n\t}", "public long getLUC() {\r\n/* 180 */ return this._LUC;\r\n/* */ }", "public String getImg_0() {\n return img_0;\n }", "public Image getImage() {\n return (isFacingRight) ? Images.get(\"rightTedhaun\") : Images.get(\"leftTedhaun\");\n }", "public BufferedImage getImage() {\n\t\t return img;\n\t}", "java.lang.String getImage();", "public Pixel topRight() {\n if (this.up == null) {\n return null;\n }\n else {\n return this.up.right;\n }\n }", "public Image getCrotchetRest();", "public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }", "public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}", "public Image getUnicorn() {\r\n \treturn unicorn;\r\n }", "public String getImage() {\n\t\treturn image;\n\t}", "public String getImage() {\n\t\treturn image;\n\t}", "public PImage getImg() {\n \treturn img;\n }", "@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}", "public String getImage() { return image; }", "public BufferedImage getImage() {\n\t\treturn this.image;\n\t}", "public String getImage()\n {\n return image;\n }", "public PImage getImage() {\n return this.image;\n }", "public double getIm() {\r\n return im;\r\n }", "public String getImage() {\n return image;\n }", "public String getUserProfileImg() {\n return userProfileImg;\n }", "public String getImage() {\n return this.Image;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "public Integer getUrid() {\r\n return urid;\r\n }", "public int getImage();", "public String getImg() {\n return img;\n }", "public String getImg() {\n return img;\n }", "public String getImg() {\n return img;\n }", "private PlanarImage getImage() {\n PlanarImage img = roiImage;\n if (img == null) {\n synchronized (this) {\n img = roiImage;\n if (img == null) {\n roiImage = img = roi.getAsImage();\n }\n }\n }\n return img;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public double getIm() {\n return im;\n }", "public Image getImage() {\n\t\treturn image;\r\n\t}", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "public double getIm() {\n\t\treturn im;\n\t}", "public Image getImage() {\r\n\t\treturn image;\r\n\t}", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "java.lang.String getProfileImage();", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\n\t\treturn image;\n\t}", "public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}", "public Image getImage() {\r\n return image;\r\n }", "public Image getImage() {\n return image;\n }", "public String getaImg() {\n return aImg;\n }", "public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}", "String getImage();", "public java.lang.String getImage() {\n java.lang.Object ref = image_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n image_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public BufferedImage getImage() {\n return image;\n }", "public Image getQuaverRest();", "public Image getImg(){\n\t\treturn imgs[count];\n\t}", "public ArrayList<String> getUsrImageUUIDs() {\n\t\treturn this.usrImageUUIDs;\n\t}", "public String getImg(){\n return img;\n }", "int getAvatar();", "public Image getImage() {\n return image;\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}", "public Integer getImageResource(){\n return mImageResource;\n }", "public ImageInfo getImage() {\n return image;\n }", "public String getRestImg() {\r\n return restImg;\r\n }", "public String getRtPic() { return rtPic; }", "public java.lang.String getImage() {\n java.lang.Object ref = image_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n image_ = s;\n return s;\n }\n }", "public String getImg_1() {\n return img_1;\n }", "byte[] getProfileImage();", "public String getImage() {\n\t\treturn null;\n\t}", "public static int getImageResourceId() {\n return mImageResourceId;\n }", "public int getR();", "public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }", "public Image getSix();", "public Image getQuaverUp();", "public Image getCrotchetUp();", "public String getpImage() {\n return pImage;\n }", "public int[][] getImage() {\n return m_img;\n }", "public final ImageProcessor getImage() {\r\n return image;\r\n }", "protected ImageView getImageView(){\n\t\treturn iv1;\n\t}", "public BufferedImage getImage() {\n\t\tString base64ImageString = getData();\n\t\tByteArrayInputStream byteStream = new ByteArrayInputStream(Base64\n\t\t\t\t.decodeBase64(base64ImageString.getBytes()));\n\t\ttry {\n\t\t\treturn ImageIO.read(byteStream);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic String getUserPicture() {\n\t\treturn super.getUserPicture();\n\t}", "public String getHeadimg() {\n return headimg;\n }", "public String getHeadimg() {\n return headimg;\n }", "public Rectangle getRect() {\n return new Rectangle(x,y,(imageWeight-50),(imageHeight-50));\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public ModelImage getResultImage() {\r\n return resultImage;\r\n }", "public int getImageResourceId() {\n return mImageResourceId;\n }", "public int getImageResourceId() {\n return mImageResourceId;\n }", "public int getImageResourceId() {\n return mImageResourceId;\n }", "public int getImageResourceId() {\n return mImageResourceId;\n }", "public int getImageResourceId() {\n return mImageResourceId;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public static String getBiblioImagenUsuario() {\n\t\treturn \"imagenUsuario\";\n\t}", "PImage getImage() {\n return _img;\n }", "public int getImageResourceId() {\r\n return mImageResourceId;\r\n }", "public Image getMinimRest();", "public int getRightImageId() {\n return rightImageId;\n }" ]
[ "0.6478926", "0.6354991", "0.62164253", "0.6104466", "0.60481685", "0.6010251", "0.59959704", "0.5993537", "0.5956977", "0.59344834", "0.59319013", "0.59297717", "0.592818", "0.5927992", "0.5884637", "0.5884637", "0.5870143", "0.584617", "0.5836355", "0.5834487", "0.5829157", "0.58153784", "0.5814011", "0.58102113", "0.5800423", "0.5796845", "0.5796079", "0.5787856", "0.57805544", "0.5774167", "0.5774167", "0.5774167", "0.5758833", "0.5750821", "0.5750821", "0.5750821", "0.5750821", "0.5726721", "0.5721384", "0.570986", "0.57077414", "0.5701463", "0.56920415", "0.5687211", "0.5681689", "0.5681689", "0.5674474", "0.5670251", "0.56649363", "0.56639105", "0.56624174", "0.56574833", "0.56561303", "0.56481254", "0.5641209", "0.5640746", "0.56300753", "0.5619375", "0.56094414", "0.56000185", "0.5597995", "0.55904454", "0.5589033", "0.5588994", "0.5588992", "0.5573805", "0.55706495", "0.55649716", "0.55603695", "0.55579174", "0.5555316", "0.5544362", "0.5544292", "0.5541171", "0.5541063", "0.55401677", "0.5536141", "0.5533479", "0.55307484", "0.5521048", "0.55121505", "0.55049795", "0.55049795", "0.5504734", "0.54885733", "0.54885733", "0.54885733", "0.54850805", "0.54850805", "0.54850805", "0.54850805", "0.54850805", "0.5472466", "0.5472466", "0.5472466", "0.5464856", "0.54605937", "0.54571515", "0.5455692", "0.54436797" ]
0.54440415
99
Listener to check if save ADF is successed.
public interface SaveAdfListener { void onSaveAdfFinished(String adfName, String adf_dataset_uuid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void alertSaveSuccess() {\n\t\tthis.alert(\"Saved\",\"Game saved\",AlertType.INFORMATION);\n\t}", "private void checkSave() {\n if (view.getSave()) {\n try {\n saveGame.export(view.getSaveGameName());\n } catch (Exception e) {\n System.out.println(\"saving failed\");\n }\n System.exit(0);\n }\n }", "protected void succeed()\r\n {\r\n // inform user\r\n ((OwMainAppContext) getContext()).postMessage(getContext().localize(\"plug.owdocprops.OwFieldView.saved\", \"The changes have been applied.\"));\r\n }", "int needsSaving();", "public void onSaveFile(){\n\n\t\t\n\t\tFormUtil.dlg.setText(\"Saving...\");\n\t\tFormUtil.dlg.show();\n\t\tGWT.runAsync(new RunAsyncCallback() {\n\t public void onFailure(Throwable caught) {}\n\t public void onSuccess() {\t \n\t\t\t\t//DeferredCommand.addCommand(new Command() {\n\t \t Scheduler scheduler = Scheduler.get();\n\t \t scheduler.scheduleDeferred(new Command() {\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t FormDef form = controller.getSelectedForm();\t\t\t\t \t\t\t\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tif(form != null){\n\t\t\t\t\t\t\t\tsaveFile(false);\n\t\t\t\t\t\t\t\tFormUtil.dlg.hide();\n\t\t\n\t\t\t\t\t\t\t\tString fileName = \"filename\";\n\t\t\t\t\t\t\t\tfileName = form.getName();\n\t\t\t\t\t\t\t\tString xmlFormStr = FormHandler.writeToXML(form);\n\t\t\t\t\t\t\t\tSaveToFileDialog dlg = SaveToFileDialog.getInstnace(xmlFormStr, fileName);\n\t\t\t\t\t\t\t\tdlg.center();\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tFormUtil.dlg.hide();\n\t\t\t\t\t\t\t\tWindow.alert(\"No form to save\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Exception ex){\n\t\t\t\t\t\t\tFormUtil.displayException(ex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t }\n\t\t});\n\t}", "public boolean isSaveDone() {\n return this.doneSave;\n }", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "public boolean doSave() {\n\n if (fDocument.getFile() == null) {\n return doSaveAs(fDocument.getFormat());\n }\n \n return fDocument.save();\n }", "private void saveFunction() {\n }", "public boolean onSave(Session s) throws CallbackException;", "public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {\n GWT.log(event.getResults());\n mywebapp.log(\"saveMediaFile complete non-markdata style\");\n if (event.getResults().equals(\"SUCCESS\")) {\n doSave();\n } else {\n postDialog.hide();\n mywebapp.getMessagePanel().displayError(event.getResults());\n }\n }", "public void onSave(String filename, boolean PDFChecked,\n\t\t\t\t\t\t\tboolean ExcelChecked) {\n\t\t\t\t\t\tif(PDFChecked){\n\t\t\t\t\t\t\tnew SeatbyAgentPDFUtility(seatReports).createPdf(filename);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(ExcelChecked){\n\t\t\t\t\t\t\tnew SeatbyAgentExcelUtility(seatReports, filename).write();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSKToastMessage.showMessage(SeatDetailsbyAgentActivity.this, \"သင္၏ Report PDF ဖုိင္ အာ External SD Card လမ္းေၾကာင္းသို႕ ထုတ္ ျပီးျပီး ျဖစ္ ပါသည္ \", SKToastMessage.SUCCESS);\n\t\t\t\t\t}", "public void save() {\n sessionBean.saveStudent();\n success = true;\n }", "public boolean save() {\n\t\treturn save(_file);\n\t}", "public boolean save();", "public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "public void onMenuSave() {\n String lastSavedPath = controller.getLastSavePath();\n\n if (lastSavedPath == null) {\n onMenuSaveAs();\n return;\n }\n\n handleFileStorageFactoryResult(controller.saveFile(lastSavedPath));\n }", "public boolean doSave() {\n return true;\n }", "public boolean getSave(){\n return this.didSave;\n }", "private void saveListener() {\n buttonPanel.getSave().addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n toDoList.saveAll(fileLocation);\n }\n });\n }", "public abstract boolean processSaveDocument(Document document);", "@Override\n protected void onPostExecute(com.google.android.gms.common.api.Status status) {\n if (!status.isSuccess()) {\n CharSequence msg = \"There was a problem saving the session: \" +\n status.getStatusMessage();\n Log.i(TAG, msg.toString());\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n } else {\n // At this point, the session has been inserted and can be read.\n CharSequence msg = \"Data saved to Google Fit!\";\n Log.i(TAG, msg.toString());\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }\n }", "public void attributSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "@Override\n public void passed() {\n Log.d(\"elomelo\",\"saved\");\n }", "@Override\n protected void onPostExecute(String adf_dataset_uuid) {\n if (mProgressDialog != null) {\n mProgressDialog.dismiss();\n }\n if (mCallbackListener != null) {\n mCallbackListener.onSaveAdfFinished(mAdfName, adf_dataset_uuid);\n }\n }", "public boolean isSaveScore(){\n\t\treturn manager.isFailed();\n\t}", "public void save() {\n }", "@Override\n public void markSuccess() {\n }", "protected boolean afterSave(boolean newRecord, boolean success) {\n /**\n * 26/07/2013 Maria Jesus Martin\n * Modificación realizada para que si la OP esta en borrador o en proceso se calculen nuevamente\n * las retenciones.\n */\n if (!Env.getContext(Env.getCtx(), \"OmitRetentionCalculation\").equals(\"Y\") \n && !this.isReceipt() \n && (super.isRetenciones()) \n && ( (DOCSTATUS_Drafted.equals(getDocStatus())) \n || (DOCSTATUS_InProgress.equals(getDocStatus()))\n )\n ) {\n System.out.println(\"Entrando a evaluar el calcular retenciones\");\n\n if (this.flagSave == false && this.retencion == true) {\n System.out.println(\"Entrando a calcular retenciones\");\n recalcularRetenciones();\n }\n }\n return true;\n\n }", "@Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"DocumentSnapshot successfully written!\");\n }", "@Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"DocumentSnapshot successfully written!\");\n }", "public boolean saveEvents() {\n\t\ttry {\n\t\t\tmSerializer.saveEvents(mEvents);\n\t\t\tLog.d(TAG, \"events saved to file\");\n\t\t\treturn true;\n\t\t} catch(Exception e){\n\t\t\tLog.e(TAG, \"Error saving event: \", e);\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public void failed() {\n Log.d(\"elomelo\",\"not saved\");\n }", "public boolean save() {\n return false;\n }", "@Override\n protected void onDialogClosed(boolean positiveResult) {\n super.onDialogClosed(positiveResult);\n\n if (positiveResult) {\n save();\n }\n }", "void onSavingFailed(Throwable e);", "private void displaySaveSuccess() {\n\t\tString title = \"Event successfully save...\";\n\t\tString msg =\n\t\t\t\t\"To Do List: \" +txtSubject.getText()+ \n\t\t\t\t\"\\nhas been save....\";\n\t\tJOptionPane.showMessageDialog(\n\t\t\t\tnull, msg, title, JOptionPane.INFORMATION_MESSAGE);\n\t}", "@Override\n\t\tprotected void onPostExecute(final Boolean success)\n\n\t\t{\n\n\t\t\tif (this.dialog.isShowing())\n\n\t\t\t{\n\n\t\t\t\tthis.dialog.dismiss();\n\n\t\t\t}\n\n\t\t\tif (success)\n\n\t\t\t{\n\n\t\t\t\tToast.makeText(ctx, \"Export successful!\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\n\t\t\t\tfilename.setText(getString(R.string.saved_history)\n\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t+ SaveUtils\n\t\t\t\t\t\t\t\t.getLastExportedFileName(StatisticExportActivity.this));\n\t\t\t}\n\n\t\t\telse\n\n\t\t\t{\n\n\t\t\t\tToast.makeText(ctx, \"Export failed\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}\n\n\t\t}", "protected boolean save() {\r\n\t\tboolean saved=true;\r\n\t\tif(validated()){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tsaved=false;\r\n\t\t}\r\n\t\treturn saved;\r\n\t}", "public boolean isSaved()\r\n {\r\n return saved;\r\n }", "@Override\n\t\t\t\tpublic void onAddSuccess() {\n\t\t\t\t\tif (addListener != null) {\n\t\t\t\t\t\taddListener.onAddSuccess();\n\t\t\t\t\t}\n\t\t\t\t}", "public boolean shouldSaveAs() {\n\treturn saveAsOnClose;\n }", "public boolean save() {\n\t\tboolean isCreate = false;\n\t\tif(!validate() || !beforeSave(isCreate)){\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tupdate();\n\t\t} catch (SQLException e) {\n\t\t\tnew Event(Event.getLeafLevelClassName(this), \"save\",\n\t\t\t\t\t\"SQL error while saving: \" + e.toString(), Event.ERROR);\n\t\t\treturn false;\n\t\t}\n\t\tthis.setPersisted(true);\n\t\tafterSave(isCreate);\n\t\treturn true;\n\t}", "private void completeSave() {\n colorBar.updateRevertToCurrent();\n colorBar.revertColorBar();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n cmapParams.setColorMapName(seldCmapName);\n saveBtn.setEnabled(true);\n }", "private void checkSave() {\n if (config.needsSave() || motes.needsSave()) {\n System.out.println(\"need save\");\n int save = JOptionPane.showConfirmDialog(frame, \"Do you want to save this configuration?\", \"Save Configuration\", JOptionPane.YES_NO_OPTION);\n if (save == JOptionPane.YES_OPTION) {\n saveConfiguration(DEFAULT_DB_CONFIG_TABLE);\n }\n }\n }", "protected abstract boolean onSave(CommitBuilder commit)\n throws IOException, ConfigInvalidException;", "@Override\r\n\tpublic void validateSave() throws Exception {\n\r\n\t}", "public void doSave() {\n WaveformLoader.doSave(waveform, WaveformLoader.scalingForSavingFile);\n }", "public boolean save() {\n return save(Datastore.fetchDefaultService(), false);\n }", "public boolean isSaved() {\r\n\t\treturn saved;\r\n\t}", "private void saveData() {\n }", "public void saveAs() {\n editorManager.currentFileManager().saveAs();\n mimaUI.fileChanged();\n }", "public void save() {\t\n\t\n\t\n\t}", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "boolean hasSaveSensor();", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"保存成功\");\n\t\t}", "@Override\n\tpublic void finishSuccess() {\n\t\tSystem.err.println(\"finishSuccess\");\n\n\t}", "public boolean hasSaveSensor() {\n return saveSensor_ != null;\n }", "@Override\n\t\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> result) {\n\t\t\t\t\t\t\tToast.makeText(AddIncomeActivity.this, \"保存成功!\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}", "void onSavingCompleted(List<File> files);", "@Override\n public void onSaveAttachment(AttachmentViewInfo attachment) {\n\n getAttachmentController(attachment).saveAttachment();\n }", "public void alertSaveError() {\n\t\tthis.alert(\"ERROR\",\"Save error\",AlertType.ERROR);\n\t}", "boolean hasSavedFile() {\n return currPlayer != -1 && getStat(saveStatus) == 1;\n }", "@Override\n public boolean save()\n {\n return false;\n }", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "private void save() {\n File personFile = mainApp.getFilmFilePath();\n if (personFile != null) {\n mainApp.saveFilmDataToFile(personFile);\n } else {\n saveAs();\n }\n }", "@Override\n public void save() {\n \n }", "public void saveProgress() {\n\t\tsaveUsers();\n\t\tsaveMaterials();\n\t\tsaveBorrowings();\n\t}", "@Override\n public void onCanvasSaved(final Save save) {\n this.savesfragment.addSave(save);\n String message = getString(R.string.savedmessage) + (!dualpane ? \"\\n\"+getString(R.string.longpresssavemessage) : \"\");\n Toast.makeText(TemplateActivity.this, message, Toast.LENGTH_SHORT).show();\n }", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to save data...\";\n if (flag){\n message = \"Success to save data...\";\n }\n JOptionPane.showMessageDialog(this, message, \"Allert / Notification\", \n JOptionPane.INFORMATION_MESSAGE);\n \n bindingTable();\n reset();\n }", "public void clickOnSave() {\r\n\t\telement(saveButton).waitUntilVisible();\r\n\t\tsaveButton.click();\r\n\t}", "public final boolean save( ) throws Exception\n\t{\n\t\tboolean ret;\n\n\t\tif ( this.href == null )\n\t\t{\n\t\t\tfinal String location = Datastore.getInstance( ).postOnServer( this );\n\t\t\tthis.href = location;\n\t\t\tret = location != null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tret = Datastore.getInstance( ).updateOnServer( this );\n\t\t}\n\n\t\t/* fetch server-side values */\n\t\tload( );\n\n\t\treturn ret;\n\t}", "public boolean saveAs() {\n boolean modOK = modIfChanged();\n boolean saved = false;\n if (modOK) {\n fileChooser.setDialogTitle (\"Save As\");\n fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n File selectedFile = fileChooser.showSaveDialog (this);\n if (selectedFile != null) {\n writer = new ClubEventWriter();\n saved = writer.save (selectedFile, clubEventList, true, false);\n if (saved) {\n setClubEventFolder (selectedFile);\n logger.recordEvent (LogEvent.NORMAL,\n \"Club Events saved to \" + selectedFile.toString(),\n false);\n } else {\n logger.recordEvent (LogEvent.MEDIUM,\n \"Problem saving Club Events to \" + selectedFile.toString(),\n false);\n }\n FileSpec fileSpec = recentFiles.get(0);\n }\n }\n return saved;\n }", "public boolean hasSaveSensor() {\n return saveSensorBuilder_ != null || saveSensor_ != null;\n }", "public int save() {\n\t\treturn 0;\n\t}", "public void onSave() {\n\t\tsetCreationDate(new Date());\n\t\tPageAlias.create(this, null);\n\t\tupdateChildPaths();\n\t}", "@Override\n\t\t\tpublic void onSuccess() {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit success\", Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Then(\"User sees the success message and travel details are saved successfully\")\n public void user_sees_the_success_message_and_travel_details_are_saved_successfully() throws Exception {\n throw new Exception(\"Validation step is failing, app needs to display a success message\");\n }", "public interface SaveFileDialogListener { \n\t\tpublic void onSaveFilePositiveClick(final String filename); \n\t\tpublic void onSaveFileNegativeClick(DialogFragment dialog); \n\t}", "public void saveResults(){\n //Tell adapter to save gathered data\n //Call appropriate function\n }", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\t\n\t\tSystem.out.println(\"All test casee passed and i m the listener class\");\n\t}", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "@Override\n public void save()\n {\n \n }", "@Override\n public void onSuccess() {\n Log.i(\"bmob\", \"删除文件成功\");\n deleteFileListener.onSuccess();\n }", "public boolean canSave()\n {\n return true;\n }", "public boolean canSave()\n {\n return true;\n }", "private void savedDialog() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Changes to the current recipe have been saved.\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Success\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "@OnClick(R.id.btn_save_event)\n public void saveChanges() {\n if (isNewEvent) {\n createEvent();\n } else {\n updateEvent();\n }\n }", "public void doSaveFlight() {\n \tif(initDateTimes()){\n \t\tflight = this.flightService.saveFlight(flight);\n \t\tPrimeFaces.current().executeScript(\"PF('flightCreateDialog').hide()\");\n \t}\n }", "public boolean isDataChanged(){\r\n\t\t\r\n return customElementsForm.isSaveRequired();\r\n }", "@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\t\t}", "public void setOnSave(OnSaveListener listener) {\n onSaveListener = listener;\n\n save.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n if (checkAllFields()) onSaveListener.onSave(formValues);\n }\n });\n }", "protected void doSave() {\n GWT.log(\"Please override\");\n }", "public boolean save() {\n if (!this.a_text.isEnabled()) {\n JOptionPane.showMessageDialog(null, \"Save not allowed.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n\n boolean res = FileTools.saveTextToFile(this.textFilePath, this.a_text.getText());\n\n if (res)\n JOptionPane.showMessageDialog(null, \"File saved\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n else\n JOptionPane.showMessageDialog(null, \"Failed to save file\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n return res;\n }", "public boolean bookSave(Book book) {\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean doPerformSave(RunData runData, Context context,\n AntelopeTaskInstance taskInstance,\n AntelopeProcessInstance processInstance, FormTool form)\n throws Exception {\n\n return doPerformDone(runData, context, taskInstance, processInstance, form);\n }" ]
[ "0.6641797", "0.6299521", "0.6241743", "0.62365687", "0.6224383", "0.6218063", "0.6187782", "0.61543965", "0.61450624", "0.6106021", "0.60539854", "0.60320497", "0.6026082", "0.6011781", "0.60023105", "0.59558743", "0.59503406", "0.5888988", "0.58832467", "0.586337", "0.584149", "0.5818024", "0.5793983", "0.5780524", "0.577515", "0.577103", "0.5757243", "0.5755769", "0.57449836", "0.5729342", "0.57234764", "0.57111394", "0.57111394", "0.56869507", "0.56534296", "0.5649272", "0.5648807", "0.56422037", "0.5596512", "0.55893594", "0.5567739", "0.5558084", "0.5553215", "0.55519557", "0.55500364", "0.5540232", "0.5536494", "0.5523207", "0.55173004", "0.5509483", "0.5497304", "0.5489053", "0.54863095", "0.548518", "0.54688364", "0.54669446", "0.54656", "0.54566807", "0.5454972", "0.54503", "0.5441644", "0.5434047", "0.54232377", "0.54174274", "0.5414245", "0.5412705", "0.5405427", "0.5404592", "0.5397235", "0.5392527", "0.5392228", "0.53898305", "0.538454", "0.53802127", "0.537354", "0.53621066", "0.5360756", "0.5353762", "0.5353006", "0.5348604", "0.5348604", "0.53424835", "0.5340947", "0.5339788", "0.53395045", "0.53394634", "0.53389174", "0.5336222", "0.5333158", "0.5333158", "0.532772", "0.532347", "0.53133947", "0.5309644", "0.5301542", "0.5299836", "0.52991736", "0.52976036", "0.5291526", "0.52900505" ]
0.7163959
0
Call this method to marshall progress updates to the UI thread.
public void publishProgress(int progress) { super.publishProgress(progress); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onProgressUpdate() {\n\n\t}", "@Override\n public void showProgressSync() {\n }", "public void run() {\n\t\t\t\t\tmHandler.post(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tprogressbar.setProgress(Integer\r\n\t\t\t\t\t\t\t\t\t.parseInt(tvsp.progress));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tloadingView.setProgress(values[0]);\n\t\t}", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "@Override\n\t protected void onProgressUpdate(Void... values) {\n\t }", "@Override\n public void update(final Progress progress) {\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n progressBar.setValue(progress.getIntPercentage());\n progressField.setText(roundToSingleDigit(progress.getPercentage()) + \"%\");\n }\n });\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n\n\n // Do things like update the progress bar\n }", "@Override\r\n public void onUIProgressStart(long totalBytes) {\r\n super.onUIProgressStart(totalBytes);\r\n\r\n }", "@Override\n public void showProgress() {\n\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tprogressBar.setVisibility(View.VISIBLE);\n\n\t\t\t// updating progress bar value\n\t\t\tprogressBar.setProgress(progress[0]);\n\n\t\t\t// updating percentage value\n\t\t\ttxtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n\t\t}", "private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percentage*100) + \"%)\");\n\t\tprogressBar.setProgress(percentage);\n\t}", "@Override\n\t\t/*\n\t\t * UI线程执行\n\t\t */\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t// 取出发布进度的值\n\t\t\tint value = values[0];\n\t\t\t// 设置给Button\n\t\t\tbtn.setText(\"\" + value);\n\t\t\tpb.setProgress(value);\n\t\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\n\t\tprotected void onProgressUpdate(Object... values) {\n\t\t}", "@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }", "public static void updateProgressBar() {\r\n mHandler.postDelayed(mUpdateTime, 100);\r\n }", "@Override\r\n protected void onProgressUpdate(Integer... progress) {\n }", "public void updateProgress() {\r\n\t\tfireTableDataChanged();\r\n\t}", "@Override protected void onProgressUpdate(Integer... vals) {\n updateProgressBar(vals[0].intValue());\n }", "protected void onProgressUpdate(Integer... progress) {\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tsuper.onProgressUpdate(progress);\n\n\t\t\tdialog.setProgress(progress[0]);\n\t\t}", "@Override\n\t\t\t\tpublic void onProgress(int progress) {\n\t\t\t\t\tmProgressBar.setProgress(progress);\n\t\t\t\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n if (mProgressDialog != null) {\n mProgressDialog.setProgress(progress[0]);\n }\n }", "public void run() {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = Msg_SetProgress;\n\t\t\t\tmHandler.sendMessage(msg);\n\t\t\t}", "@Override\n public void onClick(View view) {\n progressStatus = 0;\n\n // Start the lengthy operation in a background thread\n new Thread(new Runnable() {\n @Override\n public void run() {\n while (progressStatus < 100) {\n // Update the progress status\n progressStatus += 1;\n }\n\n //Try to sleep the thread for 30 milliseconds\n try {\n Thread.sleep(30);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Update the progress bar\n handler.post(new Runnable() {\n @Override\n public void run() {\n pgb.setProgress(progressStatus);\n }\n });\n }\n }).start();// Start the operation\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\n\t\tprotected void onProgressUpdate(Void... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Void... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\r\n protected void onProgressUpdate(Void... values) {\n super.onProgressUpdate(values);\r\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n barratime.setProgress(values[0]);\n }", "@Override\r\n protected void onProgressUpdate(Void... values) {\n \tsuper.onProgressUpdate(values);\r\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n progressBar.setVisibility(View.VISIBLE);\n\n // updating progress bar value\n progressBar.setProgress(progress[0]);\n\n // updating percentage value\n txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progress.setVisibility(View.VISIBLE);\n progress.setProgress(values[0]);\n super.onProgressUpdate(values);\n }", "protected void sendProgress() {\n setProgress(getProgress() ^ 1);\n }", "@Override\r\n\tprotected void onProgressUpdate(Void... values) {\n\t\tsuper.onProgressUpdate(values);\r\n\r\n\t}", "protected void onProgressUpdate(Integer... progress){\n\t Utils.logThreadSignature(this.tag);\n\t this.reportThreadSignature();\n\n\t //will be called multiple times\n\t //triggered by onPostExecute\n\t Integer i = progress[0];\n\t r.reportBack(tag, \"Progress:\" + i.toString());\n\t pd.setProgress(i);\n }", "protected void onProgressUpdate(Integer... progress) {\n }", "void showProgress();", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n\n progressBar.setProgress(values[0].intValue());\n\n }", "void onShowProgress();", "@Override\n protected void onProgressUpdate(Integer... progress) {\n //Shows the ProgressDialog and sets the progress/message shown\n progressDialog.show();\n progressDialog.setTitle(\"Uploading\");\n progressDialog.setProgress(progress[0]);\n progressDialog.setMessage(String.valueOf(progress[0]) + \"%\");\n }", "public void onProgress(int pos);", "public void progressMade();", "void startProgress();", "@Override\n\tprotected void onProgressUpdate(Integer... values) {\n\t}", "@Override\n public void onProgressUpdate(Integer... progress)\n {\n _dialog.setProgress(progress[0]);\n }", "@Override\n\tprotected void onProgressUpdate(Integer... values) {\n\t\tint len = progressBar.getProgress() + values[0];\n\t\tprogressBar.setProgress(len);\n\t\tString str = progressBar.getProgress() * 100 / progressBar.getMax()\n\t\t\t\t+ \"%\";\n\t\ttv.setText(\"下载完成\" + str);\n\t\tsuper.onProgressUpdate(values);\n\t}", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "@Override\n public void transferred(long num) {\n publishProgress((int) ((num / (float) totalSize) * 100));\n }", "public void startProgress(View view) {\n new Thread(()->{\n // reset (UI communication)\n progress.post(() -> progress.setProgress(0));\n // work\n for (int i = 0; i <= 10; i++) {\n final int value = i;\n doSomething();\n // (UI communication)\n progress.post(() -> {\n text.setText(\"Updating\");\n progress.setProgress(value);\n });\n }\n // end work (UI communication)\n progress.post(()->{\n text.setText(\"Finish\");\n });\n }).start();\n }", "@Override\r\n\tprotected void onProgressUpdate(String... s) {\r\n\t\tactivity.addToGUI(s[0]);\r\n\t}", "protected void onProgressUpdate(String... progress) {\n\t\t\t\t\t\t// Set progress percentage\n\t\t\t\t\t\tprgDialog.setProgress(Integer.parseInt(progress[0]));\n\t\t\t\t\t}", "@Override\r\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\r\n\t\t\tsetProgress(values[0]);\r\n\t\t\t\r\n\r\n\t\t}", "@Override\n protected void onProgressUpdate(Object[] values) {\n }", "private void progressMode() {\n\t\t// lazily build the layout\n\t\tif (progressLayout == null) {\n\t\t\tprogressLayout = new DefaultVerticalLayout(true, true);\n\n\t\t\tprogressBar = new ProgressBar();\n\t\t\tprogressBar.setHeight(\"20px\");\n\t\t\tprogressLayout.add(progressBar);\n\n\t\t\tstatusLabel = new Text(\"\");\n\t\t\tprogressLayout.add(statusLabel);\n\t\t}\n\t\tprogressBar.setValue(0.0f);\n\t\tstatusLabel.setText(\"\");\n\n\t\tremoveAll();\n\t\tadd(progressLayout);\n\t}", "@Override\n protected void onProgressUpdate(Integer... values) {\n }", "@Override\n protected void onProgressUpdate(String... progress) {\n }", "@Override\n public void run() {\n for (int i = 0; i<100 ; i++) {\n pb.setProgress(i/1000.0);\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n ProgressBar pbFileIO = (ProgressBar)findViewById(R.id.pbFileIO);\n pbFileIO.setProgress(progress[0]);\n }", "public void onProgressUpdate(int numRouleau,String prochain);", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\n\t\t\tLog.d(TAG, \" posting\");\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\n\t\t\tLog.d(TAG, \" posting\");\n\t\t}", "void onProgress(float progress);", "@Override\r\n\tpublic void updateProgress(int arg0) {\n\t\t System.out.println(\"arg0.progress=\" + arg0);\r\n\t\tmHandler.obtainMessage(100, arg0, arg0).sendToTarget();\r\n\t}", "public void run() {\r\n ouputProgressModel.setPogressStarted(true);\r\n try {\r\n for (int i = 0; i <= 100; i += 10) {\r\n // pause the thread\r\n Thread.sleep(PROCCESS_SLEEP_LENGTH);\r\n // update the percent value\r\n ouputProgressModel.setPercentComplete(i);\r\n SessionRenderer.render(\"progressExample\");\r\n }\r\n }\r\n catch (InterruptedException e) { }\r\n ouputProgressModel.setPogressStarted(false);\r\n }", "@Override\r\n protected void onProgressUpdate(Void... values) {\r\n super.onProgressUpdate(values);\r\n invalidate();\r\n }", "void showQueuingBuildProgress();", "@Override\n protected void onProgressUpdate(Integer... values) {\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "void progress(int pUnitsCompleted);", "private void updateProgress() {\n progressBar.setProgress( (1.0d * currentQuestion) / numQuestions);\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n loadingText.setText(loadingHints[random.nextInt(loadingHints.length)]);\n // [... Обновите индикатор хода выполнения, уведомления или другой\n // элемент пользовательского интерфейса ...]\n }", "@Override\n protected void onProgressUpdate(String... progress) {\n }", "@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mAvi1.setVisibility(View.VISIBLE);\n }", "@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mAvi1.setVisibility(View.VISIBLE);\n }", "@Override\n\tpublic void progress(Object... obj) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onProgressChanged(int progress) {\n\n\t\t\t}", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "void notifyProgress(MessageSnapshot snapshot);", "private void setUiDuringBackgroundTask(String progress) {\n progressDialog.setMessage(progress);\n\n setInfo(progress);\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\r\n\tprotected void progressFinished() {\n\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n pDialog.setProgress(progress[0]);\n\n // updating percentage value\n //txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Adding workouts...\");\n this.progressDialog.show();\n }", "@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }", "private void updateRunnable() {\n updateSeekBar = new Runnable() {\n @Override\n public void run() {\n playerSeekBar.setProgress(mediaPlayer.getCurrentPosition());\n seekBarHandler.postDelayed(this, 500);\n }\n };\n }", "@Override\n\t\t\tpublic void onAsyncTaskProgressUpdate(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAsyncTaskProgressUpdate(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}", "void onProgress(long bytesTransferred);", "@Override\n \t\tprotected Void doInBackground(Void... params) \n \t\t{\n \t\t\ttry \n \t\t\t{\n \t\t\t\twhile(m_progress < 100) {\n \t\t\t\t\t//Get the current thread's token\n \t\t\t\t\tsynchronized (this) \n \t\t\t\t\t{\n \t\t\t\t\t\tthis.wait();\n \t\t\t\t\t\t//Set the current progress. \n \t\t\t\t\t\t//This value is going to be passed to the onProgressUpdate() method.\n \t\t\t\t\t\tpublishProgress(m_progress);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t} \n \t\t\tcatch (InterruptedException e) \n \t\t\t{\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t\treturn null;\n \t\t}" ]
[ "0.6792078", "0.6650833", "0.6633087", "0.65950173", "0.6568589", "0.6568589", "0.6496277", "0.6482715", "0.6482685", "0.64802223", "0.647169", "0.6454707", "0.6451909", "0.644868", "0.644146", "0.644146", "0.6436689", "0.6433039", "0.6433039", "0.6421778", "0.6409111", "0.64009047", "0.6391488", "0.6344886", "0.63043195", "0.62641186", "0.62615454", "0.6260243", "0.62593645", "0.6244615", "0.6235271", "0.6235271", "0.6233998", "0.62233514", "0.6220382", "0.62130666", "0.62005025", "0.61914337", "0.618949", "0.6179726", "0.6168143", "0.6160232", "0.6152668", "0.6149476", "0.6138804", "0.6109269", "0.6105137", "0.60962135", "0.609334", "0.6080698", "0.60720384", "0.6068299", "0.6050476", "0.60346186", "0.60323685", "0.60265553", "0.6026225", "0.6025571", "0.6013618", "0.6011435", "0.6002145", "0.5984612", "0.5981117", "0.5979566", "0.5977503", "0.597685", "0.5962812", "0.5962812", "0.59623957", "0.5961181", "0.5954679", "0.594528", "0.5934667", "0.5928491", "0.5928491", "0.59243584", "0.59243584", "0.5911413", "0.5911413", "0.5911413", "0.59020036", "0.5894238", "0.5888866", "0.5888378", "0.5883149", "0.5883149", "0.5879117", "0.5878703", "0.58689314", "0.5868456", "0.5855664", "0.5841679", "0.58352816", "0.5833284", "0.58235157", "0.5806327", "0.5799016", "0.5792516", "0.5792516", "0.57918704", "0.57823384" ]
0.0
-1
Sets up the progress dialog.
@Override protected void onPreExecute() { if (mProgressDialog != null) { mProgressDialog.show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tprotected void onPreExecute() {\n\t\t progressDialog = new AutoTuningInitDialog(mChannelActivity, R.style.dialog);\n\t\t\tprogressDialog.show();\t\t\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "private void initUI() {\n fileCount = wizard.getFileCount();\n fileByteCount = wizard.getByteCount();\n fileCountLabel.setText(String.valueOf(fileCount));\n updateByteCount(byteCountLabel, byteCountUnit, \"KB\", fileByteCount, 0);\n progressBar.setProgress(0);\n }", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "private void initProgress()\n {\n\n if (showProgressBar && progressBar == null)\n { // there's an issue if called from matlab of getting the progress frame\n // in matlab's event loop so we can't just create a new one here\n progressBar = new Progress();\n }\n if (progressBar != null)\n {\n progressBar.setChanName(channelName);\n progressBar.setWorkingOn(\"Initializing\");\n progressBar.setEstTime(\"Time remaining: unknown\");\n progressBar.setProgress(-1);\n progressBar.setPosition();\n }\n }", "public void initProgressLoader() {\n progressDialog = new ProgressDialog(this);\n progressDialog.setIndeterminate(true);\n progressDialog.setCancelable(false);\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tsuper.onProgressUpdate(progress);\n\n\t\t\tdialog.setProgress(progress[0]);\n\t\t}", "private void setupProgressBar() {\n\t\tprogress_bar = new JProgressBar(0,words_to_spell.size());\n\t\tprogress_bar.setBounds(32, 170, 1284, 34);\n\t\tprogress_bar.setBorderPainted(false);\n\t\tprogress_bar.setBackground(Color.WHITE);\n\t\tprogress_bar.setStringPainted(true);\n\t\tprogress_bar.setString(\"\");\n\t\tadd(progress_bar);\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(Tracking.this);\n\t\t\tpDialog.setMessage(\"Mencari History Proses ... !\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tprogressDialog = new ProgressDialog(context);\n\t\t\t\t\t\t\tprogressDialog.setCancelable(true);\n\t\t\t\t\t\t\tprogressDialog.setMessage(context.getString(R.string.initialising_runtime));\n\t\t\t\t\t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t\t\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\t\t\t\t\tprogressDialog.show();\n\t\t\t\t\t\t}", "@Override\n protected void onPreExecute() {\n progress = new ProgressDialog(hostContext);\n progress.setMessage(\"Wait while books are being downloaded...\");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.show();\n }", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\ttry {\n\t\t\t\tdialog.setIndeterminate(false);\n\t\t\t\tdialog.setMax(100);\n\t\t\t\tdialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t\tdialog.setCancelable(false);\n\t\t\t\tdialog.show();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "@Override\n\t\t \tprotected void onPreExecute() {\n\t\t try {\n\t\t\t \tpd=new ProgressDialog(Styles_Dialog.this);\n\t\t\t \tpd.setMessage(\"Loading\");\n\t\t\t \tpd.show();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \t\n\t\t \t}", "@Override\n protected void onPreExecute() {\n\n progressDialog = new SafeProgressDialog(PlanningSettings.this);\n progressDialog.setMessage(\"Creating...\");\n progressDialog.setIndeterminate(false);\n progressDialog.setCancelable(true);\n progressDialog.show();\n super.onPreExecute();\n }", "public void setProgressDialog(Progress pb)\n {\n progressBar = pb;\n }", "private void initDialog() {\n }", "@Override\r\n\tprotected void onPreExecute()\r\n\t{\r\n\t\tprogress = new ProgressDialog(ctx);\r\n\t\tprogress.setTitle(\"Retrieving Parking Information\");\r\n\t\tprogress.setMessage(\"Please wait.\");\r\n\t\tprogress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\r\n\t\tprogress.show();\r\n\t\tsuper.onPreExecute();\r\n\t}", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Adding workouts...\");\n this.progressDialog.show();\n }", "@Override\n\tprotected void onPreExecute() {\t\t\n\t\t// setup dialog\n\t\tif (dialog!=null){\n\t\t\tdialog.setProgress(0);\n\t\t\tdialog.setMessage(\"Initialized\");\n\t\t}\n\t\t\n\t\tif (callback!=null){\n\t\t\tcallback.onTaskUpdate(null, 0);\n\t\t}\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n runOnUiThread(()->{\n pDialog = new ProgressDialog(ImageClassificationActivity.this);\n pDialog.setMessage(\"Initializing\");\n pDialog.setIndeterminate(false);\n pDialog.setMax(100);\n pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n pDialog.setCancelable(true);\n pDialog.setOnCancelListener(this);\n pDialog.show();\n });\n }", "public void onPreExecute() {\n progressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = ProgressDialogTripg.show(OrderPnrMain.this, null, null);\n\t\t}", "private void uploadingProgressBarInit() {\n uploadingProgressBar.setVisibility(VISIBLE);\n uploadingProgressBar.setProgress(0);\n }", "@Override\n protected void onPreExecute() {\n progressDialog.setProgress(0);\n //progressBar.setProgress(0);\n super.onPreExecute();\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t\tpDialog = new ProgressDialog(ProfileDetails.this);\n\t\t\t\t\tpDialog.setMessage(\"Please wait...\");\n\t\t\t\t\tpDialog.setCancelable(false);\n\t\t\t\t\tpDialog.show();\n\n\t\t\t\t}", "private void progressMode() {\n\t\t// lazily build the layout\n\t\tif (progressLayout == null) {\n\t\t\tprogressLayout = new DefaultVerticalLayout(true, true);\n\n\t\t\tprogressBar = new ProgressBar();\n\t\t\tprogressBar.setHeight(\"20px\");\n\t\t\tprogressLayout.add(progressBar);\n\n\t\t\tstatusLabel = new Text(\"\");\n\t\t\tprogressLayout.add(statusLabel);\n\t\t}\n\t\tprogressBar.setValue(0.0f);\n\t\tstatusLabel.setText(\"\");\n\n\t\tremoveAll();\n\t\tadd(progressLayout);\n\t}", "protected void createProgressDialog() {\r\t\tif (pd == null) {\r\t\t\tpd = new ProgressDialog(this);\r\t\t\tpd.setCanceledOnTouchOutside(false);\r\t\t\tpd.getWindow().setGravity(Gravity.CENTER);\r\t\t\tpd.setOnCancelListener(new DialogInterface.OnCancelListener() {\r\t\t\t\t@Override\r\t\t\t\tpublic void onCancel(DialogInterface dialogInterface) {\r\t\t\t\t\tonPdCancel();\r\t\t\t\t}\r\t\t\t});\r\t\t}\r\t}", "protected void onProgressUpdate(String... progress) {\n\t\t\t\t\t\t// Set progress percentage\n\t\t\t\t\t\tprgDialog.setProgress(Integer.parseInt(progress[0]));\n\t\t\t\t\t}", "private void setUiDuringBackgroundTask(String progress) {\n progressDialog.setMessage(progress);\n\n setInfo(progress);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tdialog = new ProgressDialog(BookingConfirmationScreen.this);\n\t\t\tdialog.setIndeterminate(false);\n\t\t\tdialog.setCancelable(true);\n\t\t\tdialog.show();\n\n\t\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}", "public void startProgressBar(View v) {\r\n\t\tshowDialog(1);\r\n\t\tnew Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (setValues()) {\r\n\t\t\t\t\t\tdismissDialog(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdismissDialog(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tSystem.out.println(\"Found an exception: \" + e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}).start();\r\n\t}", "@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(context);\n dialog.setTitle(\"Loading Contents\");\n dialog.setMessage(\"Doing something interesting ...\");\n dialog.setIndeterminate(true);\n dialog.setCancelable(false);\n dialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog.show();\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n this.dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n this.dialog.setCancelable(false);\n this.dialog.show();\n }", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tpDialog = new ProgressDialog(SingleRecord.this);\r\n\t\t\tpDialog.setMessage(\"downloading...\");\r\n\t\t\tpDialog.setIndeterminate(false);\r\n\t\t\tpDialog.setCancelable(true);\r\n\t\t\r\n\t\t\tpDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\r\n\t\t\tpDialog.show();\r\n\t\t\tpDialog.getWindow().setGravity(Gravity.BOTTOM);\r\n\t\t}", "@Override\n\tpublic void setupUI() {\n\n\t\tprogressDialog = new ProgressDialog(this);\n\t\trecyclerView = findViewById(R.id.recycler_view);\n\n\t\tmovieList = new ArrayList<>();\n\t\tmoviesAdapter = new MoviesAdapter(movieList);\n\n\t\trecyclerView.setLayoutManager(new GridLayoutManager(this, 2));\n\t\trecyclerView.setAdapter(moviesAdapter);\n\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"\",\n\t\t\t\t\t\"Loading...\");\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog.show();\n\t\t\tprogressDialog.setMessage(\"Contacting server for sharing...\");\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\n\t\t\tsuper.onPreExecute();\n\t\t\td = new ProgressDialog(SensorActivity.this);\n\t\t\td.setTitle(\"Loading\");\n\t\t\td.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t\n\t\t\tdialog = new ProgressDialog(BookingConfirmationScreen.this);\n\t\t\tdialog.setIndeterminate(false);\n\t\t\tdialog.setCancelable(true);\n\t\t\tdialog.show();\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n //Shows the ProgressDialog and sets the progress/message shown\n progressDialog.show();\n progressDialog.setTitle(\"Uploading\");\n progressDialog.setProgress(progress[0]);\n progressDialog.setMessage(String.valueOf(progress[0]) + \"%\");\n }", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t \n\t progressDialog= new Dialog(ListKotaActivity.this);\n\t progressDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n\t progressDialog.setContentView(R.layout.progress);\n\t progressDialog.setCancelable(false);\n\t progressDialog.show();\t \n\t }", "@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(AddFoodAdvActivity.this);\n dialog.setMessage(\"Please Wait...!\");\n dialog.show();\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pd = ProgressDialog.show(_contexto, \"Aviso\", \"Actualizando ticket \" + numTicket + \" ...\", true);\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t\tprogress = ProgressDialog.show(act, \"\", \"Please wait ...\", true);\n\t\talert = new AlertDialog.Builder(act);\n\n\t}", "@Override\r\n protected void onPreExecute() {\n if( progressDialog == null ) {\r\n progressDialog = ProgressDialog.show( context, context.getString(R.string.pref_sync_callings_now_title),\"\");\r\n }\r\n }", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Retrieving workouts list...\");\n this.progressDialog.show();\n }", "@Override\n protected void onPreExecute() {\n\n this.dialog.setMessage(\"Please wait ...\");\n this.dialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\t// progressDialog= ProgressDialog.show(MainActivity.this,\n\t\t\t// \"Progress Dialog Title Text\",\"Process Description Text\", true);\n\n\t\t}", "@Override\n protected void onPreExecute()\n {\n dialog.show();\n super.onPreExecute();\n }", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tprgDlg.setMax(nTotalPage);\r\n\t\t\t\t\t\t\tprgDlg.setProgress(nPage);\r\n\t\t\t\t\t\t}", "private void setGUI()\r\n\t{\r\n\t\tbubblePB = setProgressBar(bubblePB);\r\n\t\tinsertionPB = setProgressBar(insertionPB);\r\n\t\tmergePB = setProgressBar(mergePB);\r\n\t\tquickPB = setProgressBar(quickPB);\r\n\t\tradixPB = setProgressBar(radixPB);\r\n\t\t\r\n\t\tsetLabels();\r\n\t\tsetPanel();\r\n\t\tsetLabels();\r\n\t\tsetFrame();\r\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = ProgressDialog.show(SlyThemesActivity.this, \"\",Constants.PROCESSING_REQUEST);\n\t\t}", "@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t\tprogressDialog1 = ProgressDialogTripg.show(HotelOrderYuDingMain.this, null, null);\n\t\t\t}", "private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}", "private void initialView(){\n // 进度条还有二级进度条的那种形式,这里就不演示了\n final ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);// 设置水平进度条\n dialog.setCancelable(true);// 设置是否可以通过点击Back键取消\n dialog.setCanceledOnTouchOutside(false);// 设置在点击Dialog外是否取消Dialog进度条\n\n dialog.setTitle(\"正在下载\");\n dialog.setMax(100);\n dialog.setMessage(\"请等待\");\n dialog.show();\n\n\n /*ThreadA t1 = new ThreadA(\"t1\");\n\n synchronized (t1){\n t1.start();\n while(!isExists()){\n try{\n t1.wait();\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }*/\n\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n // TODO Auto-generated method stub\n try {\n Thread.sleep(25000);\n dialog.cancel();\n Intent intent=new Intent(ProgressActivity.this,SudokuActivity.class);\n startActivity(intent);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = new ProgressDialog(ListActivity.this);\n\t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\n\t\t\tprogressDialog.setMessage(\"Loading Programs. .\");\n\t\t\tprogressDialog.setCancelable(false);\n\n\t\t\tprogressDialog.show();\n\t\t}", "private void showProgressDialog() {\n if (progressDialog == null) {\n progressDialog = new ProgressDialog(getContext());\n }\n\n progressDialog.setTitle(R.string.dialog_title);\n progressDialog.setMessage(getResources().getString(R.string.dialog_message));\n progressDialog.setCancelable(false);\n progressDialog.show();\n }", "public ProgressCallBackDialog(Frame owner, String title, int totalItems)\n \t{\n \t\tsuper(owner, title);\n \t\tsetLocationRelativeTo(owner);\n \t\tinit(totalItems);\n \t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tdialog = new Dialog(Data4.this);\r\n\t\t\tdialog.setTitle(\"Please wait\");\r\n\t\t\tTextView tv = new TextView(Data4.this.getApplicationContext());\r\n\t\t\ttv.setText(\"Uploading Data to SpreadSheet...\");\r\n\t\t\tdialog.setContentView(tv);\r\n\t\t\tdialog.show();\r\n\t\t}", "void showModalProgress();", "@Override\n protected void onPreExecute() {\n\n\n dialog = new ProgressDialog(MainArea.this);\n dialog.setTitle(\"Loading Results\");\n dialog.setMessage(\"Please Wait Results Are Loading For You....\");\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n super.onPreExecute();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(SettingServerActivity.this);\n\t\t\tpDialog.setMessage(\"Please wait...\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(false);\n\t\t\tpDialog.show();\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n this.progressDialog = new ProgressDialog(context);\n this.progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n this.progressDialog.setCancelable(false);\n this.progressDialog.show();\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tlog(\"onPreExecute\");\n\t\t\n\t\tprogressDialog = new ProgressDialog(mContext);\n\t\t\n\t\tprogressDialog.setTitle(mTitle);\n\t\tprogressDialog.setMessage(mMessage);\n\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\t\tprogressDialog.setCancelable(true);\n\t\tprogressDialog.setOnCancelListener(this);\n\t\tprogressDialog.show();\n\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tdialog=new ProgressDialog(MainActivity.this);\r\n\t\t\tdialog.setMessage(\"Creating...\");\r\n\t\t\tdialog.show();\r\n\t\t}", "public void showProgressDialog() {\n pd = new ProgressDialog(this);\n pd.setMessage(\"Renting film...\");\n pd.show();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "private void setUpProgressBar() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n int totalLocationCount = 0;\n double visitedCount = 0;\n\n while (cursor.moveToNext()) {\n totalLocationCount++;\n int visited = cursor.getInt(cursor.getColumnIndex(database.COL_VISITED));\n if (visited == 1) visitedCount++;\n }\n\n int progress = (int) (visitedCount / totalLocationCount * 100);\n ProgressBar progressBar = findViewById(R.id.progress);\n TextView progressText = findViewById(R.id.progress_text);\n progressBar.setProgress(progress);\n progressText.setText(\" \" + progress + \"%\");\n }", "public void setProgressBar(JProgressBar bar) {\n\t\tprogressBar = bar;\n\t}", "@Override\n public void onProgressUpdate(Integer... progress)\n {\n _dialog.setProgress(progress[0]);\n }", "@Override\n protected void onPreExecute() {\n mProgress = new ProgressDialog(ctx);\n mProgress.setMessage(\"Finding current location\");\n mProgress.show();\n super.onPreExecute();\n }", "protected void onPreExecute() {\r\n \tdialog = new ProgressDialog(context);\r\n \t\tdialog.setMessage(\"Loading...\");\r\n \t\tdialog.show();\r\n }", "public void run() {\n\t\t\t\t\tmHandler.post(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tprogressbar.setProgress(Integer\r\n\t\t\t\t\t\t\t\t\t.parseInt(tvsp.progress));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}", "void setProgress(int progress);", "void setProgress(int progress);", "private void showDialog(){\n progress = new ProgressDialog(this);\n progress.setTitle(getString(R.string.progress_dialog_loading));\n progress.setMessage(getString(R.string.progress_dialog_authenticating_with_firebase));\n progress.setCancelable(false);\n progress.show();\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n pDialog.setProgress(progress[0]);\n\n // updating percentage value\n //txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tmyDialog = ProgressDialog.show\n\t\t\t\t\t(\n\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\t\"Loading...\",\n\t\t\t\t\t\t\t\"Please Wait\",\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t);\n\t\t}", "@Override\n protected void onPreExecute()\n {\n // Create a new progress dialog\n progressDialog = new ProgressDialog(MainActivity.this);\n // Set the progress dialog spinner progress bar\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n // Set the dialog title to 'Loading...'\n progressDialog.setTitle(\"Loading...\");\n // Set the dialog message to 'Loading application View, please wait...'\n progressDialog.setMessage(\"Loading application, please wait...\");\n // This dialog can't be canceled by pressing the back key\n progressDialog.setCancelable(false);\n // This dialog isn't indeterminate\n progressDialog.setIndeterminate(false);\n // The maximum number of items is 100\n progressDialog.setMax(100);\n // Set the current progress to zero\n progressDialog.setProgress(0);\n // Display the progress dialog\n progressDialog.show();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n p1 = new javax.swing.JProgressBar();\n p2 = new javax.swing.JProgressBar();\n p3 = new javax.swing.JProgressBar();\n p4 = new javax.swing.JProgressBar();\n jButton1 = new javax.swing.JButton();\n t1 = new javax.swing.JTextField();\n t2 = new javax.swing.JTextField();\n t3 = new javax.swing.JTextField();\n t4 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n p1.setMaximum(1000);\n\n p2.setMaximum(1000);\n\n p3.setMaximum(1000);\n\n p4.setMaximum(1000);\n\n jButton1.setText(\"Start\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Reset\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(57, 57, 57)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(p4, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(p3, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(p2, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(p1, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addComponent(jButton1)\n .addGap(35, 35, 35)\n .addComponent(jButton2)))\n .addContainerGap(21, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(p1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(p2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(p3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(p4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap(30, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n protected void onPreExecute() {\n pd = ProgressDialog.show(Events_and_Festivals.this, \"One Moment\", \"Loading Events and Festivals in the Toronto Area ...\", true, false);\n }", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t\t\n\t\t\tdialog = new ProgressDialog(AddFoodAdvActivity.this);\n\t\t\tdialog.setMessage(\"Loading...\");\n\t\t\tdialog.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "public void setStateToInProgress() {\n progressBar.setIndeterminate(true);\n progressBarLabel.setText(\"Simulation is in progress...\");\n openFolderButton.setVisible(false);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tpdia = new ProgressDialog(mContext);\n\t\t\tpdia.setMessage(\"Loading...\");\n\t\t\tpdia.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n protected void onPreExecute() {\n progressDialog.setMessage(\"Creating Account...\");\n progressDialog.show();\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute(){\n super.onPreExecute();\n count++;\n //pg = new progressDialog(MainActivity.this);\n //pg.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog.show();\n\t\t\tprogressDialog.setMessage(\"Validating credentials...\");\n\t\t}", "public quotaGUI() {\n initComponents();\n }", "@Override\n\tprotected void onPreExecute() {\n\t\t\n\t\t pDialog = new ProgressDialog(context);\n\t\t\ttry{\n\t\t\t\tthis.pDialog.setMessage(\"Please wait ...\");\n\t\t this.pDialog.setIndeterminateDrawable(context.getResources().getDrawable(R.drawable.red_progress));\n\t\t this.pDialog.setIndeterminate(false);\n\t\t this.pDialog.setCancelable(false);\n\t\t this.pDialog.show();\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t}", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(TwitterActivity.this);\n\t\t\tpDialog.setMessage(\"Updating to twitter...\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(false);\n\t\t\tpDialog.show();\n\t\t}", "@Override\n\t\t\tprotected void onPreExecute() {\n\t \t\tprogressBar = new ProgressDialog(SiQuoiaLeaderboardActivity.this);\n\t\t\t\tprogressBar.setIndeterminate(true);\n\t\t\t\tprogressBar.setCancelable(false);\n\t\t\t\tprogressBar.setMessage(\"Getting Leaderboard.\");\n\t\t\t\tprogressBar.show();\t\t\t\n\t\t\t}", "@Override\n \t\tprotected void onPreExecute() \n \t\t{\n \t\t\t//Create a new progress dialog\n \t\t\tprogressDialog = new ProgressDialog(MainActivity.this);\n \t\t\t//Set the progress dialog to display a horizontal progress bar \n \t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n \t\t\t//Set the dialog title to 'Loading...'\n \t\t\tprogressDialog.setTitle(\"Loading Game...\");\n \t\t\t//Set the dialog message to 'Loading application View, please wait...'\n \t\t\tprogressDialog.setMessage(\"Please wait...\");\n \t\t\t//This dialog can't be canceled by pressing the back key\n \t\t\tprogressDialog.setCancelable(false);\n \t\t\t//This dialog isn't indeterminate\n \t\t\tprogressDialog.setIndeterminate(false);\n \t\t\t//The maximum number of items is 100\n \t\t\tprogressDialog.setMax(100);\n \t\t\t//Set the current progress to zero\n \t\t\tprogressDialog.setProgress(0);\n \t\t\t//Display the progress dialog\n \t\t\tprogressDialog.show();\n \t\t}", "private void initProgressBar(ProgressBar progressBar) {\n this.itemDownloadPB = progressBar;\n progressBar.setProgress(Variable.getVariable().getMapFinishedPercentage());\n progressBar.setMax(100);\n progressBar.setIndeterminate(false);\n progressBar.setVisibility(View.VISIBLE);\n }" ]
[ "0.71569496", "0.7042067", "0.7042067", "0.69526875", "0.68383455", "0.6798354", "0.67552406", "0.67450374", "0.661312", "0.65686876", "0.65481", "0.6541284", "0.6498564", "0.6494596", "0.6479795", "0.6467534", "0.6443066", "0.64275974", "0.64140666", "0.641149", "0.6404688", "0.6399853", "0.63914293", "0.63865036", "0.63666135", "0.6345361", "0.6345361", "0.63292354", "0.6318156", "0.62979573", "0.629357", "0.62850744", "0.62818205", "0.62755346", "0.62625086", "0.62511605", "0.6247988", "0.6218795", "0.62168264", "0.621077", "0.620207", "0.61959463", "0.6195036", "0.6187318", "0.6186887", "0.61834574", "0.61455876", "0.6133316", "0.6120991", "0.61143893", "0.6092684", "0.60777223", "0.60690457", "0.60686904", "0.60654396", "0.6061999", "0.6061509", "0.604206", "0.60380983", "0.6037241", "0.6036171", "0.603462", "0.6030932", "0.60240585", "0.6022715", "0.601431", "0.6003304", "0.6000757", "0.5998586", "0.59978634", "0.5997377", "0.5989158", "0.59767264", "0.5976246", "0.5975687", "0.5970655", "0.5967722", "0.59659755", "0.59643185", "0.5952534", "0.5949507", "0.59464604", "0.59464604", "0.59414726", "0.59378564", "0.5934579", "0.59298974", "0.59282804", "0.5928089", "0.5921474", "0.59198946", "0.59194535", "0.5910025", "0.5909218", "0.5903338", "0.59026074", "0.5895827", "0.589228", "0.589191", "0.5881947", "0.5881866" ]
0.0
-1
Performs longrunning save in the background.
@Override protected String doInBackground(Void... params) { // This example implementation returns an empty-string on failure. String adf_dataset_uuid = TangoJniNative.saveAdf(); if (!adf_dataset_uuid.startsWith(uuid_mask)) { TangoJniNative.setAdfMetadataValue( adf_dataset_uuid.substring(0, uuid_len), "name", mAdfName); } return adf_dataset_uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveProgress() {\n\t\tsaveUsers();\n\t\tsaveMaterials();\n\t\tsaveBorrowings();\n\t}", "private void scheduleSaveOfFileIdStore() {\n if (saveFileIdDictionaryStoreTimerTask != null) {\n saveFileIdDictionaryStoreTimerTask.cancel();\n saveFileIdDictionaryStoreTimerTask = null;\n }\n saveFileIdDictionaryStoreTimerTask = new SaveFileIdDictionaryStoreTimerTask();\n TimerManager.getInstance().getTimer().schedule(saveFileIdDictionaryStoreTimerTask, SAVE_FILEID_DICTIONARY_DELAY);\n }", "public void save(){\r\n\t\ttry {\r\n\t\t\tgame.suspendLoop();\r\n\t\t\tGameStockage.getInstance().save(game);\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (GameNotSaveException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t}\r\n\t}", "private void saveDataToFile(boolean stop){\n Log.d(TAG, \"saveDataToFile\");\n\n List<SensorData> tempGyroList = new ArrayList<>(listGyroData);\n List<SensorData> tempAccelerList = new ArrayList<>(listAccelData);\n List<PPGData> tempPPGList = new ArrayList<>(listPPGData);\n\n //Should create right away since we already have a copy to allow for new samples to come\n listGyroData.clear(); listAccelData.clear(); listPPGData.clear();\n\n SaveDataInBackground backgroundSave = new SaveDataInBackground(stop);\n backgroundSave.execute(tempAccelerList, tempGyroList, tempPPGList);\n Log.d(TAG, \"saveDataToFile: Saving files asynchronously\");\n }", "public void run() {\n\t\t\tif (model.getNumberOfChangesSinceLastSave() == changeState)\n\t\t\t\treturn;\n\t\t\tchangeState = model.getNumberOfChangesSinceLastSave();\n\t\t\tif (changeState == 0) {\n\t\t\t\t/* map was recently saved. */\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tcancel();\n\t\t\t\tEventQueue.invokeAndWait(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t/* Now, it is dirty, we save it. */\n\t\t\t\t\t\tFile tempFile;\n\t\t\t\t\t\tif (tempFileStack.size() >= numberOfFiles)\n\t\t\t\t\t\t\ttempFile = (File) tempFileStack.remove(0); // pop\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ttempFile = File.createTempFile(\n\t\t\t\t\t\t\t\t\t\t\"FM_\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ ((model.toString() == null) ? \"unnamed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: model.toString()),\n\t\t\t\t\t\t\t\t\t\tfreemind.main.FreeMindCommon.FREEMIND_FILE_EXTENSION,\n\t\t\t\t\t\t\t\t\t\tpathToStore);\n\t\t\t\t\t\t\t\tif (filesShouldBeDeletedAfterShutdown)\n\t\t\t\t\t\t\t\t\ttempFile.deleteOnExit();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\t\tfreemind.main.Resources.getInstance()\n\t\t\t\t\t\t\t\t\t\t.logException(e);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmodel.saveInternal(tempFile, true /* =internal call */);\n\t\t\t\t\t\t\tmodel.getFrame()\n\t\t\t\t\t\t\t\t\t.out(Resources\n\t\t\t\t\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t\t\t\t\t.format(\"automatically_save_message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew Object[] { tempFile\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString() }));\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\tfreemind.main.Resources.getInstance().logException(\n\t\t\t\t\t\t\t\t\te);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttempFileStack.add(tempFile); // add at the back.\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tfreemind.main.Resources.getInstance().logException(e);\n\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\tfreemind.main.Resources.getInstance().logException(e);\n\t\t\t}\n\t\t}", "private void performSave() {\n if (validate()) {\n int taskId = AppUtils.getLatestTaskId() + 1;\n int catId;\n if (category.equals(AppUtils.CREATE_CATEGORY)) {\n catId = saveNewCategory();\n } else {\n catId = AppUtils.getCategoryIdByName(category);\n }\n saveNewTask(taskId, catId);\n clearAll();\n redirectToViewTask();\n }\n\n }", "@Override\n\t\tpublic void finishIteration() {\n\t\t\trailroad.save();\n\t\t\tSystem.out.println(\"SAVING!\");\n\t\t\tsuper.finishIteration();\n\t\t}", "public void doSave() {\n WaveformLoader.doSave(waveform, WaveformLoader.scalingForSavingFile);\n }", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "@WorkerThread\n public abstract void saveToDb(NetworkModel fetchedModel);", "void save() {\r\n if (actionCompleted) {\r\n forget();\r\n } else {\r\n AccountSettings.stateStored = new Bundle();\r\n save(AccountSettings.stateStored);\r\n }\r\n }", "public void save() {\t\n\t\n\t\n\t}", "public static void runSaveState() {\n for (GUISaveable s: saveables) {\n s.saveState();\n }\n }", "private void saveMap() {\r\n new Thread(() -> {\r\n try {\r\n FileOutputStream f = new FileOutputStream(this.save_file);\r\n ObjectOutputStream S = new ObjectOutputStream(f);\r\n S.writeObject(this.music_map);\r\n S.close();\r\n f.close();\r\n if (!this.save_file.setLastModified(this.music_root.lastModified())) {\r\n throw new IllegalStateException(\"Impossibile aggiornare il file dizionario\");\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }).start();\r\n }", "public void autoSave(){\n\t\ttry {\n\t\t\t//read in file\n\t\t\tFile file = new File(System.getProperty(\"user.dir\")+\"/Default.scalcsave\");\n\t\t\tObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));\n\t\t\toutput.writeObject(SaveFile.getSaveFile());\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Save Success\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@NonNull\n @Override\n public Result doWork() {\n\n Log.d(TAG, \"doWork: \");\n savedata();\n createNotification();\n\n OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(MyWorkManager.class)\n .setInitialDelay(5, TimeUnit.SECONDS).build();\n WorkManager.getInstance().enqueueUniqueWork(\"aaa\", ExistingWorkPolicy.APPEND, oneTimeWorkRequest);\n\n\n return Result.success();\n\n }", "synchronized public void saveToFile() {\n try {\n saveObjToFile(this, saveFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n log(\"error saving resource to file\");\n }\n }", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "public void save() {\n\t\tpreferences().flush();\n\t}", "private void keepRecordSaving(RecordRequest recordRequest) {\n \tLog.d(C.LOG_TAG, \"start of keepRecordSaving thread \" + recordRequest.recordIdx);\n \tLog.d(C.LOG_TAG, \"record = \" + recordRequest.dump());\n \t\n \t//Boolean writeResult = Highgui.imwrite(shotRequest.filePath, shotRequest.imageToSave);\n \ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(recordRequest.filePath);\n\t\t\trecordRequest.byteStreamToSave.writeTo(fos);\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLog.e(C.LOG_TAG, \"ERROR: can't open file when saving record\");\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.e(C.LOG_TAG, \"IOERROR: can't open file when saving record\");\n\t\t\te.printStackTrace();\n\t\t}\n }", "@Override\n\tprotected void onPause() {\n\t super.onPause();\n\t this.saveInFile();\n\t}", "void save();", "void save();", "void save();", "private void save(Store store) {\n if (saved) {\n return;\n }\n\n if (saves.isEmpty()) {\n saved = true;\n return;\n }\n\n store.save(saves);\n saved = true;\n }", "public synchronized void save() {\n/* 86 */ this.component.saveToDB();\n/* */ }", "private void saveFunction() {\n }", "public void run() {\n\t\t\t\t\t\tFile tempFile;\n\t\t\t\t\t\tif (tempFileStack.size() >= numberOfFiles)\n\t\t\t\t\t\t\ttempFile = (File) tempFileStack.remove(0); // pop\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ttempFile = File.createTempFile(\n\t\t\t\t\t\t\t\t\t\t\"FM_\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ ((model.toString() == null) ? \"unnamed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: model.toString()),\n\t\t\t\t\t\t\t\t\t\tfreemind.main.FreeMindCommon.FREEMIND_FILE_EXTENSION,\n\t\t\t\t\t\t\t\t\t\tpathToStore);\n\t\t\t\t\t\t\t\tif (filesShouldBeDeletedAfterShutdown)\n\t\t\t\t\t\t\t\t\ttempFile.deleteOnExit();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\t\tfreemind.main.Resources.getInstance()\n\t\t\t\t\t\t\t\t\t\t.logException(e);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmodel.saveInternal(tempFile, true /* =internal call */);\n\t\t\t\t\t\t\tmodel.getFrame()\n\t\t\t\t\t\t\t\t\t.out(Resources\n\t\t\t\t\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t\t\t\t\t.format(\"automatically_save_message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew Object[] { tempFile\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString() }));\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\tfreemind.main.Resources.getInstance().logException(\n\t\t\t\t\t\t\t\t\te);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttempFileStack.add(tempFile); // add at the back.\n\t\t\t\t\t}", "@Override\n public void run() {\n long[] saved = AppDatabase.getInstance().modelByName(name).insertAll((List) response);\n updateProgressDownload(1, name);\n }", "@Override\n public void onPause() {\n super.onPause();\n try {\n storeRetrieveData.saveToFile((ArrayList<TaskCollector>) taskCollectors);\n } catch (JSONException | IOException e) {\n e.printStackTrace();\n }\n }", "public void save() {\n doneSave = false;\n Double max = ((Integer) chunks.size()).doubleValue();\n Double done = 0.0;\n for (String key : chunks.keySet()) {\n ChunkWrapper w = chunks.get(key);\n w.save(false, true);\n done++;\n this.percent = ((Double) (done / max)).intValue();\n }\n chunks.clear();\n doneSave = true;\n }", "private void saveData(){\n\t\tsynchronized(onlineAllInfoList){\n\t\t\tRecorder.save(onlineAllInfoList, onlineAllInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving onlineCompetitionInfoList...\");System.out.flush();\n\t\tsynchronized(onlineCompetitionInfoList){\n\t\t\tRecorder.save(onlineCompetitionInfoList, onlineCompetitionInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving competitionList...\");System.out.flush();\n\t\tsynchronized(competitionList){\n\t\t\tRecorder.save(competitionList, competitionInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving allAIInfoList...\");System.out.flush();\n\t\tsynchronized(allAIInfoList){\n\t\t\tRecorder.save(allAIInfoList, allInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving waitingInfoList...\");System.out.flush();\n\t\tsynchronized(waitingInfoList){\n\t\t\tRecorder.save(waitingInfoList, waitingInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving sortedAIInfoPool...\");System.out.flush();\n\t\tsynchronized(sortedAIInfoPool){\n\t\t\tRecorder.save(sortedAIInfoPool, sortedInfoListFileName);\t\t\t\n\t\t}\n\t}", "private void saveData() {\n\t\tdataSaver.save(data);\n\t}", "protected abstract void doSave();", "private void saveJobList() {\n\t\tFileLoader.saveObject(getApplicationContext(), FILE_NAME_JOBS, (Serializable) jobs);\n\t}", "public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}", "private void completeSave() {\n colorBar.updateRevertToCurrent();\n colorBar.revertColorBar();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n cmapParams.setColorMapName(seldCmapName);\n saveBtn.setEnabled(true);\n }", "private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }", "public void saveShutdown() {\n running = false;\n synchronized (unchecked) {\n unchecked.notify();\n }\n }", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "@Override\n\tpublic void doSave(IProgressMonitor monitor) {\n\t}", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "public void save() {\n\t\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-save(): ERROR \" + caught.toString());\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tprocessUpdateResult(result);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Llamada al servicio RPC\n\t\t\t\ttry {\n\t\t\t\t\tif (!isLoading()) {\n\t\t\t\t\t\tstartLoading();\n\t\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().save(bmoRequisitionItem.getPmClass(), bmoRequisitionItem, callback);\n\t\t\t\t\t}\n\t\t\t\t} catch (SFException e) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-save(): ERROR \" + e.toString());\n\t\t\t\t}\n\t\t\t}", "public void save() {\n }", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }", "private void saveData() {\n }", "public void saveWorkflow() {\n\t\tsaveWorkflow(engine.getGUI().getGraphCanvas());\n }", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "public static void backupAutoSave() throws DatabaseWrapperOperationException {\t\t\r\n \t\tString programVersion = BuildInformationManager.instance().getApplicationName() \r\n \t\t\t\t+ \"_\" + BuildInformationManager.instance().getVersion()\r\n \t\t\t\t+ \"_\" + BuildInformationManager.instance().getBuildTimeStamp();\r\n \t\tString timeStamp = Long.toString(getLastDatabaseChangeTimeStamp());\t\t\r\n \t\r\n \t\tString autoSaveFilePath = FileSystemLocations.getBackupDir() + \r\n \t\t\t\tFile.separator + \"PERIODICAL_BACKUP_\" + programVersion + \"_\";\r\n \t\r\n \t\tList<File> previousAutoSaveList = getAllAutoSaves();\r\n \t\r\n \t\tif (previousAutoSaveList.isEmpty()) {\r\n \t\t\t// When no changes were made then the timestamp is the current time\r\n \t\t\tif (getLastDatabaseChangeTimeStamp() == -1) {\r\n \t\t\t\ttimeStamp = Long.toString(System.currentTimeMillis());\r\n \t\t\t}\r\n \t\t\tautoSaveFilePath = autoSaveFilePath + timeStamp + \".\" + DatabaseIntegrityManager.AUTO_SAVE_EXTENSION;\r\n \t\t\ttry {\r\n \t\t\t\tFileSystemAccessWrapper.copyFile(new File(FileSystemLocations.getDatabaseFile()), new File(autoSaveFilePath));\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t\tLOGGER.error(\"Autosave - backup failed\");\r\n \t\t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE, e);\r\n \t\t\t}\r\n \t\t// Auto-saves detected\r\n \t\t} else {\r\n \t\t\t// No need to overwrite the last auto-save when no changes were made.\r\n \t\t\tif (getLastDatabaseChangeTimeStamp() == -1) {\r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \t\r\n \t\t\t// Auto save limit reached, delete the oldest\r\n \t\t\tif (previousAutoSaveList.size() >= DatabaseIntegrityManager.AUTO_SAVE_LIMIT) {\r\n \t\t\t\tFile oldestAutoSave = previousAutoSaveList.get(previousAutoSaveList.size()-1);\r\n \t\t\t\tif (oldestAutoSave.exists() && !oldestAutoSave.delete()) {\r\n \t\t\t\t\tLOGGER.error(\"Autosave - cannot delete old autosave\");\r\n \t\t\t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tautoSaveFilePath = autoSaveFilePath + timeStamp + \".\" + DatabaseIntegrityManager.AUTO_SAVE_EXTENSION;\r\n \t\r\n \t\t\ttry {\r\n \t\t\t\tFileSystemAccessWrapper.copyFile(new File(FileSystemLocations.getDatabaseFile()), new File(autoSaveFilePath));\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t\tLOGGER.error(\"Autosave - backup failed\");\r\n \t\t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE, e);\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public void save() {\n savePrefs();\n }", "private void saveBeforeRun() {\n if ( _helper != null && _settings.getSaveBeforeRun() )\n _helper.saveBeforeRun();\n }", "public void saveToFile() throws InterruptedException\n {\n //generate data\n StringBuilder data = new StringBuilder();\n data.append(\"X,Y,Z,GPS,Timestamp\");\n //loop voor de hardcoded data die wordt aangemaakt in de loop.\n for (int i = 0; i < 5; i++)\n {\n Long currentTime = System.currentTimeMillis();\n data.append(\"\\n\" + i + \",\" + i * i + \",\" + (i + i) + \",\" + (i+i+i)*i + \",\" + currentTime);\n TimeUnit.SECONDS.sleep(1);\n }\n\n FileOutputStream fos = null;\n try\n {\n //saving the file into device\n fos = this.mainActivity.openFileOutput(MainActivity.FILE_NAME, Context.MODE_PRIVATE);\n fos.write(data.toString().getBytes());\n mEditText.getText().clear();\n Toast.makeText(this.mainActivity, \"Saved to\" + mainActivity.getFilesDir() + \"/\" + MainActivity.FILE_NAME, Toast.LENGTH_LONG).show();\n }\n catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n if (fos != null)\n {\n try\n {\n fos.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n }", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "public void save() throws Exception {\n\t\tgetControl(\"saveButton\").click();\n\t\tVoodooUtils.pause(3000);\n\t}", "public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "public void run() {\n \t\t\tlogger.info(\"Saving settings ...\");\n \n \t\t\tif (exitSavables != null) {\n \t\t\t\tEnumeration enumeration = exitSavables.elements();\n \t\t\t\twhile (enumeration.hasMoreElements()) {\n \t\t\t\t\tSavable savable = (Savable) enumeration.nextElement();\n \t\t\t\t\ttry {\n \t\t\t\t\t\tsavable.save();\n \t\t\t\t\t} catch (StorageException se) {\n \t\t\t\t\t\tlogger.log(Level.SEVERE,\n \t\t\t\t\t\t\t\t\"Error while saving a resource inside the shutdown hook.\", se);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tFileAccess.cleanKeypool(MainFrame.keypool);\n \n \t\t\tlogger.info(\"Bye!\");\n \t\t}", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "public void saveGameSession() {\n\t\tlastSaved = ProjectZero.calendar.getTime().toString();\n\t\tAssetHandler.saveGameSession();\n\t}", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void save() throws Exception {\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tgetControl(\"save\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t}", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "public void saveSelfInfo()\n\t{\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\thelper.addSelfInfo(uid, myApp.getSelfInfoList());\n\t\t\t}\n\t\t}).start();\n\t}", "@Override\n public void save() {\n \n }", "private void saveCurrentObject() {\n\t}", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }", "public void save() {\n JobNotificationDao dao = new JobNotificationDao();\n projectBean.getWorkload().getJobConfiguration().getNotifications().clear();\n for (JobNotification notification : notifications) {\n notification.copyTransient();\n notification = dao.saveOrUpdate(notification);\n projectBean.getWorkload().getJobConfiguration().getNotifications().add(notification);\n }\n }", "void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }", "public void save();", "public void save();", "public void save();", "public void save();", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "public void saveQuickly(){\r\n String quickSavePath = this.savePath + File.separator + \"QuickSave.ser\";\r\n this.save(quickSavePath);\r\n }", "private void save() {\n var boolGrid = editor.getBoolGrid();\n //Generate a track grid from the bool frid\n var grid = Track.createFromBoolGrid(boolGrid);\n var valid = Track.isValidTrack(grid);\n if (!valid) {\n //fire an error event\n MessageBus.fire(new ErrorEvent(\"Invalid track\", \"\", 2));\n } else {\n //Save the track and pop back\n var generator = new TrackFromGridGenerator(grid);\n var track = generator.generateTrack();\n (new TrackStorageManager()).saveTrack(track);\n menu.navigationPop();\n menu.showError(new ErrorEvent(\"Saved track!\", \"\", 2, Colour.GREEN));\n }\n }", "public void SaveGame(){\n if(gameStarted == false || canLoadGame == true){ return; }\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n int input = JOptionPane.showOptionDialog(null, \"Do you want to save game?\", \"Save Game\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);\n if(input == JOptionPane.OK_OPTION) {\n SaveCurrentGame();\n animationThread.start();\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LoadingScreenMusic\");\n }\n musicName = \"LoadingScreenMusic\";\n }else{\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n }\n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public void saveCurrentRecord() {\n ThreadUtil.executeOnNewThread(new Runnable() {\n @Override\n public void run() {\n SharedPreferences recordPreferences = mContext.getSharedPreferences(RECORD_PREFERENCES, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = recordPreferences.edit();\n if (mCurrentRecord == null) {\n editor.putString(CURRENT_RECORD_KEY, null);\n } else {\n String recordJson = mGson.toJson(mCurrentRecord);\n editor.putString(CURRENT_RECORD_KEY, recordJson);\n }\n editor.apply();\n\n if (mCurrentRecord != null) {\n saveRecord(mCurrentRecord);\n }\n }\n });\n }", "@Override\r\n\tpublic void onPause() {\r\n\t\tsuper.onPause();\r\n\t\ttry {\r\n\t\t\tSaveGameHandler.saveGame(this, new SaveGame(controller, status),\r\n\t\t\t\t\t\"test.game\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void save(){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(downloadedBooks);\n editor.putString( LISTS_DOWNLOADED, json);\n json = gson.toJson(progress);\n editor.putString( LISTS_PROGRESS, json);\n editor.apply();\n }", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "public boolean save() {\n\t\treturn save(_file);\n\t}", "@Override\r\n\tpublic void pause() {\n Settings.save();\r\n\t\t\r\n\t}", "public boolean save(boolean saveNested) {\n return save(Datastore.fetchDefaultService(), saveNested);\n }", "public void save() {\n\n\t\tint[][] rawData = new int[2][CHUNK_SIZE * CHUNK_SIZE];\n\n\t\tfor (int l = 0; l < 2; l++) {\n\t\t\tLayer layer = Layer.get(l);\n\t\t\tfor (int y = 0; y < CHUNK_SIZE; y++) {\n\t\t\t\tfor (int x = 0; x < CHUNK_SIZE; x++) {\n\t\t\t\t\trawData[l][x + y * CHUNK_SIZE] = getTileId(layer, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.saveData = new RawChunkData(rawData);\n\t}", "void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "@Override\r\n\tpublic void innerSave() {\n\r\n\t}", "public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }", "private void save(ComputationGraph net) throws Exception {\r\n ModelSerializer.writeModel(net, locationToSave, saveUpdater);\r\n }", "public void saveTask (View view) {\n \t\n \tTask task = gatherTaskInfo();\n \t//calls to crowd sourcer only if a task is returned\n \tif(task != null) {\n \t\tnew saveTask().execute(task);\t\t\n \t} \t\n }", "private void save() {\n // Get the current measurement\n final LiveData<Measurement> ldm = mViewModel.getMeasurementById(mMeasurementId);\n ldm.observe(getViewLifecycleOwner(), new Observer<Measurement>() {\n @Override\n public void onChanged(final Measurement measurement) {\n ldm.removeObserver(this);\n updateMeasurement(measurement);\n snackBar(\"Measurement updated!\");\n }\n });\n }", "@Override\n protected void onPause() {\n super.onPause();\n saveToFile(StartingActivity.TEMP_SAVE_FILENAME);\n boardManager.setLastTime(stopTimer());\n System.out.println(\"pause: \" + boardManager.getLastTime());\n }", "public void SaveCurrentGame(){\n if(gameStarted == false){ return; }\n recordGame.write(board, timeRuunableThread, level);\n timeRuunableThread.setDrawNumber(false);\n canLoadGame = true;\n // update infoCanvas\n CleanInfoCanvas();\n }", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "public void quitAndSave(final View v) {\n mPhraseCollection.setListTitle(((EditText) findViewById(R.id.edit_list_title)).getText().toString());\n\n // Open layout with ProgressBar while we are processing DriveFile\n setContentView(R.layout.activity_circle);\n\n\t\t// Open a new Thread to save the file and exit back to ListSelectionActivity\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (mPhraseCollection.writeChangesToDrive((EditListActivity)v.getContext())) {\n // Open new Intent to create Bundle to pass back to ListSelectionActivity\n Intent rIntent = new Intent();\n rIntent.putExtra(\"PhraseCollection\", mPhraseCollection);\n rIntent.putExtra(\"position\", mPosition);\n setResult(RESULT_CODE_SAVE, rIntent);\n finish();\n } else {\n // TODO Display error to user when writing changes to Drive is unsuccessful\n }\n\t\t\t}\n\t\t}).start();\n\t}", "public void saveArena() {\n //pick name and location\n Thread t1 = new Thread(new Runnable() {\n @Override\n public void run() {\n JFileChooser chooser = new JFileChooser();\n int approve = chooser.showSaveDialog(null);\n if (approve == JFileChooser.APPROVE_OPTION) {\t\t\t//if possible\n File selFile = chooser.getSelectedFile();\t\t\t//get output file\n File currDir = chooser.getCurrentDirectory();\t\t//get directory to save to\n\n //save\n try {\n FileWriter outFileWriter = new FileWriter(selFile);\t\t//create filewriter for selected file\n PrintWriter writer = new PrintWriter(outFileWriter);\n writer.println(saveArenaData());\t\t\t\t\t\t//save arena info to file\n writer.close();\n }\n catch (FileNotFoundException e) {\t\t\t\t\t\t\t\t//if can't find file\n e.printStackTrace();\n }\n catch (IOException e) {\t\t\t\t\t\t\t\t\t\t//if input/output error\n e.printStackTrace();\n }\n }\n }\n });\n t1.start();\n\n\n }", "@Override\n\t\t\tprotected String doInBackground(byte[]... input) {\n\t\t\t\tTimeLapseApplication tla = TimeLapseApplication.applicationContext;\n\t\t\t\tif(_id == -1){\n\t\t\t\t\tLog.d(TAG,\"Error: no _id given\");\n\t\t\t\t\t//Uri new_timelapse = tla.createTimeLapse(null, null);\n\t\t\t\t\t//_id = Integer.parseInt(new_timelapse.getLastPathSegment());\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tLog.d(\"SavePicture\",\"Reading contentprovider \" + String.valueOf(_id));\n\t\t\t\t\n\t\t ContentValues tl = SQLiteWrapper.cursorRowToContentValues(tla.getTimeLapseById(_id, null));\n\t\t int timelapse_id = tl.getAsInteger(SQLiteWrapper.COLUMN_TIMELAPSE_ID);\n\t\t if(!tl.containsKey(SQLiteWrapper.COLUMN_DIRECTORY_PATH)){\n\t\t \t// If a picture is being saved before the content provider has been updated by FileUtils.SaveTimeLapseonFilesystem\n\t\t \tLog.d(\"SavePictureTimeLapse\",\"Dir_path unexpectedly blank:\" + FileUtils.getOutputMediaFile(timelapse_id, FileUtils.MEDIA_TYPE_IMAGE, 0).getAbsolutePath());\n\t\t \ttl.put(SQLiteWrapper.COLUMN_DIRECTORY_PATH, FileUtils.getOutputMediaFile(timelapse_id, FileUtils.MEDIA_TYPE_IMAGE, 0).getAbsolutePath());\n\t\t }\n\t\t Log.d(\"TimeLapse Retrieved in SavePicture\", tl.getAsString(SQLiteWrapper.COLUMN_DIRECTORY_PATH));\n\t\t File pictureFile;\n\t\t if(tl.containsKey(SQLiteWrapper.COLUMN_IMAGE_COUNT))\n\t\t \tpictureFile = FileUtils.getOutputMediaFile(timelapse_id, FileUtils.MEDIA_TYPE_IMAGE, tl.getAsInteger(SQLiteWrapper.COLUMN_IMAGE_COUNT));\n\t\t else\n\t\t \tpictureFile = FileUtils.getOutputMediaFile(timelapse_id, FileUtils.MEDIA_TYPE_IMAGE, 0);\n\t\t \n\t\t if (pictureFile == null){\n\t\t Log.d(TAG, \"Error creating media file, check storage permissions\");\n\t\t return \"\";\n\t\t }\n\n\t\t try {\n\t\t \tLog.d(\"Writing picture\",pictureFile.getAbsolutePath());\n\t\t FileOutputStream fos = new FileOutputStream(pictureFile);\n\t\t Bitmap final_bitmap = null;\n\t\t int orientation = 0;\n\t\t if(front_facing){\n\t\t \tfinal_bitmap = flipImage(input[0], fos);\n\t\t }else{\n\t\t \tfinal_bitmap = BitmapFactory.decodeByteArray(input[0], 0, input[0].length, null);\n\t\t }\n\t\t //Log.d(\"bitmap_dimensions\",String.valueOf(final_bitmap.getHeight() + \" x \" + String.valueOf(final_bitmap.getWidth())));\n\t\t //if(final_bitmap.getHeight() < final_bitmap.getWidth()){\n\t\t if(portrait){\n\t\t orientation = 90;\n\t\t } else {\n\t\t orientation = 0;\n\t\t }\n\t\t \n\t\t if (orientation != 0) {\n\t\t Matrix matrix = new Matrix();\n\t\t matrix.postRotate(orientation);\n\t\t final_bitmap = Bitmap.createBitmap(final_bitmap, 0, 0, final_bitmap.getWidth(),\n\t\t \t\tfinal_bitmap.getHeight(), matrix, true);\n\t\t }\n\t\t final_bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fos);\n\t\t fos.close();\n\t\t } catch (FileNotFoundException e) {\n\t\t Log.d(TAG, \"File not found: \" + e.getMessage());\n\t\t } catch (IOException e) {\n\t\t Log.d(TAG, \"Error accessing file: \" + e.getMessage());\n\t\t }\n\t\t Log.d(TAG,\"Picture saved: \" + pictureFile.getAbsolutePath());\n\t\t \n\t\t // Picture is now written to Filesystem\n\t\t // set TimeLapse image_count and modified_date\n\t\t \n\t\t int num_images;\n\t\t if(tl.containsKey(SQLiteWrapper.COLUMN_IMAGE_COUNT))\n\t\t \tnum_images = tl.getAsInteger(SQLiteWrapper.COLUMN_IMAGE_COUNT);\n\t\t else\n\t\t \tnum_images = 0;\n\t\t \n\t\t \n\t\t //TimeLapse tl = ((TimeLapseApplication)tla).time_lapse_map.get(timelapse_id);\n\t\t //tl.modified_date = new Date();\n\t\t //tl.image_count ++;\n\t\t \n\t\t // Generate a thumbnail for this new picture\n\t\t tl = findOrGenerateThumbnail(tl);\n\t\t \n\t\t // TODO: Save new thumb, image to db OR do it in SaveTimeLapse\n\t\t Log.d(\"SavePicture\",tl.getAsString(SQLiteWrapper.COLUMN_DIRECTORY_PATH));\n\t\t tla.updateTimeLapseById(_id, new String[]{SQLiteWrapper.COLUMN_IMAGE_COUNT, SQLiteWrapper.COLUMN_LAST_IMAGE_PATH, SQLiteWrapper.COLUMN_THUMBNAIL_PATH},\n\t\t \t\t\t\t\t\t\t\t\t new String[]{String.valueOf(num_images+=1), tl.getAsString(SQLiteWrapper.COLUMN_LAST_IMAGE_PATH), tl.getAsString(SQLiteWrapper.COLUMN_THUMBNAIL_PATH)});\n\t\t\t\t\n\t\t // Save the new metadata.json reflecting the recently taken picture\n\t\t new FileUtils.SaveTimeLapsesOnFilesystem().execute(tl);\n\t\t\t\treturn pictureFile.getAbsolutePath();\n\t\t\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, finalsTerm);\n }\n }", "@Override\n public void save()\n {\n \n }" ]
[ "0.6396526", "0.627441", "0.62690765", "0.619909", "0.6159764", "0.59425676", "0.5840286", "0.5825904", "0.57862127", "0.5749021", "0.5645519", "0.56448936", "0.5644124", "0.5621274", "0.5616524", "0.5607303", "0.5602722", "0.5574591", "0.55497116", "0.55428714", "0.5521861", "0.5470703", "0.5470703", "0.5470703", "0.5464319", "0.54581594", "0.54554945", "0.54472244", "0.54266924", "0.5425893", "0.5424883", "0.5421972", "0.5421636", "0.5418393", "0.54145926", "0.5397376", "0.53874147", "0.53820467", "0.5381671", "0.53748196", "0.5371628", "0.53695", "0.53490347", "0.5337469", "0.53284085", "0.5328251", "0.5328072", "0.53171325", "0.5310764", "0.53080964", "0.5304944", "0.5300249", "0.5290897", "0.527692", "0.52326256", "0.522775", "0.52245355", "0.5220741", "0.52171576", "0.5211095", "0.5208634", "0.52002585", "0.51992375", "0.5183025", "0.51804477", "0.51756656", "0.5173786", "0.51687825", "0.51687825", "0.51687825", "0.51687825", "0.5167854", "0.5166973", "0.51652086", "0.51649934", "0.5163605", "0.5163605", "0.5157902", "0.51557267", "0.5152101", "0.5144225", "0.5131793", "0.51290005", "0.51205605", "0.51188344", "0.511448", "0.51070654", "0.5102165", "0.5096323", "0.50947785", "0.50935894", "0.5090244", "0.50871503", "0.5086201", "0.50853914", "0.5083506", "0.5082321", "0.50800335", "0.50800335", "0.5077247", "0.5076199" ]
0.0
-1
Responds to progress updates events by updating the UI.
@Override protected void onProgressUpdate(Integer... progress) { if (mProgressDialog != null) { mProgressDialog.setProgress(progress[0]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void update(final Progress progress) {\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n progressBar.setValue(progress.getIntPercentage());\n progressField.setText(roundToSingleDigit(progress.getPercentage()) + \"%\");\n }\n });\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n\n\n // Do things like update the progress bar\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tprogressBar.setVisibility(View.VISIBLE);\n\n\t\t\t// updating progress bar value\n\t\t\tprogressBar.setProgress(progress[0]);\n\n\t\t\t// updating percentage value\n\t\t\ttxtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n\t\t}", "public void updateProgress() {\r\n\t\tfireTableDataChanged();\r\n\t}", "protected void onProgressUpdate(String... progress) {\n\t\t\t\t\t\t// Set progress percentage\n\t\t\t\t\t\tprgDialog.setProgress(Integer.parseInt(progress[0]));\n\t\t\t\t\t}", "private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percentage*100) + \"%)\");\n\t\tprogressBar.setProgress(percentage);\n\t}", "public static void updateProgressBar() {\r\n mHandler.postDelayed(mUpdateTime, 100);\r\n }", "@Override\n\tpublic void onProgressUpdate() {\n\n\t}", "@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tsuper.onProgressUpdate(progress);\n\n\t\t\tdialog.setProgress(progress[0]);\n\t\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n progressBar.setVisibility(View.VISIBLE);\n\n // updating progress bar value\n progressBar.setProgress(progress[0]);\n\n // updating percentage value\n txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "@Override protected void onProgressUpdate(Integer... vals) {\n updateProgressBar(vals[0].intValue());\n }", "protected void onProgressUpdate(Integer... progress) {\n\t\t}", "private void updateProgress() {\n progressBar.setProgress( (1.0d * currentQuestion) / numQuestions);\n }", "@Override\n\t\tprotected void onProgressUpdate(Object... values) {\n\t\t}", "@Override\n\t protected void onProgressUpdate(Void... values) {\n\t }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\r\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n\n progressBar.setProgress(values[0].intValue());\n\n }", "protected void sendProgress() {\n setProgress(getProgress() ^ 1);\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n //Shows the ProgressDialog and sets the progress/message shown\n progressDialog.show();\n progressDialog.setTitle(\"Uploading\");\n progressDialog.setProgress(progress[0]);\n progressDialog.setMessage(String.valueOf(progress[0]) + \"%\");\n }", "private void updateProgress(int progress) {\n if (myHost != null) {\n myHost.updateProgress(progress);\n } else {\n System.out.println(\"Progress: \" + progress + \"%\");\n }\n }", "@Override\n\t\t\t\tpublic void onProgress(int progress) {\n\t\t\t\t\tmProgressBar.setProgress(progress);\n\t\t\t\t}", "@Override\r\n\tpublic void updateProgress(int arg0) {\n\t\t System.out.println(\"arg0.progress=\" + arg0);\r\n\t\tmHandler.obtainMessage(100, arg0, arg0).sendToTarget();\r\n\t}", "public void run() {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = Msg_SetProgress;\n\t\t\t\tmHandler.sendMessage(msg);\n\t\t\t}", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "@Override\n\tprotected void onProgressUpdate(Integer... values) {\n\t\tint len = progressBar.getProgress() + values[0];\n\t\tprogressBar.setProgress(len);\n\t\tString str = progressBar.getProgress() * 100 / progressBar.getMax()\n\t\t\t\t+ \"%\";\n\t\ttv.setText(\"下载完成\" + str);\n\t\tsuper.onProgressUpdate(values);\n\t}", "@Override\n\t\t\tpublic void onProgressChanged(int progress) {\n\n\t\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tloadingView.setProgress(values[0]);\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Void... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Void... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n pDialog.setProgress(progress[0]);\n\n // updating percentage value\n //txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "@Override\r\n\tprotected void onProgressUpdate(Void... values) {\n\t\tsuper.onProgressUpdate(values);\r\n\r\n\t}", "@Override\n\t\t/*\n\t\t * UI线程执行\n\t\t */\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t// 取出发布进度的值\n\t\t\tint value = values[0];\n\t\t\t// 设置给Button\n\t\t\tbtn.setText(\"\" + value);\n\t\t\tpb.setProgress(value);\n\t\t}", "private void updateProgress(int progress) {\n if (myHost != null && progress != previousProgress) {\n myHost.updateProgress(progress);\n }\n previousProgress = progress;\n }", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "@Override\r\n protected void onProgressUpdate(Void... values) {\n super.onProgressUpdate(values);\r\n }", "protected void onProgressUpdate(Integer... progress) {\n }", "public void progressMade();", "@Override\n public void showProgress() {\n\n }", "@Override\r\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\r\n\t\t\tsetProgress(values[0]);\r\n\t\t\t\r\n\r\n\t\t}", "@Override\r\n\tprotected void onProgressUpdate(String... s) {\r\n\t\tactivity.addToGUI(s[0]);\r\n\t}", "@Override\n protected void onProgressUpdate(String... values) {\n super.onProgressUpdate(values);\n String message = values[0];\n dialog.setMessage(waitMsg + message);\n displayProgress(message);\n }", "public void updateUI(){}", "@Override\r\n protected void onProgressUpdate(Void... values) {\n \tsuper.onProgressUpdate(values);\r\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progress.setVisibility(View.VISIBLE);\n progress.setProgress(values[0]);\n super.onProgressUpdate(values);\n }", "@Override\n protected void onProgressUpdate(String... progress) {\n }", "void onProgress(float progress);", "private void updateProgress(String progressLabel, int progress) {\n if (myHost != null) {\n myHost.updateProgress(progressLabel, progress);\n } else {\n System.out.println(progressLabel + \" \" + progress + \"%\");\n }\n }", "public void run() {\n\t\t\t\t\tmHandler.post(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tprogressbar.setProgress(Integer\r\n\t\t\t\t\t\t\t\t\t.parseInt(tvsp.progress));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}", "private void updateUI() {\n handler_.post(new Runnable() {\n public void run() {\n bar_.setProgress(time_);\n String remTimeStr = \"\" + (maxTime_ - time_);\n timeRemaining_.setText(REM_STRING.replace(\"?\", remTimeStr));\n }\n });\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "public void onProgressUpdate(int numRouleau,String prochain);", "protected void updateProgress(Progress prog) {\r\n \t// if this is called then ensure the no tasks msg is not also displayed\r\n \tshowNoTaskMsg(false);\r\n \t\r\n\t\tint done = prog.getWork();\r\n\t\tString status = getStatusDesc(prog);\r\n\r\n\t\tfinal ProgressUIControl progressUIControl = findOrCreateUIControl(prog);\r\n\t\tprogressUIControl.showMsg(status);\r\n\t\tprogressUIControl.showPercent(done);\r\n\t\t\r\n\t\tif (prog.isFinished() && !progressUIControl.isFinishNotified) {\r\n\t\t\tLog.i(TAG, \"Job finished:\"+prog.getJobName());\r\n\t\t\tprogressUIControl.isFinishNotified = true;\r\n\t\t\tjobFinished(prog);\r\n\t\t}\r\n }", "@Override\r\n\tprotected void progressFinished() {\n\t}", "private void updateGUIStatus() {\r\n\r\n }", "protected void onProgressUpdate(Integer... progress){\n\t Utils.logThreadSignature(this.tag);\n\t this.reportThreadSignature();\n\n\t //will be called multiple times\n\t //triggered by onPostExecute\n\t Integer i = progress[0];\n\t r.reportBack(tag, \"Progress:\" + i.toString());\n\t pd.setProgress(i);\n }", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "@Override\n public void onProgressUpdate(Integer... progress)\n {\n _dialog.setProgress(progress[0]);\n }", "@Override\n\tprotected void onProgressUpdate(Integer... values) {\n\t}", "public abstract void onProgress(short percentage, long downloadedSoFar);", "@Override\n protected void onProgressUpdate(Object[] values) {\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}", "@Override\r\n public void updateUI() {\r\n }", "public void update()\n {\n this.lastProgress = this.progress;\n\n if (this.lastProgress >= 1.0F)\n {\n this.func_184322_i();\n this.worldObj.removeTileEntity(this.pos);\n this.invalidate();\n\n if (this.worldObj.getBlockState(this.pos).getBlock() == Blocks.piston_extension)\n {\n this.worldObj.setBlockState(this.pos, this.pistonState, 3);\n this.worldObj.notifyBlockOfStateChange(this.pos, this.pistonState.getBlock());\n }\n }\n else\n {\n this.progress += 0.5F;\n\n if (this.progress >= 1.0F)\n {\n this.progress = 1.0F;\n }\n\n this.func_184322_i();\n }\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n ProgressBar pbFileIO = (ProgressBar)findViewById(R.id.pbFileIO);\n pbFileIO.setProgress(progress[0]);\n }", "@Override\n public void showProgressSync() {\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "@Override\n //here the messageReceived method is implemented\n public void messageReceived(String message) {\n publishProgress(message);\n }", "public void onProgress(int pos);", "void notifyProgress(MessageSnapshot snapshot);", "private void updateProgress(String progressLabel, int progress) {\n if (myHost != null && ((progress != previousProgress) || \n (!progressLabel.equals(previousProgressLabel)))) {\n myHost.updateProgress(progressLabel, progress);\n }\n previousProgress = progress;\n previousProgressLabel = progressLabel;\n }", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n }", "public void updateProgressMessage() {\n pb.setMax(frames);\n int rendered = getNumFramesRendered(this, projectName);\n pb.setProgress(Math.min(pb.getMax(), rendered));\n int n = pb.getMax();\n int ratio = (rendered * 100) / n;\n String temp = String.format(\"Progress: %d / %d (%d%%)\", rendered, n, ratio);\n progressMessage.setText(temp);\n }", "public void updateProgress(int progress) {\n\t\tif (getView() != null) {\n\t\t\tProgressBar listProgress = (ProgressBar) getView().findViewById(\n\t\t\t\t\tR.id.severity_list_progress);\n\t\t\tlistProgress.setProgress(progress);\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}", "void showProgress();", "void successUiUpdater();", "@Override\n\tprotected void onProgressUpdate(String... values) {\n\t\tsuper.onProgressUpdate(values);\n\t}", "@Override\n\tpublic void updateRunningStatus \n\t\t(final int progress, final String label1, final String label2)\n\t{\n\t\t\n\t\tRunnable doSetRunningStatus = new Runnable()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tmRunningPanel.updateProgressBar(progress);\n\t\t\t\tmRunningPanel.updateProgressLabel1(label1);\n\t\t\t\tmRunningPanel.updateProgressLabel2(label2);\n\t\t\t}\n\t\t};\n\t\t\n\t\tSwingUtilities.invokeLater(doSetRunningStatus);\n\t\t\n\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n imageProvider.setUploading_status((float) progress[0]);\n // updating progress bar value\n if(progressBar != null) {\n if(progress[0] >= 100 && imageProvider.getUploaded()) {\n progressBar.setVisibility(View.INVISIBLE);\n }\n progressBar.setProgress(progress[0]);\n }\n if(progress[0] >= 100 && haze!= null && imageProvider.getUploaded()){\n haze.setAlpha(0f);\n }\n if(progress[0] >= 100 && refreshImageButton!=null && !imageProvider.getUploaded()){\n refreshImageButton.setVisibility(View.INVISIBLE);\n }\n // updating percentage value\n //txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "private void updateProgress(final int value) {\n \t\t// update progress bar\n \t\tprogressBar.setValue(value);\n \t\tfinal int previous = 100 * (value - 1) / progressBar.getMaximum();\n \t\tfinal int current = 100 * value / progressBar.getMaximum();\n \t\tif (previous != current) progressBar.setString(\"\" + current + \"%\");\n \n \t\t// redraw calendar graphic\n \t\tprogressFrame.repaint();\n \t}", "private void follow_updates() {\n new Thread() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(1000);\n GUI.setUps(upd_count);\n upd_count = 0;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }", "void reportProgress(List<Node> update);", "@Override\r\n public void onUIProgressStart(long totalBytes) {\r\n super.onUIProgressStart(totalBytes);\r\n\r\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n barratime.setProgress(values[0]);\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n loadingText.setText(loadingHints[random.nextInt(loadingHints.length)]);\n // [... Обновите индикатор хода выполнения, уведомления или другой\n // элемент пользовательского интерфейса ...]\n }", "@Override\r\n protected void onProgressUpdate(Void... values) {\r\n super.onProgressUpdate(values);\r\n invalidate();\r\n }", "@Override\n protected void onProgressUpdate(String... progress) {\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n // 背景工作處理\"中\"更新的事\n\n }", "public void run() {\r\n ouputProgressModel.setPogressStarted(true);\r\n try {\r\n for (int i = 0; i <= 100; i += 10) {\r\n // pause the thread\r\n Thread.sleep(PROCCESS_SLEEP_LENGTH);\r\n // update the percent value\r\n ouputProgressModel.setPercentComplete(i);\r\n SessionRenderer.render(\"progressExample\");\r\n }\r\n }\r\n catch (InterruptedException e) { }\r\n ouputProgressModel.setPogressStarted(false);\r\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\n\t\t\tLog.d(TAG, \" posting\");\n\t\t}" ]
[ "0.7405879", "0.73704374", "0.7369706", "0.7294782", "0.71994436", "0.7188843", "0.7176534", "0.71664894", "0.70961976", "0.70961976", "0.70955527", "0.7091251", "0.7045902", "0.7021247", "0.6997063", "0.6986541", "0.69466525", "0.68938756", "0.68938756", "0.6892226", "0.6890951", "0.688982", "0.68707883", "0.6865218", "0.68491477", "0.68437064", "0.6783687", "0.6771023", "0.6771023", "0.67684174", "0.6765741", "0.67651254", "0.67582524", "0.67582524", "0.6756396", "0.6751722", "0.6740134", "0.67186284", "0.6707794", "0.6705248", "0.669456", "0.6687466", "0.66836005", "0.66718173", "0.6657697", "0.6648046", "0.6631006", "0.6629493", "0.6614907", "0.6593743", "0.6574156", "0.6569633", "0.6556829", "0.6554895", "0.65495175", "0.65388614", "0.6536341", "0.65056884", "0.65015626", "0.6500538", "0.64892185", "0.64857394", "0.64821434", "0.648038", "0.64710695", "0.6465867", "0.6465867", "0.6465867", "0.6458435", "0.6455029", "0.6453879", "0.6451214", "0.643474", "0.643474", "0.643474", "0.643474", "0.64310217", "0.6428602", "0.6427393", "0.6420898", "0.640618", "0.64033103", "0.63856095", "0.6385014", "0.63844126", "0.63838595", "0.63811827", "0.6380472", "0.6374882", "0.6371042", "0.6355222", "0.6353929", "0.6352916", "0.6351098", "0.63454825", "0.63420457", "0.63389164", "0.63230336", "0.6315347", "0.6292428" ]
0.6549365
55
Dismisses the progress dialog and call the activity.
@Override protected void onPostExecute(String adf_dataset_uuid) { if (mProgressDialog != null) { mProgressDialog.dismiss(); } if (mCallbackListener != null) { mCallbackListener.onSaveAdfFinished(mAdfName, adf_dataset_uuid); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void dismissDialog() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "public void dismissProgress() {\n if (mProgressDialog != null) {\n mProgressDialog.dismiss();\n mProgressDialog = null;\n }\n }", "void dismissProgressDialog();", "void dismissProgressDialog();", "void dismissProgressDialog();", "public void dissMissDialog(){\r\n if (dialog != null && dialog.isShowing()\r\n && dialog.getContext() != null) {\r\n try {\r\n dialog.dismiss();\r\n\r\n if(mCallback != null){\r\n mCallback.onProgressDissmiss();\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "private void dismissProgress() {\n \n \t\tnew Handler(getMainLooper()).post(new Runnable() {\n \n \t\t\t@Override\n \t\t\tpublic void run() {\n \t\t\t\tif (progressDialog == null)\n \t\t\t\t\tprogressDialog = (ProgressDialogFragment) getSupportFragmentManager()\n \t\t\t\t\t\t\t.findFragmentByTag(\n \t\t\t\t\t\t\t\t\tProgressDialogFragment.FRAGMENT_TAG);\n \n \t\t\t\tif (progressDialog != null && progressDialog.getShowsDialog()) {\n \t\t\t\t\tprogressDialog.dismiss();\n \n \t\t\t\t\tprogressDialog = null;\n \t\t\t\t}\n \t\t\t}\n \t\t});\n \t}", "public void dismissProgressDialog(){\n if(progressDialog != null)\n progressDialog.dismiss();\n }", "public void dismissProgressDialog() {\r\n if (progressDialog.isShowing()) {\r\n progressDialog.dismiss();\r\n }\r\n }", "public void dismissDialog(){\n\t if(pd != null){\n\t\t pd_progress = pd.getProgress();\n\t\t pd.dismiss();\n\t }\n }", "void dismissProgressLoading() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "public void offProgressDialog(){\n if(dialogProgresIndeterminate != null && dialogProgresIndeterminate.isShowing()){\n dialogProgresIndeterminate.dismiss();\n }\n }", "private void dismissProgressIndication() {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n try{\n mProgressDialog.dismiss(); // safe even if already dismissed\n }catch(Exception e){\n Log.i(TAG, \"dismiss exception: \" + e);\t\n }\n mProgressDialog = null;\n }\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\t\n\t\t}", "private void dismissProgressDialog()\n {\n \tif (null != dialog && dialog.isShowing()) {\n \t\tdialog.dismiss();\n \t}\n }", "@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}", "@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n // dismiss the progress dialog\n MyTask.this.cancel(true);\n finish();\n pDialog.dismiss();\n // Tell the system about cancellation\n\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "public void onDismissDialog() {\n Log.i(this, \"Dialog dismissed\");\n if (mInCallState == InCallState.NO_CALLS) {\n attemptFinishActivity();\n attemptCleanup();\n }\n }", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "public void dismissProgressDialog() {\n if (this.progressDialog != null) {\n this.progressDialog.dismiss();\n this.progressDialog = null;\n }\n }", "@Override\n\tpublic void hideProgress() {\n\t\tprogress.dismiss();\n\t}", "private void hideProgress() {\n if (dialogProgress != null) {\n dialogProgress.dismiss();\n dialogProgress = null;\n }\n }", "private void dismissProgressDialog() {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n mProgressDialog.dismiss();\n }\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t\t\n\t\t}", "@Override\n \t\tprotected void onPostExecute(Void result) \n \t\t{\n\t\t\t//close the progress dialog\n\t\t\tprogressDialog.dismiss();\n\t\t\tprogressDialog = null;\n \t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\n\t\t\t protected void onPostExecute(Void result)\n\t\t\t {\n\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t}", "private void hideDialog() {\n if (progressDialog.isShowing())\n progressDialog.dismiss();\n }", "private void stopProgressDialog() {\n try {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n mProgressDialog.dismiss();\n }\n } catch (Exception e) {\n LogWriter.err(e);\n } finally {\n mProgressDialog = null;\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\t\t protected void onPostExecute(Void result)\n\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tmydialog.dismiss();\n\t\t}", "protected void dismissLoading()\n {\n progressBar.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t}", "public void hideProgressDialog() {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (progress.isShowing())\r\n\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t} catch (Throwable e) {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "public void dismissProgressDialog() {\n if (this.pDialog != null && this.pDialog.isShowing()) {\n this.pDialog.dismiss();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "public void hideProgress() {\n // if (progressDialog != null && progressDialog.isShowing())\n try {\n progressDialog.dismiss();\n } catch (Exception e) {\n\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\tpublic void hideProgress() {\n\t\twaitDialog(false);\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n task.cancel(true); //meng- cancel AsincTask\n pd.dismiss(); //menghilangkan progress dialog\n }", "@Override\n public void onClick(View v) {\n mDialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\r\n\r\n\t\t\t}", "public void run() {\n progressDialog.dismiss();\n }", "public void run() {\n progressDialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "private void hideProgress() {\n \tif(mProgress!=null){\n \t\tmProgress.dismiss();\n \tmProgress=null;\n \t}\n }", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onDetach() {\n if (progressDialog != null && progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n super.onDetach();\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}" ]
[ "0.7666219", "0.7583008", "0.7530231", "0.7530231", "0.7530231", "0.7523263", "0.7435603", "0.7392896", "0.7351297", "0.7289879", "0.71879876", "0.7159664", "0.712965", "0.7098664", "0.7081723", "0.7054151", "0.7054151", "0.70488137", "0.70471334", "0.70471334", "0.70471334", "0.70446205", "0.70313597", "0.70313597", "0.7022988", "0.6995168", "0.6985521", "0.6984641", "0.69563824", "0.6945783", "0.69439054", "0.69439054", "0.69439054", "0.6908653", "0.69047785", "0.69037867", "0.689601", "0.6864611", "0.68555087", "0.68555087", "0.68515646", "0.6848196", "0.68432796", "0.68351185", "0.6829966", "0.68266016", "0.68266016", "0.68266016", "0.6823418", "0.682302", "0.6820343", "0.6820343", "0.6820343", "0.6820343", "0.6820343", "0.6820343", "0.6817996", "0.6817996", "0.68006337", "0.67980945", "0.67883146", "0.67803705", "0.677822", "0.6777933", "0.67748606", "0.6772846", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.6747684", "0.67436934", "0.6738869", "0.6738869", "0.6732621", "0.67276776", "0.67276776", "0.67205006", "0.67162937", "0.67162937", "0.6708672", "0.6700883", "0.6700883", "0.6689158", "0.6689158", "0.6685172", "0.6685172", "0.6685172", "0.6685172", "0.6685172", "0.66824883", "0.66772026", "0.66772026", "0.6675252", "0.6669184", "0.6669184", "0.6669184", "0.6669184" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { mainPanel = new javax.swing.JPanel(); combobox1 = new javax.swing.JComboBox(); label1 = new javax.swing.JLabel(); label2 = new javax.swing.JLabel(); label3 = new javax.swing.JLabel(); combobox2 = new javax.swing.JComboBox(); combobox3 = new javax.swing.JComboBox(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); statusPanel = new javax.swing.JPanel(); javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator(); statusMessageLabel = new javax.swing.JLabel(); statusAnimationLabel = new javax.swing.JLabel(); progressBar = new javax.swing.JProgressBar(); mainPanel.setName("mainPanel"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(combobox.ComboBoxApp.class).getContext().getResourceMap(ComboBoxView.class); combobox1.setFont(resourceMap.getFont("combobox1.font")); // NOI18N combobox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select Name", "Saddam", "Rana", "Mridul", "Niaz", "Pavel", " " })); combobox1.setName("combobox1"); // NOI18N label1.setText(resourceMap.getString("label1.text")); // NOI18N label1.setName("label1"); // NOI18N label2.setText(resourceMap.getString("label2.text")); // NOI18N label2.setName("label2"); // NOI18N label3.setText(resourceMap.getString("label3.text")); // NOI18N label3.setName("label3"); // NOI18N combobox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select Id", "1", "2", "3", "4", "5", " " })); combobox2.setName("combobox2"); // NOI18N combobox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Show GPA", "3.25", "3.50", "4.00", "4.25", "4.50" })); combobox3.setName("combobox3"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup() .addGap(81, 81, 81) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label1) .addComponent(label2) .addComponent(label3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(combobox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(combobox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(combobox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(145, 145, 145)) ); mainPanelLayout.setVerticalGroup( mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup() .addGap(37, 37, 37) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(combobox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label1)) .addGap(18, 18, 18) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(label2) .addComponent(combobox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(27, 27, 27) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(label3) .addComponent(combobox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(112, Short.MAX_VALUE)) ); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(combobox.ComboBoxApp.class).getContext().getActionMap(ComboBoxView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); statusPanel.setName("statusPanel"); // NOI18N statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N statusMessageLabel.setName("statusMessageLabel"); // NOI18N statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N progressBar.setName("progressBar"); // NOI18N javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel); statusPanel.setLayout(statusPanelLayout); statusPanelLayout.setHorizontalGroup( statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) .addGroup(statusPanelLayout.createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 230, Short.MAX_VALUE) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(statusAnimationLabel) .addContainerGap()) ); statusPanelLayout.setVerticalGroup( statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(statusPanelLayout.createSequentialGroup() .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(statusMessageLabel) .addComponent(statusAnimationLabel) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3)) ); setComponent(mainPanel); setMenuBar(menuBar); setStatusBar(statusPanel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7319037", "0.7290621", "0.7290621", "0.7290621", "0.7285163", "0.72480375", "0.72130316", "0.7207723", "0.7195822", "0.7189463", "0.7183591", "0.71580946", "0.7147075", "0.70924276", "0.70795405", "0.7056352", "0.6986753", "0.6976759", "0.6954958", "0.69533294", "0.6944831", "0.69417095", "0.6934517", "0.6930924", "0.6926761", "0.69241685", "0.6923851", "0.69112706", "0.6910913", "0.689217", "0.689193", "0.6890017", "0.68896353", "0.6888143", "0.68825865", "0.6881063", "0.6880471", "0.6877822", "0.68752986", "0.6873734", "0.68713146", "0.6859294", "0.6856707", "0.685489", "0.6854541", "0.68543345", "0.68526614", "0.68516856", "0.68516856", "0.6842822", "0.6836592", "0.6836195", "0.68277925", "0.6827518", "0.68260497", "0.682339", "0.68222433", "0.6816619", "0.6815844", "0.68096834", "0.6808133", "0.68078655", "0.6807532", "0.68070555", "0.6802426", "0.6794083", "0.679347", "0.6791848", "0.6790225", "0.6788846", "0.67884487", "0.6787538", "0.67819446", "0.6766094", "0.676505", "0.6764832", "0.67562455", "0.6754961", "0.67515653", "0.6750421", "0.6742601", "0.673875", "0.67371166", "0.6735209", "0.6732373", "0.6727282", "0.6726048", "0.6719771", "0.67154175", "0.6714355", "0.671359", "0.67079127", "0.670646", "0.670331", "0.6700197", "0.669957", "0.6698499", "0.6697054", "0.6693929", "0.6690299", "0.66896695" ]
0.0
-1
Constructor Instantiates a new user.
public User(String name) { this.name = name; this.state = State.NONE; this.bot = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"email@gmail.com\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public User() {\n log.debug(\"Create a User object\");\n }", "public User() {}", "public User() {}", "public User() {}", "public User(){}", "public User(){}", "public User(){}", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "User()\n\t{\n\n\t}", "public User() {\r\n \r\n }", "public User() {\n }", "public User() {\r\n this(\"\", \"\");\r\n }", "public User() { }", "public User(){\n this(null, null);\n }", "public User() {\r\n\t}", "public User() {\r\n }", "public User() {\r\n\r\n\t}", "public User() {\n super();\n }", "public User() {\n super();\n }", "public User() {\n\n\t}", "public User() {\n\t}", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public User()\n\t{\n\t\tfirstName = \"\";\n\t\tlastName = \"\";\n\t\tusername = \"\";\n\t\tpassword = \"\";\n\t}", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User()\n\t{\n\t}", "public User(){\n }", "public TUser() {\n this(\"t_user\", null);\n }", "public User(String name) {\n this(UUID.randomUUID().toString(), name, String.format(\"User account for %s\", name) );\n }", "public User() {\n\n }", "public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "public DbUser() {\r\n\t}", "public User(String username, String password) {\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = password;\n this.isTechAgent = false;\n }", "public User(){\n\n }", "private User() {}", "public User(String username, String password) {\r\n\t if (username == null || username.isEmpty() || password == null || password.isEmpty()) {\r\n\t throw new IllegalArgumentException(\"User : username or password passed can not be null.\"); \r\n\t }\r\n this.email = new Email(EmailType.PERSONAL, username);\r\n\t\tthis.username = username;\r\n\t\tthis.password = encrypt(password);\r\n\t\tthis.displayname = username;\r\n this.type = UserType.USER;\r\n\t\tthis.status = InstanceStatus.TRANSCIENT;\r\n\t}", "private User() {\n }", "public User()\r\n\t{\r\n\t\tthis.userId = 0;\r\n\t\tthis.userName = \"\";\r\n\t\tthis.role = \"\";\r\n\t\tthis.firstName = \"\";\r\n\t\tthis.lastName = \"\";\r\n\t\tthis.emailAddress = \"\";\r\n\t\tthis.streetAddress = \"\";\r\n\t\tthis.city = \"\";\r\n\t\tthis.state = \"\";\r\n\t\tthis.zip = 0;\r\n\t\tthis.country = \"\";\r\n\t}", "public User(String username, String nPassword)\n {\n userName = username;\n password = nPassword;\n }", "public User(int user_id, String full_name, String address, String postal_code, int mobile_no,\n String snow_zone, String garbage_day, String password){\n this.user_id = user_id;\n this.full_name = full_name;\n this.address = address;\n this.postal_code = postal_code;\n this.mobile_no = mobile_no;\n this.snow_zone = snow_zone;\n this.garbage_day = garbage_day;\n this.password = password;\n\n }", "public User(Long id) {\n\t\tsuper(id, AppEntityCodes.USER);\n\t}", "protected User() {}", "protected User() {}", "public User() {\r\n\t\tuName = null;\r\n\t\tpassword = null;\r\n\t\tfullName = null;\r\n\t\tphone = null;\r\n\t\temail = null;\r\n\t}", "public User() {\n this.username = \"test\";\n }", "protected User(){\n this.username = null;\n this.password = null;\n this.accessLevel = null;\n this.name = DEFAULT_NAME;\n this.telephone = DEFAULT_TELEPHONE;\n this.email = DEFAULT_EMAIL;\n }", "public User(String firstName, String lastName, Long userid, String email, String password, String userName) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.userid = userid;\n this.email = email;\n this.password = password;\n this.userName = userName;\n\n createContributorPrivilege();\n }", "public User(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public User(String username, String password) {\n this.username = username;\n this.password = password;\n }", "public User() {\n username = null;\n password = null;\n email = null;\n firstName = null;\n lastName = null;\n gender = null;\n personID = null;\n }", "protected User() {\n }", "public UserAccount() {\n\n\t}", "public User() throws InvalidUserDataException {\n this(DEFAULT_ID, DEFAULT_PASSWORD, DEFAULT_FIRST_NAME, \n DEFAULT_LAST_NAME, DEFAULT_EMAIL_ADDRESS, new Date(), \n new Date(), DEFAULT_TYPE, DEFAULT_ENABLED_STATUS);\n }", "User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public User() {\n\tsuper();\n}", "public AppUser() {\r\n\t\tsuper();\r\n\t}", "public GameUser() {\n\t}", "public User() {\n /**\n * default Cto'r\n */\n }", "public User(String n) { // constructor\r\n name = n;\r\n }", "public User(String username, String password) {\r\n this.username = username;\r\n this.password = password;\r\n }", "public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }", "public User(String userName, String password, String email) {\n this.userName = userName;\n this.password = password;\n this.email = email;\n }", "public Person(User user) {\n this.username = user.getUsername();\n this.email = user.getEmail();\n this.firstname = user.getFirstname();\n this.lastname = user.getLastname();\n }", "public User() {\r\n // TODO - implement User.User\r\n throw new UnsupportedOperationException();\r\n }", "public Users() {}", "public User(String uId, String email, String password) \n\t{\n\t\tthis.userId = uId;\n\t\tthis.accDetails = AccountDetails.create(uId,email,password);\n this.credit = Credit.create(uId);\n }", "public User() {\n name = \"\";\n }", "public UserAccount() {\n }", "public User(String name){\n this.name = name;\n }", "public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }", "public User(String firstName, String lastName, String userName, String email, String password) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.userName = userName;\n this.email = email;\n this.password = password;\n }", "public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"malfe.lore@gmail.com\";\n this.email = \"malfe.lore@gmail.com\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }", "public User(String username, String password, UserType type) {\r\n\t if (username == null || username.isEmpty() || password == null || password.isEmpty() || type == null) {\r\n\t throw new IllegalArgumentException(\"User : username or password or user type passed can not be null.\");\r\n\t }\r\n this.email = new Email(EmailType.PERSONAL, username);\r\n\t\tthis.username = username;\r\n\t\tthis.password = encrypt(password);\r\n\t\tthis.displayname = username;\r\n this.type = type;\r\n\t\tthis.status = InstanceStatus.TRANSCIENT;\r\n\t}", "public User(String name, String email, String password){\n this.name = name;\n this.email = email;\n this.password = password;\n }", "public User(){\n\t username = \"Anonymous\";\n\t}", "public User() {\n\t\tsuper(\"User\", models.DefaultSchema.DEFAULT_SCHEMA);\n\t}", "public AppUser() {\n super();\n }", "public JpaUser() {\n }", "public User(String firstName, String lastName, String email, String password, String userName) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.email = email;\n this.password = password;\n this.userName = userName;\n\n createContributorPrivilege();\n }", "public UserBuilder() {\n this.user = new User();\n }", "public UserModel()\n\t{}", "public User(long id, String username, String email, String password) {\n this.id = id;\n this.username = username;\n this.email = email;\n this.password = password;\n}", "public User(String name, String email){\n this(name, email, null);\n }", "public User(TUser tUser) {\n if (tUser.isSetUsername()) {\n username = tUser.getUsername();\n }\n\n if (tUser.isSetPassword()) {\n password = tUser.getPassword();\n }\n\n if (tUser.isSetEnabled()) {\n enabled = tUser.isEnabled();\n }\n\n if (tUser.isSetRoles()) {\n roles = tUser.getRoles().stream().map(tUserRole ->\n new UserRole(tUserRole, this)).collect(Collectors.toSet());\n }\n\n if (tUser.isSetRobots()) {\n robots = tUser.getRobots().stream().map(tRobot -> new Robot(tRobot, this)).collect(Collectors.toSet());\n }\n }", "public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"testuser\"; //Valid email for user\n role = 0; //Whether the user is a typical user or administrator\n status = 0; //Whether the user is active or disabled\n }", "public User(int userid, String firstname, String lastname, String email, String password) {\n\t\tsuper();\n\t\tthis.userid = userid;\n\t\tthis.firstname = firstname;\n\t\tthis.lastname = lastname;\n\t\tthis.email = email;\n\t\tthis.password = password;\n\t}", "public User (String username, String password, String fname, String lname) {\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.FirstName = fname;\n\t\tthis.LastName = lname;\n\t}" ]
[ "0.8236344", "0.8168144", "0.79917943", "0.79917943", "0.79917943", "0.79900473", "0.79900473", "0.79900473", "0.7985881", "0.7985881", "0.7985881", "0.79764795", "0.79651237", "0.79617363", "0.7934351", "0.79151464", "0.7912487", "0.78904027", "0.7876654", "0.7871704", "0.78683", "0.78683", "0.7867494", "0.78651017", "0.78527147", "0.780816", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7803248", "0.7785854", "0.77120435", "0.77057064", "0.7697687", "0.7694446", "0.76591957", "0.76380163", "0.7626372", "0.761019", "0.7574417", "0.75573874", "0.7553758", "0.74853617", "0.7470083", "0.7466893", "0.74446964", "0.74432087", "0.74432087", "0.74421835", "0.7436383", "0.7411318", "0.73813266", "0.738116", "0.7376129", "0.7364404", "0.7359808", "0.7349342", "0.73482245", "0.73460793", "0.7337379", "0.73363405", "0.73322016", "0.73269224", "0.73222435", "0.7320577", "0.7310306", "0.7310199", "0.73021203", "0.73016024", "0.72961265", "0.7291099", "0.7285739", "0.7273486", "0.7265964", "0.7262844", "0.7247963", "0.7245413", "0.7243703", "0.72351176", "0.72312504", "0.72236276", "0.7216037", "0.7206341", "0.71770537", "0.71694684", "0.71671385", "0.7148371", "0.7147558", "0.71434146", "0.71419483", "0.714169", "0.7130715" ]
0.0
-1
Instantiates a new user.
public User(String name, boolean bot) { this.name = name; this.bot = bot; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }", "private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }", "User createUser();", "public User() {\n log.debug(\"Create a User object\");\n }", "public void newUser(User user);", "public void createUser(User user);", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"email@gmail.com\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public void createUser(User user) {\n\n\t}", "public IdentifiedUser createNewUser() {\n\t\treturn new Gamer();\n\t}", "@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}", "public IUser CreateUser() {\n\t\tIUser iUser = null;\n\t\tswitch (db) {\n\t\tcase \"Mysql\":\n\t\t\tiUser = new MysqlUserImpl();\n\t\t\tbreak;\n\t\tcase \"Access\":\n\t\t\tiUser = new AccessUserImpl();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn iUser;\n\t}", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "User()\n\t{\n\n\t}", "public static createNewUser newInstance() {\n createNewUser fragment = new createNewUser();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "int newUser(String username, String password, Time creationTime);", "User createUser(UserCreationModel user);", "public iUser createUser(int id) {\n iUser user = null;\n String username = getUsername();\n String password = getPassword();\n\n boolean confirmed = confirmed(id, username);\n if (confirmed) {\n user = registerOptions(username, password, id);\n }\n return user;\n }", "User createUser(User user);", "UserCreateResponse createUser(UserCreateRequest request);", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "public User() {}", "public User() {}", "public User() {}", "private void createUser(final String email, final String password) {\n\n }", "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "public User(String name) {\n this(UUID.randomUUID().toString(), name, String.format(\"User account for %s\", name) );\n }", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public User() {\r\n \r\n }", "public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}", "public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }", "public NewMember(String username, String password, String email) {\n this.username = username;\n this.password = password;\n this.email = email;\n this.has_role = \"User\";\n this.signingDate = new Date(System.currentTimeMillis());\n }", "public User() { }", "void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;", "public static User createUser(String id) {\n\n User user = new User();\n user.setId(id);\n\n return user;\n }", "public User(){}", "public User(){}", "public User(){}", "private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }", "public User() {\r\n\r\n\t}", "User create(User user);", "public User() {\r\n }", "public static void createUser(String fname, String lname, String username, String password) {\n\t\tUser newUser = new User(fname, lname, username, password);\t\n\t}", "public User() {\r\n\t}", "public User() {\n }", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User(String firstName, String lastName, Long userid, String email, String password, String userName) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.userid = userid;\n this.email = email;\n this.password = password;\n this.userName = userName;\n\n createContributorPrivilege();\n }", "public User(String username, String password) {\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = password;\n this.isTechAgent = false;\n }", "Human_User createHuman_User();", "public void onCreationEvent(UserCreateEvent event){\n user = new UserBean(event.getUser());\n }", "@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}", "public User()\n\t{\n\t\tfirstName = \"\";\n\t\tlastName = \"\";\n\t\tusername = \"\";\n\t\tpassword = \"\";\n\t}", "public User() {\n\t}", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n }", "public User() {\n\n\t}", "public void creatUser(String name, String phone, String email, String password);", "public DbUser() {\r\n\t}", "@Override\n\tpublic void create(User user) {\n\t\t\n\t}", "User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public User()\n\t{\n\t}", "public CreateUser(int age, String name){ // constructor\n userAge = age;\n userName = name;\n }", "public static User newInstance(String account, String password, String name, boolean isFemale) {\n User user = new User();\n user.account = account;\n user.password = password;\n user.name = name;\n user.isFemale = isFemale;\n user.createdDateTime = DateTimeUtil.getCurrentDateTime(); // Automatically generates the date & time.\n return user;\n }", "public User() {\n super();\n }", "public User() {\n super();\n }", "protected User() {}", "protected User() {}", "public User() {\n\n }", "private User createWithParameters(Map<String, String> userParameters) {\n User user = new User();\n String passHashed = BCrypt.hashpw(userParameters.get(PASSWORD_PARAMETER_NAME), BCrypt.gensalt());\n user.setUsername(userParameters.get(USERNAME_PARAMETER_NAME));\n user.setPassword(passHashed);\n user.setFirstName(userParameters.get(FIRST_NAME_PARAMETER_NAME));\n user.setLastName(userParameters.get(LAST_NAME_PARAMETER_NAME));\n user.setEmail(userParameters.get(EMAIL_PARAMETER_NAME));\n user.setPhone(userParameters.get(PHONE_PARAMETER_NAME));\n user.setAddress(userParameters.get(ADDRESS_PARAMETER_NAME));\n user.setAccount(BigDecimal.ZERO);\n user.setInitDate(LocalDate.now());\n user.setBlockedUntil(LocalDate.now());\n user.setRole(User.Role.USER);\n return user;\n }", "public void create(String userName, String password, String userFullname,\r\n\t\t\tString userSex, int userTel, String role);", "@Test\n\tpublic void newUser() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\n\t\tassertThat(user).isNotNull();\n\t\tassertThat(user).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t}", "public User(String uId, String email, String password) \n\t{\n\t\tthis.userId = uId;\n\t\tthis.accDetails = AccountDetails.create(uId,email,password);\n this.credit = Credit.create(uId);\n }", "public UserAccount() {\n\n\t}", "public void createUser(SignUpDto signupdto) {\n\t\tUser user = new User();\r\n\t\t\r\n\t\tuser.setId(signupdto.getId());\r\n\t\tuser.setPw(signupdto.getPw());\r\n\t\tuser.setNickname(signupdto.getNickname());\r\n\t\t\r\n\t\tuserRepository.save(user);\t\r\n\t}", "public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "public void createUser(String firstName, String emailAddress) {\n\n this.firstName = firstName;\n this.emailAddress = emailAddress;\n\n }", "public UserAccount() {\n }", "public UserProfile() {}", "public static User createUser(Integer userId, String firstName, String lastName,\r\n\t\t\tString email, String userName, String companyName) {\r\n\t\tUser user = new User();\r\n\t\tif (userId != null) {\r\n\t\t\tuser.setUserId(userId);\r\n\t\t}\r\n\t\tuser.setFirstName(firstName);\r\n\t\tuser.setLastName(lastName);\r\n\t\tuser.setEmail(email);\r\n\t\tuser.setUserName(userName);\r\n\t\tuser.setCompanyName(companyName); \r\n\t\treturn user;\r\n\t}", "private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }", "public NewUser() {\n initComponents();\n }", "public User()\r\n\t{\r\n\t\tthis.userId = 0;\r\n\t\tthis.userName = \"\";\r\n\t\tthis.role = \"\";\r\n\t\tthis.firstName = \"\";\r\n\t\tthis.lastName = \"\";\r\n\t\tthis.emailAddress = \"\";\r\n\t\tthis.streetAddress = \"\";\r\n\t\tthis.city = \"\";\r\n\t\tthis.state = \"\";\r\n\t\tthis.zip = 0;\r\n\t\tthis.country = \"\";\r\n\t}", "private User() {}", "static User create(int id){\n return Users.isMyID(id) ? new LoggedUser(id) : new User(id);\n }", "protected User createUser(final Request req) {\n final User user = new ServletUser(req);\n return user;\n }", "public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}", "private void createUser(String username) {\n if (TextUtils.isEmpty(username)) {\n Toast.makeText(this, \"Username Field Required!\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser();\n String userID = current_user.getUid();\n User user = new User(et_username.getText().toString(), et_gender.getText().toString(), \"Newbie\", \"Online\", \"Active\", userID, \"default_url\");\n mRef.child(mAuth.getCurrentUser().getUid()).setValue(user);\n }\n }", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }" ]
[ "0.7260711", "0.71941143", "0.70997846", "0.70441043", "0.7042133", "0.6953936", "0.6921131", "0.6910028", "0.68981904", "0.68211967", "0.67626977", "0.67608553", "0.67531717", "0.67389846", "0.6729952", "0.66918755", "0.66816634", "0.6663497", "0.6655579", "0.66469306", "0.6617741", "0.6617741", "0.6617741", "0.66172266", "0.66157544", "0.6611013", "0.6599905", "0.6577271", "0.6573741", "0.6568186", "0.655954", "0.6541899", "0.65225375", "0.65183467", "0.65153855", "0.64938605", "0.64938605", "0.64938605", "0.6459217", "0.6453005", "0.64525336", "0.6452208", "0.64488", "0.6447838", "0.6443209", "0.6441058", "0.6441058", "0.6441058", "0.64406073", "0.6436166", "0.64266366", "0.64144456", "0.63936895", "0.63934016", "0.6391263", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63873196", "0.63844734", "0.63823515", "0.63799405", "0.6371113", "0.63679165", "0.6362861", "0.636068", "0.6359652", "0.63593614", "0.63593614", "0.63578916", "0.63578916", "0.6355827", "0.634636", "0.6338385", "0.63340265", "0.63324714", "0.63316655", "0.63297325", "0.6325931", "0.6321758", "0.632172", "0.63214576", "0.63014776", "0.6292698", "0.62914395", "0.6287672", "0.6277467", "0.6273156", "0.62685645", "0.62650204", "0.6261859", "0.62573886" ]
0.0
-1
Set the pieces of the user.
public void setPieces(List<Piece> pieces) { this.pieces = pieces; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUser(final String user)\n {\n checkImmutable();\n this.user = user;\n }", "void setPassedUser(User passedUser);", "public void setUser(String user)\n {\n _user = user;\n }", "private void setUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n user_ = value;\n \n }", "public void setUserPart(MtpUser mtpUser) {\n this.mtpUser = mtpUser;\n }", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "public void setUser(String user) {\r\n this.user = user;\r\n }", "private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(User user) { this.user = user; }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String paramUser) {\n\tstrUser = paramUser;\n }", "public void setUser(UserData data) {\n user = data;\n }", "public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }", "public void setUser(Motile user) {\n\n this.user = user;\n }", "void setUserData(KingdomUser user, String path, Object value);", "private void setUser(\n int index, People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.set(index, value);\n }", "public void setUser(int U)\t\n\t{\t//start of setUser mehtod\n\t\tuserNum = U;\n\t}", "private void setUser(\n People.Builder builderForValue) {\n user_ = builderForValue.build();\n \n }", "private void setUserData(){\n }", "void setUserData(Object userData);", "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "private void changeUser(int position) {\n nameView.setText(selected_user.getFname());\n ptsView.setText(Integer.toString(selected_user.getAccumulatedPts()));\n\n //TODO fix this in master\n String resourceName = selected_user.getProfilePicResourceName();\n Resources resources = context.getResources();\n int resourceId = resources.getIdentifier(resourceName, \"drawable\", \"familytaskmanager.microso.com.familytaskmanager\");\n pic.setImageResource(resourceId);\n\n //Set the selected user as the current user in the database and family\n ((MainActivity) activity).requestSetCurrentUser(position);\n }", "public void setUser(String user) {\n\t\t\tthis.user = user;\n\t\t}", "@Override\n\tpublic void setUser(String sessionId, UserInfo userInfo) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"setUser\");\n//\t\tif (!isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tUserPayload payload = new UserPayload();\n\t\t\n//\t\tUserInfo payload = new UserInfo();\n\t\tpayload.setCellPhone(userInfo.getCellPhone());\n\t\tpayload.setDisplayName(userInfo.getDisplayName());\n\t\tpayload.setEmail(userInfo.getEmail());\n\t\tpayload.setIdNumber(userInfo.getIdNumber());\n\t\t\n\t\t//user name cannot modified in cloud service\n//\t\tpayload.setUserName(userInfo.getUserName());\n\t\t\n\t\tUserSetRequest request = new UserSetRequest();\n\t\trequest.setSessionId(sessionId);\n\t\trequest.setPayload(payload);\n\t\ttry {\n\t\t\tcloudSecurityManager.setUser(request);\n\t\t\t\n\t\t\tUserInfo savedUserInfo = userInfoDao.getUserInfoByToken(sessionId);\n\t\t\tif (savedUserInfo != null) {\n\t\t\t\tsavedUserInfo.setCellPhone(userInfo.getCellPhone());\n\t\t\t\tsavedUserInfo.setDisplayName(userInfo.getDisplayName());\n\t\t\t\tsavedUserInfo.setEmail(userInfo.getEmail());\n\t\t\t\tsavedUserInfo.setIdNumber(userInfo.getIdNumber());\n\t\t\t\tuserInfoDao.saveUserInfo(savedUserInfo);\n\t\t\t}\n\t\t} catch (CloudException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new HFModuleException(e.getErrorCode(), e.getMessage());\n\t\t}\n\t\t\n//\t\tJSONObject req = new JSONObject();\n//\t\tJSONObject pl = new JSONObject();\n//\t\ttry {\n//\n//\t\t\tif (info.getDisplayName() != null)\n//\t\t\t\tpl.put(\"displayName\", info.getDisplayName());\n//\t\t\tif (info.getUserName() != null)\n//\t\t\t\tpl.put(\"userName\", info.getUserName());\n//\t\t\tif (info.getPassword() != null)\n//\t\t\t\tpl.put(\"password\", info.getPassword());\n//\t\t\tif (info.getCellPhone() != null)\n//\t\t\t\tpl.put(\"cellPhone\", info.getCellPhone());\n//\t\t\tif (info.getEmail() != null)\n//\t\t\t\tpl.put(\"email\", info.getEmail());\n//\t\t\tif (info.getIdNumber() != null)\n//\t\t\t\tpl.put(\"idNumber\", info.getIdNumber());\n//\n//\t\t\treq.put(\"CID\", 10221);\n//\t\t\treq.put(\"SID\", getsid());\n//\t\t\treq.put(\"PL\", pl);\n//\t\t\tString rsp = HttpProxy.reqByHttpPost(req.toString());\n//\n//\t\t\tJSONObject jo = new JSONObject(rsp);\n//\t\t\tif (jo.isNull(\"RC\")) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\t\t\tif (jo.getInt(\"RC\") != 1) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\n//\t\t} catch (JSONException e) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\"can not set user\");\n//\t\t}\n\t}", "public void setUser(User user) {\r\n this.user = user;\r\n }", "public void setUser(User user) {\n\tthis.user = user;\n }", "public void setUser(java.lang.String user) {\n this.user = user;\n }", "public void processUser() {\r\n view.printMessage(View.GEM_POOL + model.getStonePool());\r\n chooseMenuOption(chooseParameters(INTEGER_DELIMITERS, View.INPUT_PARAMETERS, true));\r\n\r\n\r\n }", "private void setObjUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n objUser_ = value;\n \n }", "public void setupUser() {\n }", "@FXML private void setToNewUser(){\n\t\tshowPassword();\n\t\tclearFields();\n\t\thideLackMessages();\n\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\tnewUser = true;\n\t}", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUserField(final String[] userField)\n {\n checkImmutable();\n this.userField = userField;\n }", "private void setUser(){\n try{\n if (!mainUser.getUsername().equals(\"\")){\n this.userName.setText(mainUser.getUsername());\n }else{\n this.userName.setText(\"User\");\n }\n\n\n File file = new File(mainUser.getProfileImage());\n if (!file.exists()){\n file = new File(getClass().getResource(\"../images/eren.png\").getFile());\n }\n Image img = new Image(file.toURI().toString());\n profileImage.setImage(img);\n\n setEventLabel(\"Welcome \"+mainUser.getFname()+\" \"+mainUser.getLname()+\".\");\n }catch (NullPointerException e){\n AlertBox.alert(AlertType.ERROR, stackRoot, anchorRoot, \"There was an error while updating UserInfo\");\n }\n }", "public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }", "public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }", "private void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }", "public void updateUser(Person user) {\n\t\t\n\t}", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUsername(String username)\r\n/* 16: */ {\r\n/* 17:34 */ this.username = username;\r\n/* 18: */ }", "private void setUser(\n int index, People.Builder builderForValue) {\n ensureUserIsMutable();\n user_.set(index, builderForValue.build());\n }", "private void setPrivilagesToModifyUser(User user){\n\t\tsetFields(false);\n\t\tif (!LoginWindowController.loggedUser.getPermissions().equals(\"administrator\"))\n\t\t{\n\t\t\tif (LoginWindowController.loggedUser.getId() != user.getId()){\n\t\t\t\tif ((user.getPermissions().equals(\"manager\")) \n\t\t\t\t\t\t|| (user.getPermissions().equals(\"administrator\"))){\n\t\t\t\t\tsetFields(true);\n\t\t\t\t}\n\t\t\t\tif (user.getPermissions().equals(\"pracownik\")){\n\t\t\t\t\tsetFields(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tsetFields(false);\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (LoginWindowController.loggedUser.getId() == user.getId()){\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t\tuserPermissionsBox.setDisable(true);\n\t\t\t}\n\t\t}\n\t}", "public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }", "void setUserUsername(String username);", "public void setTeclesUser(String user, int d, int i, int a, int rd, int ri, int p) {\n try {\n connect();\n Encrypter encrypter = new Encrypter();\n doStream.writeUTF(\"setTecles\");\n doStream.writeUTF(user);\n doStream.writeInt(d);\n doStream.writeInt(i);\n doStream.writeInt(a);\n doStream.writeInt(rd);\n doStream.writeInt(ri);\n doStream.writeInt(p);\n disconnect();\n } catch (Exception exc){\n exc.printStackTrace();\n }\n }", "protected void setPrivileges(PrivilegeSet ps) { this.privileges = ps; }", "public void setUsers(List<User> users)\r\n/* */ {\r\n/* 221 */ this.users = users;\r\n/* */ }", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(UserDTO user)\r\n {\r\n if (!edit)\r\n {\r\n this.user = user;\r\n\r\n if (user != null)\r\n {\r\n textUser.setText(user.getUsername());\r\n\r\n }\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(this, \"Cannot select another person while you are adding or edditing the tree.\");\r\n }\r\n }", "private void editUserCard() {\n getUserCard();\n }", "public void setPiece(Piece piece){\n this.piece = piece;\n this.pieceName = piece.pieceName;\n this.pieceColor = piece.pieceColor;\n this.firstMove = piece.firstMove;\n this.Enpassant = piece.Enpassant;\n }", "public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}", "public void setUser(UserEntity user) {\n this.user = user;\n }", "public void setUserData(Object data);", "public void setUserData (Object userData) {\n\t\tthis.userData = userData;\n\t}", "public void updateUser(User user) {\n\t\t\r\n\t}", "public void modifyUser() {\n\t\tUser selectedUser = null;\r\n\t\tselectedUser = tableUser.getSelectionModel().getSelectedItem();\r\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tif (selectedUser != null) {\r\n\t\t\t\tframeManager.modifyUser(user, selectedUser);\r\n\t\t\t\tpesquisar();\r\n\t\t\t} else {\r\n\t\t\t\tAlertUtils.alertErroSelecionar(\"Para modificar um usuario é necessário selecionar um!\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void setCurrentUser(int userNum) {\n\t\tuserTurn = userNum;\n\t}", "void editUser(String uid, User newUser);", "void setName( String username, String name ) throws UserNotFoundException;", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "private void populateUserView()\n\t{\n\t\t/* create dummy user properties, throw away later */\n\t\tPlayerViewModel userViewModel = new PlayerViewModel(currentUser.getString(\"facebookId\"), \n\t\t\t\t\t\t\t\t\t\tcurrentUser.getString(\"profilePicUrl\")+\"?type=large\", \n\t\t\t\t\t\t\t\t\t\tlocalCountMap.get(currentUser.getString(\"facebookId\")), \n\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\tfalse);\n\t\t\n\t\t/* create adapter for user view */\n\t\tuserCheeseTextView = (TextView) findViewById(R.id.cheeseCountTextView);\n\t\t//userProfileImageView = (ImageView) findViewById(R.id.userProfileImageView);\n\t\tuserProfileImageView = (CircularImageView) findViewById(R.id.userProfileImageView);\n\t\tuserViewAdapter = new UserViewAdapter(this, userCheeseTextView, userProfileImageView);\n\t\t\n\t\t/* set display values via adapter */\n\t\tuserViewAdapter.setUser(userViewModel);\t\t\n\t}", "public static void setUser(String user) {\n Account.user = user;\n }", "void setUser(OSecurityUser user);", "public void setUser(Long user) {\n this.user = user;\n }", "public void populateUserDetails() {\n\n this.enterprise = system.getOpRegionDirectory().getOperationalRegionList()\n .stream().filter(op -> op.getRegionId() == user.getNetworkId())\n .findFirst()\n .get()\n .getBuDir()\n .getBusinessUnitList()\n .stream()\n .filter(bu -> bu.getUnitType() == BusinessUnitType.CHEMICAL)\n .map(unit -> (ChemicalManufacturingBusiness) unit)\n .filter(chemBusiness -> chemBusiness.getEnterpriseId() == user.getEnterpriseId())\n .findFirst()\n .get();\n\n this.organization = (ChemicalManufacturer) enterprise\n .getOrganizationList().stream()\n .filter(o -> o.getOrgId() == user.getOrganizationId())\n .findFirst()\n .get();\n\n }", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n this.savedBy = user;\n }", "@Override\n\tpublic void updateUser(user theUser) {\n\t}", "@Override\n public void setUserId(long userId) {\n _partido.setUserId(userId);\n }", "private void setObjUser(\n People.Builder builderForValue) {\n objUser_ = builderForValue.build();\n \n }", "protected void setUsername(final String user) {\n this.user = user;\n }", "public String _setuser(b4a.HotelAppTP.types._user _u) throws Exception{\n_types._currentuser.username = _u.username;\n //BA.debugLineNum = 168;BA.debugLine=\"Types.currentuser.password = u.password\";\n_types._currentuser.password = _u.password;\n //BA.debugLineNum = 169;BA.debugLine=\"Types.currentuser.available = u.available\";\n_types._currentuser.available = _u.available;\n //BA.debugLineNum = 170;BA.debugLine=\"Types.currentuser.ID = u.ID\";\n_types._currentuser.ID = _u.ID;\n //BA.debugLineNum = 171;BA.debugLine=\"Types.currentuser.TypeOfWorker = u.TypeOfWorker\";\n_types._currentuser.TypeOfWorker = _u.TypeOfWorker;\n //BA.debugLineNum = 172;BA.debugLine=\"Types.currentuser.CurrentTaskID = u.CurrentTaskID\";\n_types._currentuser.CurrentTaskID = _u.CurrentTaskID;\n //BA.debugLineNum = 173;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public Builder setUser(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n user_ = value;\n onChanged();\n return this;\n }", "public void editUser(User user) {\n\t\t\n\t}", "public void setUserData(Object userData) {\n this.userData = userData;\n }", "abstract public void setUserData(Object data);", "public void setUser(final User user) {\n this.user = user;\n }", "void setUsername(String username);", "private void populateUserProfile() {\n setProfilePic();\n mDisplayNameTextView.setText(user.getName());\n mUsernameTextView.setText(String.format(\"@%s\", user.getUsername()));\n mBioTextView.setText(user.getBio());\n setAdapterForUserStories();\n\n new Thread(new Runnable() {\n public void run(){\n setFollowingCount();\n setFollowersCount();\n setStoriesCount();\n queryStoriesFromUser();\n }\n }).start();\n }", "public void setUser(final SimpleUser user) {\n this.user = user;\n }", "public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }", "public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }", "public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }" ]
[ "0.62990344", "0.62582374", "0.6256234", "0.6094241", "0.6090429", "0.607347", "0.60705703", "0.60615104", "0.606051", "0.5996201", "0.59820575", "0.59820575", "0.59745336", "0.59667706", "0.59667706", "0.59667706", "0.59667706", "0.59502953", "0.5939598", "0.5932616", "0.5927028", "0.5919236", "0.587062", "0.58686715", "0.5843115", "0.583485", "0.5764818", "0.5764415", "0.5760833", "0.57405144", "0.57388103", "0.5730895", "0.5729964", "0.57266915", "0.57154185", "0.5711235", "0.5686898", "0.56773025", "0.5667664", "0.5667664", "0.5667664", "0.5661136", "0.564647", "0.5642676", "0.56351143", "0.56232935", "0.5606412", "0.55939114", "0.55939114", "0.55939114", "0.55833006", "0.5558346", "0.5548191", "0.5545795", "0.5543222", "0.5540973", "0.5523754", "0.5519422", "0.5516733", "0.5516733", "0.551468", "0.5514354", "0.5513254", "0.55112994", "0.5501893", "0.5495588", "0.54861456", "0.5477702", "0.5475098", "0.5467713", "0.54623234", "0.54551506", "0.5454144", "0.5448672", "0.5439568", "0.5439052", "0.54346156", "0.54305106", "0.54237455", "0.54237455", "0.54237455", "0.54237455", "0.54237455", "0.54237455", "0.54157543", "0.5400381", "0.5396014", "0.53956366", "0.53938186", "0.5391085", "0.53900254", "0.53852475", "0.53754294", "0.5374443", "0.53729737", "0.53719264", "0.53626734", "0.53605866", "0.5352537", "0.5352537", "0.5352537" ]
0.0
-1
TODO: should modify the list with pieces if a piece is used by the game Set the colors owned by the user.
public void setColor(List<String> colors) { this.colors = colors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initPieceColors(){\n\t\tfor(Piece p : this.pieces)\n\t\t\tpieceColors.put(p, Utils.randomColor());\n\t}", "public Piece.color getColor() { return color; }", "private static Collection<Piece> getCorrectBluePieces() {\n\t\tfinal Collection<Piece> pieces = new ArrayList<Piece>();\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.MARSHAL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.FLAG, PlayerColor.BLUE));\n\t\treturn pieces;\n\t}", "private static Collection<Piece> getCorrectRedPieces() {\n\t\tfinal Collection<Piece> pieces = new ArrayList<Piece>();\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.MARSHAL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.FLAG, PlayerColor.RED));\n\t\treturn pieces;\n\t}", "public ArrayList<Piece> getColorPieces(PrimaryColor color){\n\t\tArrayList<Piece> colorPieces = new ArrayList<Piece>();\n\n\t\tfor(Piece p : this.pieces) {\n\t\t\tif(p.getColor()== color) {\n\t\t\t\tcolorPieces.add(p);\n\t\t\t}\n\t\t}\n\t\treturn colorPieces;\n\n\t}", "private ArrayList<Piece> getPieces(PieceColor color) {\n \tArrayList<Piece> pieces = new ArrayList<Piece>();\n \tPiece temp;\n \t\n \tfor(int i = 0; i < 8; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\ttemp = getPiece(j, i);\n \t\t\t\n \t\t\t//add piece to list if it's the same color\n \t\t\t//NoPieces have their own color, so they won't pass this test\n \t\t\tif(temp.getColor() == color) pieces.add(temp);\n \t\t}\n \t}\n \t\n \treturn pieces;\n }", "private void placePieces(List<Piece> pieces) {\r\n pieces.forEach(\r\n piece -> {\r\n grid[piece.getPosition()] = piece;\r\n // if key doesn't exist create new with array containing piece\r\n // if it does exist add piece to existing array\r\n this.pieces.merge(\r\n piece.getPlayerColor(),\r\n new ArrayList<>(Collections.singletonList(piece)),\r\n (o, n) -> {\r\n o.add(piece);\r\n return o;\r\n });\r\n });\r\n }", "public PieceColor getColor(){\r\n\t\treturn this.color;\r\n\t}", "private void addMockPieces() {\n for (int i = 0; i < 4; i++)\n for (int j = 0; j < 4; j++)\n serverGameManager.getBoard()\n .getSquare(i, j)\n .setPiece(new Piece(PieceType.SCOUT, PieceColor.BLUE, true));\n\n // set up fake red as all scout pieces\n for (int i = 9; i > 5; i--)\n for (int j = 9; j > 5; j--)\n serverGameManager.getBoard()\n .getSquare(i, j)\n .setPiece(new Piece(PieceType.SCOUT, PieceColor.RED, false));\n }", "public abstract Collection<Piece> getActivePieces();", "public abstract Collection<Piece> getActivePieces();", "private ArrayList<Colours> setColour(){\n\t\tArrayList<Colours> list = new ArrayList<Colours>();\n\t\tlist.add(Colours.RED);\n\t\tlist.add(Colours.BLUE);\n\t\tlist.add(Colours.YELLOW);\n\t\tlist.add(Colours.PINK);\n\t\tlist.add(Colours.GREEN);\n\t\tlist.add(Colours.PURPLE);\n\t\treturn list;\n\t}", "public ArrayList<Piece> getPieces(PieceColor color)\n {\n ArrayList<Piece> pieces = new ArrayList<>();\n for (Square[] s1: squares)\n {\n for (Square s: s1)\n {\n Piece p = s.getPiece();\n if (p!=null&&p.getColor()==color)\n pieces.add(p);\n }\n }\n return pieces;\n }", "public String getPieceColor(){\n\t\t\n\t\tif(xPosition>=ColumnNumber.firstColumn.ordinal() && xPosition<=ColumnNumber.eightColumn.ordinal() && xPosition>=RowNumber.firstRow.ordinal() && xPosition<=RowNumber.eightRow.ordinal()){\n\t\t\t\n\t\t\tif(isIcon){\n\t\t\t\treturn piece.getColor();\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t}", "public List<ColorId> checkPlayersBasicMode ()\n {\n List<ColorId> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate.getColor());\n }\n return players;\n }", "public void setPieces(List<Piece> pieces) {\n\t\tthis.pieces = pieces;\n\t}", "public void gossipGirl(){\n\t\tfor(Point p: currentPiece){\n\t\t\twell[p.x + pieceOrigin.x][p.y + pieceOrigin.y] = currentColor;\n\t\t}\n\t\trowChecked();\n\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}", "public List<Piece> whitePieces();", "public Piece(Color color) {\r\n this.type = Type.SINGLE;\r\n this.color = color;\r\n }", "@Override\r\n public void getRange(ArrayList<Piece> pieces){\r\n this.range.clear();\r\n int pieceX = this.getX(); int pieceY = this.getY(); // X and Y coordinates for the king piece\r\n\r\n // getPiece: 0 = empty; 1 = same color; 2 = opposite color\r\n //Up\r\n if (this.getPiece(pieceX, pieceY+1, pieces) == 0 || this.getPiece(pieceX, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Up-right\r\n if (this.getPiece(pieceX+1, pieceY+1, pieces) == 0 || this.getPiece(pieceX+1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Right\r\n if (this.getPiece(pieceX+1, pieceY, pieces) == 0 || this.getPiece(pieceX+1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Down-right\r\n if (this.getPiece(pieceX+1, pieceY-1, pieces) == 0 || this.getPiece(pieceX+1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down\r\n if (this.getPiece(pieceX, pieceY-1, pieces) == 0 || this.getPiece(pieceX, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down-left\r\n if (this.getPiece(pieceX-1, pieceY-1, pieces) == 0 || this.getPiece(pieceX-1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Left\r\n if (this.getPiece(pieceX-1, pieceY, pieces) == 0 || this.getPiece(pieceX-1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Up-left\r\n if (this.getPiece(pieceX-1, pieceY+1, pieces) == 0 || this.getPiece(pieceX-1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Castling\r\n for (Piece piece : pieces) {\r\n if (piece instanceof Rook) {\r\n if (piece.getColor() == this.getColor()) {\r\n if (validCastling(pieces, (Rook)piece)) {\r\n int targetX = (piece.getX() < getX()) ? (this.getX() - 2) : (this.getX() + 2);\r\n this.range.add(new int[] {targetX, this.getY()});\r\n }\r\n }\r\n }\r\n }\r\n }", "public List<Piece> blackPieces();", "public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }", "public ArrayList<Piece> getAllNeedToEatPieces(PrimaryColor playerColor){\n\t\tArrayList<Piece> needToEatPieces= new ArrayList<Piece>();\n\t\tArrayList<Piece> colorPieces=getColorPieces(playerColor);\n\n\t\tfor (Piece p : colorPieces) {\n\t\t\tif(!p.getMustEdiblePieces().isEmpty()) {\n\t\t\t\tneedToEatPieces.add(p);\n\t\t\t}\n\t\t}\n\n\t\treturn needToEatPieces;\n\t}", "public ArrayList<Piece> getAllEdiblePiecesByColor(PrimaryColor playerColor){\n\t\tArrayList<Piece> ediblePieces= new ArrayList<Piece>();\n\t\tArrayList<Piece> colorPieces=getColorPieces(playerColor);\n\n\t\tfor (Piece p : colorPieces) {\n\t\t\tediblePieces.addAll(p.getMustEdiblePieces());\n\t\t}\n\n\t\treturn ediblePieces;\n\t}", "public void initPieces() {\r\n\t\tfor (int i = 0; i < 64; i++) {\r\n\t\t\tif (i < 12) {\r\n\t\t\t\tblackPieces[i] = new ChessPiece(\"black\", \"\");\r\n\t\t\t\tblackPieces[i].setBackground(Color.BLACK);\r\n\t\t\t\tblackPieces[i].addMouseMotionListener(this);\r\n\t\t\t\tblackPieces[i].addMouseListener(this);\r\n\t\t\t\tblackPieces[i].setText(null);\r\n\t\t\t\twhitePieces[i] = new ChessPiece(\"white\", \"\");\r\n\t\t\t\twhitePieces[i].setBackground(Color.WHITE);\r\n\t\t\t\twhitePieces[i].addMouseMotionListener(this);\r\n\t\t\t\twhitePieces[i].addMouseListener(this);\r\n\t\t\t\twhitePieces[i].setText(null);\r\n\t\t\t}\r\n\t\t\tspacePieces[i] = new ChessPiece(\"empty\", \"\");\r\n\t\t\tspacePieces[i].setEnabled(false);\r\n\t\t\tspacePieces[i].setVisible(false);\r\n\t\t\tspacePieces[i].setText(null);\r\n\t\t}\r\n\t}", "private ChessPiece king(Color color) {\n\t\t// filtrando a lista\n\t\tList<Piece> list = piecesOnTheBoard.stream().filter(x -> ((ChessPiece) x).getColor() == color).collect(Collectors.toList());\n\t\t\n\t\tfor (Piece piece : list) {\n\t\t\tif (piece instanceof King) {\n\t\t\t\treturn (ChessPiece) piece;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new IllegalStateException(\"Não existe o Rei da cor \" + color + \"no tabuleiro\");\n\t}", "@Test\n public void getColorTest() {\n assertTrue(red_piece.getColor() == Piece.Color.RED);\n assertTrue(white_piece.getColor() == Piece.Color.WHITE);\n }", "protected String playerListColor() {\n return cfg.getString(\"Colors.player\").toUpperCase();\n }", "public void addPawn(Pawn.Color c) { pawn = new Pawn(c, Pawn.Type.BASIC); }", "public void initiateBoardSecondaryColors(){\n\t\tremoveAllSeconderyColorsFromBoard();\n\t\tColoredTilesFactory coloredTilesFactory = new ColoredTilesFactory();\n\t\t// add 3 yellow tiles\n\t\tfor(int i=0 ; i<YELLOW_TILES_AMOUNT;i++) {\n\t\t\tTile randTile=null;\n\t\t\tdo {\n\t\t\t\trandTile= getRandomFreeTile();\n\t\t\t}while(coloredTilesList.contains(randTile));\n\t\t\tYellowTile yTile= (YellowTile) coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.YELLOW);\n\t\t\treplaceTileInSameTileLocation(yTile);\n\t\t\tcoloredTilesList.add(yTile);\n\n\t\t}\n\n\n\t\t//add red tiles\n\t\tif(canAddRedTile() && isThereLegalTilesNotColored()){\n\t\t\tArrayList<Tile> possibleRed=getPossibleRedTiles();\n\t\t\tTile randTile=null;\n\t\t\tif(possibleRed.size() > 0) {\n\t\t\t\tRandom rand=new Random();\n\t\t\t\tdo {\n\t\t\t\t\tint tempp = rand.nextInt(possibleRed.size());\n\t\t\t\t\trandTile= possibleRed.get(tempp);\n\t\t\t\t\tpossibleRed.remove(tempp);\n\t\t\t\t}while(coloredTilesList.contains(randTile) && !possibleRed.isEmpty());\n\t\t\t\tTile rTile =coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.RED);\n\t\t\t\treplaceTileInSameTileLocation(rTile);\n\t\t\t\tcoloredTilesList.add(rTile);\n\t\t\t}\n\t\t}\n\n\n\t\t// add blue tiles\n\t\tif(canAddBlueTile()){\n\n\t\t\tTile randTile=null;\n\t\t\tdo {\n\t\t\t\trandTile = getRandomFreeTile();\n\t\t\t}while(coloredTilesList.contains(randTile));\n\t\t\tBlueTile bTile =(BlueTile)coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.BLUE);\n\t\t\treplaceTileInSameTileLocation(bTile);\n\t\t\tcoloredTilesList.add(bTile);\n\t\t}\n\n\t}", "public Piece.COLOR getActiveColor() {\n return activePlayer;\n }", "public void updateColoredTileListAfterOrange(){\n\t\tArrayList<Tile> tiles = null;\n\t\tif(Game.getInstance().getTurn().getLastPieceMoved() != null) {\n\t\t\tif(Game.getInstance().getTurn().getLastPieceMoved().getEatingCntr() > 0 || Game.getInstance().getTurn().isLastTileRed()) {\n\t\t\t\ttiles = Game.getInstance().getTurn().getLastPieceMoved().getPossibleMoves(Game.getInstance().getCurrentPlayerColor());\n\t\t\t}\n\t\t}else {\n\t\t\ttiles = Board.getInstance().getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\n\t\t}\n\n\t\tArrayList<Tile> coloredTilesToRemove=new ArrayList<Tile>();\t\t\n\t\tfor(Tile t:this.coloredTilesList) {\n\t\t\tif(tiles.contains(t)) {\n\n\t\t\t\tcoloredTilesToRemove.add(t);\n\t\t\t}\n\n\t\t}\n\n\t\tthis.coloredTilesList.removeAll(coloredTilesToRemove);\n\t\tthis.coloredTilesList.addAll(this.orangeTiles);\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\t}", "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }", "public List<Colour> getPlayerList();", "private static void AddPictureSectionPieceUI(Element eElement, PieceUI piece, Color color) throws Exception\n\t{\n\t\tint x1 = readIntAttrElement(eElement, \"x1\", -1);\n\t\tint y1 = readIntAttrElement(eElement, \"y1\", -1);\n\t\tint x2 = readIntAttrElement(eElement, \"x2\", -1);\n\t\tint y2 = readIntAttrElement(eElement, \"y2\", -1);\n\t\tpiece.setPicture(color, Environment.PIECES_IMAGE_PATH, new Point(x1, y1), new Point(x2, y2));\n\t}", "public List<Point> getPieces(Color pColor){\r\n List<Point> result = new LinkedList<>();\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if((isBlack(pColor) && isBlack(pos)) || (isRed(pColor) && isRed(pos))){\r\n result.add(pos.clone());\r\n }\r\n }\r\n } \r\n return result;\r\n }", "@SuppressWarnings(\"resource\")\n\tpublic void setPieces(String filename) throws IOException\n {\n\tString[] colors = new String[11]; //array containing the colors of the pieces\n\tcolors[0] = \"Red\";\n\tcolors[1] = \"Orange\";\n\tcolors[2] = \"Yellow\";\n\tcolors[3] = \"Green\";\n\tcolors[4] = \"Teal\";\n\tcolors[5] = \"Sky\";\n\tcolors[6] = \"Azure\";\n\tcolors[7] = \"Blue\";\n\tcolors[8] = \"Pink1\";\n\tcolors[9] = \"Pink2\";\n\tcolors[10] = \"Violet\";\n\n\tFileReader file = new FileReader(filename);\n\tScanner stringIn = new Scanner(file);\n\tString[] temp_pieces = new String[11]; \n\tint index = 0;\n\twhile(stringIn.hasNext())\n\t {\n\t\ttemp_pieces[index] = stringIn.nextLine(); \n\t\tindex++;\n\t }\n\n\tpieces = new Piece[11];\n\tunused = new Piece[11];\n\tfor(int i=0;i<temp_pieces.length;i++)\n\t {\n\t\tPiece temp = new Piece(temp_pieces[i],colors[i]); //creates new pieces from the temp array\n\t\tpieces[i] = temp;\n\t\tunused[i] = temp;\n\t\t}\n }", "public PieceColor colorGoing()\n {\n if (turn%2==0)\n return PieceColor.WHITE;\n else return PieceColor.BLACK;\n }", "private static Set<Colour> players(Colour... colours) {\r\n\t\treturn new HashSet<>(asList(colours));\r\n\t}", "public void getNewPiece(){\n\t\tthis.next_piece_index= rand.nextInt(18);\n\t\tthis.next_piece_colour= rand.nextInt(10);\n\t\tnext_currentPiece = Pentominoes.Pentomino_array[this.next_piece_index];\n\t\tnext_currentColor = Pentominoes.color_array[this.next_piece_colour];\n\t\tfor(int i = 0; i < next_pieces_array.length; i++){\n\t\t\tfor(int j = 0; j<next_pieces_array[0].length; j++){\n\t\t\t\t\tnext_pieces_array[i][j] = Color.WHITE;\n\t\t\t}\n\t\t}\n\t\tfor(Point p: next_currentPiece){\n\t\t\tnext_pieces_array[p.x + pieceOrigin2.x][p.y + pieceOrigin2.y] = next_currentColor;\n\t\t}\n\t}", "public Pawn(String color){\r\n this.color=color; \r\n }", "public void start() {\n clear();\n // Assigning chess pieces to players.\n whitePieces.add(new Piece(Owner.WHITE, Who.KING, Rank.R1, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.QUEEN, Rank.R1, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.H));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.H));\n\n for (Piece p : whitePieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n blackPieces.add(new Piece(Owner.BLACK, Who.KING, Rank.R8, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.QUEEN, Rank.R8, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.H));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.H));\n\n for (Piece p : blackPieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n whoseTurn = Owner.WHITE;\n canCastle = 15;\n passer = null;\n movesDone = lastEatMove = 0;\n }", "private void insertPiece(Piece opponentPiece) {\r\n\t\tif (opponentPiece == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (opponentPiece.getPlayer().color == Color.WHITE) {\r\n\t\t\twhite.addElement(opponentPiece);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tblack.addElement(opponentPiece);\r\n\t\t}\r\n\t}", "public HashMap<Piece, ArrayList<Piece>> searchToBurn(){\n\t\tHashMap<Piece, ArrayList<Piece>> toBurn = new HashMap<>();\n\t\tfor(Piece p : getColorPieces(Game.getInstance().getTurn().getCurrentPlayer().getColor())) {\n\t\t\tArrayList<Piece> temp = p.getMustEdiblePieces();\n\t\t\tif(!temp.isEmpty())\n\t\t\t\ttoBurn.put(p, temp);\n\t\t}\n\t\treturn toBurn;\n\t}", "public static List<Color> getColorList(){\n EnumSet<Color> allColor = EnumSet.allOf(Color.class);\n //create a List from the Collection \n return new ArrayList<Color>(allColor);\n //the ArrayList takes a Collection as an argument\n }", "public List<Piece> allPieces();", "public Board(ArrayList<Piece> pieces)\n {\n squares = new Square[Chess.ROWS][Chess.COLUMNS];\n setLayout(new GridLayout(Chess.ROWS,Chess.COLUMNS,0,0));\n firstSelected = null;\n mainBoard=true;\n turn = 0;\n fiftyMove = 0;\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n {\n squares[i][j] = new Square(i,j,this);\n for (Piece p: pieces)\n if (p.getOrigin().equals(new Location(i,j)))\n squares[i][j].setPiece(p);\n add(squares[i][j]);\n }\n positions = new ArrayList<>();\n positions.add(toString());\n }", "private void updateFamilyColorList(LinkedList<Integer> clonedList, int color) {\n\t\tupdateColorList(clonedList, color);\n\n\t\t// Update Color List in next\n\t\tif (this.getNextColorList().contains(color)) {\n\t\t\tif (this.getNext() != null) {\n\t\t\t\tthis.getNext().updateFamilyColorList(clonedList, color);\n\t\t\t}\n\t\t\tthis.setNextColorlist(this.getNext().getCopyOfNextColorList());\n\t\t\tif (!this.getNextColorList().contains(\n\t\t\t\t\tthis.getNext().getColor())) {\n\t\t\t\tthis.getNextColorList().add(this.getNext().getColor());\n\t\t\t}\n\t\t}\n\t}", "public void prepare(int posx, int posy, int piece, String color) {\n\t\tColor clr;\n\t\tif (color == \"black\")\n\t\t\tclr = Color.black;\n\t\telse\n\t\t\tclr = Color.red;\n\t\tif (prevComp != null)\n\t\t\tchangeBackground(prevComp, null, false);\n\t\tchangeBackground(curComp, clr, true);\n\t\tstoreValues(posx, posy, piece);\n\t}", "public Board(String[] colors){\n for(int i = 0; i<156; i++){\n spaces.add(colors[i%6]); //loops through the colors and adds them all to a list\n }\n }", "public ChessPiece getPiece(){return piece;}", "public static void populateColors() {\n colors.put(0,Color.rgb(238, 228, 218, 0.35)); //empty tile\n colors.put(2, Color.rgb(238, 228, 218));\n colors.put(4, Color.rgb(237, 224, 200));\n colors.put(8,Color.rgb(242, 177, 121));\n colors.put(16, Color.rgb(245, 149, 99));\n colors.put(32,Color.rgb(246, 124, 95));\n colors.put(64,Color.rgb(246, 94, 59));\n colors.put(128,Color.rgb(237, 207, 114));\n colors.put(256,Color.rgb(237, 204, 97));\n colors.put(512,Color.rgb(237, 200, 80));\n colors.put(1024,Color.rgb(237, 197, 63));\n colors.put(2048,Color.rgb(237, 194, 46));\n colors.put(4096,Color.rgb(237, 194, 46));\n colors.put(8192,Color.rgb(237, 194, 46));\n\n }", "public ArrayList<Color> userColors() {\r\n int colorIndex;\r\n ArrayList<Color> dest = new ArrayList<Color>();\r\n for (colorIndex = 0; colorIndex < this.colors; colorIndex += 1) {\r\n dest.add(Cnst.colorsToChoose.get(colorIndex));\r\n }\r\n return dest;\r\n }", "public Set<Colour> getWinningPlayers();", "public void changeWildRouteColor() {\n if (mCardsList.get(0))\n mSelectedRoute.setColor(\"red\");\n else if (mCardsList.get(1))\n mSelectedRoute.setColor(\"blue\");\n else if (mCardsList.get(2))\n mSelectedRoute.setColor(\"yellow\");\n else if (mCardsList.get(3))\n mSelectedRoute.setColor(\"green\");\n else if (mCardsList.get(4))\n mSelectedRoute.setColor(\"black\");\n else if (mCardsList.get(5))\n mSelectedRoute.setColor(\"orange\");\n else if (mCardsList.get(6))\n mSelectedRoute.setColor(\"purple\");\n else if (mCardsList.get(7))\n mSelectedRoute.setColor(\"white\");\n }", "public void fillColours() {\n this.colours = new String[4];\n this.colours[0] = \"diamonds\";\n this.colours[1] = \"hearts\";\n this.colours[2] = \"spades\";\n this.colours[3] = \"clubs\";\n }", "public void setPlayersPiece(int a_playersPiece) {\n this.playersPiece = a_playersPiece;\n }", "public void assignPlayerPieces(Map<Player, Integer> playerHash) {\n List<Integer> nums = new ArrayList<>(playerHash.values());// get all the numbers from playerHash\n List<Player> players = new ArrayList<>(playerHash.keySet()); // get all the players from the hash map\n Collections.sort(nums); // sort the list of numbers\n Collections.reverse(nums);// reverse the list so the highest numbers are first\n int pieceIndex = 0; // variable used to represent the index for the playerPiece\n List<Integer> usedNums = new ArrayList<Integer>();// Empty list that will be used to know what numbers have been used.\n for (Integer num : nums) { // go through each number in numbers\n if (!usedNums.contains(num)) {// if the usedNums list doesn't contain num\n for (Player player : players) { // for each player\n if (playerHash.get(player).equals(num)) {// if the num is the number they got from their dice roll\n player.setPiece(this.playerPieces.get(pieceIndex)); // give them the playerPiece at index pieceIndex\n pieceIndex++;// increment pieceIndex\n usedNums.add(num);//add the used number into usedNums list\n }\n }\n }\n }\n }", "public Pieces(int row, int column, PieceType piece, PieceColor color){\r\n\t\tthis.piece = piece;\r\n\t\tthis.row = row;\r\n\t\tthis.column = column;\r\n\t\tthis.color = color;\r\n\t\tthis.moved = false;\r\n\t}", "public abstract void tellColorList(ArrayList<String> colors);", "public void putChess(String color) {\n if (pool.containsKey(color)) return;\n if (color.equals(\"b\"))\n pool.put(color, new BlackChess());\n else if (color.equals(\"w\"))\n pool.put(color, new WhiteChess());\n else\n System.out.println(\"Unsupported\");\n }", "private Colors ingameColor() {\n\t\tList<Colors> colors = new ArrayList<Colors>();\n\t\tIterator<Sphere> it = this.spheres.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSphere s = it.next();\n\t\t\tif (!colors.contains(s.color())) {\n\t\t\t\tcolors.add(s.color());\n\t\t\t}\n\t\t}\n\t\treturn colors.get(MathUtils.random(colors.size() - 1));\n\t}", "List genCaps() {\n\tList ret = new ArrayList();\n\n\tif (side == LIGHT) {\n\tlong moves = ((pawnBits[LIGHT] & 0x00fefefefefefefeL) >> 9)\n\t& pieceBits[DARK];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove + 9, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\tmoves = ((pawnBits[LIGHT] & 0x007f7f7f7f7f7f7fL) >> 7)\n\t& pieceBits[DARK];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove + 7, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\t} else {\n\tlong moves = ((pawnBits[DARK] & 0x00fefefefefefefeL) << 7)\n\t& pieceBits[LIGHT];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 7, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\tmoves = ((pawnBits[DARK] & 0x007f7f7f7f7f7f7fL) << 9)\n\t& pieceBits[LIGHT];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 9, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\t}\n\tlong pieces = pieceBits[side] ^ pawnBits[side];\n\twhile (pieces != 0) {\n\tint p = getLBit(pieces);\n\tfor (int j = 0; j < offsets[piece[p]]; ++j)\n\tfor (int n = p;;) {\n\tn = mailbox[mailbox64[n] + offset[piece[p]][j]];\n\tif (n == -1)\n\tbreak;\n\tif (color[n] != EMPTY) {\n\tif (color[n] == xside)\n\tgenPush(ret, p, n, 1);\n\tbreak;\n\t}\n\tif (!slide[piece[p]])\n\tbreak;\n\t}\n\tpieces &= (pieces - 1);\n\t}\n\tif (ep != -1) {\n\tif (side == LIGHT) {\n\tif (COL(ep) != 0 && color[ep + 7] == LIGHT\n\t&& piece[ep + 7] == PAWN)\n\tgenPush(ret, ep + 7, ep, 21);\n\tif (COL(ep) != 7 && color[ep + 9] == LIGHT\n\t&& piece[ep + 9] == PAWN)\n\tgenPush(ret, ep + 9, ep, 21);\n\t} else {\n\tif (COL(ep) != 0 && color[ep - 9] == DARK\n\t&& piece[ep - 9] == PAWN)\n\tgenPush(ret, ep - 9, ep, 21);\n\tif (COL(ep) != 7 && color[ep - 7] == DARK\n\t&& piece[ep - 7] == PAWN)\n\tgenPush(ret, ep - 7, ep, 21);\n\t}\n\t}\n\treturn ret;\n\t}", "public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }", "boolean moveRed(int piece) {\n\t\treturn ((piece == 1 || piece == 3) && curPlayer == 1);\n\t}", "protected void updateColorList(LinkedList<Integer> clonedList, int color) {\n\t\t// Update Color List in vertex\n\t\tif (this.getFamilyColorList().contains(color)) {\n\t\t\tthis.getFamilyColorList().remove((Object) color);\n\t\t\tfor (Integer i : clonedList) {\n\t\t\t\tthis.getFamilyColorList().add(i);\n\t\t\t}\n\t\t\tif (this.getFamily() != null) {\n\t\t\t\tthis.getFamily().updateFamilyColorList(clonedList, color);\n\t\t\t}\n\t\t}\n\t}", "private void addColors() {\n colors.add(Color.GRAY);\n colors.add(Color.BLUE);\n colors.add(Color.DKGRAY);\n colors.add(Color.CYAN);\n colors.add(Color.MAGENTA);\n //Zijn voorlopig maar 5 kleuren, kan altijd makkelijk meer doen, wil ook liever hex-based kleuren gaan gebruiken.\n }", "public Player(int startR ,int endR , int startC ,int endC , String color) { // constractor\n // startR - start row for creating the pieces , startC - start colomn for creating the pieces\n // endR - End row for creating the pieces , endC - END colomn for creating the pieces\n this.color=color;\n \n for(int i = startR; i <= endR; i++){\n for(int j = startC ; j <= endC ;j++){\n pieces.put(new Integer (j*Board.N+i), new Piece(i,j, color)); // new piece\n teritory.add(j* Board.N +i); // saving index of teritory base \n }\n }\n }", "public void setColors(List<Color> colors) {\n this.colors = colors;\n }", "public void addPieces() {\r\n\t\tboard[0] = 8;\r\n\t\tboard[1] = 1;\r\n\t\tboard[2] = 6;\r\n\t\tboard[3] = 3;\r\n\t\tboard[4] = 5;\r\n\t\tboard[5] = 7;\r\n\t\tboard[6] = 4;\r\n\t\tboard[7] = 9;\r\n\t\tboard[8] = 2;\r\n\t}", "public Piece(int x , int y, PlayerType color,Names type){\n this.x = x;\n this.y = y;\n \n this.color = color;\n this.type = type;\n }", "Color userColorChoose();", "static void addNewPieces() {\n ArrayList<Block> news = new ArrayList<>();\n news.add(new Block(new int[]{2, 3}, Tetrominos.I));\n news.add(new Block(new int[]{2, 3}, Tetrominos.J));\n news.add(new Block(new int[]{2, 3}, Tetrominos.L));\n news.add(new Block(new int[]{2, 3}, Tetrominos.O));\n news.add(new Block(new int[]{2, 3}, Tetrominos.S));\n news.add(new Block(new int[]{2, 3}, Tetrominos.T));\n news.add(new Block(new int[]{2, 3}, Tetrominos.Z));\n\n\n Collections.shuffle(news);\n newPiece.addAll(news);\n }", "public void removeAllSeconderyColorsFromBoard() {\n\t\tArrayList<Tile> boardTiles= getAllBoardTiles();\n\t\tif(!this.coloredTilesList.isEmpty()) {\n\t\t\tboardTiles.retainAll(coloredTilesList);\n\t\t\tfor(Tile t :boardTiles) {\n\t\t\t\tTile basicTile= new Tile.Builder(t.getLocation(), t.getColor1()).setPiece(t.getPiece()).build();\n\t\t\t\treplaceTileInSameTileLocation(basicTile);\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tthis.coloredTilesList=null;\n\t\tthis.coloredTilesList=new ArrayList<Tile>();\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\n\t}", "private ArrayList<Color> createColorArray(){\n ArrayList<Color> out = new ArrayList<>();\n out.add(detectColor((String) Objects.requireNonNull(P1color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P2color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P3color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P4color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P5color.getSelectedItem())));\n out.add(detectColor((String) Objects.requireNonNull(P6color.getSelectedItem())));\n return out;\n }", "public void setTurn(PieceColor color) {\n \tturn = color;\n }", "public static void setPieceInBoard(int[] piece, int pos) {\n for (int f = 0; f < ColorFrames.FRAMES_DIM; ++f) { // For each frame dimension\n int color = piece[f];\n if (color != ColorFrames.NO_FRAME) {\n Panel.printFrame(f, color, pos); // Displays the frame with (f) dimension and (color)\n Panel.clearFrame(f, 0); // Clean the frame of piece.\n pieces[pos - 1][f] = color;\n }\n }\n\n checkGridPos(pos);\n }", "void onCheck(Chess.Color inCheckColor);", "public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }", "public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}", "private void checkBackgroundColor() {\n\n String color = \"\";\n Connection conn = null;\n try {\n conn = (new Sqlite().connect());\n\n String SQL = \"Select * from options WHERE user_id =\" + newUser.getId();\n try (ResultSet rs = conn.createStatement().executeQuery(SQL)) {\n while (rs.next()) {\n color = rs.getString(3);\n }\n conn.close();\n }\n\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(FirstPage.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n switch (color) {\n case \"Blue\":\n jPanel1.setBackground(new Color(90, 166, 190));\n break;\n case \"Grey\":\n jPanel1.setBackground(Color.gray);\n break;\n case \"Red\":\n jPanel1.setBackground(Color.red);\n break;\n default:\n jPanel1.setBackground(new Color(90, 166, 190));\n break;\n }\n }", "public static List<PlayerColor> getPlayerColors() {\n List<PlayerColor> colorList = new ArrayList<>();\n for (PlayerColor color: PlayerColor.values()) {\n colorList.add(color);\n }\n return colorList;\n }", "@Override\n public void setCheckers(boolean color, ArrayList<Checker> checkersInUse, int checkerNum) {\n if(color == true) { //player x\n color = true;\n for(int i = 1; i <= 3; i++) { //iterates through three rows\n if(i%2 != 0) {\n for(int j = 1; j<= 7; j+=2) {\n checkersInUse.add(new KingChecker( j, i,true, checkerNum +1));\n checkerNum ++;\n }\n }else {\n for(int j = 2; j<= 8; j+=2) {\n checkersInUse.add(new KingChecker( j, i, true, checkerNum +1));\n checkerNum ++;\n }\n }\n }\n }else{\n color = false;\n for(int i = 6; i <= 8; i++) {\n if(i%2 != 0) {\n for(int j = 1; j<=7; j+=2) {\n checkersInUse.add(new Checker(j, i, false, checkerNum +1));\n checkerNum ++;\n }\n }else {\n for(int j = 2; j<=8; j+=2) {\n checkersInUse.add(new Checker(j, i, false, checkerNum +1));\n checkerNum ++;\n }\n }\n }\n\n }\n }", "void selectColorFrom(Set<GameColor> colors, String title, Consumer<GameColor> callback);", "private void startNewGame(){\n if (selectedPiece!=null)\n selectedPiece.setBackground(getDefaultColor(selectedPiece));\n selectedPiece = null;\n setAllToDefaultColor();\n setDefulatMessage();\n board = new ChessBoard(1, false);\n for(int row = 0 ; row < ROWS; row++){\n for(int col = 0; col < COLS ; col++){\n setButtonIcon(row,col);\n }\n }\n }", "pieces getPiece(int position)\n {\n int j ;\n if(position == whiteHorse1.position && whiteHorse1.alive == true ) return whiteHorse1;\n if(position == whiteHorse2.position && whiteHorse2.alive == true) return whiteHorse2;\n if(position == whiteQueen.position && whiteQueen.alive == true ) return whiteQueen;\n if(position == whiteKing.position && whiteKing.alive == true) return whiteKing;\n if(position == whiteCastle1.position && whiteCastle1.alive == true ) return whiteCastle1;\n if(position == whiteCastle2.position && whiteCastle2.alive == true) return whiteCastle2;\n if(position == whiteBishop1.position && whiteBishop1.alive == true) return whiteBishop1;\n if(position == whiteBishop2.position && whiteBishop2.alive == true) return whiteBishop2;\n j=0;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];\n \n \n \n if(position == blackHorse1.position && blackHorse1.alive == true ) return blackHorse1;\n if(position == blackHorse2.position && blackHorse2.alive == true) return blackHorse2;\n if(position == blackQueen.position && blackQueen.alive == true ) return blackQueen;\n if(position == blackKing.position && blackKing.alive == true) return blackKing;\n if(position == blackCastle1.position && blackCastle1.alive == true ) return blackCastle1;\n if(position == blackCastle2.position && blackCastle2.alive == true) return blackCastle2;\n if(position == blackBishop1.position && blackBishop1.alive == true) return blackBishop1;\n if(position == blackBishop2.position && blackBishop2.alive == true) return blackBishop2;\n j=0;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];\n\n else return null;\n }", "protected void drawPossibleMoves(){\n if (selectedPiece == null) return;\n Pair<Integer,Integer> coord = getJButtonCoord(selectedPiece);\n int startRow = coord.getKey();\n int startCol = coord.getValue();\n for(int row = 0;row < ROWS;row ++){\n for(int col = 0; col < COLS ;col++){\n if (board.canMove(startRow,startCol,row,col)){\n buttonGrid[row][col].setBackground(Color.GREEN);\n }\n }\n }\n\n\n }", "public GamePiece(Color color, int x, int y){\n king = false;\n this.x = x;\n this.y = y;\n this.color = color;\n // Aligns to correct position on centre of the correct tile\n setCenterX(30 + (x * 60));\n setCenterY(30 + (y * 60));\n setRadius(20);\n // Sets the colour of the piece to visually show who it belongs to\n setFill(color);\n }", "@Override\r\n\tpublic void tellColorList(ArrayList<String> colors) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t\tsuper.setColorList(colors);\r\n\t}", "@Override\n\tpublic Color getColor() {\n\t\treturn playerColor;\n\t}", "public void populateLists() {\n\t\tfor (int row = 0; row < 8; row++) {\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tif (board[row][col] != null && board[row][col].isWhite())\n\t\t\t\t\twhitePieces.add(board[row][col]);\n\t\t\t\t\t//whitePieces.add(board[row][col]);\n\t\t}\n\t\tfor (int row = 0; row < 8; row++) {\n\t\t\tfor (int col = 0; col < 8; col++){\n\t\t\t\tif (board[row][col] != null && !board[row][col].isWhite())\n\t\t\t\t\tblackPieces.add(board[row][col]);}\n\t\t\t\n\t\t}\n\t}", "PieceColor whoseMove() {\n return _whoseMove;\n }", "private TetrisPiece randomPiece() {\n\t\tint rand = Math.abs(random.nextInt());\n\t\treturn new TetrisPiece(rand % (PIECE_COLORS.length));\n\t}", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "public static void boardInit() {\n ArrayList<Piece> white_piece_list = new ArrayList<>();\n ArrayList<Piece> black_piece_list = new ArrayList<>();\n ArrayList<Piece> piece_array = PieceFactory.createPieces();\n for(Piece p : piece_array)\n {\n if(p.getColor())\n {\n black_piece_list.add(p);\n }\n else\n {\n white_piece_list.add(p);\n }\n }\n white_player.setpieceList(white_piece_list);\n white_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER);\n black_player.setpieceList(black_piece_list);\n black_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER + PieceFactory.DIST_BETWEEN_PIECES);\n }", "public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "public static void removePieceList(String piece)\n\t{\n\t\tfor(int loop = 0; loop < 32; loop++)\n\t\t{\n\t\t\tif(pieceList[loop] == piece)\n\t\t\t{\n\t\t\t\tpieceList[loop] = \"\";\n\t\t\t}\n\t\t}\n\t}", "public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public Piece.COLOR checkColor (int x, int y){\n\t\treturn board[x][y].getColor();\n\t}", "public HashMap<String, List<ColorId>> checkRocketJumpColors ()\n {\n Map<Square, List<Player>> mapRocket = checkRocketJump();\n HashMap<String, List<ColorId>> hashMapToReturn = new HashMap<>();\n List<ColorId> colorIdList ;\n\n for (Square squareIterate : mapRocket.keySet())\n {\n colorIdList = new ArrayList<>();\n\n for (Player playerIterate : mapRocket.get(squareIterate))\n {\n colorIdList.add(playerIterate.getColor());\n }\n\n hashMapToReturn.put(squareIterate.toStringCoordinates(), colorIdList);\n }\n\n return hashMapToReturn;\n\n }" ]
[ "0.733636", "0.6910533", "0.68165493", "0.67925227", "0.6696798", "0.6532478", "0.64365244", "0.6416119", "0.64080054", "0.63776577", "0.63776577", "0.6342452", "0.63332003", "0.6307101", "0.6282686", "0.6231256", "0.62180966", "0.62097216", "0.6137953", "0.6123004", "0.6056563", "0.6048181", "0.59972626", "0.59883976", "0.59780496", "0.5967966", "0.5967038", "0.59668934", "0.59582144", "0.5948819", "0.5937863", "0.59326184", "0.5911559", "0.5891786", "0.5834007", "0.5826941", "0.5812766", "0.58065784", "0.58063483", "0.58037484", "0.5775129", "0.57316613", "0.5730837", "0.5725453", "0.5712774", "0.5707606", "0.57056886", "0.5701468", "0.5698686", "0.5693265", "0.5691441", "0.56868416", "0.5677757", "0.56764174", "0.5667277", "0.56563747", "0.56539667", "0.5652694", "0.56475514", "0.56465304", "0.56464726", "0.5645578", "0.56347233", "0.56304884", "0.5617667", "0.56137043", "0.5611527", "0.56036633", "0.55979896", "0.55967176", "0.5590287", "0.5590187", "0.5587727", "0.55815876", "0.5577708", "0.55743", "0.55732405", "0.5570887", "0.55466163", "0.5526875", "0.5506824", "0.5505738", "0.5498425", "0.5493243", "0.549242", "0.54879487", "0.5485568", "0.5484727", "0.547654", "0.5470343", "0.54673976", "0.5462308", "0.5460853", "0.5451854", "0.54484105", "0.5447644", "0.5441827", "0.5441728", "0.5440866", "0.5436916" ]
0.54827005
88
Set the state of the user to NONE (i.e. not in a game and not left)
public void setNone() { state = State.NONE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }", "public void Reset()\r\n\t{\r\n\t\tif(!levelEditingMode)//CAN ONLY RESET IN LEVEL EDITING MODE\r\n\t\t{\r\n\t\t\tgrid.clearUserObjects();\r\n\t\t\tmenu = new SpriteMenu(listFileName, playButton);\r\n\t\t}\r\n\t}", "public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }", "public void reset() {\n this.inhibited = false;\n this.forced = false;\n }", "public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "void setMenuNull() {\n game.r = null;\n }", "void unsetState();", "public void turnOff() {\n update(0,0,0);\n this.status = false;\n }", "public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\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 clearState() {\n // if the user press the wrong cells, aka path, etc.\n // set state back to grass\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n } else if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n\n }\n }", "public void disabledInit() {\n oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kRightRumble, 0);\n }", "public void turn_off () {\n this.on = false;\n }", "public void setToDefualts(){\n\t\tchangeInPlayerHealth = 0;\n\t\tchangeInPlayerScore = 0;\n\t\tchangInBatteryCharge = 0;\n\t\tpuaseForAnimation = false;\n\t}", "private void softReset() {\n // variables\n lapMap.clear();\n // ui\n sessionTView.setText(\"\");\n positionTView.setText(\"-\");\n currentLapTView.setText(\"--:--:---\");\n lastLapTView.setText(\"--:--:---\");\n bestLapTView.setText(\"--:--:---\");\n currentLapNumberTView.setText(\"-\");\n gapTView.setText(\" -.---\");\n fastestDriver = Float.MAX_VALUE;\n fastestDriverName = null;\n fastestDriverTView.setText(\"--:--:---\");\n fastestDriverNameTView.setText(\"Fastest lap\");\n Log.d(TAG, \"SOFT Reset: between game states\");\n }", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "private void unsetOneAllChecks() {\r\n\r\n checkIman.setEnabled(false);\r\n checkBonferroni.setEnabled(false);\r\n checkHolm.setEnabled(false);\r\n checkHochberg.setEnabled(false);\r\n checkHommel.setEnabled(false);\r\n checkHolland.setEnabled(false);\r\n checkRom.setEnabled(false);\r\n checkFinner.setEnabled(false);\r\n checkLi.setEnabled(false);\r\n\r\n }", "public void reset(){\r\n barn.setVisited(Boolean.FALSE);\r\n turkeyTalk.setVisited(Boolean.FALSE);\r\n pigginOut.setVisited(Boolean.FALSE);\r\n seeTheLight.setVisited(Boolean.FALSE);\r\n theGobbling.setVisited(Boolean.FALSE);\r\n youDied1.setVisited(Boolean.FALSE);\r\n threeLittlePigs.setVisited(Boolean.FALSE);\r\n forTheGreaterGood.setVisited(Boolean.FALSE);\r\n farmHouseTurkey.setVisited(Boolean.FALSE);\r\n youWin.setVisited(Boolean.FALSE);\r\n }", "@Override\n\tprotected void resetState() {\n\n\t\tlogger.info(\"resetState: behaviorId = \" + _behavior.getBehaviorId());\n\t\t\n\t\t/*\n\t\t * Only return the username to the available usernames if\n\t\t * the user has sucessfully logged in and received a username.\n\t\t * For the auction workload the username will be an email \n\t\t * address with an @\n\t\t */\n\t\tif ((getUserName() != null) && (getUserName().contains(\"@\"))) {\n\t\t\tsynchronized (_workload.getAvailablePersonNames()) {\n\t\t\t\t// Remove the current user from the static list of all logged in\n\t\t\t\t// users\n\t\t\t\tlogger.info(\"resetState: behaviorId = \" + _behavior.getBehaviorId() + \" returning \"\n\t\t\t\t\t\t+ getUserName() + \" to availablePersonNames\");\n\t\t\t\t_workload.getAvailablePersonNames().add(getUserName());\n\t\t\t\tsetUserName(Long.toString(getId()));\n\t\t\t}\n\t\t}\n\t\t_activeAuctions.clear();\n\t\t_bidHistoryInfo.clear();\n\t\t_attendanceHistoryInfo.clear();\n\t\t_purchaseHistoryInfo.clear();\n\t}", "protected void onDiscard() {\r\n this.setActive(false);\r\n }", "public void setlogUserOut() {\n\t\tcontroller.logoutUser();\n\t\tuserMenuButton.setText(\"\");\n\t\tuserMenuButton.setStyle(\"\");\n\t\tuserMenuButton.getItems().removeAll(menu1, menu2);\n\t\tloggedinuser.setVisible(false);\n\t\tuserSettings.setVisible(false);\n\t\tloginoption.setVisible(true);\n\n\t}", "public User() {\n this.prefs = Gdx.app.getPreferences(\"prefs\");\n\n this.noWalls = prefs.getBoolean(\"noWalls\");\n this.noGrid = prefs.getBoolean(\"noGrid\");\n }", "public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }", "public void accountViewReset(){\n\t\taccountNameViewTextField.setText(null);\n\t\tuserRadioButton.setSelected(false);\n\t\tviewerRadioButton.setSelected(false);\n\t\t//\t\tuserClick = false;\n\t\t//\t\tviewerClick = false;\n\t\t//\t\tuserCheckBox.setSelected(userClick);\n\t\t//\t\tviewerCheckBox.setSelected(viewerClick);\n\t}", "public void reset()\n {\n mine = false;\n revealed = false;\n flagged = false;\n repaint();\n }", "private void setMembershipPanelEdiableFalse() {\n \n accountNrTF.setEditable(false);\n fromDateTF.setEditable(false);\n groupTrainingCB.setEnabled(false);\n monthPayTF.setEditable(false);\n pbsDateTF.setEditable(false);\n pbsNumberTF.setEditable(false);\n regNrTF.setEditable(false);\n balanceTF.setEditable(false);\n poolsCB.setEnabled(false);\n timeLimitCB.setEnabled(false);\n endDateTF.setEditable(false);\n membershipDropD.setEnabled(false);\n }", "public void playerHasNoSword() {\n\t\tthis.state = cannotBeKilled;\n\t}", "public void turnOff() {\n\t\tisOn = false;\n\t}", "public void removeFromGame(){\n this.isInGame = false;\n }", "public void setNeutralState() {\n redLED.set(true);\n greenLED.set(true);\n blueLED.set(true);\n }", "public void setInGame() {\n this.inGame = true;\n }", "public boolean isNone() {\n\t\treturn state == State.NONE;\n\t}", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "public void setNoneText(String noneText) {\r\n this.noneText = noneText;\r\n }", "public void resetState();", "public void lose() {\n displayErrorMessage(\"You Lose!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n } else\n controller.switchToLobby();\n }", "private void clear() {//将文本框等状态置零\n\t\tusername.setText(\"\");\n\t\tpass.setText(\"\");\n\t\tname.setText(\"\");\n\t\tsex1.setSelected(true);\n\t\ttel.setText(\"\");\n\t\taddr.setText(\"\");\n\t\trole.setSelectedIndex(0);\n\t\tusername.grabFocus();\n\t}", "public void makeInvisible() {\n\t\t\n\t\theadShape.setVisible(false);\n\t\tspine.setVisible(false);\n\t\tleftArmLine.setVisible(false);\n\t\trightArmLine.setVisible(false);\n\t\tleftLegLine.setVisible(false);\n\t\trightLegLine.setVisible(false);\n\t\tplayAgain.setVisible(false);\n\t\trevealLabel.setVisible(false);\n\t\t\n\t\t\n\t}", "protected void setInactive() {\r\n\t\tactive = false;\r\n\t}", "public void discardLeader(int bool){\n this.leaderCardsPanel.discardLeaderCard(bool);\n }", "public void clear() {\n up = false;\n down = false;\n left = false;\n right = false;\n }", "public static void clearGameType() {\r\n\t\tMain.isThreeHanded = false;\r\n\t\tMain.isFourHandedSingle = false;\r\n\t\tMain.isFourHandedTeams = false;\r\n\t}", "private void changeStoryStateToNone(final Story story) {\n changeStoryStateToNone(story, null);\n }", "public void setUnproved() {\n\t\tproveState = UNPROVED;\n\t}", "@FXML\n\tpublic void disableMyUser(ActionEvent event) {\n\t\tif (!txtDisableMyUser.getText().isEmpty()) {\n\t\t\tSystemUser user = restaurant.returnUser(txtDisableMyUser.getText());\n\n\t\t\tif (user != null) {\n\t\t\t\ttry {\n\t\t\t\t\tuser.setCondition(Condition.INACTIVE);\n\t\t\t\t\trestaurant.saveUsersData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"Tu usuario ha sido deshabilitado\");\n\t\t\t\t\tdialog.setTitle(\"Usuario Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtDisableMyUser.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del usuario\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este usuario no existe\");\n\t\t\t\tdialog.setTitle(\"Error, usuario inexistente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "boolean unblockUser(User user);", "public void clearStateToPureMapState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen || cells.get(i) == CellState.ToPlaceTower || cells.get(i) == CellState.Tower) {\n cells.set(i, CellState.Grass);\n }\n }\n }", "public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void setNoUserPw(java.lang.String noUserPw) {\r\n this.noUserPw = noUserPw;\r\n }", "void setUserLocked(boolean b);", "void setAccountNonLocked(boolean accountNonLocked);", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "public void leftOff() {\r\n\t\tsetLeftColor(0, 0, 0);\r\n\t}", "public void clearCommand(){\n up = false;\n left = false;\n right = false;\n }", "public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }", "protected void resetState()\n {\n // Nothing to do by default.\n }", "public void setInactive() {\n\t\tactive = false;\n\t}", "public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}", "public void resetTossedStatus(){\n\t\tdiceTossed = false;\n\t}", "public void flagUser() {\n\t\tsuper.flagUser();\n\t}", "private void disableGamePlayKeys() {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Z, 0), \"none\");\n }", "public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}", "private void checkOffStatus(ServiceState s) {\n assertFalse(s.getRoaming());\n assertNull(s.getOperatorAlphaLong());\n assertNull(s.getOperatorAlphaShort());\n assertNull(s.getOperatorNumeric());\n assertFalse(s.getIsManualSelection());\n }", "void unmute() {\n execute(\"player.muted = false\");\n }", "public void setScreenUnlockSecurityNone() {\n // try {\n // new LockPatternUtils(mContext).clearLock();\n // } catch (Exception e) {\n // // e.printStackTrace();\n // }\n }", "@Override\r\n\tpublic void disable() {\n\t\tcurrentState.disable();\r\n\t}", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "public void skipTurn(String username) {\n if(username.equals(this.username) && !(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, \"You skipped your turn!\");\n } else if (!(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, username + \" skipped his turn\");\n\n }\n }", "public void lockGame() {\n this.isLocked = true;\n btnLockGame.setEnabled(false);\n }", "private void resetAfterGame() {\n }", "public void resetState() {\n events.clear();\n justPressedKeys.clear();\n justReleasedKeys.clear();\n\n setAxisValue(InputAxis.MOUSE_X, 0);\n setAxisValue(InputAxis.MOUSE_Y, 0);\n setAxisValue(InputAxis.MOUSE_WHEEL_Y, 0);\n }", "private void clearUser() { user_ = null;\n \n }", "private void logout(){\n player.setName(\"(bot) \" + player.getName());\n botMode = true;\n System.out.println(\"bot made\");\n login = false;\n }", "private void clearUser() {\n user_ = emptyProtobufList();\n }", "public void disable() {\n operating = false;\n }", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "@Override\n public void onNoUserRegistered() {\n\n showUI();\n }", "public void deactivate(){\n state = State.invisible;\n active = false;\n }", "public void reset() {\n tid.setEnabled(true);\n tid.setText(\"\");\n tname.setText(\"\");\n }", "public void reset()\n {\n m_fCorrectEvent = false;\n }", "public void setViewStateBoolean() {\n viewState.setFromAccountView(false);\n }", "public void resetGame(){\r\n\t\tSystem.out.println(\"Reset game min:\"+minimum+\" max:\"+maximum);\r\n\t\t//reset the target, set guesses to 1, and newGame flag to true\r\n\t\ttarget.setRandom(minimum, maximum, \"reset game\");\r\n\t\tthis.msg.setMessage(\"\");\r\n\t\tthis.guesses.setValue(1);\r\n\t\t\r\n\t}", "public void reset() {\n this.state = null;\n }", "public void resetOvladani() {\n this.setEnabled(true);\n gameConnectButton.setEnabled(true);\n gameConnectButton.setText(\"Pripoj ke hre\");\n\n newGameButton.setEnabled(true);\n newGameButton.setText(\"Zaloz hru\");\n\n zalozenaHra = false;\n\n }", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }", "public static void putStatusOffline()\n {\n try\n {\n DatabaseData.updateUserStatusOffline(userId);\n }catch(Exception e) {\n putStatusOffline();\n }\n }", "public void assertNotInState(T forbidden) {\n synchronized (this) {\n if (state == forbidden) {\n throw new IllegalStateException(\"Should not be in state \" + forbidden + \".\");\n }\n }\n }", "public void invertAdminStatus() {\n this.isAdmin = !(this.isAdmin);\n }", "@Override\n public void clear() {\n beginMyTurn();\n }", "public void reset() {\r\n\r\n b1.setText(\"\");\r\n b1.setEnabled(true);\r\n\r\n b2.setText(\"\");\r\n b2.setEnabled(true);\r\n\r\n b3.setText(\"\");\r\n b3.setEnabled(true);\r\n\r\n b4.setText(\"\");\r\n b4.setEnabled(true);\r\n\r\n b5.setText(\"\");\r\n b5.setEnabled(true);\r\n\r\n b6.setText(\"\");\r\n b6.setEnabled(true);\r\n\r\n b7.setText(\"\");\r\n b7.setEnabled(true);\r\n\r\n b8.setText(\"\");\r\n b8.setEnabled(true);\r\n\r\n b9.setText(\"\");\r\n b9.setEnabled(true);\r\n\r\n win = false;\r\n count = 0;\r\n }", "public void defender(){setModopelea(1);}", "public void resetGameRoom() {\n gameCounter++;\n score = MAX_SCORE / 2;\n activePlayers = 0;\n Arrays.fill(players, null);\n }" ]
[ "0.65236235", "0.6354156", "0.6281041", "0.62709206", "0.62479293", "0.6191287", "0.6170772", "0.61661077", "0.6134478", "0.6131848", "0.6055779", "0.60432756", "0.5974866", "0.5956835", "0.5952529", "0.5951574", "0.5917009", "0.59163296", "0.5908654", "0.59080076", "0.58979434", "0.5853408", "0.58452415", "0.584229", "0.5842241", "0.58384556", "0.5836429", "0.5823069", "0.58080906", "0.5801511", "0.577664", "0.57757926", "0.57723534", "0.57462275", "0.57336456", "0.5718157", "0.5715861", "0.5703626", "0.57027286", "0.5696472", "0.5690917", "0.56894106", "0.5684069", "0.5675897", "0.56721306", "0.5665721", "0.5665467", "0.5661054", "0.5659569", "0.5622879", "0.5621408", "0.5610965", "0.56066364", "0.5597334", "0.55952746", "0.5591621", "0.55894935", "0.55818856", "0.55571085", "0.5550137", "0.5549292", "0.5535227", "0.5532353", "0.551729", "0.5515589", "0.5515404", "0.5502949", "0.54989064", "0.54984486", "0.5495386", "0.5483985", "0.54833585", "0.5482141", "0.5479749", "0.54745495", "0.5473544", "0.5471863", "0.5470976", "0.5470249", "0.54642993", "0.54642624", "0.5463211", "0.54593605", "0.54513", "0.5450797", "0.5443418", "0.5440168", "0.5427592", "0.5418996", "0.54130316", "0.5406126", "0.54059047", "0.5401465", "0.5400198", "0.5396505", "0.5396243", "0.5395673", "0.5392079", "0.5391857", "0.5391194" ]
0.7105041
0
Set the state of the user to LEFT (when left a game).
public void setLeft() { state = State.LEFT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLeft(boolean left) {\n myLeft = left;\n }", "public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}", "public void leftPressed() {\n\t\tkeys.get(keys.put(Keys.LEFT, true));\n\t}", "public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }", "public void left() {\n\t\tstate.left();\n\t}", "public static void setsLeft(char sLeft) {\n\t\t\tGamePreferences.sLeft = sLeft;\n\t\t}", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "public static void setLeft(char left) {\n\t\t\tGamePreferences.left = left;\n\t\t}", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "public void turnLeft();", "private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public void turnLeft() { turn(\"LEFT\"); }", "public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}", "private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}", "public void setLeft(boolean b){ left = b; }", "public void setLeft(boolean b){ left = b; }", "public void setLeft(boolean left) {\n\t\tthis.left = left;\n\t}", "public LTSState getLeftState(){\n\t\treturn leftState;\n\t}", "public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }", "public boolean isLeft() {\n\t\treturn state == State.LEFT;\n\t}", "private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "public void turnLeft ()\n\t{\n\t\t//changeFallSpeed (-1);\n\t\tturnInt = -1;\n\t}", "public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "public void onStateLeft();", "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}", "public void setMoveLeft(boolean TorF) {\n moveLeft = TorF;\n }", "public void leftPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.left();\t\n\t\t}\n\t}", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void moveLeft()\n {\n if (this.x >= 2) {\n --x;\n } else {\n System.out.println(\"Move is outside of the field! Try again.\");\n }\n }", "public abstract void turnLeft();", "public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }", "private void handleLeft() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()-1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()==-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getNumberColumns()-1);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}", "public IState getLeftState() {\n\t\treturn leftState;\n\t}", "public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}", "public void moveLeft() {\n\t\tsetPosX(getPosX() - steps);\n\t}", "public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}", "public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }", "public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }", "public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }", "public void goLeft()\r\n\t{\r\n\t\tthis.X--;\r\n\t}", "private void stateMovingLeft(float dt) {\n setPosition(b2body.getPosition().x - getWidth() / 2, b2body.getPosition().y - getHeight() / 2);\n setRegion(bridgeStand);\n\n // Kinematic bodies do not collide with static ones (we can't use WorldContactListener)\n float velX;\n if (getX() <= 0) {\n velX = b2body.getLinearVelocity().x * -1;\n b2body.setLinearVelocity(velX, VELOCITY_Y);\n currentState = State.MOVING_RIGHT;\n }\n }", "@Override\r\n\tpublic void setLeft(MoveLeftCommand left) {\n\r\n\t}", "public void moveLeft() {\n\t\t\n\t}", "public void setLeft(int x) {\r\n leftSide = x;\r\n }", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "public void setLeft(IAVLNode node) {\n\t\t\tthis.left = node; // to be replaced by student code\n\t\t}", "public void moveLeft() {\n \tif(!move.moveLeft()) {\n \t\tif(physinteractor(getX()-1,getY())) {\n \t\t\tmove.moveLeft();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "@Override\n\tpublic void onTurnLeft(PlatformPlayer player) {\n\t\t\n\t}", "void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }", "private void turnLeft(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t}\n\t}", "void keyLeft();", "void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}", "public void setXLeft(int left) {\n this.xLeft = left;\n }", "public void uturn() {\n\t\tthis.turnLeft(2);\n\t}", "public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}", "public void goLeft() {\n if(page.left == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"left\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.left;\n addQueue();\n }", "public void moveLeft() {\n locX = locX - 1;\n }", "void moveLeft();", "@Override\n\tpublic boolean canBeLeft() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean moveLeft() {\n\t\tboolean rs = super.moveLeft();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}", "public void setTvMessageUserLeft(String message) {\n mTvMessageUserLeft.setText(message);\n }", "public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}", "public void setLeft(IAVLNode node);", "public void setLeft(IAVLNode node);", "private void leftButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_leftButtonKeyPressed\n this.leftButton.setEnabled(true);\n if(!this.left){\n this.controller.setLeft(true);\n this.left = true;\n }\n }", "public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}", "public void setLeft(AVLNode<E> left) {\r\n\t\tthis.left = left;\r\n\t}", "public void turnLeft(int ticks){\n\t\tposition = (position + ticks)%40;\n\t\tcount++;\n\t\tcheckTurn(ticks);\n\t}", "public void executeLeftGame() {\r\n //COME BACK TO THIS\r\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "void setLeftToRight(boolean ltor);", "@Override\n\tpublic void setIrLeft(int irLeft) {\n\t\t\n\t}", "public void moveLeft() {\n\t\tposX -= speed;\n\t}", "public void setLeftRumble(float intensity) {\n\t\tjoystick.setRumble(RumbleType.kLeftRumble, intensity);\n\t}", "public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public Direction left() {\n\t\treturn left;\n\t}", "@Override\n\tpublic void onUserLeftRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveLeft();\n\t\t\tSystem.out.println(\"Heading +10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void leftButtonPressed() {\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif(!on) {\n\t\t\t\t// Enable our steamer\n\t\t\t\tstreamer.enable();\n\t\t\t\t// Enable the sensor\n\t\t\t\tdroneApp.myDrone.quickEnable(qsSensor);\n\t\t\t\t\n\t\t\t\ton = true;\n\t\t\t\t\n\t\t\t\tint w = tvSensorValue.getWidth();\n\t\t\t\tint h = tvSensorValue.getHeight();\n\t\t\t\t\n\t\t\t\tif(firstTime) {\t\t\n\t\t\t\t\tfirstTime = false;\n\t\t\t\t\twarmUpWindow1 = new PopupWindow(layout2, w, h, true);\n\t\t\t\t\twarmUpWindow1.setOutsideTouchable(true);\n\t\t\t\t\twarmUpWindow1.setFocusable(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(warmedUp) {\n\t\t\t\t\twarmedUp = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshowWarmupWindow(h);\n\t\t\t\tcountdown1Handler.post(countdown1Runnable);\n\t\t\t} else {\n\t\t\t\tresetAllOperations();\n\t\t\t}\n\t\t}\n\t}", "public void onLeftUp();", "public void rotateLeft() {\n\t\tif (rotLeft == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(90), 0f);\n\t\t\trotLeft = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotLeft);\n\t}", "public void moveLeft(int delta){\n //if the object is not already moving at maximum speed\n if(x_velocity > -maximumSpeed){\n //then the object will accelerate towards maximum speed\n x_velocity -= accelerationSpeed*delta;\n if(x_velocity < -maximumSpeed){\n //and if the object exceeds maximum speed, set it to maximum speed\n x_velocity = -maximumSpeed;\n }\n }\n // if()\n moving = true;\n facing = Facing.LEFT;\n movingLeft = true;\n movingRight = false;\n \n \n }", "private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }", "public static char getsLeft() {\n\t\t\treturn sLeft;\n\t\t}", "public static void setLeftPower(double leftPower) {\n\t\tSystem.out.println(\"Left: \" + leftPower);\n\t\tShooter.leftPower = leftPower;\n\t}", "public void leftOff() {\r\n\t\tsetLeftColor(0, 0, 0);\r\n\t}", "public final void setLeftIndex(int leftIndex)\n {\n this.leftIndex = leftIndex;\n }", "public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }", "private void RightLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t}\n \t}", "public boolean canBeLeft();", "@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}" ]
[ "0.7228826", "0.71921784", "0.7190697", "0.7066647", "0.70571667", "0.7048397", "0.7025491", "0.7022745", "0.69688404", "0.69208133", "0.6893369", "0.6885336", "0.68837154", "0.687492", "0.6851881", "0.6821761", "0.6821761", "0.68145764", "0.67806095", "0.67408204", "0.6699435", "0.6696291", "0.66937715", "0.6692405", "0.66708165", "0.6658127", "0.6644137", "0.66376513", "0.6636247", "0.66142094", "0.659883", "0.6577032", "0.65175205", "0.6477216", "0.6474991", "0.6470021", "0.6466146", "0.64552623", "0.6452144", "0.64470077", "0.64437455", "0.6439882", "0.6411169", "0.6410769", "0.63889945", "0.63709354", "0.63532615", "0.6342231", "0.6341488", "0.63408333", "0.6325446", "0.6299755", "0.6292345", "0.61977535", "0.6184293", "0.6174119", "0.6171556", "0.61636764", "0.61557645", "0.6148651", "0.6142296", "0.6141642", "0.6137212", "0.6128433", "0.61178106", "0.61151034", "0.611241", "0.61095303", "0.61037153", "0.609758", "0.6087241", "0.60780793", "0.60780793", "0.6041757", "0.6041335", "0.6037704", "0.60056424", "0.5997613", "0.59748936", "0.5965521", "0.5965437", "0.5962793", "0.59610564", "0.5958197", "0.5925865", "0.5916646", "0.59122753", "0.59080845", "0.58841485", "0.5880132", "0.5872175", "0.5863103", "0.58608204", "0.5844826", "0.5844817", "0.58410466", "0.5837736", "0.58328754", "0.5827234", "0.58226997" ]
0.7821311
0
Set the state of the user to JOINED (when joined a game).
public void setJoined() { state = State.JOINED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void join(User user);", "public boolean isJoined() {\n\t\treturn state == State.JOINED;\n\t}", "public\tvoid\tuserJoined(UIRosterEntry user)\n\t{\n\t\t\n\t\tNewChatPanel panel = this.getDiscussionPanel();\n\t\n\t\tString joinedUserName = user.getDisplayName();\n\t\tString joinedUserId = user.getUserId();\n\t\t\n\t\tString senderId = this.rosterModel.getCurrentActivePresenter().getUserId();\n\t\tString senderName = this.rosterModel.getCurrentActivePresenter().getDisplayName();\n\t\t\n\t\t//Window.alert(\"senderId = \"+senderId+\":senderName:\"+senderName);\n\t\t//Window.alert(\"User Joined:joinedUserName :\"+joinedUserName+\":joinedUser Status:\"+user.getJoinedStatus());\n\t\t//Window.alert(\"lastUserJoined = \"+lastUserJoined);\n\t\tif((joinedUserId != senderId ) && (joinedUserId != lastUserJoined ) && (senderName != \"Not Available\") && (joinedUserId != me.getUserId()) && (!user.getJoinedStatus()))\n\t\t{\n\t\t//\tpanel.receiveChatMessage(\"\", sender,joinedUser + \" has joined the conference\");\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_joined_message\",\"has joined the dimdim web meeting.\");\n\t \t //Window.alert(\"adding \"+s);\n\t\t\tpanel.receiveWelcomeMessage(joinedUserName + \" \"+s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t\telse if((joinedUserId == senderId) && lastUserJoined == null && (joinedUserId != lastUserJoined))\n\t\t{\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_welcome_message\",\"Welcome to the Dimdim Web Meeting.\");\n\t \t //Window.alert(\"adding welcom message...\");\n\t\t\tpanel.receiveWelcomeMessage(s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t}", "@Override\r\n\tpublic void joinEvent(String account, Integer eventId, boolean join) {\n\t\tuserDAO.updateEventPin(account, eventId, join);\r\n\t}", "@Override\n\tpublic void playerJoining(String playerID) {\n\t}", "private void UserJoinChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Join to \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}", "@Override\n\tpublic void onUserJoinedLobby(LobbyData arg0, String arg1) {\n\t\t\n\t}", "void onJoin(String joinedNick);", "public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }", "public void join(Player player) {\n if (this.stored.contains(player.getName()) ^ !this.optInEnable) {\n if (Trivia.wrapper.permission(player, PermissionTypes.PLAY) && this.running) {\n if (!this.active.contains(player)) {\n this.active.add(player);\n player.sendMessage(\"Qukkiz is now \" + ChatColor.GREEN + \"enabled\" + ChatColor.WHITE + \".\");\n }\n }\n }\n }", "public void setIsJoin (Boolean isJoin) {\r\n\t\tthis.isJoin = isJoin;\r\n\t}", "public void join(LobbyPlayer player) {\n if (listener == null) listener = Firebase.registerListener(\"lobbies/\" + player.getLobbyCode(), onLobbyChange);\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + player.getLobbyCode());\n ObjectMapper mapper = new ObjectMapper();\n Map<String, Object> kv = mapper.convertValue(LobbyPlayerDTO.fromModel(player), new TypeReference<Map<String, Object>>() {});\n doc.update(\"players.\" + player.getUsername(), kv);\n }", "public void join() throws OperationFailedException\n {\n if (chatRoomSession == null && chatInvitation == null)\n { // the session is not set and we don't have a chatInvitatoin\n // so we try to join the chatRoom again\n ChatRoomManager chatRoomManager =\n provider.getAimConnection().getChatRoomManager();\n chatRoomSession = chatRoomManager.joinRoom(this.getName());\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n else if (chatInvitation != null)\n {\n chatRoomSession = chatInvitation.accept();\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n\n // We don't specify a reason.\n opSetMuc.fireLocalUserPresenceEvent(this,\n LocalUserAdHocChatRoomPresenceChangeEvent.LOCAL_USER_JOINED, null);\n }", "@Override\n public void onGuildMemberJoin(@NotNull GuildMemberJoinEvent event) {\n super.onGuildMemberJoin(event);\n event.getMember().getUser().openPrivateChannel().queue((channel) -> {\n channel.sendMessage(Settings.WELCOME_MESSAGE).queue();\n });\n }", "GameJoinResult join(Player player);", "public void handleUsersLeft(ChatRoomSession chatRoomSession,\n Set<ChatRoomUser> chatRoomUserSet)\n {\n updateMemberList(chatRoomUserSet, true);\n }", "@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\r\n public void onJoin(PlayerJoinEvent joinEvent) {\n Player player = joinEvent.getPlayer();\r\n\r\n String health = String.valueOf(player.getHealth());\r\n String ping = String.valueOf(player.getPing());\r\n\r\n if (config.getBoolean(\"JoinEnabled\")) {\r\n joinEvent.setJoinMessage(config.getString(\"JoinMessage\").\r\n replace(\"%player%\", player.getDisplayName()).\r\n replace(\"%server%\", getServer().getMotd()).\r\n replace(\"%ping%\", ping).\r\n replace(\"%health%\", health));\r\n\r\n // Checks if the user has put a join message or not\r\n if (config.getString(\"JoinMessage\").trim().isEmpty() || config.getString(\"JoinMessage\").equals(\"\")) {\r\n this.getLogger().info(\"Couldn't define any join message.\");\r\n }\r\n }\r\n else this.getLogger().info(\"Join messages are disabled.\");\r\n }", "public void onJoin(Team t) {\n \t\tint index = teams.size();\n \t\tteams.add(t);\n \t\tteamIndexes.put(t, index);\n \t\tif (!t.hasSetName() && t.getPlayers().size() > Defaults.MAX_TEAM_NAME_APPEND){\n \t\t\tt.setDisplayName(TeamUtil.createTeamName(indexOf(t)));\n \t\t}\n \t\tstartTracking(t);\n \t\tt.setAlive();\n \t\tt.resetScores();/// reset scores\n \t\tTeamController.addTeamHandler(t, this);\n \t\tfor (ArenaPlayer p: t.getPlayers()){\n \t\t\tarenaInterface.onJoin(p,t);\t\t\t\n \t\t}\n \n \t\tPerformTransition.transition(this, MatchState.ONJOIN, t, true);\n \t}", "@Override\n\tpublic void onUserJoinedRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "@EventHandler\r\n\tpublic void onJoin(PlayerJoinEvent e) {\r\n\t\tBukkit.broadcastMessage(ChatColor.GRAY + \"Fellow Gamer \" +\r\n\t\t\t\t\t\t\t\tChatColor.YELLOW + e.getPlayer().getDisplayName() + \r\n\t\t\t\t\t\t\t\tChatColor.GRAY + \" has joined.\");\r\n\t}", "@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n public void onPlayerJoin(PlayerJoinEvent ev) {\n ObjectiveSender.handleLogin(ev.getPlayer().getUniqueId());\n }", "@Override\n\tpublic void joinLobby(int playerID, int sessionID){\n\t\tif(sessionID == NO_LOBBY_ID)\n\t\t\treturn;\n\t\t//check if the player is already in an other lobby\n\t\tint playerSession = getSessionFromClient(playerID);\n\n\t\tif(playerSession == NO_LOBBY_ID){\n\t\t\tlobbyMap.get(sessionID).addPlayer(getPlayerMap().get(playerID));\n\t\t\tDebugOutputHandler.printDebug(\"Player \"+getPlayerMap().get(playerID).getName()+\" now is in lobby \" + getPlayerMap().get(playerID).getSessionID());\n\t\t}\n\t}", "void rejoin()\n {\n this.suspended = false;\n this.game.notifyPlayerRejoined(this);\n }", "public void handleUsersJoined(ChatRoomSession chatRoomSession,\n Set<ChatRoomUser> chatRoomUserSet)\n {\n updateMemberList(chatRoomUserSet, false);\n }", "public void enterLobby(User user) {\r\n\t\tif (usersInLobby.get(user.getUsername()) == null) {\r\n\t\t\tusersInLobby.put(user.getUsername(), user);\r\n\t\t}\r\n\t\tuser.setLocation(\"Lobby\");\r\n\t}", "@Override\n public void memberJoined(@NotNull final Address address) {\n }", "public boolean joinLobby(Lobby lobby)\n {\n if (lobby.assignSlot(this))\n {\n this.currentLobby = lobby;\n return true;\n }\n return false;\n }", "public void join() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip m = memberShipService.getMemberShip(userId, groupId);\n\n if (m != null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are already member of this group\",\n \"You are already member of this group\"));\n return;\n }\n\n UbikeGroup group = groupService.find(groupId);\n m = new MemberShip(current, group, Role.Member);\n memberShipService.create(m);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You joined the group \" + group.getName() + \" successfully\",\n \"You joined the group \" + group.getName() + \" successfully\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n if (members == null) {\n members = new ArrayList<MemberShip>();\n BaseBean.setSessionAttribute(\"tmp_members\", members);\n }\n members.add(m);\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while joinning group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }", "public void joinServer(String userName)\n\t{\n\t\ttry {\n\t\t\tSocket toServer = new Socket(server, directorySocket);\n\t\t\tObjectOutputStream outToServer = new ObjectOutputStream(toServer.getOutputStream());\n\t\t\t\n\t\t\tthis.userName = userName;\n\t\t\t\n\t\t\tServerMessage m = new ServerMessage();\n\t\t\tm.setCommand(JOIN);\n\t\t\tm.setUser(new UserBean(this.hostName, userName, ipAddress));\n\t\t\t\n\t\t\toutToServer.writeObject(m);\n\t\t\t\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void joinGame(String playeruuid);", "@SubscribeEvent\n public void onVoiceJoined(GuildVoiceJoinEvent event) {\n if (event.getMember().getUser().isBot()) return;\n // Logic\n GuildUserModel guildUser = taules.dataManager.getGuildUserModel(event.getGuild().getIdLong(), event.getMember());\n DB.save(new CallLogModel(guildUser.getId()));\n }", "private void joinNewClient() {\r\n\t\t\tString clientName = _clientView.getUserName();\r\n\t\t\tif(clientName == null)\r\n\t\t\t\treturn;\r\n\t\t\t_clientModel.connectToServer();\r\n\t\t\t_clientModel.joinChat(clientName);\r\n\t\t}", "@SuppressWarnings(\"deprecation\")\n @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\n\tvoid onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\tUUID playerID = player.getUniqueId();\n\t\t\n\t\t//note login time\n\t\tDate nowDate = new Date();\n long now = nowDate.getTime();\n\n\t\t//if player has never played on the server before...\n\t\tif(!player.hasPlayedBefore())\n\t\t{\n\t\t //if in survival claims mode, send a message about the claim basics video (except for admins - assumed experts)\n\t\t if(instance.config_claims_worldModes.get(player.getWorld()) == ClaimsMode.Survival && !player.hasPermission(\"griefprevention.adminclaims\") && this.dataStore.claims.size() > 10)\n\t\t {\n\t\t WelcomeTask task = new WelcomeTask(player);\n\t\t Bukkit.getScheduler().scheduleSyncDelayedTask(instance, task, instance.config_claims_manualDeliveryDelaySeconds * 20L);\n\t\t }\n\t\t}\n\n\t\t//in case player has changed his name, on successful login, update UUID > Name mapping\n\t\tinstance.cacheUUIDNamePair(player.getUniqueId(), player.getName());\n\t}", "@EventHandler\r\n public void onPlayerJoinEvent(PlayerJoinEvent event) {\r\n Player p = event.getPlayer();\r\n plugin.sendStatusMsg(p);\r\n }", "public void playerJoins(final SonicPlayer sP) {\n\t\t_T.run_ASync(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (!checkConnection()) {\n\t\t\t\t\t//Something is wrong, kick the player\n\t\t\t\t\t_.badMsg(sP.getPlayer(), \"Something is wrong with the game.. Sorry! Contact Stoux if he is online!\");\n\t\t\t\t\tsonic.playerQuit(sP);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void joinGame(CatanColor color) \n\t{\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\tJSONObject model;\n\t\ttry \n\t\t{\n\t\t\tString model_string =ref.proxy.joinGame(ref.game_id, color);\n\t\t\tmodel = new JSONObject(model_string);\n\t\t\tif(model.equals(\"FAILED\\n\"))\n\t\t\t{\n\t\t\t\tthrow new JoinExceptions(\"Join Refused by server\");\n\t\t\t}\n\t\t\tif(getSelectColorView().isModalShowing())\n\t\t\t{\n\t\t\t\tgetSelectColorView().closeModal();\n\t\t\t\tsetSelectColorView(null);\n//\t\t\t\tif(this.getJoinGameView().isModalShowing())\n//\t\t\t\t{\n//\t\t\t\t\tgetJoinGameView().closeModal();\n//\t\t\t\t}\n\t\t\t}\n\t\t\tModelPopulator.populateModel(model, ref.getFascade());\n\t\t\t// If join succeeded\n\t\t\tReference.GET_SINGLETON().player_color = color;\n\n\t\t\t//joinAction.execute();\n\t\t} \n\t\tcatch (JSONException | JoinExceptions e) \n\t\t{\n\t\t\tString error = \"Sorry, Failed to Join Game. Please try again or contact your system administrator.\";\n\t\t\tthis.messageView.setTitle(\"Join Failed\");\n\t\t\tthis.messageView.setMessage(error);\n\t\t\tSystem.err.print(\"ERROR: FAILED TO JOIN GAME\");\n\t\t\te.printStackTrace();\n\n\t\t\tif(!this.messageView.isModalShowing())\n\t\t\t{\n\t\t\t\tthis.messageView.showModal();\n\t\t\t}\n\t\t\tif(getSelectColorView().isModalShowing())\n\t\t\t{\n\t\t\t\tgetSelectColorView().closeModal();\n\t\t\t}\n\t\t} \n\t}", "@Override\n\tpublic void onJoinLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onJoinLobbyDone\");\n\t}", "public void PlayerJoinsGame(String user)\n\t\t{\n\t\t\tplayer_queue.add(user);\n\t\t}", "private void joinGame() {\n\t\tgame.connect(list.getSelectedValue());\n\t\tdispose();\n\t}", "public void becomeLeader()\r\n\t{\r\n\t\tisleader = true;\r\n\t}", "@Override\n\tpublic void onUserLeftLobby(LobbyData arg0, String arg1) {\n\t\t\n\t}", "public void changeLoginStatus(Integer userId, Integer loginStatus);", "public void joinGame(int selectedRow) {\n \t\tsynchronized (lobbyManager.getAvailableGames()) {\n \t\t\ttry {\n \t\t\t\tlobbyManager.joinGame(lobbyManager.getAvailableGames().get(selectedRow));\n \t\t\t} catch (IndexOutOfBoundsException e) {\n \t\t\t\t//Just to prevent a user trying to to rejoin a game that has been quit before refreshing\n \t\t\t}\n \t\t}\n \t}", "public void handleJoin()\n {\n String n = name.getText();\n if(n.isEmpty())\n {\n setStatus(\"Bitte Namen eingeben!\",Color.RED);\n return;\n }\n if(n.contains(\";\"))\n {\n setStatus(\"Bitte keine ; verwenden!\",Color.RED);\n return;\n }if(n.contains(\"'\"))\n {\n setStatus(\"Bitte keine ' verwenden!\",Color.RED);\n return;\n }if(n.contains(\",\"))\n {\n setStatus(\"Bitte keine , verwenden!\",Color.RED);\n return;\n }\n String ip = ip_text.getText();\n if(ip.isEmpty())\n {\n setStatus(\"Bitte IP eingeben!\",Color.RED);\n return;\n }\n if(ip.contains(\";\"))\n {\n setStatus(\"Bitte kiene ; verwenden!\",Color.RED);\n return;\n }if(ip.contains(\"|\"))\n {\n setStatus(\"Bitte kiene | verwenden!\",Color.RED);\n return;\n }if(ip.contains(\",\"))\n {\n setStatus(\"Bitte kiene , verwenden!\",Color.RED);\n return;\n }\n\n matchup.joinGame(n,color_snake.getValue(),color_head.getValue(),ip);\n }", "public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}", "public void joinGame(int lobbyId)\n {\n //call Client controller's joinLobby method with the selected lobby's\n //id\n clientController.joinGame(lobbyId);\n }", "public void joinGame(View view) {\n EditText editText = (EditText) findViewById(R.id.enter_game_keyword);\n gameName = editText.getText().toString();\n\n if (!nameEntered(gameName)) {\n return;\n }\n GameNameHandler.joinGameHandler(this, gameName, getPlayerName());\n saveInPreferences(gameName);\n }", "@EventHandler\n public void onPlayerJoin(PlayerJoinEvent event) {\n Player player = event.getPlayer();\n String motd = config.getString(\"motd\");\n if (motd != null && !motd.trim().isEmpty()) {\n motd = ChatColor.translateAlternateColorCodes('&', motd);\n player.sendMessage(motd.split(\"\\\\\\\\n\"));\n }\n }", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "private void indicateUserLoginStatusChanged() {\n raise(new UserLoginStatusChangedEvent(null));\n }", "@Override\n\tpublic void startJoinGame(GameInfo game) \n\t{\n\t\tif(game == null) return;\n\t\t\n\t\tgetSelectColorView().enableAllColors();\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\tref.game_id = game.getId();\n\t\tref.player_index = getIndex(game.getPlayers());\n\t\tfor(PlayerInfo player_info: game.getPlayers())\n\t\t{\n\t\t\tif(player_info.getColor() == null)continue;\n\t\t\tgetSelectColorView().setColorEnabled(player_info.getColor(), false);\n\t\t\tif (player_info.getName().equals(ref.getName())) \n\t\t\t{\n\t\t\t\tgetSelectColorView().setColorEnabled(player_info.getColor(), true);\n\t\t\t}\n\t\t}\n\t\tif(getJoinGameView().isModalShowing()) \n\t\t{\n\t\t\tgetJoinGameView().closeModal();\n\t\t}\n\t\t\n\t\tif(!getSelectColorView().isModalShowing())\n\t\t{\n\t\t\tgetSelectColorView().showModal();\n\t\t}\n\t}", "Client join(Participant participant);", "private static void addConnectStateToUser(String userId) {\n DatabaseReference userStatusDatabaseRef =\n userInfoRef.child(userId);\n\n // Create a reference to the special '.info/connected' path in\n // Realtime Database. This path returns `true` when connected\n // and `false` when disconnected.\n DatabaseReference firebaseConnectionRef= FirebaseDatabase.getInstance().getReference(\".info/connected\");\n firebaseConnectionRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n boolean connected = snapshot.getValue(Boolean.class);\n //only if the user is connected (not connected users will be handled in the disconnect event listener\n if (connected) {\n // If we are currently connected, then use the 'onDisconnect()'\n // method to add a set which will only trigger once this\n // client has disconnected by closing the app,\n // losing internet, or any other means.\n HashMap<String, Object> offlineUpdateMap = new HashMap<String, Object>() {{\n put(\"status\", OFFLINE_STATE);\n }};\n userStatusDatabaseRef.onDisconnect().updateChildren(offlineUpdateMap);\n\n\n // We can now safely set ourselves as 'online' knowing that the\n // server will mark us as offline once we lose connection.\n HashMap<String, Object> onlineUpdateMap = new HashMap<String, Object>() {{\n put(\"status\", ONLINE_STATE);\n }};\n userStatusDatabaseRef.updateChildren(onlineUpdateMap);\n\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }", "public void joinGroup(Group group, LocalDateTime dateJoined) {\n Membership member = new Membership(group, this, dateJoined);\n group.addToMemberships(member);\n memberships.put(group.getTitle(), member);\n }", "void setUserLocked(boolean b);", "private boolean joinGame() throws RemoteException{\n\t\tgui.showLoginWindow(playerDetails);\n\n\t\twhile(!gui.isUserDataAvailable()){\n\t\t\t// wait for user to enter details\n\t\t\tDebug.log(\"MainMenu\", \"waiting for player details\");\n\t\t\ttry{\n\t\t\t\tThread.sleep(1000);\n\t\t\t}catch(InterruptedException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\t\t}\n\t\tplayerDetails = gui.getPlayerDetails();\n\t\tDebug.log(\"MainMenu\", \"player details received!\");\n\n\t\tif(playerDetails == null) quitGame(false); // quit if player declined/cancelled to enter details\n\n\t\t/* Get preferred position */\n\t\tpreferredPosition = gui.getPreferredPosition();\n\n\t\t/* Register this client as Callback */\n\t\treturn server.connect(this, myHost, myPort, preferredPosition, false, playerDetails.getFirstName(), playerDetails.getSurname(),\n\t\t\t\tplayerDetails.getAddress(), playerDetails.getPhone(), playerDetails.getUsername(), playerDetails.getPassword());\n\t}", "@Override\n\tpublic void playerJoined(String playerID) {\n\t}", "@Override\n\tpublic void updateJoinUserRefuse(int joinNumber) {\n\t\tuserInfoDAO.updateJoinUserRefuse(joinNumber);\n\t}", "@EventHandler\n\tpublic void OnPlayerJoin (PlayerJoinEvent e) throws SQLException{\n\t\tPlayer p = e.getPlayer();\n\t\te.setJoinMessage(null);\n\t\tJoinedServer(p);\n\t}", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "@EventHandler\n\tpublic void onPlayerJoin(PlayerJoinEvent e) {\n\t\tfinal Player p = e.getPlayer();\n\t\t\n\t\tif (UpdateListener.isAnewUpdateAvailable()) {\n\t\t\tif (p.hasPermission(\"AlmostFlatLandsReloaded.UpdateMessage\")) {\n\t\t\t\tp.sendMessage(Options.msg.get(\"[AlmostFlatLandsReloaded]\") + Options.msg.get(\"msg.3\"));\n\t\t\t}\n\t\t}\n\t}", "public abstract boolean onPreJoinGame(INetHandler netHandler, S01PacketJoinGame joinGamePacket);", "public void turnOn() {\n\t\tisOn = true;\n\t}", "private void joinChannel() {\n // Get the User Id for the current user\n final String userId = mUser.getUid();\n // User Id set to 0 for auto handling by Agora\n int uid = 0;\n // Token object\n RtcTokenBuilder token = new RtcTokenBuilder();\n // Time stamp used for length of token\n int timestamp = (int)(System.currentTimeMillis() / 1000 + expirationTimeInSeconds);\n\n String uId = Objects.requireNonNull(mAuth.getCurrentUser()).getUid();\n\n addCallToDb(uId); // Add current user to db for active calls\n\n try {\n // Create a token using Agora Sdk\n agora_token = token.buildTokenWithUid(getString(R.string.agora_app_id), getString(R.string.agora_app_certificate),\n channelName, uid, RtcTokenBuilder.Role.Role_Publisher, timestamp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n // Join the channel with the given token and channel name\n mRtcEngine.joinChannel(agora_token, channelName, \"\", uid);\n }", "@EventHandler\n\tpublic void onJoin(PlayerJoinEvent event) {\n\t\t\n\t\tif (PlaytimeConfig.getPlaytimeConfig().get(\"players.\" + event.getPlayer().getUniqueId()) == null) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tint ticks = PlaytimeConfig.getPlaytimeConfig().getInt(\"players.\" + event.getPlayer().getUniqueId() + \".playtime\");\n\t\t\tevent.getPlayer().setStatistic(Statistic.PLAY_ONE_TICK, ticks);\n\t\t}\n\t}", "@EventHandler(ignoreCancelled = true)\n public void onPlayerJoin(PlayerJoinEvent event) {\n new AtlasTask() {\n @Override\n public void run() {\n if (event.getPlayer().isOnline()) {\n update(event.getPlayer());\n }\n }\n }.later(20);\n }", "@EventHandler\n public void onPlayerJoinEvent(PlayerJoinEvent e)\n {\n Player player = e.getPlayer();\n String playerName = player.getName();\n \n this.afkPlayers.put(playerName, false);\n this.afkPlayersAuto.put(playerName, false);\n this.afkLastSeen.put(playerName, new GregorianCalendar());\n \n player.sendMessage(this.getListMessage());\n }", "private void markOnline(boolean b) {\n usersRef.child(userMe.getId()).child(\"online\").setValue(b);\n }", "private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }", "@EventHandler\r\n\tpublic void onJoin(final PlayerJoinEvent e){\n\t\tBukkit.getScheduler().runTaskLater(QuickShop.instance, new Runnable(){\r\n\t\t\t@Override\r\n\t\t\tpublic void run(){\r\n\t\t\t\tMsgUtil.flush(e.getPlayer());\r\n\t\t\t}\r\n\t\t}, 60);\r\n\t}", "void updateUserActivateStatus(User user, int newStatus);", "public void setJoin(boolean canJoin) {\n this.canJoin = canJoin;\n }", "private synchronized void updateUserStatus(final IUser user) {\n // Do not process a bot\n if (user.isBot()) {\n return;\n }\n\n String gameName = getCurrentGame(user);\n if (gameName == null || gameName.isEmpty()) {\n return;\n }\n\n gameName = gameName.toLowerCase();\n\n // User is now playing a game\n final long userID = user.getLongID();\n\n // Add game info for all guilds this user is on\n for (IGuild guild : this.bot.getClient().getGuilds()) {\n if (guild.getUsers().contains(user)) {\n if (!hasGame(gameName, guild)) {\n this.addGame(gameName, guild);\n }\n if (!doesUserPlay(userID, gameName, guild)) {\n this.addUser(gameName, userID, guild);\n }\n }\n }\n }", "public void setCurrentUser(int userNum) {\n\t\tuserTurn = userNum;\n\t}", "private void updateUserStatus(boolean online)\n {\n }", "@EventHandler(priority = EventPriority.HIGHEST)\r\n\tpublic void onPlayerJoin(PlayerJoinEvent pje) {\n\t\t\r\n\t\tPlayer p = pje.getPlayer();\r\n\t\tLocation loc = (Location)plugin.getCorrectedSpawns().get(p.getName());\r\n\t\tif (loc != null)\r\n\t\t{\r\n\t\t\tpje.getPlayer().teleport(loc);\r\n\t\t\tpje.getPlayer().sendMessage(ChatColor.RED+\"[Prisonbeds]\"+ChatColor.WHITE+\" You are imprisoned.\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void executeJoiningPlayer(Player player) {\r\n nui.setupNetworkPlayer(player);\r\n }", "@EventHandler(priority = EventPriority.HIGHEST)\n public void onPlayerJoin(PlayerJoinEvent playerJoinEvent) {\n final Player player = playerJoinEvent.getPlayer();\n\n // Checks if the update notify setting was enabled and if the player has permission to see update notifications\n if(configFile.getBoolean(\"Update_Notify\") && Utilities.checkPermissions(player, true, \"omegavision.update\", \"omegavision.admin\")) {\n // Check the plugins version against the spigotMC and see if it is up-to-date\n new SpigotUpdater(pluginInstance, 73013).getVersion(version -> {\n int spigotVersion = Integer.parseInt(version.replace(\".\", \"\"));\n int pluginVersion = Integer.parseInt(pluginInstance.getDescription().getVersion().replace(\".\", \"\"));\n\n if(pluginVersion >= spigotVersion) {\n Utilities.message(player, \"#00D4FFYou are already running the latest version\");\n return;\n }\n\n PluginDescriptionFile pdf = pluginInstance.getDescription();\n Utilities.message(player,\n \"#00D4FFA new version of #FF4A4A\" + pdf.getName() + \" #00D4FFis avaliable!\",\n \"#00D4FFCurrent Version: #FF4A4A\" + pdf.getVersion() + \" #00D4FF> New Version: #FF4A4A\" + version,\n \"#00D4FFGrab it here:#FF4A4A https://www.spigotmc.org/resources/omegavision.73013/\"\n );\n });\n }\n\n // Add the user to the user data map if they aren't currently in it.\n if(player.getFirstPlayed() == System.currentTimeMillis()) {\n userDataHandler.getUserDataMap().putIfAbsent(player.getUniqueId(), new ConcurrentHashMap<>());\n } else {\n userDataHandler.addUserToMap(player.getUniqueId());\n }\n\n // Check if the Night Vision Login setting was enabled and the player has a\n // true night vision status in the map and permission for night vision long.\n // If so, Apply night vision to them once they have logged in. Otherwise, remove it.\n if(configFile.getBoolean(\"Night_Vision_Settings.Night_Vision_Login\") && (boolean) userDataHandler.getEffectStatus(player.getUniqueId(), UserDataHandler.NIGHT_VISION) && Utilities.checkPermissions(player, true, \"omegavision.nightvision.login\", \"omegavision.nightvision.admin\", \"omegavision.admin\")) {\n Utilities.addPotionEffect(player, PotionEffectType.NIGHT_VISION, 60 * 60 * 24 * 100 ,1, particleEffects, ambientEffects, nightvisionIcon);\n } else {\n userDataHandler.setEffectStatus(player.getUniqueId(), false, UserDataHandler.NIGHT_VISION);\n Utilities.removePotionEffect(player, PotionEffectType.NIGHT_VISION);\n }\n\n if(configFile.getBoolean(\"Night_Vision_Limit.Enabled\")) {\n if((boolean) userDataHandler.getEffectStatus(player.getUniqueId(), UserDataHandler.LIMIT_REACHED)) {\n NightVisionToggle nightVisionToggle = new NightVisionToggle(pluginInstance, player);\n nightVisionToggle.limitResetTimer(player);\n }\n }\n }", "public void creatUserJoins(int tid, int uid, Timestamp time);", "public void setUsersState(State state)\n\t{\n\t\tsetState(users, state);\n\t}", "public void setLobby(Lobby l){\r\n\t\tthis.lobby = l;\r\n\t}", "public boolean isJoin()\r\n { return type == JOIN; }", "private void joinLobby(ActionEvent actionEvent, String name) throws ExecutionException, InterruptedException {\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n if(!fireStoreController.checkExistence(token)){\n JoinLobbyViewTokenTextField.setText(\"This lobby does not exist\");\n }\n\n if(fireStoreController.getLobbySize(token) >= 8){\n LobbyAlreadyFullPopup.setVisible(true);\n }\n\n }", "public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\t//Add the player to the correct permissions groups for their professions\n\t\tPlayer player = event.getPlayer();\n\t\tUUID uuid = player.getUniqueId();\n\t\tProfessionStats prof = new ProfessionStats(perms, data, config, uuid);\n\t\tfor (String pr: prof.getProfessions())\n\t\t\tperms.playerAdd(null, player, config.getString(\"permission_prefix\") + \".\" + pr + \".\"\n\t\t\t\t\t+ prof.getTierName(prof.getTier(pr)));\n\t\t\n\t\t//Add the player's name and UUID to file.\n\t\tdata.set(\"data.\" + uuid + \".name\", player.getName());\n\t}", "public void updateUserLogin(String userName, boolean isOnOff){\n\t\tint isOn = isOnOff? 1 : 0;\n try {\n\t Connection c = new MyConnection().getConnection();\n\t Statement st = c.createStatement();\n \n\t st.executeUpdate(\"update users set IsConnected = \"+isOn+\" WHERE UserName ='\"+userName+\"'\"); \n\t} catch (Exception e) {\n\t\te.printStackTrace();\t\n\t}\n\t}", "public void joinGame(Socket clientSocket){\n\t\t//spawn a new thread that would listen to this client's requests\n\t\tClientListener listener = new ClientListener(clientSocket);\n\t\t\n\t\tsynchronized (joinGameLock) {\n\t\t\t//Will be used by session to get answers from client\n\t\t\tclientListeners.add(listener);\n\t\t\t\n\t\t\t//add socket to collection of connected clientSockets\n\t\t\tconnectedClientSockets.add(clientSocket);\n\t\t\t\n\t\t\t//start the clientListener thread to listen for game inputs\n\t\t\tlistener.start(); \n\t\t\t\n\t\t\tif(connectedClientSockets.size()==MIN_PLAYERS){\n\t\t\t\t//Session is ready to be started. Wake up the session thread to start game. \n\t\t\t\tjoinGameLock.notifyAll();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//signal the client that they have joined the gameSession\n\t\tString message = String.format(\"@joinAck %d\", this.sessionID);\n\t\tsendMsgToSocket(message, clientSocket);\n\t\t\n\t}", "@EventHandler\n public void onPlayerJoinGameEvent(GameJoinEvent event) {\n this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, () -> {\n synchronized (this.statsController) {\n final Stats stats = GameListener.this.statsController.getByPlayer(event.getPlayer());\n stats.setAmountOfGamesPlayed(stats.getAmountOfGamesPlayed() + 1);\n this.statsController.store(stats);\n this.updateStats(event.getPlayer(), stats);\n }\n });\n }", "public boolean isJoining(){\n\t\treturn join!=null;\n\t}", "public void turnOn() {\n\t\tOn = true;\n\t}", "protected void onJoin(String channel, String sender, String login, String hostname) {}", "@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }", "public void turn_on () {\n this.on = true;\n }", "public void setInGame() {\n this.inGame = true;\n }", "public void onReadyButton(View view) {\n mUser.setState(User.UserState.DoneWithNight);\n\n // NOTE!!!!!!!!!!!!!!!!!!\n // When ever the User updates,\n // Because of our event up above,\n // A check goes to see if everyone is ready.\n // If everyone is ready, then it moves to the next Lobby!\n // I hope.\n mRoom.updateUser(mUser);\n Intent intent = new Intent(this, DayMain.class);\n intent.putExtra(\"Client_Data\", mUser);\n intent.putExtra(\"Room_Data\", mRoom);\n Log.v(TAG, \"Starting day for the Villager \");\n startActivity(intent);\n\n }", "public void join(String ip,int port, int myPort){\r\n\t\ttry{\r\n\t\t\tXmlRpcSender.execute(\"joinRequest\", new Object[] { this.ip, String.valueOf(this.port), this.id }, ip, port);\r\n\t\t\tthis.isJoined = true;\r\n\t\t}catch(Exception e ){e.printStackTrace();}\t\r\n\t}", "public static void setConnectedUser( HttpServletRequest request, User user )\r\n\t{\r\n\t\trequest.getSession().setAttribute( \"connectedUser\", user );\r\n\t}", "public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }", "private void joinGame(int gameId){\n\n }", "public void singlePlayerSelected()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startSinglePlayerGame();\n }" ]
[ "0.683152", "0.62726915", "0.6094303", "0.6027506", "0.59263754", "0.5908483", "0.58741134", "0.58413136", "0.5803663", "0.5775824", "0.57479036", "0.57400614", "0.569363", "0.56800324", "0.56357217", "0.5630235", "0.5599799", "0.5591674", "0.5579766", "0.55795974", "0.55783635", "0.5527927", "0.5526752", "0.5526324", "0.5502647", "0.5480437", "0.54677474", "0.5436151", "0.541865", "0.5412465", "0.5408552", "0.5388831", "0.5373497", "0.5368642", "0.53504205", "0.53381795", "0.5332915", "0.5331827", "0.5312893", "0.5308567", "0.53058225", "0.5288184", "0.5286015", "0.5284241", "0.52798134", "0.52695775", "0.52683973", "0.52585864", "0.5248786", "0.52469915", "0.5245392", "0.52447206", "0.5242126", "0.52325976", "0.52299803", "0.5224382", "0.5219861", "0.5219081", "0.5216818", "0.51992154", "0.5190022", "0.5188129", "0.51862305", "0.51833093", "0.5179284", "0.51786524", "0.5178258", "0.5144496", "0.51350003", "0.51178473", "0.5117317", "0.50895464", "0.50829697", "0.50789684", "0.5077521", "0.5067658", "0.50674015", "0.50653994", "0.50618744", "0.505339", "0.50525844", "0.5044476", "0.5036749", "0.5019721", "0.5003033", "0.4990997", "0.49801037", "0.49797252", "0.49751374", "0.4967777", "0.49663067", "0.4955799", "0.4955789", "0.49495387", "0.49467835", "0.4945682", "0.4942552", "0.49419996", "0.4934041", "0.49293873" ]
0.7756205
0
Set the state of the user to READY (when ready to play a game).
public void setReady() { state = State.READY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReady() {\n\t\tthis.state = State.READY;\n\t}", "public void clientReady(String user){\r\n\t\tuserReady.put(user, true);\t\r\n\t\tthis.checkState();\r\n\t}", "public void onReadyButton(View view) {\n mUser.setState(User.UserState.DoneWithNight);\n\n // NOTE!!!!!!!!!!!!!!!!!!\n // When ever the User updates,\n // Because of our event up above,\n // A check goes to see if everyone is ready.\n // If everyone is ready, then it moves to the next Lobby!\n // I hope.\n mRoom.updateUser(mUser);\n Intent intent = new Intent(this, DayMain.class);\n intent.putExtra(\"Client_Data\", mUser);\n intent.putExtra(\"Room_Data\", mRoom);\n Log.v(TAG, \"Starting day for the Villager \");\n startActivity(intent);\n\n }", "public void setReady() {\n this.isReady = true;\n }", "public boolean addReadyUser(User user) {\r\n\t\tif (playerState.get(user) == ENTERED) {\r\n\t\t\tplayerState.remove(user);\r\n\t\t\tplayerState.put(user, READY);\r\n\t\t\treadyUser++;\r\n\t\t\tbroadCast(\"before_notify\", String.valueOf(user.getNickname()) + \" 님이 READY\");\r\n\t\t\tif (readyUser == users.size()) {\r\n\t\t\t\tbroadCast(\"GAME_PLAY_START\", \"\");\r\n\t\t\t\tthis.status = LOAD;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.print(\"somthing wrong\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public synchronized void isReady(String username, boolean ready) throws RemoteException {\n Player p = getPlayer(username);\n if (p != null) {\n p.setReady(ready);\n System.out.println(username + (ready ? \" no\" : \"\") + \" esta listo!\");\n }\n }", "private void ready(){\n setButtons(false);\n setMsgText(\"You are READY.\");\n }", "public void setReady() {\n\t\tlabelReady.setEnabled(true);\n\t\tlabelBusy.setEnabled(false);\n\t\tsetStatusBar(DO_MOVE_MSG);\n\t}", "public void setReady(final boolean isReady)\r\n {\r\n _isReady = isReady;\r\n }", "public void setReady(boolean ready) {\r\n\t\tthis.ready = ready;\r\n\t}", "public void setReadyToRun(boolean ready);", "public void setReady() {\n\t\tfadein = fadeout = false;\n\t\tfadeValue = 1;\n\t\tloadingDone();\n\t}", "public Boolean waitingUser(){\n\t\tif (currentPlayer == 0){\n\t\t\tSystem.out.println(\"You are the first player, changing waitingUser to true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void markReady() {\n\t\tsetState(State.READY);\n\t\tthis.statusCode = StatusCode.Success.code;\n\t}", "protected final void setReady(boolean ready) {\n if (this.ready != ready) {\n this.ready = ready;\n notifyReadyStateChanged();\n }\n }", "public void startGame() {\n status = Status.COMPLETE;\n }", "@RequestMapping(value = \"/team/ready/{ready}\", method = PUT)\n public LobbyTeam markReady(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"ready\") boolean ready)\n throws TeamNotFoundException, TeamLeaderOnlyException {\n log.info(\"user {} marks his team ready: {}\", user.getIdentity(), ready);\n return lobbyService.markTeamReady(user.getProfileId(), ready);\n }", "private void newGame() {\n try {\n toServer.writeInt(READY);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void setWaitState() {\r\n state = WAITFORBALL;\r\n game.waitingForBall.addFirst(this);\r\n }", "public void ready(int playerNo) {\r\n\t\tthis.playersReady++;\r\n\r\n\t\t// Tell all of the players in the lobby that somebody has become ready\r\n\t\tthis.queueMessage(\"% \" + playerNo + \" READY\");\r\n\r\n\t\t// Do a 15 second timer to wait for more people to join\r\n\t\tif (this.playersReady != 0 && this.playersReady == this.players.size()) {\r\n\t\t\tthis.startReadyTimer(true);\r\n\t\t}\r\n\t}", "public void setCargoIntookState() {\n redLED.set(true);\n greenLED.set(false);\n blueLED.set(false);\n }", "public void setUserState(Byte userState) {\r\n this.userState = userState;\r\n }", "public void setUserInterface(ReturnBookUI userInterface) {\n\t\tif (!state.equals(ControlState.getInitialized)) { //Changed instance sTaTe to state\r\n\t\t\tthrow new RuntimeException(\"ReturnBookControl: cannot call setUI except in INITIALISED state\");\r\n\t\t}\t\r\n\t\tthis.userInterface = userInterface;\r\n\t\tuserInterface.setState(ReturnBookUI.UI_STATE.READY); //Changed method name to verb starting with lowercase and in camelBack\r\n\t\tstate = ControlState.READY;\t\t\r\n\t}", "@Override\n\tpublic void playerReady(String playerID, boolean isReady) {\n\t\t//printMessage(\"ph.playerReady: \"+playerID+\" is ready\");\n\t\t//moeten wij niets met doen\n\t}", "public boolean isReady() {\n\t\treturn state == State.READY;\n\t}", "@Override\n public void userRequestedAction()\n {\n inComm = true;\n view.disableAction();\n\n // switch to loading ui\n view.setActionText(\"Loading...\");\n view.setStatusText(loadingMessages[rand.nextInt(loadingMessages.length)]);\n view.setStatusColor(COLOR_WAITING);\n view.loadingAnimation();\n\n // switch the status of the system\n if (isArmed) disarmSystem();\n else armSystem();\n isArmed = !isArmed;\n\n // notify PubNub\n }", "public void setSignUpStatus() {\n // true = open && false = closed\n\n int choice = 0;\n signUpStatus = true;\n System.out.println(\"Set Sign Up Status\" + \"\\n1. Open\" + \"\\n2.Closed\");\n choice = InputTools.intChecker(1, 2);\n\n switch (choice) {\n case 1:\n signUpStatus = true;\n System.out.println(\"Sign Up Status : Open\");\n break;\n case 2:\n signUpStatus = false;\n System.out.println(\"Sign Up Status : Closed\");\n break;\n }\n }", "public void setInGame() {\n this.inGame = true;\n }", "public void setBusy() {\n\t\tlabelReady.setEnabled(false);\n\t\tlabelBusy.setEnabled(true);\n\t\tsetStatusBar(WAIT_MOVE_MSG);\n\t}", "public void setIsCompletingGame(boolean state)\r\n {\r\n this.isCompletingGame= state; \r\n }", "public void setUserStatus(Byte userStatus) {\r\n this.userStatus = userStatus;\r\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void setPlayerAwaitingAuthy(Boolean playerAwaitingAuthy) {\n\t\tthis.playerAwaitingAuthy = playerAwaitingAuthy;\n\t}", "public abstract void ready();", "public void setReadyTime() {\r\n\t\t\tthis.readyTime = 0;\r\n\t\t}", "public void setIsReady(boolean param) {\n // setting primitive attribute tracker to true\n localIsReadyTracker = true;\n\n this.localIsReady = param;\n }", "@Override\r\n\t\t\tpublic void onReadyChange(boolean ready) {\n\r\n\t\t\t}", "@Then(\"the game shall become ready to start\")\n\tpublic void the_game_shall_become_ready_to_start() {\n\t}", "void user_in(boolean e)\n\t\t{\n\t\t\tthis.init = true;\n\t\t\tthis.enable = e;\n\t\t}", "private void updateUI() {\n if(mChoice == Keys.CHOICE_WAITING) {\n mInstructionView.setText(\"Choose your weapon...\");\n mChoiceView.setImageResource(R.drawable.unknown);\n mRockButton.setEnabled(true);\n mPaperButton.setEnabled(true);\n mScissorsButton.setEnabled(true);\n } else {\n // A mChoice has been made\n mRockButton.setEnabled(false);\n mPaperButton.setEnabled(false);\n mScissorsButton.setEnabled(false);\n\n mInstructionView.setText(\"Waiting for opponent...\");\n\n switch(mChoice) {\n case Keys.CHOICE_ROCK:\n mChoiceView.setImageResource(R.drawable.rock);\n break;\n case Keys.CHOICE_PAPER:\n mChoiceView.setImageResource(R.drawable.paper);\n break;\n case Keys.CHOICE_SCISSORS:\n mChoiceView.setImageResource(R.drawable.scissors);\n break;\n }\n }\n\n // Check Pebble player response has arrived first\n if(mChoice != Keys.CHOICE_WAITING && mP2Choice != Keys.CHOICE_WAITING) {\n doMatch();\n }\n }", "public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }", "@External\n\tpublic void set_game_ready( Address _scoreAddress ) {\n\n\t\tAddress sender = Context.getCaller();\n\t\tAddress owner = this.owner_data.get(_scoreAddress);\n\t\t\n\t\tif (!sender.equals(owner)) {\n\t\t\t\tContext.revert(\"Sender not the owner of SCORE \");\n\t\t\t}\n\t\t\n\t}", "public boolean isReady() {\n return mIsReady;\n }", "private void updateReady(List touchEvents) {\n\n if (touchEvents.size() > 0)\n state = GameState.Running;\n }", "@Override\n public boolean isReady() {\n return true;\n }", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public boolean isReady() {\n return true;\n }", "void setUserLocked(boolean b);", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "@Override\n\tpublic boolean isReady() {\n\t\treturn false;\n\t}", "@Override\n public void stateAction(SmartBartender smartBartenderContext) {\n LOGGER.info(\"Ready for use! Waiting for user input\");\n if (this.nextState == null) {\n this.nextState = new CleaningState();\n } else {\n this.nextState = new ShutdownState();\n }\n this.nextState(smartBartenderContext);\n\n }", "@Override\n\tpublic void pause() \n\t{\n\t\tif (state_Game==GAME_READY) \n\t\t{\n\t\t\tstate_Game=GAME_PAUSED;\n\t\t}\n\t}", "public void announceWinner(){\n gameState = GameState.HASWINNER;\n notifyObservers();\n }", "public boolean ready();", "public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }", "public boolean isReady() {\n return ready;\n }", "public void setOnline() {\n if (this.shutdownButton.isSelected() == false) {\n this.online = true;\n this.statusLed.setStatus(\"ok\");\n this.updateOscilloscopeData();\n }\n }", "public void waitForDecision(){\n if(gameOver) {\n return;\n }\n if(!decisionActive) {\n try {\n uiWaiting = true;\n synchronized(uiWait) {\n uiWait.wait();\n }\n } catch (Exception e) { logger.log(\"\"+e); }\n }\n }", "public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}", "public void IsReady() {\n\t\tSystem.out.println(\"Table now ready for customers.\");\n\t\ttable.setState(table.GetReady());\n\t}", "void setStatus(final UserStatus status);", "@Override\n\tpublic boolean ready() {\n\t\treturn this.ok;\n\t}", "public void setReadyToFly(boolean readyToFly) {\r\n this.readyToFly = readyToFly;\r\n }", "private void updateUserStatus(boolean online)\n {\n }", "public void setReady(int[] details, boolean ready)throws RemoteException{\n sd.getGames().get(details[0]).getPlayers()[details[1]].setReady(ready);\n }", "void play(boolean fromUser);", "public boolean Start(){\r\n\t\tif (this.getGameState().equals(GAMESTATE.READY_TO_START)){\r\n\t\t\tsetGameState(GAMESTATE.RUNNING);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isReady() {\n return isReady;\n }", "public void setWaitingToGo(boolean waitingToGo) {\n this.waitingToGo = waitingToGo;\n }", "void isReady();", "void isReady();", "public UserCon()\n\t{\n\t\tfor (String s : Flags.userPrefs)\n\t\t\tprefs.put(s, false);\n\t\tcs = ConnState.PLAYING;\n\t\tisDummy = true;\n\t\tch = null;\n\t}", "public void setUserStatus(java.lang.String userStatus) {\r\n this.userStatus = userStatus;\r\n }", "public boolean isReady()\r\n {\r\n return _isReady;\r\n }", "public User() {\n this.prefs = Gdx.app.getPreferences(\"prefs\");\n\n this.noWalls = prefs.getBoolean(\"noWalls\");\n this.noGrid = prefs.getBoolean(\"noGrid\");\n }", "public boolean isReady();", "public boolean isReady();", "public void showReady();", "private void updateReady(List<TouchEvent> touchEvents) {\n\n\t\tif (touchEvents.size() > 0)\n\t\t\tstate = GameState.Running;\n\t}", "public void start()\n\t{\n\t\taskUser();\n\t\tloop();\n\n\t}", "public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}", "public void setUserStatus(java.lang.String userStatus) {\n this.userStatus = userStatus;\n }", "public void beginTakingPlayers() {\n currentQuestionIndex = 0;\n setGameState(GameState.AWAITING_PLAYERS);\n }", "public void setStateComplete() {state = STATUS_COMPLETE;}", "@SuppressWarnings(\"WeakerAccess\")\n public ReadyState getReadyState() {\n return mReadyState;\n }", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "public void waitForUserClick(Player player){\n Log.d(getClass().toString(),\"wait for user click???\");\n }", "private void setUIStatePaused(){\n countdownLabel.setText(\"Paused\");\n play.setEnabled(true);\n pause.setEnabled(false);\n stop.setEnabled(true);\n }", "public Boolean getPlayerAwaitingAuthy () {\n\t\treturn this.playerAwaitingAuthy;\n\t}", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "void setNetStatus(boolean status){\r\n\t\t\t\tready=status;\r\n\t\t\t}", "boolean isReady();", "boolean isReady();", "boolean isReady();", "@FXML private void setToNewUser(){\n\t\tshowPassword();\n\t\tclearFields();\n\t\thideLackMessages();\n\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\tnewUser = true;\n\t}", "public void UserHasBeenRegistered() {\r\n\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"User has been registered\",\"\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\tNameTF.setText(\"\");\r\n\t\t\tSurnameTF.setText(\"\");\r\n\t\t\tUsernameTF.setText(\"\");\r\n\t\t\tPasswordTF.setText(\"\");\r\n\t\t\tEmailTF.setText(\"\");\r\n\t\t\tAddressTF.setText(\"\");\r\n\t\t\tCardNTF.setValue(null);\r\n\t\t}", "public static void waitToGo() {\r\n try {\r\n sendMessageToMaster(SocketMessage.SLAVE_READY_TO_GO);\r\n wait_to_run.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }" ]
[ "0.7123642", "0.69347554", "0.6907666", "0.67411387", "0.6708115", "0.6616565", "0.65422034", "0.6420964", "0.6335282", "0.6318819", "0.6297034", "0.6294741", "0.6279563", "0.6196337", "0.61727196", "0.61363393", "0.60653865", "0.598844", "0.59690994", "0.59438545", "0.5884772", "0.5871521", "0.58329165", "0.58202076", "0.5803454", "0.57872355", "0.57555056", "0.5748756", "0.5734416", "0.5733226", "0.5726695", "0.56845194", "0.5636778", "0.5636611", "0.5627656", "0.5621958", "0.56143075", "0.5599868", "0.55875546", "0.55700946", "0.5564872", "0.5548549", "0.5525469", "0.5517773", "0.54985607", "0.5469748", "0.5469748", "0.54571414", "0.54550654", "0.5447691", "0.54430866", "0.542523", "0.54159176", "0.54099256", "0.54073954", "0.53968483", "0.5390754", "0.5386632", "0.53798646", "0.53755015", "0.53731525", "0.537243", "0.53703284", "0.5367924", "0.5365844", "0.5362988", "0.534378", "0.5340322", "0.53340334", "0.5333464", "0.5324642", "0.5323303", "0.5323303", "0.5318547", "0.53111374", "0.5309111", "0.5308809", "0.52999145", "0.52999145", "0.52979034", "0.529188", "0.528374", "0.5283712", "0.5271091", "0.5257775", "0.5257468", "0.5255177", "0.52514076", "0.5250789", "0.5234887", "0.52346474", "0.52342093", "0.52131444", "0.5198213", "0.5188522", "0.5188522", "0.5188522", "0.5186201", "0.5183417", "0.5167257" ]
0.7082413
1
Set the state of the user to INGAME (when playing a game).
public void setPlaying() { state = State.INGAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInGame() {\n this.inGame = true;\n }", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }", "private void enterSinglePlayerMode(Game game) {\n if (!game.isStarted() && !game.isGameOver()) {\n game.startGame();\n initSubSystems(game);\n stateSession.initialGame = new Game(game);\n }\n }", "public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }", "@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}", "void user_in(boolean e)\n\t\t{\n\t\t\tthis.init = true;\n\t\t\tthis.enable = e;\n\t\t}", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void setCurrentUser(int userNum) {\n\t\tuserTurn = userNum;\n\t}", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }", "public void setUserState(Byte userState) {\r\n this.userState = userState;\r\n }", "private void setGameState(GAMESTATE gameState) {\r\n\t\tlog.info(\"GID \" + this.GID + \" GAME STATE has changed to \" + gameState );\r\n\t\tthis.gameState = gameState;\r\n\t\t\r\n\t}", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "@Override\n public void setUsername() {\n try {\n JCheckBox botCheckBox = (JCheckBox) logIn.getComponent(5);\n bot = botCheckBox.isSelected();\n if(bot) {\n try {\n int thinkingTime = Integer.parseInt((String) JOptionPane.showInputDialog(frame, \"Please enter the AI thinking time in seconds\", \"Thinking time\", JOptionPane.INFORMATION_MESSAGE, null, null, 0));\n client.setThinkintTime(thinkingTime);\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(frame, \"Set thinking time to 0\", \"Illegal input\", JOptionPane.ERROR_MESSAGE);\n client.setThinkintTime(0);\n }\n }\n username = ((JTextField) logIn.getComponent(3)).getText();\n client.setName(username);\n if(serverBrowser == null) {\n serverList();\n } else {\n frame.setContentPane(serverBrowser);\n ((JLabel)((JPanel) serverBrowser.getComponent(0)).getComponent(0)).setText(username);\n }\n } catch (IllegalNameException e) {\n JOptionPane.showMessageDialog(frame, \"Invalid name, please do not use ';' in your name.\", \"Ilegal username\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n public final void switchUserMode() {\n }", "public void setUsernameState(String usernameState) {\r\n\t\tthis.usernameState = usernameState;\r\n\t}", "private void setGameState() // Convert the string version of the game state to the GameState version.\n\t{\n\t\tif (gameStateString.equalsIgnoreCase(\"waitingForStart\"))\n\t\t{\n\t\t\tgameState = GameState.waitingForStart;\n\t\t}\n\t\telse if (gameStateString.equalsIgnoreCase(\"gameWelcome\"))\n\t\t{\n\t\t\tgameState = GameState.gameWelcome;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"decideWhoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerOneGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerTwoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerOnesTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerTwosTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"aPlayerHasWon\"))\n\t\t{\n\t\t\tgameState = GameState.aPlayerHasWon;\n\t\t} \n\n\t}", "public void setHaveGame()\n\t{\n\t\tthis.haveGame = true;\n\t\tthis.isTurn = true;\n\t\tSystem.out.println(\"Setting have game\");\n\t}", "public static void setState(GameState state) {\r\n\t\tgameState = state;\r\n\t}", "public void setGameState(GameState gs){\n this.gameState = gs;\n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n currentUser = (String) comboBox1.getSelectedItem();\n try {\n saveGame.setGameState(currentUser);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "public void setUpGame() {\n\t\tGameID = sql.getTheCurrentGameID() + 1;\r\n\t\tSystem.err.println(GameID);\r\n\t\ttheModel.shuffleDeck();\r\n\t\ttheModel.createPlayers();\r\n\t\ttheModel.displayTopCard();\r\n\t\t// theModel.chooseFirstActivePlayer();\r\n\t}", "public void startGame() {\n status = Status.COMPLETE;\n }", "@Override\n public void setGameState(GameState gameState) {\n this.gameState = gameState;\n }", "public static void setEnemyOne(boolean state)\r\n\t{\r\n\t\tenemyOne = state;\r\n\t}", "public void setUser(String businessName) {\n editSharedPrefs().putString(USER_NAME, businessName).apply();\n editSharedPrefs().putBoolean(SHARED_PREFS_SETUP, true);\n }", "private void login(){\n out.println(\"Enter player name: \");\n player = new Player(in.nextLine());\n game.addPlayerObject(player);\n out.println(\"Player name set to: \" + player.getName() + \"\\r\\n\");\n\n game.incrementPlayersConnected();\n\n login = true;\n }", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}", "public void setFaceUp(){faceUp = true;}", "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "private void handleStartGame()\n {\n String name = nameInputLabel.getText();\n if (name != null)\n {\n gameScreen.setPlayerName(name.replaceAll(\";\", \" \").trim());\n }\n else\n {\n gameScreen.setPlayerName(\"\");\n }\n \n // Set the new screen state\n gameScreen.setState(gameScreen.getLevelSplashState());\n }", "private void setUpGame() {\n \tresetGame();\n \tprintln(\"Welcome to Hangman!\");\n \tprintln(\"The word now looks like this: \" + currentWord);\n \tprintln(\"You have \" + guessesLeft + \" guesses left.\");\n }", "public void setState(PlayerState state) {\n this.state = state;\n }", "default void toggle(boolean fromUser) {\n if (isPlaying()) {\n pause(fromUser);\n } else {\n play(fromUser);\n }\n }", "public void startOppTurn(GameState state) {\n }", "GameState checkState(String guid, String username) throws GameStateException;", "public void switchGame() {\n \tplayerController.clearKeysPressed();\n game.game1 = !game.game1;\n if (game.game1) {\n \tgame.gameSnapshot = game.game1Snapshot;\n \tgame.rooms = game.game1Rooms;\n \tgame.characters = game.game1Characters;\n \tgame.player = game.player1;\n } else {\n \tgame.gameSnapshot = game.game2Snapshot;\n \tgame.rooms = game.game2Rooms;\n \tgame.characters = game.game2Characters;\n \tgame.player = game.player2;\n }\n \n currentNPCs = game.gameSnapshot.map.getNPCs(game.player.getRoom());\n getTileRenderer().setMap(game.player.getRoom().getTiledMap());\n getTileRenderer().clearPeople();\n getTileRenderer().addPerson((List<AbstractPerson>) ((List<? extends AbstractPerson>) currentNPCs));\n getTileRenderer().addPerson(game.player);\n }", "public void setManagingUser(String managingUser, boolean isManagingUser) {\n this.managingUserDisplay.setText(managingUser);\n if (!isManagingUser) {\n btnResetGame.setEnabled(false);\n btnLockGame.setEnabled(false);\n } else {\n if (isLocked) {\n btnLockGame.setEnabled(false);\n btnResetGame.setEnabled(true);\n } else {\n btnLockGame.setEnabled(true);\n btnResetGame.setEnabled(true);\n }\n }\n }", "public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }", "private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }", "public void setLoadGame() {\n this.loadeGame = true;\n }", "public void setName( final String name ) throws RemoteException {\r\n playerState.name = name;\r\n }", "void setGameName(String gameName);", "protected void switchState(DisplayStates gameState) {\r\n\t\tthis.currentGameState = gameState;\r\n\t}", "public void turnOn(){\n Logger.getGlobal().log(Level.INFO,\" Turning On..\");\n vendingMachine = new VendingMachine();\n inventoryPopulation();\n idle();\n }", "public void setPlayState(PlayerState state) { isPaused = !state.playing; }", "public void set(GameState state){\n states.pop();\n states.push(state);\n }", "public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}", "public void setFirstPlayer() {\n notifySetFirstPlayer(this.getCurrentTurn().getCurrentPlayer().getNickname(), onlinePlayers);\n }", "public void flagUser() {\n\t\tsuper.flagUser();\n\t}", "public void setState(GameState s) {\n this.state = s;\n }", "public void setGame() {\n }", "public GameMode(int s)\n {\n bird3.y+=15;\n bird3.goUp = true;\n \n state = s;\n sprite = 0; \n }", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "public void exchangeActivePlayer() {\r\n\t\tif (activePlayer.equals(\"black\")) {\r\n\t\t\tdisablePlayer(\"black\");\r\n\t\t\tenablePlayer(\"white\");\r\n\t\t\tt.setText(\"white turn\");\r\n\t\t} else {\r\n\t\t\tdisablePlayer(\"white\");\r\n\t\t\tenablePlayer(\"black\");\r\n\t\t\tt.setText(\"black turn\");\r\n\t\t}\r\n\t}", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "void play(boolean fromUser);", "private void setUIStatePlaying(){\n play.setEnabled(false);\n pause.setEnabled(true);\n stop.setEnabled(true);\n }", "private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }", "public void setUpTheGame() throws UserCancelsException{\n played = true;\n ui.printToUser(\"Close the game at any time by inputting letters instead of numbers.\");\n currentOcean = new OceanImpl();\n currentOcean.placeAllShipsRandomly();\n \n currentScore = 0;\n playTheGame();\n if(currentScore<highestScore\n ||highestScore == 0){\n highestScore = currentScore;\n ui.printToUser(\"New High Score! : \" + highestScore);\n }\n }", "public void mapMode() {\n\t\ttheTrainer.setUp(false);\n\t\ttheTrainer.setDown(false);\n\t\ttheTrainer.setLeft(false);\n\t\ttheTrainer.setRight(false);\n\n\t\tinBattle = false;\n\t\tred = green = blue = 255;\n\t\tthis.requestFocus();\n\t}", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "public static void setInstance(GameState state) {\n\t\tGameState.instance = state;\n\t}", "public static void setUserInitialLetter(ChatUser user) {\n final String DefaultLetter = \"#\";\n String letter = DefaultLetter;\n\n final class GetInitialLetter {\n String getLetter(String name) {\n if (TextUtils.isEmpty(name)) {\n return DefaultLetter;\n }\n char char0 = name.toLowerCase().charAt(0);\n if (Character.isDigit(char0)) {\n return DefaultLetter;\n }\n ArrayList<Token> l = HanziToPinyin.getInstance().get(name.substring(0, 1));\n if (l != null && l.size() > 0 && l.get(0).target.length() > 0) {\n Token token = l.get(0);\n String letter = token.target.substring(0, 1).toUpperCase();\n char c = letter.charAt(0);\n if (c < 'A' || c > 'Z') {\n return DefaultLetter;\n }\n return letter;\n }\n return DefaultLetter;\n }\n }\n\n if (!TextUtils.isEmpty(user.getNick())) {\n letter = new GetInitialLetter().getLetter(user.getNick());\n user.setInitialLetter(letter);\n return;\n }\n if (letter.equals(DefaultLetter) && !TextUtils.isEmpty(user.getUsername())) {\n letter = new GetInitialLetter().getLetter(user.getUsername());\n }\n user.setInitialLetter(letter);\n }", "public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "public void gameSetupSinglePlayer(boolean botMode) {\r\n\t\tthis.screen = new Screen(this); //creazione schermo di gioco\r\n\t\tthis.botMode = botMode;\r\n\t\t\r\n\t\tint n;\r\n\t\t\r\n\t\tif(botMode) n = 2; \r\n\t\telse n = 1;\r\n\t\t\t\t\r\n\t\tscreen.setNumberOfPlayers(n);\r\n\t\tfor (int i=0; i<n; i++) {\r\n\t\t\tplayers.add(new Player());\r\n\t\t}\r\n\t\t\r\n\t\tscreen.addPlayers(players);\r\n\t\t//screen.start();\r\n\t\tscreen.setLevel(level);\r\n\t\tscreen.setMusic(music);\r\n\t\t\r\n\t\tgameFrame.add(screen);\r\n\t\tgameFrame.requestFocusInWindow();\r\n\r\n\t\t// aggiungo controllo da tastiera\r\n\t\tgameFrame.addKeyListener(players.get(0).getInputHandler());\r\n\t\tgameFrame.pack();\r\n\t\tgameFrame.setVisible(true);\r\n\t\t\t\t\r\n\t\t// avvio ciclo di gioco\r\n\t\tnew Thread(screen).start();\r\n\t\tscreen.setVisible(true);\r\n\t}", "public synchronized void startGame() {\n PreGameState preGameState = new PreGameState();\n pickTeamState = preGameState.startGame(players);\n state = State.PICK_TEAM;\n teamSelection = new HashSet<>();\n }", "public static void changeGameState(GameState state) {\n gameState = state;\n\n switch (state) {\n case START_STATE:\n mainPanel.removeAll();\n mainPanel.add(_welcome);\n mainPanel.revalidate();\n mainPanel.repaint();\n break;\n case GAME_STATE:\n mainPanel.removeAll();\n mainPanel.add(_gameWindow);\n mainPanel.revalidate();\n mainPanel.repaint();\n break;\n case GAME_END:\n _gameWindow.TextLog(String.format(\"\\n\\nThe winner is %s !!!!\\nThe End\", PlayersLoop.getPlayers().get(0)));\n _gameWindow.EndGame();\n break;\n default:\n System.out.println(\"UNKNOWN STATE!\");\n //todo logger.\n break;\n }\n }", "public void setNames() {\n\t\tPlayer1 = \"COMPUTER\";\n\t\tPlayer2 = JOptionPane.showInputDialog(null, \"Enter your Name:\");\n\t\tnames_set = true;\n\t}", "@Override\n\tpublic void setupName(GameEnvironment incomingGame) {\n\t\tthis.game = incomingGame;\n\t\tboolean state = true;\n\t\twhile(state == true) {\n\t\t\tSystem.out.println(\"Hey mate! What is your name?\");\n\t\t\ttry {\n\t\t\t\tString name = scanner.nextLine();\n\t\t\t\tif (name.matches(NAME_REGEX)) {\n\t\t\t\t\tstate = false;\n\t\t\t\t\tgame.setName(name);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(NAME_REQUIREMENTS);\n\t\t\t\t}\n\t\t\t} catch(Exception e){\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t}", "private void switchPlayer() {\n Player player;\n playerManager.switchPlayer();\n\n if(playerManager.getCurrentPlayer() == 1)\n player = playerManager.getPlayer(1);\n else if(playerManager.getCurrentPlayer() == 2)\n player = playerManager.getPlayer(2);\n else\n player = new Player(\"No Player exists\");\n\n updateLiveComment(\"Turn : \" + player.getName());\n }", "@FXML private void setToNewUser(){\n\t\tshowPassword();\n\t\tclearFields();\n\t\thideLackMessages();\n\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\tnewUser = true;\n\t}", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "private static void SetMode() {\n Enum[] modes = {Mode.SINGLEPLAYER, Mode.MULTIPLAYER};\r\n // setting GameMode by passing in array to validator which will prompt what Enum is wanted\r\n Game.GameMode = (Mode) Validator.Mode(modes);\r\n }", "private void startGame() {\n\t\tentities.clear();\n\t\tinitEntities();\n\t\t\n\t\t// blank out any keyboard settings we might currently have\n\t\tleftPressed = false;\n\t\trightPressed = false;\n\t\tfirePressed = false;\n\t}", "public void setGameStarted(boolean gameStarted) {\n this.gameStarted = gameStarted; \n }", "public void pauseGame(boolean state) {\r\n paused = state;\r\n }", "public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "@Override\n public void onPlay(GameState gameState) {\n gameState.promptActivityForLocation(this);\n\n }", "public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}", "private void startGame()\n {\n if (heroPlayer != null && antagonistPlayer != null && location != null && currentPlayerName != \"null\")\n {\n gameStarted = true;\n }\n }", "void markAsUserSession();", "void pauseGame() {\n myGamePause = true;\n }", "public void setArenaState(ArenaState arenaState) {\n this.arenaState = arenaState;\n MMGameStateChangeEvent gameStateChangeEvent = new MMGameStateChangeEvent(this, getArenaState());\n Bukkit.getPluginManager().callEvent(gameStateChangeEvent);\n }", "private void gameSetup(){\n\t\tboard.boardSetup();\n\t\tdirectionArray = setUpDirectionArray();\n\t\tcurrentPlayer = SharedConstants.PlayableItem.BLACK;\n\t\tcurrentState = SharedConstants.GameStatus.PLAYING;\n\t\tgameStateModel = new GameSateModel();\n\t\tloadGame = new GameStateRetriever();\n\t\tsaveGame = new GameStateWrter(connectFourModel.getGameStateModel());\n\t}", "public void setEndOfGame(boolean state) {\n this.endOfGame = state;\n }", "public void setCurrentUser(String username) {\n currentUser = username;\n }", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "@Override // com.android.server.wm.WindowContainer\n public void switchUser() {\n super.switchUser();\n this.mWmService.mWindowsChanged = true;\n this.mDisplayPolicy.switchUser();\n }", "public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }", "public String getUsernameState() {\r\n\t\treturn usernameState;\r\n\t}" ]
[ "0.69563764", "0.62579334", "0.6157723", "0.6097014", "0.6033271", "0.6009611", "0.59381205", "0.5905196", "0.5901207", "0.5895539", "0.5885928", "0.58677936", "0.5865031", "0.5864494", "0.58635986", "0.58575207", "0.5837692", "0.5768753", "0.5767677", "0.576297", "0.57528484", "0.5728067", "0.5726551", "0.5705115", "0.56988704", "0.56909615", "0.5674082", "0.5672455", "0.56654996", "0.56555533", "0.56332165", "0.5614189", "0.5610653", "0.5607521", "0.560715", "0.55910265", "0.5570197", "0.5569475", "0.55682033", "0.55382323", "0.5533758", "0.5523227", "0.55179197", "0.55120695", "0.5503621", "0.54939705", "0.5484888", "0.54777473", "0.54712117", "0.54698443", "0.54641694", "0.54639137", "0.545904", "0.54586875", "0.54571384", "0.5454263", "0.5451104", "0.54458815", "0.5440451", "0.54373175", "0.5433979", "0.5429793", "0.5426973", "0.54250896", "0.5409847", "0.54084027", "0.53985786", "0.5395437", "0.53950083", "0.5389662", "0.53886706", "0.538715", "0.5386986", "0.53856385", "0.53783244", "0.5378071", "0.5367121", "0.5364796", "0.5363393", "0.5358466", "0.53492576", "0.5346093", "0.5343963", "0.5340422", "0.53284425", "0.53229934", "0.5317357", "0.53139764", "0.53104055", "0.5310031", "0.5309095", "0.5306364", "0.5303816", "0.5300027", "0.52930874", "0.52924776", "0.5292039", "0.5283845", "0.5283572", "0.52826715" ]
0.685332
1
Set the userIO to be used for communicating with the client of this player.
public void setUserIO(UserIO userIO) { this.userIO = userIO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPlayerInputIO(EnginePlayerIO pIO){\n\t\tplayerIO = pIO;\n\t}", "public UserIO getUserIO() {\n\t\treturn this.userIO;\n\t}", "public void setPlayer2Txt(String user) {\n\t\tclientName = user;\n\t\tplayer2Txt.setText(clientName);\n\t}", "public UserCon()\n\t{\n\t\tfor (String s : Flags.userPrefs)\n\t\t\tprefs.put(s, false);\n\t\tcs = ConnState.PLAYING;\n\t\tisDummy = true;\n\t\tch = null;\n\t}", "public void setUser(String user) {\r\n this.user = user;\r\n }", "public UserLibraryView(UserIO io) {\n this.io = io;\n }", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUserInterface(ReturnBookUI userInterface) {\n\t\tif (!state.equals(ControlState.getInitialized)) { //Changed instance sTaTe to state\r\n\t\t\tthrow new RuntimeException(\"ReturnBookControl: cannot call setUI except in INITIALISED state\");\r\n\t\t}\t\r\n\t\tthis.userInterface = userInterface;\r\n\t\tuserInterface.setState(ReturnBookUI.UI_STATE.READY); //Changed method name to verb starting with lowercase and in camelBack\r\n\t\tstate = ControlState.READY;\t\t\r\n\t}", "public EnginePlayerIO getPlayerInputIO(){\n\t\treturn playerIO;\n\t}", "public void setUser(String user) {\n\t\t\tthis.user = user;\n\t\t}", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setUser(String user)\n {\n _user = user;\n }", "public static void setConnectedUser( HttpServletRequest request, User user )\r\n\t{\r\n\t\trequest.getSession().setAttribute( \"connectedUser\", user );\r\n\t}", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "public void setUser(Motile user) {\n\n this.user = user;\n }", "public UserHandler(Execute exec, Socket connection, Socket KillSwitch, CLIENTTYPE TYPE) {\r\n\t\tthis.exec = exec;\r\n\t\tthis.scan = exec.scan;\r\n\t\tthis.engine = exec.engine;\r\n\t\tthis.Client = connection;\r\n\t\tthis.TYPE = TYPE;\r\n\t\t// Attempt to form data streams to connect player to the server\r\n\t\ttry {\r\n\t\t\tFromClient = new DataInputStream(Client.getInputStream());\r\n\t\t\tToClient = new DataOutputStream(Client.getOutputStream());\r\n\t\t\t// Send Client Type to Client as a notification to know what client type to run\r\n\t\t\tToClient.writeUTF(TYPE.getTYPENAME());\r\n\t\t\tif (TYPE != CLIENTTYPE.OBSERVER) {\r\n\t\t\t\tToClient.writeUTF(engine.GetSpellOptionsCSV());\r\n\t\t\t}\r\n\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"\\nError getting the data streams created. Possible loss in connection\");\r\n\t\t}\r\n\t\tif(TYPE == CLIENTTYPE.HOST) {\r\n\t\t\tengine.AddHostKSocket(KillSwitch);\r\n\t\t} else if(TYPE == CLIENTTYPE.PLAYER) {\r\n\t\t\tengine.AddPlayerKSocket(KillSwitch);\r\n\t\t}\r\n\t}", "private void setPlayer() {\n player = Player.getInstance();\n }", "public void setUser(java.lang.String user) {\n this.user = user;\n }", "public void setUser(String paramUser) {\n\tstrUser = paramUser;\n }", "public void setUser(final String user)\n {\n checkImmutable();\n this.user = user;\n }", "private void SetCurrentPlayer() throws IOException\n {\n if( mTeamsComboBox.getSelectedItem() != null )\n {\n String team = mTeamsComboBox.getSelectedItem().toString();\n String position = mPositionComboBox.getSelectedItem().toString();\n String playerData = GetPlayerString(team, position);\n if( playerData != null )\n SetPlayerData(playerData);\n }\n }", "@Override\n public void setUsername() {\n try {\n JCheckBox botCheckBox = (JCheckBox) logIn.getComponent(5);\n bot = botCheckBox.isSelected();\n if(bot) {\n try {\n int thinkingTime = Integer.parseInt((String) JOptionPane.showInputDialog(frame, \"Please enter the AI thinking time in seconds\", \"Thinking time\", JOptionPane.INFORMATION_MESSAGE, null, null, 0));\n client.setThinkintTime(thinkingTime);\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(frame, \"Set thinking time to 0\", \"Illegal input\", JOptionPane.ERROR_MESSAGE);\n client.setThinkintTime(0);\n }\n }\n username = ((JTextField) logIn.getComponent(3)).getText();\n client.setName(username);\n if(serverBrowser == null) {\n serverList();\n } else {\n frame.setContentPane(serverBrowser);\n ((JLabel)((JPanel) serverBrowser.getComponent(0)).getComponent(0)).setText(username);\n }\n } catch (IllegalNameException e) {\n JOptionPane.showMessageDialog(frame, \"Invalid name, please do not use ';' in your name.\", \"Ilegal username\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public GameHandler(Socket cs) {\r\n try {\r\n ous = new ObjectOutputStream(cs.getOutputStream());\r\n ois = new ObjectInputStream(cs.getInputStream());\r\n try {\r\n Request request = (Request) ois.readObject();\r\n if (request.getType() == Setting.REG || request.getType() == Setting.LOGIN || request.getType() == Setting.FBLOG) {\r\n user = (User) request.getObject();\r\n if (request.getType() == Setting.LOGIN) {\r\n user = UserController.login(user);\r\n\r\n } else if (request.getType() == Setting.REG) {\r\n user = UserController.register(user);\r\n\r\n } else if (request.getType() == Setting.FBLOG) {\r\n user = UserController.fbLogin(user);\r\n System.out.println(\"\" + user.getImg());\r\n Image image = new Image(user.getImg());\r\n saveToFile(image, \"\" + image.toString(), user);\r\n }\r\n\r\n if (user.getId() != 0 && !checkAlreadyLogin(user)) {\r\n\r\n clientsVector.add(this);\r\n // if register or login is ok send list off available players to client \r\n this.ous.flush();\r\n this.ous.reset();\r\n user.setStatus(Setting.AVAILABLE);\r\n //////////// Update server list ////////////////\r\n if (request.getType() == Setting.REG) {\r\n Platform.runLater(() -> {\r\n try {\r\n ServerTicTacServer.items.add(user);\r\n } catch (Exception e) {\r\n System.out.println(\"servertictacserver items \");\r\n e.printStackTrace();\r\n }\r\n });\r\n }\r\n if (request.getType() == Setting.LOGIN) {\r\n ServerTicTacServer.updateServerList(user);\r\n }\r\n ServerTicTacServer.usersList.refresh();\r\n ////////////////////////////////////////////////\r\n request.setType(Setting.REG_OK);\r\n\r\n List availablePlayerList = new ArrayList<User>();\r\n for (GameHandler gameHandler : clientsVector) {\r\n if (gameHandler.user != null && gameHandler.user.getId() != user.getId()) {\r\n availablePlayerList.add(gameHandler.user);\r\n }\r\n }\r\n Object[] objects = {availablePlayerList, user};\r\n request.setObject(objects);\r\n System.out.println(\"ssssssssssssss :\" + user.getName());\r\n this.ous.writeObject(request);\r\n this.ous.flush();\r\n this.ous.reset();\r\n request.setType(Setting.ADD_PLAYER_TO_AVAILABLE_LIST);\r\n request.setObject(user);\r\n brodCast(request);\r\n start();\r\n } else {\r\n\r\n // error in registration or login >> send to client error message\r\n if (request.getType() == Setting.REG) {\r\n\r\n request.setType(Setting.REG_NO);\r\n request.setObject(\"email already exist\");\r\n } else if (checkAlreadyLogin(user)) {\r\n request.setType(Setting.LOGIN_NO);\r\n request.setObject(\"That account is already login\");\r\n } else if (request.getType() == Setting.LOGIN) {\r\n request.setType(Setting.LOGIN_NO);\r\n request.setObject(\"incorrect username or passsword\");\r\n\r\n }\r\n\r\n this.ous.writeObject(request);\r\n this.ous.flush();\r\n this.ous.reset();\r\n ous.close();\r\n ois.close();\r\n cs.close();\r\n }\r\n }\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"construct gamehandler exception\");\r\n //Logger.getLogger(GameHandler.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public void setChatSession(IoSession s) {\n\t\tm_chatSession = s;\n\t}", "public void setUserType(Byte userType) {\r\n this.userType = userType;\r\n }", "public void setUserType(Byte userType) {\n this.userType = userType;\n }", "public void setIo(MapReader io) {\n\t\tthis.io = io;\n\t}", "@Override\n public void setUserUuid(java.lang.String userUuid) {\n _partido.setUserUuid(userUuid);\n }", "public void setTxtUser(String txtUser) {\n this.txtUser.setText(txtUser);\n }", "public void setImage(String userId){\n\t\tImageIcon icon = new ImageIcon(\"image/\" + userId + \".png\");\n\t\ticon.setImage(icon.getImage().getScaledInstance(icon.getIconWidth(),\n\t\ticon.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tplayerImage = icon.getImage();\n\t\tpaint(this.getGraphics());\n\t}", "public Handler_ClientChat(Socket clientSocket, PrintWriter user) \r\n\t\t{\r\n\t\t\tPrintWriter_client = user;\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tsocket_1 = clientSocket;\r\n\t\t\t\t\r\n\t\t\t\tInputStreamReader isReader = new InputStreamReader(socket_1.getInputStream());\r\n\t\t\t\tbuff_reader = new BufferedReader(isReader);\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) \r\n\t\t\t{\r\n\t\t\t\tChat.append(\"Unlooked-for Error... \\n\");\r\n\t\t\t}\r\n\t\t}", "public void setUserData(Object userData) {\n this.userData = userData;\n }", "public void setCurrentUser(int userNum) {\n\t\tuserTurn = userNum;\n\t}", "public void setUserData (Object userData) {\n\t\tthis.userData = userData;\n\t}", "public void setUserNick(String userNick) {\r\n this.userNick = userNick;\r\n }", "public void setUser(User user) {\r\n this.user = user;\r\n }", "public static void setUserForCurrentThread(String user) {\r\n userPerThread.set(user);\r\n }", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "protected void setUsername(final String user) {\n this.user = user;\n }", "public void setUser(UserData data) {\n user = data;\n }", "void setOsU( String osU );", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "@Override // com.android.server.wm.WindowContainer\n public void switchUser() {\n super.switchUser();\n this.mWmService.mWindowsChanged = true;\n this.mDisplayPolicy.switchUser();\n }", "public void setOwner(User owner) {\n this.owner = owner;\n }", "public void setUser(UserModel user) {\n this.sender = user;\n }", "public void setUser(User user) {\n\tthis.user = user;\n }", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "public void setUser(int U)\t\n\t{\t//start of setUser mehtod\n\t\tuserNum = U;\n\t}", "@Override\n public boolean setLoggedUser(User user) \n {\n try\n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\user.ser\");\n \n File file_remember_me = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n if(!file_remember_me.exists()) file.deleteOnExit();\n \n FileOutputStream fout = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fout); \n oos.writeObject(user);\n oos.close();\n\t}\n catch(Exception ex){ ex.printStackTrace();return false;}\n \n return true;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public RWClient(Socket usr, String name, boolean t, ObjectInputStream ois, Client cl){\n this.usr = usr;\n this.username = name;\n this.write = t;\n this.client = cl;\n this.ois = ois;\n }", "public void setUserPart(MtpUser mtpUser) {\n this.mtpUser = mtpUser;\n }", "public static void setUserClient(UserClient userClient) {\n if (userClient == null) {\n throw new IllegalArgumentException();\n }\n USER_CLIENT = userClient;\n }", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setTcpSession(IoSession s) {\n\t\tm_tcpSession = s;\n\t}", "public void setPlayer(ViewerManager2 player) {\n this.player = player;\n // the player is needed to be existent befor starting up the remote Server\n //startRemoteServer();\n\n }", "public void setUi(GamePanel ui) {\n this.ui = ui;\n }", "public IRCSocketManager setUser(String newUser)\n\t{\n\t\tif (newUser == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Name cannot be null.\");\n\t\t}\n\t\t\n\t\tthis._user = newUser;\n\t\treturn this;\n\t}", "@ReactMethod\n public void setUseConnectionService(final boolean use) {\n runInAudioThread(new Runnable() {\n @Override\n public void run() {\n useConnectionService_ = use;\n setAudioDeviceHandler();\n }\n });\n }", "@Override public void setBio(User user, String bioText) throws RemoteException, SQLException {\r\n gameListClientModel.clientSetBio(user, bioText);\r\n }", "@Override\n public final void switchUserMode() {\n }", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", "public void setoPlayer(Player oPlayer) {\n\t\tthis.oPlayer = oPlayer;\n\t}", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public void setUser(String user) {\n\t\tthis.user = user;\n\t\t// BUG Fix submitted by Lamine Brahimi \n\t\t// add this (taken form sip_messageParser)\n\t\t// otherwise comparison of two SipUrl will fail because this\n\t\t// parameter is not set (whereas it is set in sip_messageParser).\n\t\tif (user != null\n\t\t\t&& (user.indexOf(POUND) >= 0 || user.indexOf(SEMICOLON) >= 0)) {\n\t\t\tsetUserType(TELEPHONE_SUBSCRIBER);\n\t\t} else {\n\t\t\tsetUserType(USER);\n\t\t}\n\t}", "public void setUserType(UserType userType) {\n\t\tthis.userType = userType;\n\t\tif (userType != CustomerControl.dummyUserType)\n\t\t\tthis.userTypeID=userType.getUserTypeID();\n\t}", "public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }", "public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }", "public void setUser(User user) { this.user = user; }", "public void setUserSerial(String userSerial) {\n this.userSerial = userSerial;\n }", "private void setUser(HttpServletRequest req, Request sensorReq) {\n\t\tObject userObject = req.getAttribute(\"__user\");\n\t\tif ( null == userObject) \n\t\t{\n\t\t\tsensorReq.setUser(UserProfile.getAnonymous());\n\t\t} \n\t\telse \n\t\t{\n\t\t\tsensorReq.setUser((UserProfile) userObject);\n\t\t}\n\t}", "public void setUserItem(UserItem userItem) {\n attributes.put(KEY_USER_ITEM, userItem);\n this.getHttpRequest().setAttribute(KEY_USER_ITEM, userItem);\n }", "public void setIdUser(Integer idUser) {\r\n\t\tthis.idUser = idUser;\r\n\t}", "@Override\r\n public void onUserSet(GenericDevice dev, PDeviceHolder devh, PUserHolder us) {\n\r\n }", "public final void setOutputPeer(final WebSocketServerOutputStream op) {\n this.outputPeer = op;\n }", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "@Override\n public void setUserData(final Object userData) {\n this.userData = userData;\n }", "public void setUser(Long user) {\n this.user = user;\n }", "public void setAudioPlayer(AudioPlayer player) {\n\taudioPlayer = player;\n externalAudioPlayer = true;\n }", "@Override\r\n\tpublic void setTheOwner(Player owner) {\n\t\t\r\n\t}", "public void setClient(ConnectionToClient client) {\n this.client = client;\n }", "public void setDatabaseUser(String sDatabaseUser) throws IOException;", "public void setIOType(final String iOTypeValue) {\n this.iOType = iOTypeValue;\n }", "public void setSwitchingToSystemUserMessage(String switchingToSystemUserMessage) {\n synchronized (this.mLock) {\n this.mSwitchingToSystemUserMessage = switchingToSystemUserMessage;\n }\n }", "public void setIOType(final String iOTypeValue) {\n this.iOType = iOTypeValue;\n }" ]
[ "0.66303486", "0.61887527", "0.57513636", "0.56434387", "0.5634971", "0.5603959", "0.5561666", "0.55589306", "0.55589306", "0.55589306", "0.55589306", "0.5464309", "0.544634", "0.54277945", "0.5398934", "0.5393416", "0.53856874", "0.53763", "0.53763", "0.5374323", "0.5361267", "0.53493536", "0.53469914", "0.5326833", "0.5313243", "0.52976793", "0.52833515", "0.52791464", "0.526318", "0.5254774", "0.524536", "0.5243965", "0.5216722", "0.5209625", "0.51809", "0.51747525", "0.51723343", "0.51630634", "0.5158559", "0.51473176", "0.51462436", "0.5140042", "0.51243454", "0.5120899", "0.51191854", "0.5111611", "0.5110408", "0.5106165", "0.5100947", "0.5100613", "0.5092279", "0.5083434", "0.5071054", "0.505781", "0.50560325", "0.5029159", "0.5022557", "0.5022557", "0.5022557", "0.50156254", "0.5011462", "0.5008936", "0.50083536", "0.50083536", "0.5003088", "0.5002812", "0.50020164", "0.50019157", "0.49939284", "0.49909288", "0.49794647", "0.49587145", "0.49554768", "0.4952463", "0.49505392", "0.49432856", "0.4937277", "0.49312046", "0.49309868", "0.49296954", "0.49259162", "0.4923749", "0.4920005", "0.49140593", "0.49100184", "0.49068344", "0.49068344", "0.49068344", "0.49068344", "0.49068344", "0.49068344", "0.48981264", "0.48935422", "0.48874295", "0.48845595", "0.48758462", "0.4872488", "0.4872323", "0.486033", "0.4853684" ]
0.7728936
0
Queries Checks if is bot.
public boolean isBot() { // return this.getUserIO().checkConnection(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isIsQuery();", "public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "boolean hasQuery();", "public void queryServer()\n {\n if(!getPassword().equals(getPasswordConfirm()))\n {\n Toast.makeText( (getActivity() ) .getBaseContext(), \"Password Mismatch.\", Toast.LENGTH_SHORT).show();\n passwordEdit.setText(\"\");\n passwordConfirmEdit.setText(\"\");\n }\n else if(!noNullUserInput())\n {\n //TODO highlight unfished fields.\n Toast.makeText( (getActivity() ) .getBaseContext(), \"Finish filling out the data!\", Toast.LENGTH_SHORT).show();\n }\n else if(Model.instance().getServerHost() == null || Model.instance().getServerHost() == null )\n {\n ((FamilyMap) getActivity() ).createServerInfoQuery(this); //easy...\n }\n else\n {\n //try it out. if it fails\n WebAccess wa = new WebAccess();\n RegisterRequest rr = new RegisterRequest(this.getUserName(),this.getPassword(),this.getEmail(), this.getFirstName(), this.getLastName(), this.getGender());\n wa.execute(rr);\n deactivateButtons();\n }\n }", "Query query();", "boolean hasQueryMessage();", "Query queryOn(Connection connection);", "boolean isOQL();", "protected boolean isQueryAvailable() {\n return query != null;\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n\n new Clientes().execute(query);\n Toast.makeText(c, query,\n Toast.LENGTH_SHORT).show();\n\n return false;\n }", "public boolean isBot(){\n return false;\n }", "public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }", "public void executeBot(){\n if(botSignal){\n if(bot != null){\n bot.execute();\n }\n }\n botSignal=false;\n }", "public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);", "public void Query() {\n }", "public boolean queryRepository() {\n return !pathQueryDependencies.isEmpty() && repositoryUrl != null;\n }", "void runQueries();", "IQuery getQuery();", "public boolean hasQuery() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean hasQuery() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public void run() {\n List<Map> queries = (List<Map>) server.get(\"queries\");\n Connection connection = null;\n if (queries != null && !queries.isEmpty()) {\n String dbServerDisplayName = (String) server.get(\"displayName\");\n try {\n long timeBeforeConnection = System.currentTimeMillis();\n connection = getConnection();\n long timeAfterConnection = System.currentTimeMillis();\n logger.debug(\"Time taken to get Connection: \" + (timeAfterConnection - timeBeforeConnection));\n\n logger.debug(\"Time taken to get Connection for \" + dbServerDisplayName + \" : \" + (timeAfterConnection - timeBeforeConnection));\n\n if (connection != null) {\n logger.debug(\" Connection successful for server: \" + dbServerDisplayName);\n for (Map query : queries)\n executeQuery(connection, query);\n } else {\n\n logger.debug(\"Null Connection returned for server: \" + dbServerDisplayName);\n }\n\n } catch (SQLException e) {\n logger.error(\"Error Opening connection\", e);\n status = false;\n } catch (ClassNotFoundException e) {\n logger.error(\"Class not found while opening connection\", e);\n status = false;\n } catch (Exception e) {\n logger.error(\"Error collecting metrics for \"+dbServerDisplayName, e);\n status = false;\n }\n finally {\n try {\n if (connection != null) {\n closeConnection(connection);\n }\n } catch (Exception e) {\n logger.error(\"Issue closing the connection\", e);\n }\n }\n }\n }", "private boolean _autoShowQuery() throws SessionException \n {\n \n\t long sleeptime = 5000; //5 seconds\n \n //---------------------------\n \n //we don't use this client any more, so get rid of it\n if (this._client != null && this._client.isLoggedOn())\n this._client.logout();\n \n //---------------------------\n \n //get options sg, ft - remember ft might be null\n String serverGroup = (String) this._argTable.get(CMD.SERVERGROUP);\n String filetype = (String) this._argTable.get(CMD.FILETYPE);\n String outputDir = (String) this._argTable.get(CMD.OUTPUT);\n \n if (outputDir == null)\n {\n outputDir = System.getProperty(\"user.dir\");\n this._argTable.put(CMD.OUTPUT, outputDir);\n }\n \n //---------------------------\n \n boolean loggerInitError = !_initSessionLogging(\n \"FeiQ Notification\",\n \"FeiQ Notification Report\");\n if (loggerInitError) \n return false;\n \n //--------------------------- \n\n //get the invoke command string\n String invoke = (String) this._argTable.get(CMD.INVOKE);\n if (invoke != null) {\n invoke.trim();\n if (invoke.length() == 0)\n invoke = null;\n }\n\n //set exit on error flag\n boolean exitOnError = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEEXITONERROR) != null)\n exitOnError = true;\n\n //set invoke async flag\n boolean invokeAsync = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEASYNC) != null)\n invokeAsync = true;\n \n //---------------------------\n \n //check format option, and build new formatter, using default if\n //format value is null\n String format = (String) this._argTable.get(CMD.FORMAT);\n this._dateFormatter = new DateTimeFormatter(format); \n\n //---------------------------\n \n String msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + \"Subscribing to [\" + serverGroup + \"] server group.\\n\";\n\n if (this._mailmessage)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n //---------------------------\n \n boolean success = true;\n boolean newconnection = false;\n boolean timeToExit = false;\n\n //---------------------------\n \n //create copy of options for query client\n final Map qOptions = (Map) this._argTable.clone(); \n QueryResultsCollector starScream = createClientCollector(qOptions, Constants.AUTOSHOWFILES);\n this._queryClient = starScream.getClient();\n \n //start the query subscription\n this._logger.debug(\"Starting subscription on query client\");\n int xid = this._queryClient.subscribeQuery();\n \n //---------------------------\n \n //launch subscription client on own thread\n Thread subThread = new Thread(starScream);\n subThread.setName(\"Query_Result_Collector:\"+serverGroup);\n subThread.start();\n \n //---------------------------\n \n //check to see if we bundle results so that they are retrived\n //per filetype, or all files in results in seqential time order\n boolean bundleResults = Utils.bundleResultsByFiletype();\n \n //enter loop, while collector has work to do, keep going\n while (starScream.isActive()) \n {\n long issueTime = System.currentTimeMillis();\n \n //---------------------------\n \n //if no results available, then go to sleep\n if (starScream.isResultAvailable())\n {\n List<String> filetypes = starScream.getResultKeys();\n List<Result> allResults = starScream.getAllResults();\n \n if (bundleResults)\n {\n \t \n \t //if bundle, then create a reordered list that combines\n \t //same filetype'd results\n List<Result> reorderedResults = new ArrayList<Result>();\n for (int i = 0; i < filetypes.size(); ++i)\n {\n String ft = filetypes.get(i);\n List<Result> resultList = starScream.getResultsForFiletype(ft);\n reorderedResults.addAll(resultList); \n }\n \n //now we can process the reordered results\n allResults = reorderedResults; \n }\n \n \n for (Result result : allResults)\n { \n String ft = result.getType();\n String filename = result.getName();\n \n boolean proceed = _handleNewFile(result, outputDir, \n invoke, exitOnError, \n invokeAsync,\n Constants.AUTOSHOWFILES);\n if (!proceed)\n {\n timeToExit = true;\n break;\n }\n \n //invoke event handlers\n this._triggerFileResultEvent(Constants.AUTOSHOWFILES, result);\n \n result.commit();\n starScream.remove(ft, result.getName());\n }\n \n // if timeToExit was set, break out of outer loop\n if (timeToExit)\n break;\n } //end_if_results \n \n //if we have the same connection, check if we should nap\n this._logger.debug(\"Waiting for new files...\");\n try {\n //assume we are gonna sleep...\n boolean shouldSleep = true;\n while(shouldSleep)\n {\n //check to see if we really should sleep\n this._logger.debug(\"Checking for results from query\"); \t \n shouldSleep = !starScream.isResultAvailable();\n shouldSleep = shouldSleep && this._queryClient.isAlive();\n if (shouldSleep)\n Thread.sleep(sleeptime);\n }\n } catch (InterruptedException e) {\n break; // exit the infinite loop and return\n }\n \n } //end_while_starscream_active\n \n \n //---------------------------\n \n //close query client\n if (this._queryClient != null && this._queryClient.isAlive())\n this._queryClient.close();\n \n //---------------------------\n \n return success;\n }", "protected boolean query() {\r\n\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()) + processQueryAuthor(queryBk.getCreator())\r\n\t\t\t\t+ processQueryPublisher(queryBk.getPublisher()));\r\n\t\tSystem.out.println(queryStr);\r\n\t\t// if edition is 'lastest' (coded '0'), no query is performed; and\r\n\t\t// return false.\r\n\t\tif (queryBk.parseEdition() == 0) {\r\n\t\t\treturn false;\r\n\t\t} // end if\r\n\r\n\t\t/*\r\n\t\t * The following section adds edition info to the query string if edition no. is\r\n\t\t * greater than one. By cataloging practice, for the first edition, probably\r\n\t\t * there is NO input on the associated MARC field. Considering this, edition\r\n\t\t * query string to Primo is NOT added if querying for the first edition or no\r\n\t\t * edition is specified.\r\n\t\t */\r\n\t\tif (queryBk.parseEdition() > 1) {\r\n\t\t\tqueryStr += processQueryEdition(queryBk.parseEdition());\r\n\t\t} // end if\r\n\r\n\t\t/*\r\n\t\t * Querying the Primo X-service; and invoking the matching processes (all done\r\n\t\t * by remoteQuery()).\r\n\t\t */\r\n\t\tif (strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\t/*\r\n\t\t * For various reasons, there are possibilities that the first query fails while\r\n\t\t * a match should be found. The follow work as remedy queries to ensure the\r\n\t\t * accuracy.\r\n\t\t */\r\n\r\n\t\tif (!match && strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\tqueryStr = new String(\r\n\t\t\t\t\tprocessQueryPublisher(queryBk.getPublisher()) + processQueryAuthor(queryBk.getCreator()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match) {\r\n\t\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()) + processQueryAuthor(queryBk.getCreator()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match) {\r\n\t\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match && strHandle.hasSomething(queryBk.getPublishYear())) {\r\n\t\t\tqueryStr = new String(\r\n\t\t\t\t\tprocessQueryAuthor(queryBk.getCreator()) + processQueryYear(queryBk.getPublishYear()));\r\n\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match) {\r\n\t\t\tqueryStr = new String(\r\n\t\t\t\t\tprocessQueryAuthor(queryBk.getCreator()) + processQueryTitleShort(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\t// Additional query for Chinese titles\r\n\r\n\t\tif (!match && (CJKStringHandling.isCJKString(queryBk.getTitle())\r\n\t\t\t\t|| CJKStringHandling.isCJKString(queryBk.getCreator())\r\n\t\t\t\t|| CJKStringHandling.isCJKString(queryBk.getPublisher()))) {\r\n\r\n\t\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\r\n\t\t\tif (!match && queryBk.parseEdition() != -1) {\r\n\t\t\t\tqueryStr = new String(\r\n\t\t\t\t\t\tprocessQueryTitle(queryBk.getTitle()) + processQueryEdition2(queryBk.parseEdition()));\r\n\t\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t\tsetBookInfo();\r\n\t\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (!match && queryBk.parseEdition() != -1) {\r\n\t\t\t\t\tqueryStr = new String(\r\n\t\t\t\t\t\t\tprocessQueryTitle(queryBk.getTitle()) + processQueryEdition3(queryBk.parseEdition()));\r\n\t\t\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\t\t\tmatch = true;\r\n\t\t\t\t\t\tsetBookInfo();\r\n\t\t\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmatch = false;\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\t// Additional check for ISO Document number in <search> <genernal> PNX\r\n\t\t// tag\r\n\t\tif (!match && !CJKStringHandling.isCJKString(queryBk.getTitle())) {\r\n\t\t\tqueryStr = new String(processQueryTitleISODoc(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t\terrMsg += \"Query: No record found on Primo.\" + Config.QUERY_SETTING;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\t\treturn false;\r\n\t}", "public boolean isBot() {\n \t\treturn (type == PLAYER_BOT);\n \t}", "public static void queriedCheckForUpdate(Activity context) {\n\n // Get tracker\n Tracker tracker = ((GlobalEntity) context.getApplicationContext())\n .getTracker(TrackerName.APP_TRACKER);\n if (tracker == null) {\n return;\n }\n\n // Build and send an Event\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Check For Update\")\n .setAction(\"queryCheckForUpdate\")\n .setLabel(\"queryCheckForUpdate\").build());\n }", "public boolean getBot() {\n return bot;\n }", "Boolean callAskQuery(String name, Map<String, String> params);", "boolean hasQueryPort();", "boolean hasQueryVisibility();", "public List<OwnerQueryStatsDTO> getQueries() {\n\t\tif (queries == null) {\n\t\t\ttry (Config config = ConfigFactory.get()) {\n\n\t\t\t queries = DbUtil.getOwnerQueries(config, userBean.getUserId(), getFilterTerms(),\n\t\t\t\t\t flagFilter);\n\t\t\t\tsortQueries();\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn queries;\n\t}", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public static void phoneAdmin(){\r\n\r\n\r\n try (Connection c = getConnection()) {\r\n\r\n // String sql = \"SELECT * FROM sms.phones when PhoneNumber = 79827956841 \" ;\r\n String sql = \"SELECT * from sms_log.users where username = 'Pedro'\";\r\n PreparedStatement ps = c.prepareStatement(sql);\r\n\r\n\r\n try (ResultSet rs = ps.executeQuery()) {\r\n if (rs.next()) {\r\n isPhoneAdminExists = true;\r\n\r\n\r\n }\r\n\r\n adminSmsRid();\r\n }\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (isPhoneAdminExists) {\r\n\r\n\r\n blackList();\r\n\r\n\r\n\r\n }\r\n\r\n }", "Bot getBotByBotId(String botId) throws CantGetBotException;", "public boolean isCallQueryMechanism() {\n return false;\n }", "public boolean isOkToQuery(String id){\n try{\n queryTextbook(id);\n return true;\n }catch (RuntimeException e){\n e.printStackTrace();\n return false;\n }\n }", "boolean hasQueryAuthorizations();", "String getAskQuery(String... args);", "public static boolean askModel(String szQuery, String Url) {\t \n\t\tQuery query = QueryFactory.create(szQuery) ;\n\t\tQueryExecution qexec = QueryExecutionFactory.sparqlService(Url, query);\n\t\t \n\t\tboolean b = qexec.execAsk();\n\t\treturn b;\n\t}", "public int getType() {\n return Command.TYPE_QUERY;\n }", "private static void testConnection(GraknSession session) {\n try (GraknGraph graph = session.open(GraknTxType.READ)) {\n\n // construct a match query to find people\n MatchQuery query = graph.graql().match(var(\"x\").isa(\"mirna\"));\n\n // execute the query\n List<Answer> result = query.limit(10).execute();\n\n // if there is no data throw error\n if (result.isEmpty()) {throw new RuntimeException(\"Expected data is not present in the graph.\");}\n System.out.println(\"Connection OK.\");\n }\n }", "String query();", "private void checkInlineQueries() throws Exceptions.OsoException, Exceptions.InlineQueryFailedError {\n Ffi.Query nextQuery = ffiPolar.nextInlineQuery();\n while (nextQuery != null) {\n if (!new Query(nextQuery, host).hasMoreElements()) {\n String source = nextQuery.source();\n throw new Exceptions.InlineQueryFailedError(source);\n }\n nextQuery = ffiPolar.nextInlineQuery();\n }\n }", "boolean hasQueryId();", "boolean hasQueryId();", "public void queryServer() {\n final String lastTime = \"2020-11-17 00:00:00\";\n final OkHttpClient client = HttpHelper.getOkHttpClient();\n final RequestBody requestBody = new FormBody.Builder()\n .add(Config.STR_TIME, lastTime)\n .build();\n final Request request = new okhttp3.Request.Builder()\n .post(requestBody)\n .url(Config.URL_TALK_QUERY)\n .build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(@NonNull Call call, @NonNull IOException e) {\n uniApiResult.postValue(new UniApiResult.Fail(Config.ERROR_NET, Arrays.toString(e.getStackTrace())));\n Log.e(\"Contacts\", Config.ERROR_NET);\n }\n @Override\n public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {\n if( !response.isSuccessful() ) {\n uniApiResult.postValue(new UniApiResult.Fail(Config.ERROR_NET, String.valueOf(response.code())));\n return;\n }\n assert response.body() != null;\n String resJson = response.body().string();\n try {\n JSONObject jsonO = new JSONObject(resJson);\n uniApiResult.postValue(new UniApiResult<>(jsonO.getString(Config.STR_STATUS), \"\"));\n\n JSONArray jsonA = (JSONArray) jsonO.get(Config.STR_STATUS_DATA);\n// List<TMessage> newTMessages = new ArrayList<>();\n for (int i = 0; i < jsonA.length(); ++i) {\n TMessage message = TMessage.jsonToTMessage((JSONObject) jsonA.get(i));\n if (!tMessageDao.isMessageExist(message.getAccount1(), message.getAccount2(),message.getSendTime())) {\n tMessageDao.InsertMessage(message);\n// newTMessages.add(message);\n }\n }\n// TMessageList.postValue(newTMessages);\n ThreadPoolHelper.getInstance().execute(TalkViewModel.this::queryLocalMessageList);\n //new Thread(TalkViewModel.this::queryLocalMessageList).start();\n } catch (JSONException e) {\n e.printStackTrace();\n uniApiResult.postValue(new UniApiResult.Fail(Config.ERROR_UNKNOWN, Arrays.toString(e.getStackTrace())));\n }\n }\n });\n }", "private Queries() {\n // prevent instantiation\n }", "boolean hasFindGamesRequest();", "public String getPingQuery()\n {\n return _pingQuery;\n }", "boolean not_query(DiagnosticChain diagnostics, Map<Object, Object> context);", "public boolean isStatementQueryMechanism() {\n return true;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "private void executeQuery() {\n }", "boolean hasQueryAddress();", "private void querys() {\n\t try {\r\n\t\tBoxYieldRptFactory.getRemoteInstance().SteDate();\r\n\t } catch (EASBizException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t } catch (BOSException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "pb4server.QueryInfoByWorldAskReq getQueryInfoByWorldAskReq();", "@Override\n public boolean onQueryTextSubmit(String query) {\n queryMain = query;\n consultarDb();\n return true;\n }", "public void requestBot(String s) {\n\t\tLEDManager.requestConnection(s);\n\t}", "java.util.List<WorldUps.UQuery> \n getQueriesList();", "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "void bot_check_on_user() { // using Watson Speech-to-Text and text-to-Speech functions\r\n String output;\r\n String input;\r\n output: \"Are you okay?\";\r\n input = get voice input;\r\n if (input = \"Yes I’m okay.\") {} // nothing to do\r\n else if (input = \"A bit unwell.\") {\r\n output = \"Please list your symptoms.\";\r\n String symptoms;\r\n symptoms = get voice input;\r\n CFR_check(symptoms);\r\n }\r\n else if (input = …(no sound)) {\r\n CFR_check(\"No response, might be unconscious.\");\r\n else output : \"Please repeat.\";\r\n }", "boolean hasQueryLogicName();", "public void queryAccelerometerData()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(serverRequestStatus==true)\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcheckApi();\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "WorldUps.UQuery getQueries(int index);", "public boolean hasQueryMessage() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@Override\n public void readyToSend(Connection ignoreMe) {\n sendQuery(connection, query);\n }", "public java.util.List<WorldUps.UQuery> getQueriesList() {\n if (queriesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(queries_);\n } else {\n return queriesBuilder_.getMessageList();\n }\n }", "public void run() {\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }", "@Override\n\t\t\tpublic Boolean execute() throws EvrythngException {\n\t\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\t\ttry {\n\t\t\t\t\t// Execute request (response status code will be automatically checked):\n\t\t\t\t\treturn command.execute(client) != null;\n\t\t\t\t} finally {\n\t\t\t\t\tcommand.shutdown(client);\n\t\t\t\t}\n\t\t\t}", "public boolean querySql(String sql){\r\n boolean result = true;\r\n try{\r\n stm = con.createStatement();\r\n rss = stm.executeQuery(sql);\r\n }catch(SQLException e){\r\n report = e.toString();\r\n result = false;\r\n }\r\n return result;\r\n }", "public WorldUps.UQueryOrBuilder getQueriesOrBuilder(\n int index) {\n if (queriesBuilder_ == null) {\n return queries_.get(index); } else {\n return queriesBuilder_.getMessageOrBuilder(index);\n }\n }", "public static ResultSet query(String command) {\r\n\t\tif (isConnected()) try {\r\n\t\t\tConsole.sql(command);\r\n\t\t\treturn con.createStatement().executeQuery(command);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "WorldUps.UQueryOrBuilder getQueriesOrBuilder(\n int index);", "boolean hasQueryName();", "public boolean getEnableGraphQueries() {\n return enableGraphQueries;\n }", "public boolean hasQueryMessage() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "protected void queryMsg() {\n\t\tif (currentPosition == 0) {//LIVE\n\t\t\tobtainLiveData(true, currentPosition, liveMaxChatId);\n\t\t} else {//CHAT\n\t\t\tobtainChatData(true, currentPosition, chatModels.get(0).getChatId());\n\t\t}\n\t}", "String getQuery() throws RemoteException;", "public List<QueryDescriptor> getUserQueries()\n {\n List<QueryDescriptor> queries = new ArrayList<QueryDescriptor>();\n Map<String, QueryDescriptor> Queries = ((DemoQueryModel) _queryModel).getQueries();\n Iterator keys = Queries.keySet().iterator();\n while (keys != null && keys.hasNext())\n {\n Object key = keys.next();\n QueryDescriptor qd = Queries.get(key);\n Object queryType = qd.getUIHints().get(QueryDescriptor.UIHINT_IMMUTABLE);\n\n // For userQueries, immutable is false\n if (queryType != null && queryType.equals(Boolean.FALSE))\n {\n queries.add(qd);\n }\n }\n\n return queries;\n }", "public static void operation() {\n try ( QueryExecution qExec = QueryExecutionHTTP.service(dataURL).query(\"ASK{}\").build() ) {\n qExec.execAsk();\n System.out.println(\"Operation succeeded\");\n } catch (QueryException ex) {\n System.out.println(\"Operation failed: \"+ex.getMessage());\n }\n System.out.println();\n }", "public Query getQuery ()\n {\n\n\treturn this.q;\n\n }", "public static void balanceQuery(CommandSender sender, String[] args) {\n if (!PermissionNode.ADD.hasPermission(sender)) {\n CommandDebug.INSUFFICIENT_PERMISSION.message(sender, PermissionNode.ADD.get());\n return;\n }\n if (args.length != 3) {\n CommandDebug.INVALID_NUMBER_OF_ARGUMENTS.message(sender);\n return;\n }\n TokenType type;\n try {\n type = TokenType.valueOf(args[2].toUpperCase());\n } catch (Exception e) {\n CommandDebug.INVALID_TOKEN_TYPE.message(sender);\n return;\n }\n UUID target = Bukkit.getOfflinePlayer(args[1]).getUniqueId();\n PlayerTokenManager.getTokens(target, type);\n MessageType.BALANCE_QUERY.message(sender, Bukkit.getOfflinePlayer(target).getName(), type.name(), ElementalTokens.getNumberFormat().format(PlayerTokenManager.getTokens(target, type)));\n }", "public Queries queries() {\n return this.queries;\n }", "@Override\r\n\t\tprotected Boolean doInBackground(String... args) {\r\n\t\t\tConnectivityManager cm = (ConnectivityManager) getActivity()\r\n\t\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\r\n\t\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n\t\t\tif (netInfo != null && netInfo.isConnected()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tURL url = new URL(UserFunctions.chkConnURL);\r\n\t\t\t\t\t// URL url = new\r\n\t\t\t\t\t// URL(\"http://10.0.2.2/notified/all_con.php\");\r\n\t\t\t\t\tHttpURLConnection urlc = (HttpURLConnection) url\r\n\t\t\t\t\t\t\t.openConnection();\r\n\t\t\t\t\turlc.setConnectTimeout(3000);\r\n\t\t\t\t\turlc.connect();\r\n\t\t\t\t\tif (urlc.getResponseCode() == 200) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (MalformedURLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t// Message.message(getApplicationContext(), \"malformedUrl\");\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t// Message.message(getApplicationContext(), \"exception\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t// Message.message(getApplicationContext(), \"exception\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "boolean hasQueryTimeSec();", "public boolean Query(Guitar guitar) {\n\treturn guitarDao.Query(guitar);\n}", "private static boolean musicCommands(CommandContext context, Guild guild, Command invoked, TextChannel channel, Member invoker) {\n if ((invoked instanceof IMusicCommand || invoked instanceof AkinatorCommand) // the hate is real\n && guild.getId().equals(BotConstants.FREDBOAT_HANGOUT_ID)\n && guild.getJDA().getSelfUser().getId().equals(BotConstants.MUSIC_BOT_ID)) {\n if (!channel.getId().equals(\"174821093633294338\") // #spam_and_music\n && !channel.getId().equals(\"217526705298866177\") // #staff\n && !invoker.getUser().getId().equals(\"203330266461110272\")//Cynth\n && !invoker.getUser().getId().equals(\"81011298891993088\")) { // Fre_d\n context.deleteMessage();\n context.replyWithName(\"Please don't spam music commands outside of <#174821093633294338>.\",\n msg -> CentralMessaging.restService.schedule(() -> CentralMessaging.deleteMessage(msg),\n 5, TimeUnit.SECONDS));\n return true;\n }\n }\n return false;\n }", "@TargetApi(Build.VERSION_CODES.M)\n @SuppressLint(\"MissingPermission\")\n private boolean isConnected_Q() {\n //Get ConnectivityManager.\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n //Check current network has Internet access.\n if (connectivityManager != null) {\n Network activeNetwork = connectivityManager.getActiveNetwork();\n if (activeNetwork == null) { //No default network is currently active.\n return false;\n }\n\n NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(activeNetwork);\n if (networkCapabilities != null && isConnectionValidated(networkCapabilities)) {\n return true;\n }\n }\n\n return false;\n }", "List<RequestHistory> getQueries() throws RemoteException;", "private boolean checkBackend() {\n \ttry{\n \t\tif(sendRequest(generateURL(0,\"1\")) == null ||\n \tsendRequest(generateURL(1,\"1\")) == null)\n \t\treturn true;\n \t} catch (Exception ex) {\n \t\tSystem.out.println(\"Exception is \" + ex);\n\t\t\treturn true;\n \t}\n\n \treturn false;\n \t}", "public ArrayList<Bot> getAllBots() {\n final String errorMessage = \"Error getting all bots\";\n ResultSet retrievedBots = dbConnector.selectQuery(\"SELECT c.name, bot_id, active_time, probability, activity_status\" +\n \" FROM Bots as b, Company as c WHERE b.company_id = c.company_id;\");\n ArrayList<Bot> bots = null;\n try {\n bots = new ArrayList<Bot>();\n while (retrievedBots.next()) {\n bots.add(toBot(retrievedBots));\n }\n } catch (SQLException e) {\n System.out.println(errorMessage);\n }\n return bots;\n }", "public static boolean booleanQueryDB(String query) throws SQLException{\n\t\t\tConnection con = connectToDB();\n\t\t\t// Creiamo un oggetto Statement per poter interrogare il db.\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t// Eseguiamo una query e immagazziniamone i risultati in un oggetto ResultSet.\n\t\t\t\n\t\t\t// String qry = \"SELECT * FROM utente\";\n\t\t\tResultSet res = cmd.executeQuery(query);\n\t\t\t\n\t\t\tint size = 0;\n\t\t\tif (res != null) \n\t\t\t{ \n\t\t\t res.beforeFirst(); \n\t\t\t res.last(); \n\t\t\t size = res.getRow(); \n\t\t\t} \n\t\t\t\n\t\t\tres.close();\n\t\t\tcmd.close();\n\t\t\t\n\t\t\tif (size == 0) return false;\n\t\t\telse return true;\n\t\t}", "pb4server.QueryInfoByWorldAskReqOrBuilder getQueryInfoByWorldAskReqOrBuilder();", "public abstract QueryResultIterable executeGroundingQuery(Formula formula);", "public ListExpensesDAOSQL() {\n\t\t\tthis.queryHandler = new QueryHandler(this.url,this.login,this.passwd);\n\t\t}", "public int getQueriesCount() {\n if (queriesBuilder_ == null) {\n return queries_.size();\n } else {\n return queriesBuilder_.getCount();\n }\n }", "int getQueriesCount();", "@Override\r\n\tpublic boolean check(ForgetBean forget) {\r\n\r\n\t\tSession session = factory.openSession();\r\n\r\n\t\tSystem.out.println(\"readched repo\");\r\n\t\tList<Object> list = session.createSQLQuery(\r\n\t\t\t\t\"SELECT account.email FROM account\tINNER JOIN aadhar ON account.aadharNo = aadhar.aadharNo\tWHERE email = '\"\r\n\t\t\t\t\t\t+ forget.getEmail() + \"' AND mobileNo = \" + forget.getMobileNo())\r\n\t\t\t\t.list();\r\n\t\tif (list.size() != 0) {\r\n\r\n\t\t\tSystem.out.println(\"true repo\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"false repo\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void checkAllarmOnDatabase(Session session) {\n\t\tsynchronized (clients) {\n\t\t\tfor (Session sess : clients) {\n\t\t\t\t/**\n\t\t\t\t * check the mapping\n\t\t\t\t */\n\t\t\t\tString userid = (String) this.endpointConfig.getUserProperties()\n\t\t\t\t\t\t.get(sess.getId());\n\t\t\t\tif (sess.isOpen()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString message = \"\";\n\t\t\t\t\t\tif (StringUtils.isNotEmpty(userid)) {\n\t\t\t\t\t\t\tmessage = codaEveService\n\t\t\t\t\t\t\t\t\t.jsonQueueGetAllarms(userid);\n\t\t\t\t\t\t\tsess.getBasicRemote().sendText(message);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tlogger.error(ex.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.58333385", "0.58101696", "0.5791339", "0.57372874", "0.56936336", "0.5631526", "0.54378456", "0.5354415", "0.5337922", "0.532388", "0.5318915", "0.5179578", "0.51419556", "0.50971293", "0.50618523", "0.50612664", "0.50580573", "0.50199515", "0.50025356", "0.49445578", "0.4940053", "0.49024785", "0.48979196", "0.4896462", "0.48899353", "0.48647386", "0.48552087", "0.48241258", "0.47827435", "0.47540665", "0.4753243", "0.4744979", "0.47330385", "0.4713678", "0.47057122", "0.46922207", "0.46892327", "0.46715853", "0.46611962", "0.4654533", "0.46292695", "0.46272615", "0.46088484", "0.46088484", "0.45961088", "0.458528", "0.45845816", "0.45689029", "0.45675617", "0.45662454", "0.45608088", "0.45370921", "0.45240128", "0.45231113", "0.4520362", "0.4515166", "0.45107403", "0.45096335", "0.4505187", "0.45039698", "0.45039698", "0.4503309", "0.4496616", "0.44955397", "0.44924012", "0.4490879", "0.4489915", "0.4488886", "0.44877157", "0.44751206", "0.44597343", "0.44581908", "0.4455213", "0.4453779", "0.44531012", "0.44509742", "0.44463855", "0.44441202", "0.44432637", "0.44409278", "0.44390902", "0.44339108", "0.4431082", "0.4430161", "0.44293", "0.44172072", "0.441645", "0.44162464", "0.44118074", "0.44044396", "0.4401223", "0.4398353", "0.43980294", "0.43963397", "0.4394066", "0.4388674", "0.43871638", "0.43867314", "0.43820897", "0.43799603" ]
0.57822984
3
Get the colors of the user.
public List<String> getColor() { return this.colors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Color> userColors() {\r\n int colorIndex;\r\n ArrayList<Color> dest = new ArrayList<Color>();\r\n for (colorIndex = 0; colorIndex < this.colors; colorIndex += 1) {\r\n dest.add(Cnst.colorsToChoose.get(colorIndex));\r\n }\r\n return dest;\r\n }", "public Color[] getColors();", "public Color[] getColors()\n {\n return colors;\n }", "public Object getColors() {\r\n if (colors != null) {\r\n return colors;\r\n }\r\n ValueBinding vb = getValueBinding(\"colors\");\r\n return vb != null ? vb.getValue(getFacesContext()) : null;\r\n }", "public List<Color> getColors() {\n return colors;\n }", "public List<PhotoColor> getColors() {\n return fullPhoto.getColors();\n }", "public Set<Integer> getColors(){\n Set<Integer> colors = new HashSet<Integer>();\n //for(OTEventModel event : events){\n //\tcolors.add(event.getColor());\n //}\n\n return colors;\n }", "public ArrayList<String> getColorList()\n {\n \treturn colors;\n }", "public Color[] getColors() {\n return mGraphicsRenderer.getColors();\n }", "public String[] getColour()\n {\n return colour;\n }", "public ColorMapper getColors() {\n\t\treturn colors;\n\t}", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "public AvatarColor getColor() {\n return this.color;\n }", "public Color[] getExperimentColors();", "public String getRecentColors() {\n return (String) data[GENERAL_RECENT_COLORS][PROP_VAL_VALUE];\n }", "public DiceColor getColor() {\n return color;\n }", "public static Color getColor() {\n return myColor;\n }", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "public Color getColor();", "public Color getColor();", "public Color getColor();", "public String listOfColors() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Color> it = colors.iterator(); it.hasNext();){\r\n\t\t\t Color c = (Color) it.next();\r\n \t sb.append(c.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "public String printColors(){\n String RGB = \"\";\n detectedColor = m_colorSensor.getColor();\n RGB = \"Red: \" + detectedColor.red + \", Green: \" + detectedColor.green + \", Blue: \" + detectedColor.blue;\n return RGB;\n }", "public String getColor() {\r\n\t\treturn \"Color = [\"+ ColorUtil.red(color) + \", \"+ ColorUtil.green(color) + \", \"+ ColorUtil.blue(color) + \"]\";\r\n\t}", "public GameColor getColor();", "String getColour();", "public Integer getColor() {\n\t\treturn color;\n\t}", "public static List<PlayerColor> getPlayerColors() {\n List<PlayerColor> colorList = new ArrayList<>();\n for (PlayerColor color: PlayerColor.values()) {\n colorList.add(color);\n }\n return colorList;\n }", "public native int getColors() throws MagickException;", "public int getColor() {\n return color;\n }", "public int getColor() {\n \t\treturn color;\n \t}", "String getColor();", "public int getColor();", "public int getColor();", "public List<Color> getAvailableColorList()\n\t{\n\t\treturn availableColorList;\n\t}", "java.awt.Color getColor();", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public String getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "public Set<CtColor> getColors() {\n\t\tHashSet<CtColor> hs = new HashSet<CtColor>();\n\t\tint colorIndexArr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };\n\t\tfor (CtColor chip : chips) {\n\t\t\tcolorIndexArr[chip.getColorNum()] = 1;\n\t\t}\n\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (colorIndexArr[i] != 0)\n\t\t\t\ths.add(new CtColor(i));\n\t\t}\n\t\treturn hs;\n\t}", "public int[] getColorIndexes()\n {\n return this.colorIndexes;\n }", "public Color getColor() {\n return color;\r\n }", "public String getColor()\n {\n return color;\n }", "public String getColor()\n {\n return color;\n }", "public String getColor(){\r\n return color;\r\n }", "public Color getColor() {\n \t\treturn color;\n \t}", "public IsColor getColor() {\n\t\treturn ColorBuilder.parse(getColorAsString());\n\t}", "public int[] getScreenColor(Double x, Double y)\r\n\t{\r\n\t\tRobot robot = com.sun.glass.ui.Application.GetApplication().createRobot();\r\n\t\t\r\n\r\n\t\tint test = robot.getPixelColor(x.intValue(), y.intValue());\r\n\t\t\r\n\r\n\t\tint red = (test >> 16) & 0xFF;\r\n\t\tint green = (test >> 8) & 0xFF;\r\n\t\tint blue = (test ) & 0xFF;\r\n\r\n\t\tint[] ColorArray = {red,green,blue};\r\n\t\treturn ColorArray ;\r\n\t}", "public String getColor() {\n\t\t\r\n\t final String uri = colorsBeUrl+\"/colors_be/getColor\";\r\n\t \r\n\t //TODO: Autowire the RestTemplate in all the examples\r\n\t RestTemplate restTemplate = new RestTemplate();\r\n\t \r\n\t String result = restTemplate.getForObject(uri, String.class);\r\n\t System.out.println(result);\r\n\t return result;\r\n\t \r\n\t}", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n\t\treturn couleur;\n\t}", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor() \n\t{\n\t\treturn color;\n\t}", "public String obtenColor() {\r\n return color;\r\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\r\n return color;\r\n }", "public String getColor() { \n return color; \n }", "@NoProxy\n @NoWrap\n @NoDump\n public String getColor() {\n return color;\n }", "public static float[] createColors() {\n float[] data = new float[4 * 3];\n data[0] = 1f;\n data[1] = 0f;\n data[2] = 0f;\n data[3] = 1f;\n\n data[4] = 0f;\n data[5] = 1f;\n data[6] = 0f;\n data[7] = 1f;\n\n data[8] = 0f;\n data[9] = 0f;\n data[10] = 1f;\n data[11] = 1f;\n return data;\n }", "public Color getColor()\n { \n return color;\n }", "public static List<Color> getColorList(){\n EnumSet<Color> allColor = EnumSet.allOf(Color.class);\n //create a List from the Collection \n return new ArrayList<Color>(allColor);\n //the ArrayList takes a Collection as an argument\n }", "public Color getColor(){\n return color;\n }", "public String getColor()\n {\n return this.color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return color;\r\n }", "public int getColor() {\n return this.color;\n }", "public String getColor() {\n\t\treturn color;\n\t}", "public String getColor() {\n\t\treturn color;\n\t}", "public String getColor() {\n return this.color;\n }", "private Color[] getColorsForState(State state)\n {\n switch (state)\n {\n case GREEN:\n return GREEN_COLORS;\n case ORANGE:\n return ORANGE_COLORS;\n case RED:\n return RED_COLORS;\n case BACKGROUND:\n return DARK_GRAY_COLORS;\n default:\n return null;\n }\n }", "public String getColor() {\r\n\t\treturn color;\r\n\t}", "public ColorElements getColorAccess() {\n\t\treturn eColor;\n\t}", "public static Color[] getValues() {\r\n\t\treturn VALUES;\r\n\t}", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n\treturn color;\n }" ]
[ "0.769223", "0.6913966", "0.6726766", "0.6646931", "0.6612023", "0.6569035", "0.6510137", "0.64978236", "0.6378681", "0.62757665", "0.620303", "0.61576176", "0.61576176", "0.61576176", "0.61576176", "0.61576176", "0.61341393", "0.6129394", "0.6115053", "0.61044765", "0.6094308", "0.6087298", "0.6034556", "0.6034556", "0.6034556", "0.6010906", "0.59815294", "0.5981409", "0.59677464", "0.5967345", "0.5960731", "0.5959518", "0.5955142", "0.594365", "0.5940258", "0.59371907", "0.5933025", "0.5933025", "0.59171313", "0.591558", "0.59127325", "0.59127325", "0.59048706", "0.5901539", "0.58914554", "0.5890699", "0.58898854", "0.5872671", "0.5872671", "0.5872166", "0.58692163", "0.58677703", "0.5851513", "0.58464885", "0.5844679", "0.5837667", "0.5836619", "0.5836619", "0.5836619", "0.5829636", "0.582621", "0.5824909", "0.5823867", "0.5823867", "0.5823867", "0.5823867", "0.5823867", "0.5823867", "0.5823867", "0.5823867", "0.582296", "0.5816519", "0.58138925", "0.5807217", "0.5791664", "0.5791645", "0.57883817", "0.57839465", "0.5783039", "0.5783039", "0.5783039", "0.5783039", "0.5783039", "0.5783039", "0.5778735", "0.5772331", "0.5772331", "0.5772331", "0.5771591", "0.57684153", "0.57684153", "0.57561815", "0.57555664", "0.57547915", "0.57543916", "0.57508767", "0.5742278", "0.5742278", "0.5742278", "0.574007" ]
0.6829586
2
Get the pieces from the user.
public List<Piece> getPieces() { return this.pieces; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getUser(){\n Set<String> userSet = preferences.getStringSet(userRef, new HashSet<>());\n if(userSet.size() == 0) return new String[0];\n String user = \"\";\n String pass = \"\";\n String test = userSet.toArray()[0].toString();\n Pattern pattern = Pattern.compile(\"^.+@.+\\\\..+$\");\n Matcher matcher = pattern.matcher(test);\n if(matcher.matches()) {\n user = test;\n pass = userSet.toArray()[1].toString();\n }else {\n pass = test;\n user = userSet.toArray()[1].toString();\n }\n return new String[] {user, pass};\n }", "public String[] getUserInfo(String usr, String key);", "@Override\r\n public MessageList getPieces()\r\n {\r\n MessageList pieces = new MessageList();\r\n pieces.add( loginPiece );\r\n pieces.add( viewexpPiece );\r\n pieces.add( getjsPiece );\r\n pieces.add( getcssPiece );\r\n pieces.add( increaseexpPiece );\r\n pieces.add( viewuserstatsPiece );\r\n pieces.add( getimagePiece );\r\n return pieces;\r\n }", "String getUser();", "String getUser();", "public String[] getGamingUsers() {\n connect();\n\n String data[] = null;\n try {\n doStream.writeUTF(\"GAMING_USERS\");\n doStream.writeUTF(currentUser.getUserName());\n int aux = diStream.readInt();\n data = new String[aux];\n\n for (int i = 0 ; i < aux; i++){\n data[i] = diStream.readUTF();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n disconnect();\n\n return data;\n }", "java.lang.String getUser();", "@Override\r\n public void handle( MessageList pieces, int userid )\r\n throws InterruptedException\r\n {\r\n\r\n if( pieces.contains( loginPiece ) )\r\n {\r\n write( \"$.lad.window();\" );\r\n IOTrainer.getInstance().outputMainView( userid );\r\n }\r\n else if( pieces.contains( viewexpPiece ) )\r\n {\r\n outputEXP( userid );\r\n }\r\n else if( pieces.contains( increaseexpPiece ) )\r\n {\r\n int levels =\r\n Integer.valueOf( pieces.getValue( \"increaseexplevel\" ) );\r\n ModifierTarget type =\r\n ModifierTarget.fromString( pieces.getValue( \"type\" ) );\r\n UserExpTarget target =\r\n UserExpTarget.fromString( pieces.getValue( \"target\" ) );\r\n\r\n EXPManager.advanceUserEXP( userid, target, type, levels );\r\n\r\n outputEXP( userid );\r\n }\r\n else if( pieces.contains( viewuserstatsPiece ) )\r\n {\r\n TrainerBattleStats stats = EXPManager.getBattleStats( 1, userid );\r\n\r\n write( \"$.lad.stats.view(\" + stats.toJSString() + \",'User');\" );\r\n }\r\n else if( pieces.contains( getjsPiece ) )\r\n {\r\n if( cachedJS == null )\r\n {\r\n String js = readPackagedFile( \"lad/files/game.js\" );\r\n StringBuffer buffer = new StringBuffer( 200 );\r\n\r\n // Weapon strings\r\n buffer.append( \"return [ \" );\r\n for( Weapon w : Weapon.values() )\r\n {\r\n buffer.append( \"\\\"\" );\r\n buffer.append( w.toString() );\r\n buffer.append( \"\\\",\" );\r\n }\r\n buffer.deleteCharAt( buffer.length() - 1 );\r\n buffer.append( \"];\" );\r\n js = magicComment( \"WEAPON STRING\", js, buffer );\r\n\r\n // Weapon objects\r\n buffer.setLength( 0 );\r\n buffer.append( \"return [ \" );\r\n for( Weapon w : Weapon.values() )\r\n {\r\n // Type\r\n UserExpTarget gen = UserExpTarget.generalFromWeapon( w );\r\n List< Double > atts = w.getAttributesList();\r\n ListIterator< Double > iter = atts.listIterator();\r\n\r\n buffer.append( \"this.weapon( \\\"\" );\r\n buffer.append( w.toString() );\r\n buffer.append( \"\\\",\" );\r\n\r\n buffer.append( gen.getValue() );\r\n buffer.append( \",\" );\r\n\r\n while( iter.hasNext() )\r\n {\r\n buffer.append( String.format( \"%.2f\", iter.next() ) );\r\n\r\n if( iter.hasNext() )\r\n {\r\n buffer.append( \",\" );\r\n }\r\n }\r\n\r\n buffer.append( \"),\" );\r\n }\r\n buffer.deleteCharAt( buffer.length() - 1 );\r\n buffer.append( \"];\" );\r\n js = magicComment( \"WEAPON OBJECTS\", js, buffer );\r\n\r\n // Battle Statistic Types\r\n String stats = \"return \" +\r\n TrainerBattleStats.getStatTypes().toJSString() + \";\";\r\n\r\n js = magicComment( \"STAT TYPES\", js, stats );\r\n \r\n // Cache it\r\n cachedJS = js;\r\n }\r\n\r\n // Outputs the js\r\n write( cachedJS );\r\n \r\n // Also include this so that the view works\r\n write( \"addMenuButton('LAD','ui-icon-home',function(){\" +\r\n \"$.ladAjax({ 'login': '' });});\" );\r\n }\r\n else if( pieces.contains( getimagePiece ) )\r\n {\r\n String img = pieces.getValue( \"getimg\" );\r\n write( readPackagedFile( \"lad/files/\" + img ) );\r\n }\r\n else if( pieces.contains( getcssPiece ) )\r\n {\r\n if( cachedCSS == null )\r\n {\r\n cachedCSS = readPackagedFile( \"lad/files/game.css\" );\r\n }\r\n write( cachedCSS );\r\n }\r\n }", "@Override\n\tpublic List<User> get() {\n\t\tList<User> result = new ArrayList<>();\n\t\tfor (String key : userlist.keySet()) {\n\t\t\tUser user = userlist.get(key);\n\t\t\tint dni = user.getDni();\n\t\t\tString name = user.getName();\n\t\t\tString secondName = user.getSecondName();\n\t\t\tString username = user.getUser();\n\t\t\tString pass = user.getPass();\n\t\t\tresult.add(new User(dni, name, secondName, username, pass));\n\t\t}\n\t\treturn result;\n\t}", "private void getGredentialsFromMemoryAndSetUser()\n\t{\n\t SharedPreferences settings = getSharedPreferences(LOGIN_CREDENTIALS, 0);\n\t String username = settings.getString(\"username\", null);\n\t String password = settings.getString(\"password\", null);\n\t \n\t //Set credentials to CouponsManager.\n\t CouponsManager.getInstance().setUser(new User(username, password));\n\t \n\t}", "public static Object[] getUserData(){\n String name, password;\n\n System.out.println(\"\\n1. Manager\\n2. Customer\");\n int res = ConsoleReader.getInt();\n System.out.print(\"\\nEnter your name :\");\n ConsoleReader.getString();\n name = ConsoleReader.getString();\n System.out.print(\"Enter your password :\");\n password = ConsoleReader.getString();\n return new Object[] {res, name, password};\n }", "public String[] getUsers(){\n try {\n names = credentials.keys();\n }catch (java.util.prefs.BackingStoreException e1){\n System.out.println(e1);\n }\n return names;\n }", "People getUser();", "public String getUserPart(String key);", "public void getUserData()\n\t{\n\t\tint count; //Loop counter\n\t\tString pathname = filename;\n\t\t\n\t\tString div = \",\"; //Used to divide info.\n\t\tString [] userArray; //To hold divided info.\n\t\t\n\t\ttry {\n FileReader reader = new FileReader(pathname);\n BufferedReader bufferedReader = new BufferedReader(reader);\n \n String line;\n \n //While getting each line of the data file, BUT stops when USER data found.\n //Loop through each line and determine which user data to choose.\n while ((line = bufferedReader.readLine()) != null) {\n // System.out.println(\"User Data in file: \" + line);\n \n System.out.println(\"Checking User name in line of data ...\");\n \n //This divides the info in the data file into an array.\n userArray = line.split(div); \n \n \n if (User.equals(userArray[0]))\n \t{\n \t\tSystem.out.println(\"User Found: \" + User);\n \t\tuser_line = line;\n \t\t//Assigning data to class variables.\n \t\tUserPassword = userArray[1].trim(); //Assigning the password.\n \t\tDevice_ID = Integer.parseInt(userArray[2].trim()); //Assigning device ID.\n \t\tisLost = (Integer.parseInt(userArray[3].trim()) == 0) ? false : true;\n \t\t\n \t\t//This reads out information.\n \t\tfor (count = 0; count < userArray.length; count++)\n {\n \t\t\tSystem.out.println(\"INFO: \" + userArray[count]);\n }\n \t\tbreak;\n \t}\n System.out.println(\"========================================\");\n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n\t}", "private String[] getCredentials() {\n String[] cred = new String[2];\n System.out.print(\"Username: \");\n cred[0] = sc.nextLine();\n System.out.print(\"Password: \");\n cred[1] = sc.nextLine();\n return cred;\n }", "@Override\n\t\tprotected List<String> doInBackground(Void... params) {\n\t\t\tList<String> result = new LinkedList<String>();\n\t\t\ttry {\n\t\t\t\tresult = getPieces();\n\t\t\t\t//System.out.println(result.toString());\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\t//Log.e(\"doInBackground\", e.toString());\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\treturn result;\n\t\t}", "public String getBoardsForCurrentUser(Argument ... args) {\n return(enhanceURL(createURL(GET_BOARDS).asString()));\n }", "public void getUsers(String[] tokens) {\n\n }", "public List<UserBean> getUser() {\n\t\tSystem.out.println(\"=========================\");\n\t\treturn userMapper.getUser();\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<>();\n // user name\n user.put(KEY_NAME, sharedPreferences.getString(KEY_NAME, null));\n // user rol\n user.put(KEY_ROL, sharedPreferences.getString(KEY_ROL, null));\n // user user\n user.put(KEY_USER, sharedPreferences.getString(KEY_USER, null));\n // user email id\n user.put(KEY_EMAIL, sharedPreferences.getString(KEY_EMAIL, null));\n // user avatar\n user.put(KEY_PHOTO, sharedPreferences.getString(KEY_PHOTO, null));\n // return user\n return user;\n }", "public void getUserData() {\r\n User user = serverView.getUserInfo(username.getText());\r\n username.setText(\"\");\r\n if (user == null) {\r\n Alert alert = new Alert(AlertType.ERROR);\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"no User with this username\");\r\n alert.showAndWait();\r\n } else {\r\n\r\n try {\r\n userContent.getChildren().clear();\r\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"UserInfoView.fxml\"));\r\n fxmlLoader.setController(new UserInfoController(user));\r\n Pane pane = fxmlLoader.load();\r\n userContent.getChildren().add(pane);\r\n\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public void populateUserDetails() {\n\n this.enterprise = system.getOpRegionDirectory().getOperationalRegionList()\n .stream().filter(op -> op.getRegionId() == user.getNetworkId())\n .findFirst()\n .get()\n .getBuDir()\n .getBusinessUnitList()\n .stream()\n .filter(bu -> bu.getUnitType() == BusinessUnitType.CHEMICAL)\n .map(unit -> (ChemicalManufacturingBusiness) unit)\n .filter(chemBusiness -> chemBusiness.getEnterpriseId() == user.getEnterpriseId())\n .findFirst()\n .get();\n\n this.organization = (ChemicalManufacturer) enterprise\n .getOrganizationList().stream()\n .filter(o -> o.getOrgId() == user.getOrganizationId())\n .findFirst()\n .get();\n\n }", "private void getValues() {\n session = new UserSession(getApplicationContext());\n\n //validating session\n session.isLoggedIn();\n\n //get User details if logged in\n HashMap<String, String> user = session.getUserDetails();\n\n shopname = user.get(UserSession.KEY_NAME);\n shopemail = user.get(UserSession.KEY_EMAIL);\n shopmobile = user.get(UserSession.KEY_MOBiLE);\n System.out.println(\"nameemailmobile \" + shopname + shopemail + shopmobile);\n }", "void retrievePassWord(User user);", "public List<User> getUserList();", "String getUsersInput(String outForUser) throws IOException;", "List<KingdomUser> getUsers();", "private static String getUser(String message) { return message.split(\"!\")[0].substring(1); }", "public Motile getUser() {\n return user;\n }", "private void getUserInfo() {\n\t}", "public abstract String getUser();", "public String[] listUsers();", "public ArrayList<String> getPieces() {\n\treturn pieces;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "public List<User> getUsers() {\n try (ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(PATH))) {\n\n return (List<User>) inputStream.readObject();\n\n } catch (Exception e) {\n System.out.println(\"Ошибка при чтений файла или файла не существует! get user\");\n }\n\n return new ArrayList<>();\n }", "public synchronized void getGoodFromUser() throws RemoteException {\n\t\tConcurrentHashMap<String, Good> map = null;\n\n\t\tfor (String notaryID : notaryServers.keySet()) {\n\t\t\tNotaryInterface notary = notaryServers.get(notaryID);\n\n\t\t\t//send signed message\n\t\t\tString cnonce = cryptoUtils.generateCNonce();\n\t\t\tString toSign = notary.getNonce(this.id) + cnonce + this.id;\n\t\t\tResult res = null;\n\n\t\t\ttry {\n\t\t\t\tres = notary.getGoodsFromUser(this.id, cnonce, cryptoUtils.signMessage(toSign));\n\t\t\t} catch (InvalidSignatureException e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\n\t\t\t//verify received message\n\t\t\tString toVerify = toSign + res.getContent().hashCode();\n\t\t\tif (!cryptoUtils.verifySignature(notaryID, toVerify, res.getSignature())) {\n\t\t\t\tSystem.err.println(\"ERROR: Signature could not be verified\");\n\t\t\t}\n\n\t\t\tmap = (ConcurrentHashMap<String, Good>) res.getContent();\n\n\t\t\t//System.out.println(\"g3.1\");\n\t\t}\n\n\t\tif (verbose) {\n\t\t\tSystem.out.println(\"Goods owned:\");\n\t\t\tfor (String s : map.keySet()) {\n\t\t\t\tSystem.out.println(\"> \" + s);\n\t\t\t}\n\t\t}\n\t\tgoods = map;\n\t}", "String getUserInfoFromServer(String userID);", "public User[] get_return(){\r\n return local_return;\r\n }", "private void queryStoriesFromUser() {\n ParseQuery<Story> query = ParseQuery.getQuery(Story.class);\n // include objects related to a story\n query.include(Story.KEY_AUTHOR);\n query.include(Story.KEY_ITEM);\n query.include(Story.KEY_LIST);\n query.include(Story.KEY_CATEGORY);\n // where author is current user and order by time created\n query.whereEqualTo(Story.KEY_AUTHOR, user);\n query.orderByDescending(Story.KEY_CREATED_AT);\n query.findInBackground((stories, e) -> {\n mUserStories.clear();\n for (int i = 0; i < stories.size(); i++) {\n Story story = stories.get(i);\n Item item = (Item) story.getItem();\n mUserStories.add(story);\n queryPhotosInStory(story, item);\n }\n\n if (stories.size() == 0) {\n emptyLayout.setVisibility(View.VISIBLE);\n } else {\n emptyLayout.setVisibility(View.GONE);\n }\n });\n }", "public String getUser(){\n \treturn user;\n }", "public String showUser(){\n String dataUser = \"\";\n for(int i = 0; i<MAX_USER; i++){\n if(user[i] != null){\n dataUser += user[i].showDataUser();\n }\n }\n return dataUser;\n }", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }", "Data<User> getMe(String fields);", "public String getUser1()\n {\n return userInput1;\n }", "public java.util.List<People> getUserList() {\n return user_;\n }", "public void requestUserData() {\r\n\t \tmText.setText(\"Fetching user name, profile pic...\");\r\n\t \tBundle params = new Bundle();\r\n\t \tparams.putString(\"fields\", \"name, picture\");\r\n\t \tUtility.mAsyncRunner.request(\"me\", params, new UserRequestListener());\r\n\t }", "public List<User> getUsers();", "public static String[] getlistofUser() {\n\t\tString[] names = new String[workers.size()];\n\t\tfor (int i = 0; i < names.length; i++)\n\t\t\tnames[i] = workers.get(i).getUser();\n\t\treturn names;\n\t}", "@GET(\"pomodorotasks\")\n Call<List<PomodoroTask>> pomodorotasksGet(\n @Query(\"user\") String user\n );", "public List<String> displayuser() {\n\t\t// TODO Auto-generated method stub\n\t\tList<String> list = new ArrayList<>();\n\t\tlist = crud1.displayUsers();\n\t\treturn list;\n\t}", "List<User> getUsers();", "List<User> getUsers();", "public HashMap<String, String> getUserDetails()\n {\n HashMap<String, String> user = new HashMap<>();\n\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_PHONE, pref.getString(KEY_PHONE, null));\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public void extractParameters() {\n\t\tString[] parameters = body.split(\"&\");\n\n\n\n\t\t//If there is a value given for every parameter, we extract them\n\t\tString[] huh = parameters[0].split(\"=\");\n\t\tif(huh.length>1) {\n\t\t\tusername = huh[1];\n\t\t}else{allParametersGiven=false;}\t\n\n\t\tString[] hoh = parameters[1].split(\"=\");\n\t\tif(hoh.length>1) {\n\t\t\tpassword = hoh[1];\n\t\t}else{allParametersGiven=false;}\n\n\t}", "public List getUsers(User user);", "public List<UserExtraDTO> getSpecificUser(Set<UserExtra> list)\n\t{\n\t\tList<UserExtraDTO> users=new ArrayList<UserExtraDTO>();\n\n\t\tIterator<UserExtra> it=list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tUserExtra userEx=it.next();\n\t\t\tOptional<User> user=userService.findByid(userEx.getId());\n\t\t\tusers.add(new UserExtraDTO(user.get(),userEx));\n\t\t}\n\n\n\n\t\treturn users;\n\t}", "User getPassedUser();", "public static ArrayList<String> getUserByID(User user) {\n \n ArrayList<String> currentUser = new ArrayList<>();\n \n String sql = \"SELECT * FROM $tablename WHERE $column = ?\";\n \n String query = sql.replace(\"$tablename\", user.getTable()).replace(\"$column\", user.getColumn());\n \n ResultSet rs;\n \n try(\n Connection conn = DbUtil.getConn(DbType.MYSQL);\n PreparedStatement stmt = conn.prepareStatement(query);\n ) {\n \n stmt.setInt(1, user.getID());\n \n rs = stmt.executeQuery();\n \n if (rs.next()) {\n \n currentUser.add(Integer.toString(rs.getInt(\"studentID\")));\n currentUser.add(Integer.toString(rs.getInt(\"diplomaID\")));\n currentUser.add(Integer.toString(rs.getInt(\"employeeID\")));\n currentUser.add(rs.getString(\"firstName\"));\n currentUser.add(rs.getString(\"lastName\"));\n currentUser.add(rs.getString(\"email\"));\n currentUser.add(rs.getString(\"password\"));\n currentUser.add(rs.getString(\"industryPreference\"));\n currentUser.add(rs.getString(\"visitCount\"));\n currentUser.add(rs.getString(\"averageGrade\"));\n currentUser.add(rs.getString(\"assessmentsPassed\"));\n \n return currentUser;\n \n } else {\n System.out.println(\"N\");\n return null;\n }\n \n } catch (Exception e) {\n System.err.println(e);\n return null;\n }\n }", "public HashMap<String, String> getUserDetails(){\n HashMap<String, String> user = new HashMap<String, String>();\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n return user;\n }", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "List<UserInfo> getUserInfo(int roomId, List<Integer> userIds) throws IOException;", "public void processUser() {\r\n view.printMessage(View.GEM_POOL + model.getStonePool());\r\n chooseMenuOption(chooseParameters(INTEGER_DELIMITERS, View.INPUT_PARAMETERS, true));\r\n\r\n\r\n }", "@Override\r\n\tpublic MemberBean getInfo(String user) throws Exception {\n\t\tSystem.out.println(\"MemberService:getInfo\");\r\n\t\tMemberBean bean = null;\r\n\t\tbean = memberdao.getMember(user);\r\n\t\treturn bean;\r\n\t}", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n private Map<String, String> getUsers() {\n try {\n return (HashMap<String, String>) FileUtil.getInstance().readObjectFromFile(openFileInput(\"users.ser\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return new HashMap<>();\n }", "private List<LatLng> getCoordinates() {\n\n List<LatLng> list = new ArrayList<>();\n SharedPreferences.Editor editor = walkingSharedPreferences.edit();\n int size = walkingSharedPreferences.getInt(user.getUsername(), 0);\n for(int actual = 0; actual < size; actual++) {\n String pos = walkingSharedPreferences.getString(user.getUsername() + \"_\" + actual, \"\");\n editor.remove(user.getUsername() + \"_\" + actual);\n String[] splitPos = pos.split(\" \");\n LatLng latLng = new LatLng(Double.parseDouble(splitPos[LAT]), Double.parseDouble(splitPos[LNG]));\n list.add(latLng);\n }\n editor.remove(user.getUsername());\n editor.apply();\n return list;\n\n }", "public User getUserData();", "public void selectAllUser() {\n String sql = \"SELECT id, user, publickey, password, salt FROM users\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // loop through the result set\n while (rs.next()) {\n System.out.println(rs.getInt(\"id\") + \"\\t\" + rs.getString(\"user\") + \"\\t\" + rs.getDouble(\"publickey\")\n + \"\\t\" + rs.getString(\"password\") + \"\\t\" + rs.getString(\"salt\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public List<String> show () {\n\t\treturn userDao.show();\n\t}", "public List<Piece> allPieces();", "public String getUser() {\n\treturn strUser;\n }", "People getObjUser();", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "Map<Date, Set<String>> getFullUsers(Step step) throws SQLException;", "static void loadUser() {\n\t\tScanner inputStream = null; // create object variable\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStream = new Scanner(new File(\"user.txt\"));\n\t\t\tinputStream.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No User Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStream.hasNext()) {\n\n\t\t\t\tString instanceOf = inputStream.next();\n\n\t\t\t\tString readUserName = inputStream.next();\n\t\t\t\tString readPassword = inputStream.next();\n\t\t\t\tString readEmployeeNumber = inputStream.next();\n\t\t\t\tString readName = inputStream.next();\n\t\t\t\tString readPhone = inputStream.next();\n\t\t\t\tString readEmail = inputStream.next();\n\t\t\t\tif (instanceOf.contains(\"*AD*\")) {\n\t\t\t\t\tAdmin a1 = new Admin(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Admin User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CC*\")) {\n\t\t\t\t\tCourseCoordinator a1 = new CourseCoordinator(readUserName, readPassword, readEmployeeNumber,\n\t\t\t\t\t\t\treadName, readPhone, readEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an CC User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*AP*\")) {\n\t\t\t\t\tApproval a1 = new Approval(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Approval User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CA*\")) {\n\t\t\t\t\tCasual a1 = new Casual(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\ta1.setHrly_rate(inputStream.nextInt());\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Casual User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStream.close();\n\t}", "@Override\n\tpublic UserInfo getUserInfo() {\n\t\tHttpSession session = RpcContext.getHttpSession();\n String auth = (String)session.getAttribute(\"auth\");\n UserInfo ui = null;\n if (auth != null) {\n\t switch(AuthType.valueOf(auth)) {\n\t\t case Database: {\n\t\t String username = (String)session.getAttribute(\"username\");\n\t\t \t\tui = _uim.select(username);\n\t\t \t\tbreak;\n\t\t }\n\t\t case OAuth: {\n\t\t \t\tString googleid = (String)session.getAttribute(\"googleid\");\n\t\t \t\tui = _uim.selectByGoogleId(googleid);\n\t\t \t\tbreak;\n\t\t }\n\t }\n }\n\t\treturn ui;\n\t}", "public String getUser2()\n {\n return userInput2;\n }", "public User getUser (int position){\n return myUsers.get(position);\n }", "public int[] takeShots(){\n ui.printToUser(\"Please enter the row value\");\n int row = Integer.parseInt(String.valueOf(ui.readFromUser().charAt(0)));\n ui.printToUser(\"Please enter the column value\");\n int column = Integer.parseInt(String.valueOf(ui.readFromUser().charAt(0)));\n return new int[]{row, column};\n }", "public String getUser(int id){\n\t\treturn listePseudo.get(id);\n\t}", "@Override\r\n\tpublic List<PassInfo> find(String userId) {\n\t\tList<PassInfo> list = (List<PassInfo>) getHt().find(\"From PassInfo o where o.userId=?\", userId);\r\n\t\treturn list;\r\n\t}", "private void getData() {\n\t\tSharedPreferences preferences = getActivity().getSharedPreferences(\"the_username_and_password\", LoginActivity.MODE_PRIVATE);\n\t\tmToken = preferences.getString(\"accessToken\", \"\");\n//\t\tmap.put(\"access_token\", mToken);\n\n\t\tIPresenter presenter = new IPresenter(new IView<FeaturesBean>() {\n\n\t\t\t@Override\n\t\t\tpublic void success(FeaturesBean bean) {\n\t\t\t\tif (swipe != null) {\n\t\t\t\t\tswipe.setRefreshing(false);\n\t\t\t\t\tswipe.setEnabled(true);\n\t\t\t\t}\n\t\t\t\tonSuccess(bean);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void defeat(String s) {\n\t\t\t\tswipe.setRefreshing(false);\n\t\t\t\tswipe.setEnabled(true);\n\t\t\t}\n\t\t});\n\n\t\tpresenter.DoGet(UrlUtils.ROUTE_URL + mToken);\n\t}", "public List<User> getUserOfList(String id) {\n String query = DatabaseHelper.PARTICIPANT_COLUMN_SHOPPING_LIST_ID + \" = '\" + id + \"'\";\n List<Participant> participantList = getEntry(query);\n List<User> userList = new LinkedList<User>();\n\n for (Participant participant : participantList) {\n List<User> results = _userDataSource.getEntry(DatabaseHelper.USER_COLUMN_ID + \" = '\" + participant.getId() + \"'\");\n\n if (results.size() > 0) {\n userList.add(results.get(0));\n }\n }\n\n return userList;\n }", "private void getUserInput() {\n getUserTextInput();\n getUserPhotoChoice();\n getUserRoomChoice();\n getUserBedroomsChoice();\n getUserBathroomsChoice();\n getUserCoownerChoice();\n getUserIsSoldChoice();\n getUserTypeChoice();\n mAmenitiesInput = Utils.getUserAmenitiesChoice(mBinding.chipGroupAmenities.chipSchool,\n mBinding.chipGroupAmenities.chipShop, mBinding.chipGroupAmenities.chipTransport,\n mBinding.chipGroupAmenities.chipGarden);\n }", "public List<WallItem> getWallItemsForUser(String userUuid);", "private void retrieve() throws IOException {\n String data = fromServer.readUTF();\n// report(\"data: \" + data);\n String[] datas = data.split(COMMAND_DELIMITER);\n int isFull = Integer.parseInt(datas[0]);\n\n if(isFull == 1) {\n // points\n String[] points = datas[1].split(POINTS_DELIMITER);\n int[][] board = new int[SIDE][SIDE];\n for (int i = 0; i < points.length; i++) {\n board[i / SIDE][i % SIDE] = Integer.parseInt(points[i]);\n }\n boardComponent.setBoard(board);\n boardComponent.repaint();\n\n // players\n String[] players = datas[2].split(POINTS_DELIMITER);\n lbPl1.setText(players[0]);\n lbPl2.setText(players[1]);\n lbBlackStone.setIcon(blackIcon);\n lbWhiteStone.setIcon(whiteIcon);\n\n\n colorLabel.setText(\"You are a viewer.\");\n setButtons(false);\n btnNewGame.setEnabled(false);\n }\n\n // attendants\n try {\n String[] attendants = datas[3].split(POINTS_DELIMITER);\n for (String str : attendants) {\n listOfNames.add(str);\n nameListTextArea.append(str + \"\\n\");\n }\n// nameListTextArea.update(nameListTextArea.getGraphics());\n// atsScrollPane.setViewportView(nameListTextArea);\n }catch(Exception e){\n // when the first player enter the room, there is no existed attendants\n }\n\n }", "public List<String> getAvailableAssignees()\n {\n // TODO stefan an Rollen knüpfen\n final Matcher<String> m = new BooleanListRulesFactory<String>().createMatcher(\"admin/user/*\");\n final List<GWikiElementInfo> userInfos = wikiContext.getElementFinder()\n .getPageInfos(new GWikiPageIdMatcher(wikiContext, m));\n\n List<String> users = new ArrayList<String>();\n for (final GWikiElementInfo user : userInfos) {\n users.add(GWikiContext.getNamePartFromPageId(user.getId()));\n }\n return users;\n }", "String[] getParts();", "com.lxd.protobuf.msg.result.user.User.User_ getUser();", "private void fetchUser() {\n UserFetcher userFetcher = new UserFetcher();\n userFetcher.setListener(this);\n userFetcher.getUser();\n }", "public java.util.List<People> getUserList() {\n return java.util.Collections.unmodifiableList(\n instance.getUserList());\n }", "public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }", "public ArrayList<CharacterSheet> readCharacterSheet(User user) {\n\t\tArrayList<CharacterSheet> sheets = new ArrayList<CharacterSheet>();\n\t\tint userId = user.getIdUser();\n\t\tString sql = \"SELECT \"\n\t\t+ \"idcharactersheet, player_name, character_name, character_class, race, alignment, \"\n\t\t+ \"background, proficience_bonus, inspiration, xp_points, life_points, level, armor_class, \"\n\t\t+ \"hit_dice, speed, initiative, passive_perception \"\n\t\t+ \"FROM charactersheet \"\n\t\t+ \"WHERE user_iduser=?\";\n\t\t\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttry {\n\t\t\tstmt = getConnection().prepareStatement(sql);\n\t\t\tstmt.setInt(1, userId);\n\t\t\t\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tCharacterSheet sheet = new CharacterSheet();\n\t\t\t\tsheet.setIdCharacterSheet(rs.getInt(\"idcharactersheet\"));\n\t\t\t\tsheet.setPlayerName(rs.getString(\"player_name\"));\n\t\t\t\tsheet.setCharacterName(rs.getString(\"character_name\"));\n\t\t\t\tsheet.setCharacterClass(rs.getString(\"character_class\"));\n\t\t\t\tsheet.setRace(rs.getString(\"race\"));\n\t\t\t\tsheet.setAlignment(rs.getString(\"alignment\"));\n\t\t\t\tsheet.setBackground(rs.getString(\"background\"));\n\t\t\t\tsheet.setProficienceBonus(rs.getInt(\"proficience_bonus\"));\n\t\t\t\tsheet.setInspiration(rs.getBoolean(\"inspiration\"));\n\t\t\t\tsheet.setXpPoints(rs.getDouble(\"xp_points\"));\n\t\t\t\tsheet.setLifePoints(rs.getInt(\"life_points\"));\n\t\t\t\tsheet.setLevel(rs.getInt(\"level\"));\n\t\t\t\tsheet.setArmorClass(rs.getInt(\"armor_class\"));\n\t\t\t\tsheet.setHitDice(rs.getString(\"hit_dice\"));\n\t\t\t\tsheet.setSpeed(rs.getString(\"speed\"));\n\t\t\t\tsheet.setInitiative(rs.getString(\"initiative\"));\n\t\t\t\tsheet.setPassivePerception(rs.getInt(\"passive_perception\"));\n\t\t\t\tsheets.add(sheet);\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\trs.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn sheets;\n\t}", "public String getUser()\n {\n return _user;\n }", "List<User> getUserByName(String name);" ]
[ "0.61775374", "0.5932889", "0.5916618", "0.5681215", "0.5681215", "0.56432104", "0.56313634", "0.5571603", "0.55502844", "0.5494867", "0.5464977", "0.54560816", "0.54278976", "0.5421484", "0.54194677", "0.54167753", "0.5391025", "0.53641695", "0.53563553", "0.53415877", "0.5303122", "0.52972406", "0.526365", "0.5260886", "0.5253295", "0.5236112", "0.52259654", "0.5213259", "0.5201108", "0.51705235", "0.51697624", "0.5152845", "0.514332", "0.51407695", "0.5135353", "0.5132979", "0.51316524", "0.5113242", "0.5109067", "0.5102629", "0.50983495", "0.50907546", "0.5081919", "0.5081485", "0.5081289", "0.5072299", "0.5072046", "0.5068335", "0.5061535", "0.50514066", "0.50513655", "0.50454426", "0.50351864", "0.50342345", "0.50342345", "0.50339407", "0.5029334", "0.5025395", "0.50237226", "0.5018883", "0.50087017", "0.49968895", "0.4994201", "0.49910766", "0.49866", "0.49834287", "0.49773648", "0.49766362", "0.4974236", "0.4970014", "0.49690068", "0.49662536", "0.49624035", "0.49615002", "0.49588114", "0.49532223", "0.49524558", "0.4951804", "0.49480626", "0.4946016", "0.49438363", "0.49434668", "0.49391475", "0.4937662", "0.49368364", "0.49234006", "0.49209914", "0.49152994", "0.49149203", "0.49075615", "0.49056885", "0.48957145", "0.4880387", "0.48786843", "0.4876745", "0.4874257", "0.48707235", "0.486642", "0.48606238", "0.4856446" ]
0.4917878
87
Get the name of the user.
public String getName() { return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n return user.getName();\n }", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "public String getUser_name() {\n return user_name;\n }", "public String getName() {\n return (String) getObject(\"username\");\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUserName();\n\t}", "public String getUserName() {\n\t\t\treturn name;\n\t\t}", "@Override\n\tpublic String getUserName() {\n\t\t\n\t\ttry {\n\t\t\treturn UserLocalServiceUtil.getUser(_dataset.getUserId()).getScreenName();\n\t\t} catch (PortalException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SystemException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treturn \"ERROR\";\n\t\t}\n\t}", "public String getUserName(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_NAME, null);\n }", "@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\n\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\n\t}", "public String getUserName() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"USERNAME\", null);\n\t}", "public String getName() {\r\n\t\treturn this.userName;\r\n\t}", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getUserName() {\n\t\treturn phoneText.getText().toString();\n\t}", "public java.lang.String getUserName() {\n return userName;\n }", "public String getUserName() {\n Object ref = userName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userName_ = s;\n }\n return s;\n }\n }", "String getUserName();", "String getUserName();", "@Override\n\tpublic String getUsername() {\n\t\treturn user.getUsername();\n\t}", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getUserName() {\n Object ref = userName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n }\n }", "public java.lang.String getUserName() {\r\n return userName;\r\n }", "public String getName() {\n\t\treturn this.username;\n\t}", "public final String getUser() {\n return username;\n }", "public String getName() {\r\n\t\treturn username;\r\n\t}", "@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}", "public static String getUserName() {\r\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t\treturn session.getAttribute(\"username\").toString();\r\n\t}", "public static String getUserName() {\r\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t\treturn session.getAttribute(\"username\").toString();\r\n\t}", "public static String getUserName() {\n\t\treturn readTestData.getkeyData(\"SignUpDetails\", \"Key\", \"Value\", \"userName\");\n\t}", "@Override\n public java.lang.String getUserName() {\n return _partido.getUserName();\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n }\n }", "public java.lang.String getUserName() {\n java.lang.Object ref = userName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n userName_ = s;\n return s;\n }\n }", "public String getUserRealName() {\r\n return userRealName;\r\n }", "public String getUserName() {\n return sessionData.getUserName();\n }", "public String getUserName() {\n return (String) getAttributeInternal(USERNAME);\n }", "@AutoEscape\n\tpublic String getUser_name();", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _esfTournament.getUserName();\n\t}", "@Override\n public String getUserName() {\n return name;\n }", "public String getUserName() {\n if (passCred != null)\n return passCred.getUserName();\n else\n return null;\n }", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _employee.getUserName();\n\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn super.getUserName();\n\t}", "@Override\n\tpublic String getUserName() {\n\t\treturn super.getUserName();\n\t}", "public String getUserName() {\n return txtUserName().getText();\n }", "public String getUserName()\n\t{\n\t\treturn this.userName;\n\t}", "private String getLoggedInUserName() {\n try {\n /*\n * Get the user information.\n */\n String userName = ServerUtilities.getServerUserInfo().getName();\n\n if(userName.isEmpty()) {\n return new String(\"Anonymous User\");\n }\n return userName;\n } catch (Exception ignore) {\n }\n\n return new String(\"Anonymous User\");\n }", "public String getUser() {\r\n\t\treturn _userName;\r\n\t}", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _second.getUserName();\n\t}", "public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUserName() {\r\n\t\treturn userName;\r\n\t}", "public String getUserName() {\n\t\treturn this.userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserName() {\n\t\treturn userName;\n\t}", "public String getUserRealname() {\n return userRealname;\n }", "String getUserName() {\r\n\t\t\treturn username;\r\n\t\t}", "public java.lang.String getUser() {\n return user;\n }", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _paper.getUserName();\n\t}", "public String getUserName() {\n\t\t\treturn userName;\n\t\t}", "public String getUserName() {\n\t\treturn this.username;\r\n\t}", "java.lang.String getUser();", "@Override\r\n\tpublic String getFullname(String userId) {\n\t\tif (conn == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tString name = null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT username FROM users WHERE user_id = ? \";\r\n\t\t\tPreparedStatement statement = conn.prepareStatement(sql);\r\n\t\t\tstatement.setString(1, userId);\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tname = rs.getString(\"username\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn name;\r\n\t}", "public String returnUserName() {\n\t\treturn this.registration_username.getAttribute(\"value\");\r\n\t}", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }", "public String getUserName() {\n return userName;\n }" ]
[ "0.86399394", "0.8288293", "0.8288293", "0.8288293", "0.8151296", "0.8078177", "0.8046667", "0.79935366", "0.7941082", "0.7920933", "0.7908733", "0.7871395", "0.7871395", "0.7845169", "0.7823669", "0.77972835", "0.7786012", "0.77838546", "0.77771956", "0.7776549", "0.7776549", "0.7776549", "0.7776549", "0.7776549", "0.7776549", "0.7776549", "0.7776549", "0.7776549", "0.77736115", "0.7759459", "0.7759459", "0.7757463", "0.77495277", "0.77495277", "0.7744995", "0.773308", "0.7732928", "0.7730114", "0.7724137", "0.76903045", "0.76854706", "0.76854706", "0.76805794", "0.7669115", "0.76678777", "0.76678777", "0.7663451", "0.7651163", "0.7627571", "0.76223135", "0.76126397", "0.7612198", "0.76018083", "0.7600988", "0.7598457", "0.7598457", "0.7590154", "0.75630796", "0.75544184", "0.75304914", "0.75301707", "0.7509988", "0.7495195", "0.7495195", "0.7495195", "0.7495195", "0.74852747", "0.7477327", "0.7477327", "0.7477327", "0.7477327", "0.7477327", "0.7477327", "0.7477327", "0.7477327", "0.7477327", "0.7477327", "0.74771595", "0.7462468", "0.7457753", "0.7451709", "0.74460703", "0.7429191", "0.7428128", "0.74195737", "0.7419459", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778", "0.7418778" ]
0.0
-1
Check whether the user is in the NONE state.
public boolean isNone() { return state == State.NONE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isNone() {\n if (var == null)\n return (flags & (PRIMITIVE | ABSENT | UNKNOWN)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;\n else\n return (flags & (ABSENT | PRESENT_DATA | PRESENT_ACCESSOR)) == 0;\n }", "public boolean isEmpty() {\n\t\tif (player == ePlayer.none) return true;\n\t\treturn false;\n\t}", "public boolean isEmpty() {\n return userListCtrl.isEmpty();\n }", "public boolean nothing() {\n return nodesNumber() == 0 && edgesNumber() == 0 && nonDirectionalEdgesNumber() == 0;\n }", "public boolean isMaybeAbsent() {\n checkNotUnknown();\n return (flags & ABSENT) != 0;\n }", "public boolean isNEVER()\n {\n return equiv(NEVER);\n }", "public void setNone() {\n\t\tstate = State.NONE;\n\t}", "public boolean isSetUser() {\n return this.user != null;\n }", "public boolean isSetUser() {\n return this.user != null;\n }", "public boolean isNotPresent() {\n checkNotUnknown();\n return !isMaybePresent();\n }", "public boolean isAlone() {\n\t\tif (getMateFollow() != null)\n\t\t\tif (!getMateFollow().isKO())// Checks if the support is dead\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\telse\n\t\t\treturn true;\n\t}", "public boolean isEmpty() {\r\n return CommonUtil.isBlankOrNull(loginId);\r\n }", "public boolean isNull(){\n return false;\n }", "public boolean isZero() {\r\n Vector3 veucl3 = this.getEuclidVector3();\r\n return (veucl3 == null) ? false : veucl3.isZero();\r\n }", "public boolean isNullOrUndef() {\n checkNotPolymorphicOrUnknown();\n return (flags & (NULL | UNDEF)) != 0\n && (flags & (NUM | STR | BOOL)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;\n }", "public boolean isEmpty(){\n\t\treturn isPassable&&!containsItems()&&!containsMonster()&&tileItems.noGold();\r\n\t}", "public boolean isEmpty(){\n\t\tif(attackValue>0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public boolean isNull() {\n return false;\n }", "public boolean isUser()\n\t{\n\t\treturn (id != -1);\n\t}", "public boolean isNull() {\n\t\treturn false;\n\t}", "public boolean isSetUserid() {\n return this.userid != null;\n }", "@Override\n public boolean isUser() {\n return false;\n }", "public boolean verifyNoInactives() {\n\t\treturn !btnInactives.isEnabled();\n\n\t}", "public boolean isEmpty() {\n\t\tif (!rock && food == 0 && critter == null)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean isNilZyhtVO()\n {\n synchronized (monitor())\n {\n check_orphaned();\n nc.vo.crd.bd.interf.zyhtvo.ZyhtVO target = null;\n target = (nc.vo.crd.bd.interf.zyhtvo.ZyhtVO)get_store().find_element_user(ZYHTVO$0, 0);\n if (target == null) return false;\n return target.isNil();\n }\n }", "boolean isNull();", "boolean isNoop();", "public boolean isAnonymousUser() {\n return ElasticSocialFunctions.isAnonymousUser();\n }", "public boolean isSetUserId() {\n return this.userId != null;\n }", "public boolean isSetUserId() {\n return this.userId != null;\n }", "public boolean isSetUserId() {\n return this.userId != null;\n }", "public boolean isSetUserId() {\n return this.userId != null;\n }", "public boolean isSetUserId() {\n return this.userId != null;\n }", "public void resultIsNull(){\n if(alertDialog.isShowing()){\n return;\n }\n if(inActive){\n return;\n }\n }", "public boolean isUnknown() {\n return (flags & UNKNOWN) != 0;\n }", "public boolean isSetUserName() {\r\n return this.userName != null;\r\n }", "public boolean isSetUserName() {\r\n return this.userName != null;\r\n }", "public boolean isSetUserName() {\r\n return this.userName != null;\r\n }", "public boolean isSetUserName() {\r\n return this.userName != null;\r\n }", "public boolean isSetUserName() {\r\n return this.userName != null;\r\n }", "public static boolean isNull() {\r\n\t\tif(instance==null)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean isNulled() {\n \t\treturn nulled;\n \t}", "public boolean isEmpty() {\n\t\treturn person.isEmpty();\n\t}", "public boolean isNull() {\n return Stream.<Object>of(airQualityIndex, humidity,\n measurementTime, pm1, pm25, pm10, pollutionLevel,\n pressure, temperature)\n .allMatch(Objects::isNull);\n }", "public void verifyFalseLogin() {\n alertElement.waitForState().present(30);\n alertElement.assertContains().text(\"Please Enter a Valid User ID\");\n }", "public boolean isNull() {\n return channel instanceof NullChannel;\n }", "public boolean isNull()\n\t{\n\t\treturn cp.isNull();\n\t}", "public boolean isSetUserName() {\n return this.userName != null;\n }", "public boolean isSetUserName() {\n return this.userName != null;\n }", "public static Predicate<String> none() {\n return (each) -> false;\n }", "private boolean isUserAnonymous() {\n // User is anonymous, if his profile is transient.\n return getProfile().isTransient();\n }", "public boolean isAccountNonLocked() {\n\t\treturn true;\n\t}", "public boolean isAccountNonLocked() {\n\t\treturn true;\n\t}", "public boolean isEmpty() {\n\t\treturn tamano == 0;\n\t}", "public boolean hasNoCooldown(User u) {\r\n\t\tfor (int i = 0; i < Main.Bot.cooldown.size(); i++) \r\n\t\t\tif (Main.Bot.cooldown.get(i).hasUser(u))\r\n\t\t\t\treturn false;\r\n\t\t\r\n\t\treturn true;\r\n\t}", "Boolean getStandAlone();", "boolean isNullOmittable();", "public boolean isPlayerDefeated() {\n if (player.getHealth() <= 0) {\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\r\n return totalGifts == 0;\r\n }", "public boolean isDoNothingTransition() {\n\t\t\tif (pop == DPDA.emptyChar && read == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (read == null && pop == push) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "@Override\n\tpublic boolean canBeFalsey() {\n\t\treturn false;\n\t}", "public boolean isEmpty()\n {\n return ( name == null ) && ( data == null ) && ( notes == null );\n }", "public boolean isUnassigned() {\n return !assigned;\n }", "public boolean isUnknown() {\n\t\treturn (access & Opcodes.ACC_UNKNOWN) != 0;\n\t}", "public void setNoneText(String noneText) {\r\n this.noneText = noneText;\r\n }", "public static boolean isUndefined(long roleId) {\n return roleId <= 0 || getById(roleId) == null;\n }", "@Override\n\tpublic boolean isAccountNonLocked() {\n\t\treturn !locked;\n\t}", "public boolean isSetWasNotGiven()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(WASNOTGIVEN$4) != 0;\n }\n }", "public boolean isEmpty() {\n return getCardCount() <= 0;\n }", "boolean isAccountNonLocked();", "boolean isAccountNonLocked();", "public boolean isEmpty() {\n return helpers.isEmpty();\n }", "public boolean isAccountNonLocked() {\n\t\treturn false;\r\n\t}", "public boolean isAccountNonLocked() {\n\t\treturn false;\r\n\t}", "private boolean isAllFieldsAreFull(){\n\t\tboolean lack = true;\n\t\tif (userNameField.getText().equals(\"\")) {\n\t\t\tlackUserNameLabel.setVisible(true);\t\t\t\t\n\t\t\tlack = false;\n\t\t}\n\t\tif (userLastNameField.getText().equals(\"\")) {\n\t\t\tlackUserLastNameLabel.setVisible(true);\n\t\t\tlack = false;\n\t\t}\n\t\tif (userLoginField.getText().equals(\"\")) {\n\t\t\tlackUserLoginLabel.setText(\"to pole nie może być puste\");\n\t\t\tlackUserLoginLabel.setVisible(true);\n\t\t\tlack = false;\n\t\t}\n\t\t\n\t\tif (userPermissionsBox.getSelectionModel().getSelectedIndex() <= -1) {\n\t\t\tlackUserPermissionsLabel.setVisible(true);\n\t\t\tlack = false;\n\t\t}\n\t\t\n\t\tif ((newUser) || (changePassword)){\n\t\t\tif (userPasswordField.getText().equals(\"\")) {\n\t\t\t\tlackUserPasswordLabel.setVisible(true);\n\t\t\t\tlack = false;\n\t\t\t}\n\t\t\tif (userConfirmPasswordField.getText().equals(\"\")) {\n\t\t\t\tlackUserConfirmPasswordLabel.setText(\"to pole nie może być puste\");\n\t\t\t\tlackUserConfirmPasswordLabel.setVisible(true);\n\t\t\t\tlack = false;\n\t\t\t}\n\t\t}\n\t\treturn lack;\n\t}", "boolean isNilObjectives();", "@Override\n\tpublic boolean isAccountNonLocked() {\n\t\treturn isAccountNonLocked;\n\t}", "public boolean isGameOver() {\n return (hasHeWon(computer) || hasHeWon(user) || getAvailableStates().isEmpty());\n }", "@Override\n\tpublic boolean isAccountNonLocked() {\n\t\treturn accountNonLocked;\n\t}", "public Boolean isNull(){\n\t\treturn equals(NULL);\n\t}", "public boolean isEmpty() {\n\t\t// your code here\n\t\treturn false;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn block == Block.EMPTY;\n\t}", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "public boolean hasNeverContacted() {\r\n\t\treturn lastContactTimestamp.get() == 0;\r\n\t}", "public static final Function<Object,Boolean> isNull() {\r\n return FnObject.isNull();\r\n }", "@Override\n public boolean isAccountNonLocked() {\n return Boolean.TRUE;\n }", "public boolean isEmpty() {\n return labeledFieldEmptyOrHidden;\n }", "public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isActiveOrAbsent() {\n return !isInactive();\n }", "public boolean isAccountNonLocked() {\n\t\treturn false;\n\t}", "public boolean isAccountNonLocked() {\n\t\treturn false;\n\t}", "boolean noneGranted(String roles);", "public boolean isDontCare(){\n return hasDontCare;\n }", "public boolean hasEmptyHand(String pid) {\r\n return getPlayerHand(pid).isEmpty();\r\n }", "private static boolean checkNotExistenceForCompare(ForStmt forUser, ForStmt forApplication) {\n return !checkIsPresentForCompare(forUser) && !checkIsPresentForCompare(forApplication);\n }", "public boolean noLives()\r\n\t{\r\n\t\treturn Avatar.getLives() <= 0;\r\n\t}", "public boolean isAuthRequired() {\n return !AfUtil.anyEmpty(_username);\n }", "public boolean isSetUserId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);\n }", "public boolean isSetUserId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);\n }", "public boolean isSetUserId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);\n }" ]
[ "0.6997316", "0.6691835", "0.6479777", "0.63403887", "0.6246283", "0.6216447", "0.6196022", "0.6096771", "0.6096771", "0.6066432", "0.6045078", "0.6017829", "0.6017549", "0.6007424", "0.5992655", "0.5982877", "0.59308434", "0.59286344", "0.5861681", "0.5855456", "0.5838826", "0.5805449", "0.5797158", "0.579526", "0.57887155", "0.5770064", "0.57650375", "0.57601184", "0.57525414", "0.57525414", "0.57525414", "0.57525414", "0.57525414", "0.5751021", "0.57393235", "0.57387453", "0.57387453", "0.57387453", "0.57387453", "0.57387453", "0.5728995", "0.57272774", "0.5726772", "0.57188386", "0.5716459", "0.5716362", "0.57147956", "0.5712161", "0.5712161", "0.5707059", "0.56991947", "0.568935", "0.568935", "0.5684853", "0.56786954", "0.567694", "0.56685877", "0.56599873", "0.56569684", "0.565522", "0.5636522", "0.5631334", "0.5621797", "0.56189346", "0.5617328", "0.56133854", "0.56099606", "0.56074923", "0.5597408", "0.55952513", "0.55952513", "0.55939066", "0.5591849", "0.5591849", "0.55871314", "0.5577687", "0.55750126", "0.5574568", "0.5572638", "0.5572558", "0.5570522", "0.5568645", "0.5566717", "0.55607224", "0.55579287", "0.5555976", "0.55552167", "0.5551654", "0.5545174", "0.55443716", "0.55443716", "0.5542892", "0.5541862", "0.5538552", "0.5538004", "0.5534398", "0.5534011", "0.5533171", "0.5533171", "0.5533171" ]
0.7610076
0
Check whether the user is in the LEFT state.
public boolean isLeft() { return state == State.LEFT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean canBeLeft();", "void hasLeft();", "@Override\n\tpublic boolean canBeLeft() {\n\t\treturn true;\n\t}", "public LTSState getLeftState(){\n\t\treturn leftState;\n\t}", "public void setLeft() {\n\t\tstate = State.LEFT;\n\t}", "public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}", "public boolean isFacingLeft(){\r\n\t\tif(facingLeft == true){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isMoveLeft() {\n return moveLeft;\n }", "@Override\n\tpublic boolean moveLeft() {\n\t\tboolean rs = super.moveLeft();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}", "private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }", "void setLeft(boolean left) {\n myLeft = left;\n }", "public void leftPressed() {\n\t\tkeys.get(keys.put(Keys.LEFT, true));\n\t}", "public IState getLeftState() {\n\t\treturn leftState;\n\t}", "public boolean isSetIsLeft() {\n return EncodingUtils.testBit(__isset_bitfield, __ISLEFT_ISSET_ID);\n }", "public void left() {\n\t\tstate.left();\n\t}", "boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}", "public boolean isLeftKnown() {\n return left != BeaconColor.UNKNOWN;\n }", "private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}", "public void onStateLeft();", "private boolean canDoLeftFusion(TFNode node) throws TFNodeException {\r\n TFNode parent = node.getParent();\r\n if (parent == null) {\r\n throw new TFNodeException(\"Node has no parent and therefore no sibling\");\r\n }\r\n\r\n // Must have a left sibling\r\n if (WCIT(node) > 0) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }", "public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean isLeftRed() {\n return (left == BeaconColor.RED_BRIGHT || left == BeaconColor.RED);\n }", "public void setLeft(boolean left) {\n\t\tthis.left = left;\n\t}", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "public boolean isLeftDown() {\n return pm.pen.getButtonValue(PButton.Type.LEFT);\n }", "public void setLeft(boolean b){ left = b; }", "public void setLeft(boolean b){ left = b; }", "public boolean left() {\r\n if( col <= 0 ) return false;\r\n --col;\r\n return true;\r\n }", "public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }", "private boolean leftCollision(InteractiveObject obj){\n\t\treturn leftUpCollision(obj) || leftDownCollision(obj);\n\t}", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public boolean isLeftToRight() {\n return leftToRight;\n }", "private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}", "@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}", "private void handleLeft() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()-1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()==-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getNumberColumns()-1);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }", "public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}", "public boolean moveLeft() {\n if (position.isLinked(position.getWest())) {\n position.getGameObjects().remove(this.type);\n position = position.getWest();\n position.getGameObjects().add(this.type);\n return true;\n }\n return false;\n }", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public boolean moveLeft() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenLeft() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.LEFT);\r\n\t\t\tif ( currentCol-1 < 0 || maze [currentRow] [currentCol-1].isOpenRight() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol--;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol >= 0 )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Left: \" + moved );\r\n\t\treturn moved;\r\n\t}", "private boolean canDoLeftTransfer(TFNode node) throws TFNodeException {\r\n TFNode parent = node.getParent();\r\n if (parent == null) {\r\n throw new TFNodeException(\"Node has no parent and therefore no sibling\");\r\n }\r\n\r\n // Must have a left sibling\r\n if (WCIT(node) > 0) {\r\n // That sibling must have two or more items in it\r\n TFNode leftSibling = parent.getChild(WCIT(node) - 1);\r\n if (leftSibling.getNumItems() > 1) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean getUserLeftButtonPressed(String msg, String trueButton, String falseButton) {\n msg = msg.replace(\"\\n\", \"<BR>\");\n trueButton = trueButton.replace(\"\\n\", \"<BR>\");\n falseButton = falseButton.replace(\"\\n\", \"<BR>\");\n return boardController.getUserButtonPressed(msg, trueButton, falseButton).equals(trueButton);\n }", "public static char getsLeft() {\n\t\t\treturn sLeft;\n\t\t}", "public boolean isLeftButtonPressed() {\n // checks if the left button of the mouse is pressed\n\n if (leftButtonPressed && released) {\n released = false;\n pressed = true;\n } else if (leftButtonPressed && !released) {\n pressed = false;\n released = false;\n } else {\n released = true;\n pressed = false;\n }\n\n return pressed;\n }", "public boolean isLeftProper() {\n return leftProperType != null && !leftProperType.isNullType() && !leftProperType.isPrimitive()\n && !leftProperType.isArrayType() && !leftProperType.isGeneric();\n }", "private boolean moveLeft() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() - rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() - rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public Direction left() {\n\t\treturn left;\n\t}", "protected boolean anyMovesLeft() {\r\n return super.anyMovesLeft();\r\n }", "public void leftPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.left();\t\n\t\t}\n\t}", "@Override\n public int checkNoMovesLeft(List<Integer> userStates, List<Integer> agentStates) {\n boolean noMovesForPlayer1 = checkEmptyMovesForPlayer(userStates);\n boolean noMovesForPlayer2 = checkEmptyMovesForPlayer(agentStates);\n if (noMovesForPlayer1 && noMovesForPlayer2) return 0;\n else if (noMovesForPlayer1) return NO_MOVES_PLAYER1;\n else if (noMovesForPlayer2) return NO_MOVES_PLAYER2;\n else return BOTH_PLAYERS_HAVE_MOVES;\n }", "public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }", "private void checkLeftWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() <= 0) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t\t\n\t\t\tInvader.setDirectionRight(true);\n\t\t}\n\t}", "public boolean isRight() {\r\n\t\treturn firstNameState == null && lastNameState == null && steetState == null \r\n\t\t\t\t&& cityState == null && phoneNumberState == null && emailState == null \r\n\t\t\t\t&& usernameState == null && passwordState == null && rolesState == null\r\n\t\t\t\t&& siretState == null && urlState == null && postalCode == null;\r\n\t}", "@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}", "private void checkHasNodeLeft() throws RemoteException {\n\t\tif (hasNodeLeft)\n\t\t\tthrow new RemoteException();\n\t}", "public static void setsLeft(char sLeft) {\n\t\t\tGamePreferences.sLeft = sLeft;\n\t\t}", "public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}", "public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}", "public void turnLeft();", "public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}", "public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "public boolean moveLeft()\n {\n\tboolean update;\n\tboolean action = false;\n\t\t\n\tdo\n\t{\n update = false;\n\t\t\t\n for (int y=0; y<cases.length-1; y++)\n {\n for (int x=0; x<cases[y].length; x++)\n\t\t{\n boolean merge;\n boolean move;\n\t\t\t\t\t\n do\n {\n merge = merge(cases[x][y+1],cases[x][y]);\n move = move(cases[x][y+1],cases[x][y]);\n\t\t\tupdate = (update || merge || move);\n if(!action && update)\n {\n action = update; \n }\n } while (merge || move);\n }\n }\n } while (update);\n \n return action;\n }", "public void setMoveLeft(boolean TorF) {\n moveLeft = TorF;\n }", "public void moveLeft()\n {\n if (this.x >= 2) {\n --x;\n } else {\n System.out.println(\"Move is outside of the field! Try again.\");\n }\n }", "private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }", "@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }", "public boolean refreshLeft(){\r\n\t\treturn refreshLeft;\r\n\t}", "private boolean canMoveLeft()\n {\n // runs through board row first, column second\n for ( int row = 0; row < grid.length ; row++ ) {\n for ( int column = 1; column < grid[row].length; column++ ) {\n\n // looks at tile directly to the left of the current tile\n int compare = column-1;\n if ( grid[row][column] != 0 ) {\n if ( grid[row][compare] == 0 || grid[row][column] ==\n grid[row][compare] ) {\n return true;\n }\n }\n }\n } \n return false;\n }", "@Override\n\tpublic void onUserLeftRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "private void checkStateChange() {\n\t\tif(previousState == null){\n\t\t\tpreviousState = getOrientation();\n\t\t}\n\t\telse{\n\t\t\tif(previousState != getOrientation()){\n\t\t\t\tif(isTurningLeft){\n\t\t\t\t\tisTurningLeft = false;\n\t\t\t\t}\n\t\t\t\tif(isTurningRight){\n\t\t\t\t\tisTurningRight = false;\n\t\t\t\t}\n\t\t\t\tpreviousState = getOrientation();\n\t\t\t}\n\t\t}\n\t}", "private void updateJustTurnedLeft(MyAIController controller, Coordinate pos, WorldSpatial.Direction orientation) {\n\t\t// Check car has moved positions\n\t\tif (controller.getPosition() != previousPosition) {\n\t\t\tif (checkFollowingWall(pos, orientation)) {\n\t\t\t\tstate = ExplorerState.WALL_FOLLOWING;\n\t\t\t}\n\t\t}\n\t}", "private void stateMovingLeft(float dt) {\n setPosition(b2body.getPosition().x - getWidth() / 2, b2body.getPosition().y - getHeight() / 2);\n setRegion(bridgeStand);\n\n // Kinematic bodies do not collide with static ones (we can't use WorldContactListener)\n float velX;\n if (getX() <= 0) {\n velX = b2body.getLinearVelocity().x * -1;\n b2body.setLinearVelocity(velX, VELOCITY_Y);\n currentState = State.MOVING_RIGHT;\n }\n }", "public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }", "public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }", "public boolean pageLeft() {\n if (this.mCurItem <= 0) {\n return false;\n }\n setCurrentItem(this.mCurItem - 1, true);\n return true;\n }", "boolean getLeftToRight();", "private boolean hasLeftWall(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\treturn !v.mayMove(Direction.WEST);\n\t\tcase SOUTH:\n\t\t\treturn !v.mayMove(Direction.EAST);\n\t\tcase WEST:\n\t\t\treturn !v.mayMove(Direction.SOUTH);\n\t\tcase EAST:\n\t\t\treturn !v.mayMove(Direction.NORTH);\n\t\tdefault: return false;\n\t\t}\n\t}", "public static void setLeft(char left) {\n\t\t\tGamePreferences.left = left;\n\t\t}", "public String getLeftKey() {\n return this.leftKey;\n }", "public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "private static boolean canCaptureUpLeft(ItalianBoard board, int posR, int posC) {\n try {\n if (((board.getBoard()[posR][posC].getPiece() == PieceType.MAN) && (board.getBoard()[posR - 1][posC - 1].getPiece() == PieceType.MAN)) || (board.getBoard()[posR][posC].getPiece() == PieceType.KING))\n return ((board.getBoard()[posR - 1][posC - 1].getPlace() != board.getBoard()[posR][posC].getPlace()) &&\n (board.getBoard()[posR - 1][posC - 1].getPlace() != PlaceType.EMPTY) &&\n (board.getBoard()[posR - 2][posC - 2].getPlace() == PlaceType.EMPTY));\n } catch (ArrayIndexOutOfBoundsException ignored) {\n }\n return false;\n }", "public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}", "public boolean hasLeftChild() {\n\t\treturn leftChild != null;\n\t}", "LogicExpression getLeft();", "public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}", "private boolean isLeftButtonEvent(MouseEvent me) {\r\n\t\treturn ((me.getModifiers() & MouseEvent.BUTTON1_MASK) == MouseEvent.BUTTON1_MASK);\r\n\t}", "public BeaconColor getStateLeft() {\n return left;\n }", "public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }", "private void leftButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_leftButtonKeyPressed\n this.leftButton.setEnabled(true);\n if(!this.left){\n this.controller.setLeft(true);\n this.left = true;\n }\n }", "public void goLeft() {\n if(page.left == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"left\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.left;\n addQueue();\n }", "public boolean requiresLeftMarking() {\n return false;\n }", "public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}" ]
[ "0.6891382", "0.68422425", "0.6787012", "0.6680951", "0.66609037", "0.6654329", "0.66265625", "0.6522035", "0.6509862", "0.64566123", "0.643853", "0.64340204", "0.64305943", "0.6416572", "0.6406212", "0.634946", "0.63493985", "0.63448083", "0.6342463", "0.63126", "0.6239483", "0.6203408", "0.6192218", "0.6184378", "0.61840034", "0.6181208", "0.61521864", "0.61380243", "0.61131424", "0.6110116", "0.6110116", "0.6088401", "0.6081901", "0.6073053", "0.607192", "0.60436875", "0.60427487", "0.60130554", "0.6010472", "0.5983628", "0.5965727", "0.59551615", "0.59466743", "0.59442997", "0.59437585", "0.59283173", "0.5926989", "0.59145397", "0.5911304", "0.5906008", "0.5904751", "0.5898733", "0.5877528", "0.5869921", "0.5850466", "0.58484846", "0.5840436", "0.5806563", "0.580418", "0.57930654", "0.578326", "0.57792836", "0.5777986", "0.5777676", "0.57632506", "0.57555735", "0.57397515", "0.57318234", "0.57231367", "0.5722928", "0.5715049", "0.57106876", "0.5707762", "0.5698063", "0.5697818", "0.56925774", "0.5689342", "0.5683845", "0.56754196", "0.5661162", "0.5658396", "0.56487435", "0.5646128", "0.5641965", "0.5621462", "0.5621075", "0.56195766", "0.5615239", "0.5612095", "0.5610795", "0.5602318", "0.5600913", "0.55866617", "0.55855113", "0.55805016", "0.55734986", "0.5566055", "0.5565435", "0.55552447", "0.5541224" ]
0.779129
0
Check whether the user is in the JOINED state.
public boolean isJoined() { return state == State.JOINED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isJoining(){\n\t\treturn join!=null;\n\t}", "public boolean isJoin()\r\n { return type == JOIN; }", "public boolean isJoin()\r\n {\n return false;\r\n }", "public boolean isJoining(Train train){\n\t\treturn join==train;\n\t}", "@Override\n\tpublic boolean canJoin() {\n\t\treturn isOpen() || isRunning();\n\t}", "public Boolean getIsJoin () {\r\n\t\treturn isJoin;\r\n\t}", "public void setJoined() {\n\t\tstate = State.JOINED;\n\t}", "boolean hasJoinGameRequest();", "public static boolean CanSendJoinRequest() \n\t{\t\n\t\t//login and Goto community\n\t\tGoto();\n\t\t\n\t\t//Send Join request\n\t\tWebElement JoinCommunity= Driver.Instance.findElement(PageObjRef.JoinCommunity);\n\t\tJoinCommunity.click();\n\t\t\n\t\t//Validate\n\t\tString Check= Driver.Instance.findElement(PageObjRef.CheckJoinRequestSent).getText();\t\t\n\t\tif(Check.endsWith(\"In a short while someone will review your request.\"))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean canJoin(User user, Chatroom chatroom) {\n\t\t// invites are needed to join the chatroom and the useer has not received an\n\t\t// invite\n\t\tif (chatroom.getInvited_only() && !memberInvitationSent(user, chatroom)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "void join(User user);", "public boolean joinHelper(Person p){\n\t return false;\n\t}", "public boolean joinLobby(Lobby lobby)\n {\n if (lobby.assignSlot(this))\n {\n this.currentLobby = lobby;\n return true;\n }\n return false;\n }", "public boolean join(){\n\t\tif (joined) return true;\n\t\t\n StructuredDocument creds = null;\n try {\n AuthenticationCredential authCred = new AuthenticationCredential(peerGroup, null, creds );\n MembershipService membership = peerGroup.getMembershipService();\n Authenticator auth = membership.apply( authCred );\n \n // Check if everything is okay to join the group\n if (auth.isReadyForJoin()){\n Credential myCred = membership.join(auth);\n StructuredTextDocument doc = (StructuredTextDocument)\n myCred.getDocument(new MimeMediaType(\"text/plain\"));\n }\n else\n log.error(\"You cannot join repository\");\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n log.info(\"Joined to Virtual Repository (low-level)\");\n //change DatabaseDiscovery\n DatabaseDiscovery dd = new DatabaseDiscovery(peerGroup.getParentGroup());\n \n try {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n //looking for cmu service\n try {\n\t\t\tmanagementModule = dd.obtainManagementServ(peerGroup.getPeerID().toString());\n\t\t} catch (GridException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n \n \n //point to discovery service in joined group\n new DatabaseDiscovery(peerGroup);\n\n this.joined = true; \n \n\t\treturn true;\n\t}", "private boolean canEnlist() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "public boolean hasJoins() {\r\n\t\treturn joins != null &&\r\n\t\t !joins.isNull();\r\n\t}", "@Override\n\tpublic boolean isOwnMessage() {\n\t\ttry {\n\t\t\treturn (this.user.id == AccountManager.current_account.getUser().id);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasJoinGameResponse();", "public boolean isActive(){\n return (registeredParticipants.size() == connections().size());\n }", "public boolean isLoggedin(){\n return STATE.equals(IN);\n }", "public static boolean own() {\n return InventoryManager.getAccessibleCount(ItemPool.COMBAT_LOVERS_LOCKET) > 0;\n }", "public void setIsJoin (Boolean isJoin) {\r\n\t\tthis.isJoin = isJoin;\r\n\t}", "public boolean isUserLoggedIn(Context context){\n\t\tDatabaseHandler db = new DatabaseHandler(context);\n\t\tint count = db.getRowCount();\n\t\tif(count > 0){\n\t\t\t// user logged in\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isLoggedIn() {\n FirebaseUser currentUser = mAuth.getCurrentUser();\n return currentUser != null && prefs.isVerified();\n }", "boolean hasSelectedUser();", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "public boolean checkIn(){\n return state.checkIn();\n }", "public boolean autoJoinAllowed() {\n return _autoJoin;\n }", "@Override\n\tpublic boolean hasAvailability(String userId) throws ASException {\n\t\tUser user = userDao.get(userId, true);\n\t\t\n\t\t// No messaging enabled means no coupons received\n\t\tif( !user.getGeoFenceEnabled() || !user.getReceivePushMessages() ) \n\t\t\treturn false;\n\t\t\n\t\t// if has an active lock, means false\n\t\tif( dmlDao.hasActiveLocks(userId, new Date()))\n\t\t\treturn false;\n\t\t\n\t\t// No surprises till now... means it's OK\n\t\treturn true;\n\t}", "public boolean isMyTurn() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getActivePlayer());\n }", "private boolean canSafelyLeave(long guildId, MusicState state) {\n if (System.currentTimeMillis() - state.getLastInteract() < TIME_TILL_LEAVE) {\n return false;\n }\n\n if (state.getCurrentQueue().queue().isEmpty()) {\n return true;\n }\n\n Guild guild = this.manager.getGuildById(guildId);\n if (guild == null) {\n return false;\n }\n VoiceChannel channel = guild.getAudioManager().getConnectedChannel();\n if (channel == null) {\n // Not connected?\n return true;\n }\n // Number of people listening\n long listeningCount = channel.getMembers().stream().filter(m -> {\n GuildVoiceState vs = m.getVoiceState();\n return !m.getUser().isBot() && vs != null && !vs.isDeafened();\n }).count();\n\n return listeningCount == 0;\n }", "boolean isInRoom(String username)\n {\n for (ClientHandle participant : participants) {\n if (participant.getUsername().equals(username))\n {\n return true;\n }\n }\n return false;\n }", "protected boolean isReferenced() {\r\n return mReferenced || mUsers.size() > 0;\r\n }", "public static Result isLDLMember() {\n String email = session().get(\"email\");\n if (email == null) {\n return unauthorized(\"unauthorized - you must be logged in!\");\n }\n\n // Load the user and check rights:\n User user = User.findByEmail(email);\n if (!user.isLDLMember()) {\n return unauthorized(\n \"unauthorized - you must be a member of a Legal Deposit library organisation to view the crawled resources\");\n }\n\n // Otherwise, all good:\n response().setHeader(\"X-Auth-Remote-User\", user.name);\n response().setHeader(\"X-Auth-Remote-User-Email\", user.email);\n response().setHeader(\"X-Auth-Remote-User-Primary-Role\",\n user.getRole().name);\n return ok(Json.toJson(\"isLDLMember\"));\n }", "boolean hasLobbyId();", "public boolean isLoggedIn() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n return sharedPreferences.getString(KEY_USER, null) != null;\n }", "public boolean isActiveUser() {\r\n if (currentProcessInstance == null)\r\n return false;\r\n \r\n String[] states = currentProcessInstance.getActiveStates();\r\n if (states == null)\r\n return false;\r\n \r\n Actor[] users;\r\n for (int i = 0; i < states.length; i++) {\r\n try {\r\n users = currentProcessInstance.getWorkingUsers(states[i]);\r\n for (int j = 0; j < users.length; j++) {\r\n if (getUserId().equals(users[j].getUser().getUserId()))\r\n return true;\r\n }\r\n } catch (WorkflowException ignored) {\r\n // ignore unknown state\r\n continue;\r\n }\r\n }\r\n \r\n return false;\r\n }", "public UserJoins getUserJoins(Integer tid, int uid);", "public static boolean isLoggedIn() {\n\t\treturn arcade.hasPlayer();\n\t}", "public boolean isLoggedIn(){\n return mSharedPreferences.contains(SharedPrefContract.PREF_IS_LOGGED_IN) && mSharedPreferences.getBoolean(SharedPrefContract.PREF_IS_LOGGED_IN, true);\n }", "public boolean isLoggedIn() {\n SQLiteDatabase db = this.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n SportPartnerDBContract.LoginDB.COLUMN_EMAIL_NAME\n };\n\n Cursor cursor = db.query(\n SportPartnerDBContract.LoginDB.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null\n );\n\n boolean logedin = cursor.getCount() == 1;\n cursor.close();\n return logedin;\n }", "private boolean isFollowing(User user, String target)\n{\n \n DefaultListModel following = user.getFollowings();\n if (following.contains(target))\n {\n return true;\n }\n return false;\n}", "boolean isLocked();", "boolean isLocked();", "public boolean hasStartedUserState(int userId) {\n return this.mStartedUsers.get(userId) != null;\n }", "public void setJoin(boolean canJoin) {\n this.canJoin = canJoin;\n }", "Boolean isAccountLocked(String username);", "public Boolean isFollowing() {\n Integer groupType = getGroupType();\n if (groupType != null && groupType == Group.DISCUSSION_KEY) {\n return isMember();\n } else {\n return isFollowing;\n }\n }", "private boolean isContactableUser() {\r\n\r\n return (friendFeed == null || friendFeed.getContact() == null) ? false\r\n : friendFeed.getContact().isContactable();\r\n }", "public boolean isLoggedIn() {\n return mAuth.getCurrentUser() != null;\n }", "boolean hasAccountLink();", "boolean hasUserManaged();", "public static boolean CanCancelJoinRequest()\n\t{\n\t\t//login and Goto community\n\t\tGoto();\n\t\t\n\t\t//Send Join request\n\t\tWebElement CancelRequest= Driver.Instance.findElement(PageObjRef.CancelRequest);\n\t\tCancelRequest.click();\n\t\t\t\t\n\t\t//Validate\n\t\tString Check= Driver.Instance.findElement(PageObjRef.CheckCancelRequest).getText();\t\t\n\t\tif(Check.endsWith(\"was canceled.\"))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isLoggedIn() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n return sharedPreferences.getString(KEY_EMAIL, null) != null;\r\n }", "Boolean isLogIn();", "public boolean isLeader() throws RemoteException;", "public boolean isLeader() throws RemoteException;", "public boolean hasLanded ();", "public boolean hasAccount(){\r\n\t\treturn (associatedAccount != null);\r\n\t}", "public boolean checkIfLoggedIn() \n {\n if(this.getLoggedUser() != null)\n {\n return true;\n }\n return false;\n }", "private boolean isLoggedIn() {\n // Gets SharedPreferences\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n // Gets boolean, which displays if the user has ever logged in.\n // This changes to true, when the user has logged in\n return sharedPreferences.getBoolean(getResources().getString(R.string.pref_logged_in_key), getResources().getBoolean(R.bool.pref_already_logged_in_default));\n }", "public boolean clockedIn() {\n return state instanceof ClockedIn;\n }", "@Override\n\tpublic boolean isJoinedToTransaction() {\n\t\treturn false;\n\t}", "public boolean isUser()\n\t{\n\t\treturn (id != -1);\n\t}", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public boolean isLocked();", "public static boolean isLoginable(Long id)\r\n {\r\n User u = get(id);\r\n return(\r\n User.ACTIVATED.equals(u.getStatus())\r\n );\r\n }", "private boolean canJoin() {\n\t\tdouble distanceBetween=0;\n\t\tif (join==null)\n\t\t\treturn true;\n\t\tif (join.cars.get(join.cars.size()-1).getTrain()!=join)\n\t\t\treturn true;\n\t\t//Check if the train to be joined still exists (it could have crashed or reached its destination/dead-end).\n\t\tif(!this.getHead().getObserver().get(0).containsTrain(join))\n\t\t\treturn true;\n\t\t/*Compute the needed space (diameter of the circumscribing circle) between two vehicles to be sure that a train can cross an other train \n\t\t * without crashing.*/\n\t\tdouble distance=Math.sqrt(Math.pow(this.cars.get(0).getImage().getWidth(),2)+Math.pow(this.cars.get(0).getImage().getHeight(),2));\n\t\tif(this.getHead().getIntermediate()==join.getTail().getIntermediate())\n\t\t{\n\t\t\t//If both trains have the same intermediate, test if the minimum distance is respected.\n\t\t\tdistanceBetween = Math.sqrt(Math.pow(this.getHead().xpoints[0]-join.getTail().xpoints[0],2)+Math.pow(this.getHead().ypoints[0]-join.getTail().ypoints[0],2));//-distance;\n\t\t\tfor(int i = 0; i < 4; ++i)\n\t\t\t\tfor(int j = 0; j < 4; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tdistanceBetween = Math.min(distanceBetween, Math.sqrt(Math.pow(this.getHead().xpoints[j]-join.getTail().xpoints[i],2)+Math.pow(this.getHead().ypoints[j]-join.getTail().ypoints[i],2)));//-distance;\n\t\t\t\t\t}\n\t\t\tif(distanceBetween>distance)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}\n\t\tif (this.getHead().getObserver().get(0).newIntermediate(this.getHead().getIntermediate(), this.getHead().getDestination())==join.getTail().getIntermediate())\n\t\t{\n\t\t\t/*If both trains do not have the same intermediate: compute the distance from the current train's head to the next intersection and add it\n\t\t\t * to the distance from the next intersection to the tail of the train to be joined*/\n\t\t\tdistanceBetween=Math.sqrt(Math.pow((this.getHead().xpoints[0]+(this.getHead().xpoints[1]-this.getHead().xpoints[0])/2.f)-join.getTail().getTraversedIntersection().x,2)+\n\t\t\t\t\tMath.pow((this.getHead().ypoints[0]+(this.getHead().ypoints[1]-this.getHead().ypoints[0])/2.f)-join.getTail().getTraversedIntersection().y,2));\n\t\t\tdistanceBetween+=Math.sqrt(Math.pow((join.getTail().ypoints[3]+(join.getTail().ypoints[2]-join.getTail().ypoints[3])/2.f)-join.getTail().getTraversedIntersection().y,2)+\n\t\t\t\t\tMath.pow((join.getTail().xpoints[3]+(join.getTail().xpoints[2]-join.getTail().xpoints[3])/2.f)-join.getTail().getTraversedIntersection().x, 2));\n\t\t\tif (distanceBetween>distance)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean checkTrailUser(String trailUserId, String currentUserId) {\n if(trailUserId.equals(currentUserId))\n return true;\n return false;\n }", "private boolean joinGame() throws RemoteException{\n\t\tgui.showLoginWindow(playerDetails);\n\n\t\twhile(!gui.isUserDataAvailable()){\n\t\t\t// wait for user to enter details\n\t\t\tDebug.log(\"MainMenu\", \"waiting for player details\");\n\t\t\ttry{\n\t\t\t\tThread.sleep(1000);\n\t\t\t}catch(InterruptedException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\t\t}\n\t\tplayerDetails = gui.getPlayerDetails();\n\t\tDebug.log(\"MainMenu\", \"player details received!\");\n\n\t\tif(playerDetails == null) quitGame(false); // quit if player declined/cancelled to enter details\n\n\t\t/* Get preferred position */\n\t\tpreferredPosition = gui.getPreferredPosition();\n\n\t\t/* Register this client as Callback */\n\t\treturn server.connect(this, myHost, myPort, preferredPosition, false, playerDetails.getFirstName(), playerDetails.getSurname(),\n\t\t\t\tplayerDetails.getAddress(), playerDetails.getPhone(), playerDetails.getUsername(), playerDetails.getPassword());\n\t}", "public boolean isLoggedIn() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(AppConfig.SHARED_PREF_NAME, Context.MODE_PRIVATE);\n return sharedPreferences.getString(AppConfig.EMAIL, null) != null;\n }", "@Override\n protected boolean isFinished() {\n return (m_left_follower.isFinished() || m_right_follower.isFinished());\n }", "public boolean isLoggedIn(){\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n if (sharedPreferences.getString(KEY_USERNAME, null) != null){\n return true;\n }\n return false;\n }", "public static boolean isUserPassed() {\n return isUserPassed(user);\n }", "@Override\n\tpublic boolean isUserLoggedIn() {\n\t\treturn sessionService.getCurrentUserId() != null;\n\t}", "public boolean isLiked();", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean isLooting() {\r\n\t\t\treturn this.isLooting;\r\n\t\t}", "private boolean hasLinkToUseraccess(Paymentform paymentform) {\n return paymentform.getPaymentformUserid() != null;\n }", "@Override\n\tpublic boolean isOnline(String userId) throws Exception {\n\t\treturn false;\n\t}", "public boolean checkIn()\r\n\t{\r\n\t\tif(this.status == 'B')\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "@Override\n public boolean isLocked() {\n Preconditions.checkState(connection != null);\n try {\n if (super.isLocked() && locked) {\n DbLockRecord record = checkExpiry(fetch(session, false, false));\n return (record.isLocked() && instanceId().compareTo(record.getInstanceId()) == 0);\n }\n return false;\n } catch (Exception ex) {\n throw new LockException(ex);\n }\n }", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "private boolean isLeaseHeld(int memberLeaseId) {\n return memberLeaseId == leaseId;\n }", "public static boolean isLoggedIn() {\n return Application.getGame().isLoggedIn();\n }", "public void join(Player player) {\n if (this.stored.contains(player.getName()) ^ !this.optInEnable) {\n if (Trivia.wrapper.permission(player, PermissionTypes.PLAY) && this.running) {\n if (!this.active.contains(player)) {\n this.active.add(player);\n player.sendMessage(\"Qukkiz is now \" + ChatColor.GREEN + \"enabled\" + ChatColor.WHITE + \".\");\n }\n }\n }\n }", "public boolean isUserLoggedIn();", "public boolean isUserInGroup(long idUser, long idGroup);", "private boolean isBlocked(Intent intent)\n {\n String newState = intent.getStringExtra(PortalDetectorService.EXTRA_PORTAL_STATE);\n \n return !(State.NO_PORTAL.equals(newState) || State.SIGNED_IN.equals(newState));\n }", "boolean isMember();", "public boolean isLocked() {\n return (lockId == null ? false : true);\n }" ]
[ "0.75148267", "0.69609606", "0.694948", "0.66458255", "0.6551428", "0.6549819", "0.651844", "0.6240759", "0.59832346", "0.59278613", "0.5868235", "0.5863532", "0.57537264", "0.57020205", "0.5668984", "0.5663307", "0.56525576", "0.564117", "0.5557644", "0.5530874", "0.5524858", "0.5489149", "0.5480368", "0.5468318", "0.54629636", "0.54456484", "0.5431088", "0.5420602", "0.54168445", "0.5396785", "0.53822064", "0.53787816", "0.5360751", "0.5348291", "0.5344583", "0.5342086", "0.53408563", "0.5333368", "0.5329382", "0.5328378", "0.53244597", "0.5323102", "0.5320536", "0.5320536", "0.5319538", "0.53040653", "0.5292395", "0.5278951", "0.52766377", "0.5274983", "0.5268065", "0.5266949", "0.526075", "0.5237771", "0.5228725", "0.52284145", "0.52284145", "0.5215868", "0.52047557", "0.5193546", "0.5185331", "0.5179435", "0.5178517", "0.51774776", "0.5173704", "0.5173704", "0.51632464", "0.51632464", "0.5160765", "0.5154468", "0.51407623", "0.5135994", "0.51261955", "0.5122191", "0.512125", "0.51202625", "0.5119802", "0.5112632", "0.510673", "0.51065385", "0.51057684", "0.509737", "0.5095856", "0.5092774", "0.50905985", "0.5089229", "0.5089229", "0.5089229", "0.5089229", "0.5089229", "0.5089229", "0.5089229", "0.50891984", "0.5071196", "0.50658244", "0.5055987", "0.5051535", "0.50489986", "0.5046468", "0.50402814" ]
0.7656348
0
Check whether the user is in the READY state.
public boolean isReady() { return state == State.READY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isReady();", "public boolean isReady();", "public Boolean isAvailable()\n\t{\n\t\treturn presence != null && presence.equals(AVAILABLE);\n\t}", "boolean isReady();", "boolean isReady();", "boolean isReady();", "public boolean isReady() {\n return ready;\n }", "public boolean isReady()\r\n {\r\n return _isReady;\r\n }", "public boolean isReady() {\n return isReady;\n }", "void isReady();", "void isReady();", "public boolean isReady() {\n return mIsReady;\n }", "public boolean ready();", "public void IsReady() {\n\t\tSystem.out.println(\"Table now ready for customers.\");\n\t\ttable.setState(table.GetReady());\n\t}", "public boolean ready ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"ready\", true);\n $in = _invoke ($out);\n boolean $result = $in.read_boolean ();\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return ready ( );\n } finally {\n _releaseReply ($in);\n }\n }", "public boolean addReadyUser(User user) {\r\n\t\tif (playerState.get(user) == ENTERED) {\r\n\t\t\tplayerState.remove(user);\r\n\t\t\tplayerState.put(user, READY);\r\n\t\t\treadyUser++;\r\n\t\t\tbroadCast(\"before_notify\", String.valueOf(user.getNickname()) + \" 님이 READY\");\r\n\t\t\tif (readyUser == users.size()) {\r\n\t\t\t\tbroadCast(\"GAME_PLAY_START\", \"\");\r\n\t\t\t\tthis.status = LOAD;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.print(\"somthing wrong\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean ready() {\n diff = eventTime - System.currentTimeMillis(); //Step 4,5\n return System.currentTimeMillis() >= eventTime;\n }", "public boolean getReady() {\r\n\t\treturn ready;\r\n\t}", "@Override\n\tpublic boolean isReady() {\n\t\treturn (this.baseTime == this.timeRemaining);\n\t}", "public boolean ready() {\n try {\n return in.available() > 0;\n } catch (IOException x) {\n return false;\n }\n }", "public boolean isReady(){\n return !result.equals(\"\");\n }", "public boolean isAvailable() {\n return LocalTime.now().isAfter(busyEndTime);\n }", "public Boolean isDatabaseReady() {\n\t\tif (databaseIsReady == false) {\n\t\t\tdatabaseIsReady = tableExists(SERVICE_STATE_TABLE);\n\t\t}\n\t\treturn databaseIsReady;\n\t}", "protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean isReady() {\n return areValidReadings(mReadings);\n }", "public boolean isAvailable() {\n\t\tObject oo = get_Value(\"IsAvailable\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public boolean checkIn()\r\n\t{\r\n\t\tif(this.status == 'B')\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean ready() {\n\t\treturn this.ok;\n\t}", "Boolean isAvailable();", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "public boolean isAvailable() {\r\n return isavailable;\r\n }", "public boolean getIsReady() {\n return localIsReady;\n }", "public Boolean isReady()\n {\n return (sensorModules != null && !sensorModules.isEmpty());\n }", "public void clientReady(String user){\r\n\t\tuserReady.put(user, true);\t\r\n\t\tthis.checkState();\r\n\t}", "@Override\n\tpublic boolean isReady() {\n\t\treturn false;\n\t}", "protected final boolean isReady() {\n // check if visible (invisible components are ok to be not ready)\n if (!this.isVisible()) {\n return true;\n }\n if (!this.isDisplayable()) {\n return true;\n }\n // check if this is not ready\n if (!ready) {\n return false;\n }\n // check if any child is not ready\n for (BlankDialogModule module : childModules) {\n if (!module.isReady()) {\n return false;\n }\n }\n // all ready!\n return true;\n }", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "public static boolean isBillingReady ()\n {\n return (!CShell.isGuest() && !CShell.isPermaguest()\n && !MemberMailUtil.isPlaceholderAddress(CShell.creds.accountName));\n }", "@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean isServiceReady();", "public boolean isReady() {\n return this.mWmService.mDisplayReady && this.mDisplayReady;\n }", "@Override\n public synchronized void isReady(String username, boolean ready) throws RemoteException {\n Player p = getPlayer(username);\n if (p != null) {\n p.setReady(ready);\n System.out.println(username + (ready ? \" no\" : \"\") + \" esta listo!\");\n }\n }", "public void setReady() {\n\t\tthis.state = State.READY;\n\t}", "private boolean isBusy() {\n return currentStudent != null;\n }", "public Boolean waitingUser(){\n\t\tif (currentPlayer == 0){\n\t\t\tSystem.out.println(\"You are the first player, changing waitingUser to true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isAvailable(){\n\t\ttry{\n\t\t\tgetPrimingsInternal(\"Test\", \"ATGATGATGATGATGATGATG\");\n\t\t}\n\t\tcatch(IOException e){\n\t\t\treturn false;\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void setReady() {\n this.isReady = true;\n }", "@Override\n public boolean isReady() {\n return true;\n }", "@SuppressWarnings(\"WeakerAccess\")\n public ReadyState getReadyState() {\n return mReadyState;\n }", "@Override\r\n\tpublic boolean isReady() {\n\t\treturn !finish;\r\n\t}", "public boolean isAvailable() {\n return available;\n }", "public boolean isAvailable() {\n return available;\n }", "@Override\n public boolean isAvailable() {\n return room.isAvailable();\n }", "public void setReady() {\n\t\tstate = State.READY;\n\t}", "public boolean isAvailable()\n {\n return available;\n }", "public boolean isAvailable() {\n return available;\n }", "public boolean isAvailable() {\n return available;\n }", "public boolean isAvailable() {\r\n\t\treturn available;\r\n\t}", "public boolean getReadyToRun();", "public boolean isAvailable() {\r\n\treturn available;\r\n }", "@Override\n public boolean isReady() {\n return true;\n }", "boolean isWaiting()\n {\n return waitFlags != 0;\n }", "@Override\n public boolean isReady() {\n return (running && !opening) || packetQueue.size() > 0;\n }", "boolean checkAvailable(String userName);", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@DISPID(138)\r\n\t// = 0x8a. The runtime will prefer the VTID if present\r\n\t@VTID(133)\r\n\tboolean isWaitingUserResponse();", "private void isSystemReady() {\n\tif ((moStore.getAuthenticationDefinition().getQuery() == null)\n\t\t|| moStore.getJdbcConnectionDetails() == null) {\n\t moSessionStore.setSystemToHaltState();\n\n\t return;\n\t}// if ((moStore.getAuthenticationDefinition().getQuery() == null)\n\n\tmoSessionStore.setSystemToReadyState();\n }", "default boolean isAvailable() {\n switch (getState()) {\n case STOPPED:\n return true;\n case STARTING:\n return false;\n case STARTED:\n return false;\n case STOPPING:\n return false;\n default:\n throw new IllegalStateException(\"The speaker state is in an unknown state\");\n }\n }", "private boolean allReady() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n if (playersInLobby.length <= 1)\n return false;\n for (PlayerModel pl : playersInLobby) {\n if (!pl.isReady() && !(pl instanceof ClientPlayerModel))\n return false;\n }\n return true;\n }", "boolean isAvailable() {\r\n\t\treturn available;\r\n\t}", "public boolean isStateAvailable(int paraState) {\n\t\treturn true;\n\t}", "public boolean isReady() throws java.io.IOException {\n\n return br.ready();\n }", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "public boolean isReadyForRelease() {\r\n return true;\r\n }", "@Override\n public boolean isReady() {\n return isFinished();\n }", "boolean isBlipReady(ConversationBlip blip);", "public void onReadyButton(View view) {\n mUser.setState(User.UserState.DoneWithNight);\n\n // NOTE!!!!!!!!!!!!!!!!!!\n // When ever the User updates,\n // Because of our event up above,\n // A check goes to see if everyone is ready.\n // If everyone is ready, then it moves to the next Lobby!\n // I hope.\n mRoom.updateUser(mUser);\n Intent intent = new Intent(this, DayMain.class);\n intent.putExtra(\"Client_Data\", mUser);\n intent.putExtra(\"Room_Data\", mRoom);\n Log.v(TAG, \"Starting day for the Villager \");\n startActivity(intent);\n\n }", "@Override\r\n\tpublic boolean isReady() {\n\t\tResultSetDTO dto = mongoManager.fetchAndUpdateAvailableToRead(previousCollectionName);\r\n\t\t\r\n\t\tlogger.info(\"ready to start a new transaction? : [\"+(dto.isNotEmpty()?\"Yes\":\"No\")+\"], fetch size : \"+dto.getBatchRowsSize());\r\n\t\tif(dto.isNotEmpty()){\r\n\t\t\t\r\n\t\t\tnextBatchRows = dto.getBatchRows();\r\n\t\t\tcollectionName = dto.getCollectionName();\r\n\t\t\tpreviousCollectionName = collectionName;\r\n//\t\t\tlong idletime = 1 * 1000;\r\n//\t\t\tlogger.info(\"sleeping(has data)... idle time:\"+idletime+\" ms\");\r\n//\t\t\tUtils.sleep(idletime);\r\n\t\t\tlogger.debug(\"received data, prepare to sleep for a while...\");\r\n\t\t\tUtil.sleepForawhile(3 * 1000);\r\n\t\t\treturn true;\r\n\t\t} else{ //sleep while there is no data found\r\n\t\t\tlogger.warn(\"no data found, sleeping...\");\r\n\t\t\tUtil.sleepForawhile(6 * 1000);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n//\t\treturn mongoManager.getAvailableToRead(nextRead) > 0;\r\n\t}", "boolean isAvailable( long millis );", "public boolean isATMReadyTOUse() throws java.lang.InterruptedException;", "boolean isBlipReady(String blipId);", "private boolean checkBootstrap ()\n {\n if (game.hasBootstrap()) {\n return true;\n } else {\n log.info(\"Game: \" + game.getGameId() + \" reports that boot is not ready!\");\n game.setStateBootPending();\n return false;\n }\n }", "@Override\n\tpublic boolean hasAvailability(String userId) throws ASException {\n\t\tUser user = userDao.get(userId, true);\n\t\t\n\t\t// No messaging enabled means no coupons received\n\t\tif( !user.getGeoFenceEnabled() || !user.getReceivePushMessages() ) \n\t\t\treturn false;\n\t\t\n\t\t// if has an active lock, means false\n\t\tif( dmlDao.hasActiveLocks(userId, new Date()))\n\t\t\treturn false;\n\t\t\n\t\t// No surprises till now... means it's OK\n\t\treturn true;\n\t}", "public boolean hasPlayready() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "public void setReady(final boolean isReady)\r\n {\r\n _isReady = isReady;\r\n }", "public boolean isBusy() {\n return isBusy;\n }", "@Override\n public boolean isReady() {\n //at least one parameter estimtion must be enabled\n return (mPositionEstimationEnabled || mTransmittedPowerEstimationEnabled || mPathLossEstimationEnabled) &&\n //if position estimation is disabled, an initial position must be provided\n !(!mPositionEstimationEnabled && mInitialPosition == null) &&\n //if transmitted power estimation is disabled, an initial transmitted power must be provided\n !(!mTransmittedPowerEstimationEnabled && mInitialTransmittedPowerdBm == null) &&\n //readings must also be valid\n areValidReadings(mReadings);\n }", "private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }", "@Override\n public boolean isReady() {\n return !isDone;\n }", "public boolean verifyAndSetStatus() {\n if (status == FINISHED) {\n // No further checks needed\n return false;\n }\n \n if (Float.compare(estimation, 0f) <= 0) {\n if (status == READY_FOR_ESTIMATION) {\n return false;\n } else {\n status = READY_FOR_ESTIMATION;\n return true;\n }\n } else {\n // If no sprint was yet assigned, we must be in state\n // READY_FOR_SPRINT, otherwise in state IN_SPRINT\n if (sprint == null) {\n if (status == READY_FOR_SPRINT) {\n return false;\n } else {\n status = READY_FOR_SPRINT;\n return true;\n }\n } else {\n if (status == IN_SPRINT) {\n return false;\n } else {\n status = IN_SPRINT;\n return true;\n }\n }\n }\n }", "public boolean isBusy() {\n\t\treturn false;\n\t}", "private boolean isProcessorReady(int aStatus) {\n if (aStatus == Constants.CAS_PROCESSOR_READY || aStatus == Constants.CAS_PROCESSOR_RUNNING) {\n return true;\n }\n\n return false;\n }", "public boolean isBusy();", "public boolean isAvailable() {\n return this.isAcceptingRider && this.currentTrip == null;\n }", "public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }" ]
[ "0.6814", "0.6814", "0.68056715", "0.68049395", "0.68049395", "0.68049395", "0.68047035", "0.6802912", "0.6784457", "0.6598324", "0.6598324", "0.6582867", "0.65228844", "0.65180475", "0.64468294", "0.6436942", "0.6427495", "0.64246637", "0.6422763", "0.6411706", "0.6392344", "0.6355353", "0.6353231", "0.632212", "0.63079256", "0.6299457", "0.6292899", "0.62911046", "0.62773097", "0.6275917", "0.6275917", "0.6242844", "0.6224985", "0.61981297", "0.6172439", "0.6161468", "0.61597276", "0.61574644", "0.61574644", "0.61574644", "0.61574644", "0.61524487", "0.6151656", "0.61412716", "0.61325574", "0.61276406", "0.61188215", "0.6118314", "0.6112174", "0.6100566", "0.6096367", "0.60907507", "0.60764533", "0.60711104", "0.60652375", "0.6062853", "0.60565794", "0.6055982", "0.6050361", "0.6046712", "0.6046712", "0.604526", "0.6041135", "0.6039438", "0.60393935", "0.6024881", "0.6021997", "0.6016495", "0.6011414", "0.6005311", "0.6004265", "0.59960717", "0.5969466", "0.5955702", "0.5943121", "0.59109414", "0.5887242", "0.5887242", "0.5849169", "0.5848807", "0.5837811", "0.5834861", "0.5823856", "0.5797762", "0.579622", "0.5791077", "0.5785345", "0.5783812", "0.57788473", "0.5777541", "0.57710624", "0.5769647", "0.5769044", "0.5761864", "0.5749538", "0.5742693", "0.5738935", "0.5737295", "0.5734715", "0.5733674" ]
0.7359511
0
Check at what index the piece with the given colour and ring type is in the list of pieces.
public int checkPiece(String colour, char type) { int location = -1; for (Piece p : this.getPieces()) { location ++; if (p.getColour().equals(colour)) { if (p.getType() == type) { return location; } } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean kingCheck(ArrayList<Piece> pieces) {\r\n boolean check = false;\r\n int[] kingCoords = new int[]{this.getX(), this.getY()};\r\n\r\n for (Piece piece : pieces) {\r\n if (piece.getColor() != this.getColor()) { // If the color does not match the king's color...\r\n for (int[] coordinate : piece.range) {\r\n if (coordinate[0] == kingCoords[0] && coordinate[1] == kingCoords[1]) { // Checks to see if the king is in range of enemy pieces\r\n check = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return check;\r\n }", "public double is_square(int c, int pieces[]) {\n int d = SQ_RIGHT_TOP(c);\n int e = SQ_LEFT_TOP(d);\n int f = SQ_RIGHT_BOTTOM(e);\n // c = SQ_LEFT_TOP(f)\n \n // convert all kings to draughts (this makes the final checking easier\n // WHITEDRAUGHT = 1, BLACKDRAUGHT = 2, WHITEKING = 3, BLACKING = 4\n if(pieces[c] > 2) pieces[c] -= 2;\n if(pieces[d] > 2) pieces[d] -= 2;\n if(pieces[e] > 2) pieces[e] -= 2;\n if(pieces[f] > 2) pieces[f] -= 2;\n \n // So if they are all white they are all 1, if they are all black they are all 2. Easy checking:\n if((pieces[c] == pieces[d]) && (pieces[e] == pieces[d]) && (pieces[f] == pieces[d])) {\n int our_color = (isWhite) ? WHITEPIECE : BLACKPIECE;\n \n if(pieces[c] == our_color) {\n return 1;\n }else{\n return 0;\n }\n }\n return 0;\n }", "public static boolean isPieceAvailable(int[] piece) {\n /* Before this was checking if a frame was available,\n but now it's checking for the whole piece since the method\n implemented before could give bugs */\n\n for (int b = 1; b <= ColorFrames.BOARD_PLACES; ++b) {\n if (hasSpaceForPiece(piece, b))\n return true;\n }\n\n return false;\n }", "public boolean anyValid(OthelloPiece colour){\n boolean valid = false;\n for(int i=0; i<WIDTH;i++){\n for(int j=0;j<HEIGHT;j++){\n if(anyMove(i,j,colour)){\n valid = true;\n }\n } \n }\n clearPieces();\n return valid;\n }", "@Override\r\n public void getRange(ArrayList<Piece> pieces){\r\n this.range.clear();\r\n int pieceX = this.getX(); int pieceY = this.getY(); // X and Y coordinates for the king piece\r\n\r\n // getPiece: 0 = empty; 1 = same color; 2 = opposite color\r\n //Up\r\n if (this.getPiece(pieceX, pieceY+1, pieces) == 0 || this.getPiece(pieceX, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Up-right\r\n if (this.getPiece(pieceX+1, pieceY+1, pieces) == 0 || this.getPiece(pieceX+1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Right\r\n if (this.getPiece(pieceX+1, pieceY, pieces) == 0 || this.getPiece(pieceX+1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Down-right\r\n if (this.getPiece(pieceX+1, pieceY-1, pieces) == 0 || this.getPiece(pieceX+1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down\r\n if (this.getPiece(pieceX, pieceY-1, pieces) == 0 || this.getPiece(pieceX, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down-left\r\n if (this.getPiece(pieceX-1, pieceY-1, pieces) == 0 || this.getPiece(pieceX-1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Left\r\n if (this.getPiece(pieceX-1, pieceY, pieces) == 0 || this.getPiece(pieceX-1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Up-left\r\n if (this.getPiece(pieceX-1, pieceY+1, pieces) == 0 || this.getPiece(pieceX-1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Castling\r\n for (Piece piece : pieces) {\r\n if (piece instanceof Rook) {\r\n if (piece.getColor() == this.getColor()) {\r\n if (validCastling(pieces, (Rook)piece)) {\r\n int targetX = (piece.getX() < getX()) ? (this.getX() - 2) : (this.getX() + 2);\r\n this.range.add(new int[] {targetX, this.getY()});\r\n }\r\n }\r\n }\r\n }\r\n }", "private static void check(int pos, int ppos, int mp, int color) {\n int p = 0;\n for (; p < ColorFrames.BOARD_DIM; ++p) {\n int ps = p * mp + pos;\n if (ps != ppos) {\n int f = 0;\n for (; f < ColorFrames.FRAMES_DIM; ++f) {\n if (pieces[ps - 1][f] == color)\n break; // when a piece doesn't have the specified color\n }\n\n if (f == ColorFrames.FRAMES_DIM)\n break;\n }\n }\n\n /* if has a line, column or diagonal with frames that have the same color\n clears those frames */\n if (p == ColorFrames.BOARD_DIM) {\n for (int i = 0; i < ColorFrames.BOARD_DIM; ++i)\n clearGridPositionColor(i * mp + pos, color);\n }\n }", "private ChessPiece king(Color color) {\n\t\t// filtrando a lista\n\t\tList<Piece> list = piecesOnTheBoard.stream().filter(x -> ((ChessPiece) x).getColor() == color).collect(Collectors.toList());\n\t\t\n\t\tfor (Piece piece : list) {\n\t\t\tif (piece instanceof King) {\n\t\t\t\treturn (ChessPiece) piece;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new IllegalStateException(\"Não existe o Rei da cor \" + color + \"no tabuleiro\");\n\t}", "String checkPieceLocations(\n\t\t\tCollection<PieceLocationDescriptor> aConfiguration,\n\t\t\tPlayerColor playerColor);", "public ArrayList<Piece> getPieces(PieceColor color)\n {\n ArrayList<Piece> pieces = new ArrayList<>();\n for (Square[] s1: squares)\n {\n for (Square s: s1)\n {\n Piece p = s.getPiece();\n if (p!=null&&p.getColor()==color)\n pieces.add(p);\n }\n }\n return pieces;\n }", "private ArrayList<Piece> getPieces(PieceColor color) {\n \tArrayList<Piece> pieces = new ArrayList<Piece>();\n \tPiece temp;\n \t\n \tfor(int i = 0; i < 8; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\ttemp = getPiece(j, i);\n \t\t\t\n \t\t\t//add piece to list if it's the same color\n \t\t\t//NoPieces have their own color, so they won't pass this test\n \t\t\tif(temp.getColor() == color) pieces.add(temp);\n \t\t}\n \t}\n \t\n \treturn pieces;\n }", "public ArrayList<Piece> getColorPieces(PrimaryColor color){\n\t\tArrayList<Piece> colorPieces = new ArrayList<Piece>();\n\n\t\tfor(Piece p : this.pieces) {\n\t\t\tif(p.getColor()== color) {\n\t\t\t\tcolorPieces.add(p);\n\t\t\t}\n\t\t}\n\t\treturn colorPieces;\n\n\t}", "public boolean letTheRoundBegin (Color color){\n friendlyPieces.clear();\n hostilePieces.clear();\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n if (board[i][j]!=null){\n if (board[i][j].getColor()==color){\n friendlyPieces.add(board[i][j]);\n } else {\n hostilePieces.add(board[i][j]);\n }\n }\n }\n }\n Collections.shuffle(friendlyPieces);\n \n //instantiating friendly king\n int i = 0;\n while (i<friendlyPieces.size() && !(friendlyPieces.get(i) instanceof King)){\n i++;\n }\n friendlyKing = friendlyPieces.get(i);\n \n //calculating if it is check or not\n List<ChessPiece> threats = new ArrayList();\n for (ChessPiece hostilePiece : hostilePieces) {\n if (hostilePiece.canCaptureKing(board, friendlyKing)){\n threats.add(hostilePiece);\n }\n }\n if (!threats.isEmpty()){\n return handleCheck(threats);\n }\n \n //if there's no check, regular round takes place\n checkFlag = false;\n for (ChessPiece actualPiece : friendlyPieces) {\n if (attemptToCapture(actualPiece)) return true;\n }\n for (ChessPiece actualPiece : friendlyPieces) {\n if (attemptToMove(actualPiece)) return true;\n }\n return false;\n }", "private Piece findKing(PieceColor color)\n {\n for (Piece p: getPieces())\n {\n if (p.isKing() && p.getColor()==color)\n return p;\n }\n return null;\n }", "public static boolean hasSpaceForPiece(int[] piece, int pos) {\n for (int f = 0; f < piece.length; ++f) {\n int color = piece[f];\n if (color != ColorFrames.NO_FRAME && pieces[pos - 1][f] != ColorFrames.NO_FRAME)\n return false;\n }\n\n return true;\n }", "public boolean testColourcomponents(EIfcpixeltexture type) throws SdaiException;", "public static boolean validPiece(String piece)\n\t{\n\t\tfor(int loopPieces = 0; loopPieces < 32; loopPieces++)\n\t\t{\n\t\t\tif(pieceList[loopPieces].equals(piece))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean canEats(Point piece){\r\n\t// direction -1: red pieces +1: black pieces\r\n int dir = isRed(piece)? -1:+1;\r\n int dest = dir * 2; // eat move destination\r\n // compute movement points\r\n Point left = new Point(piece.getFirst() + dir, piece.getSecond() - 1);\r\n Point left2 = new Point(piece.getFirst()+ dest, piece.getSecond() - 2);\r\n Point right = new Point(piece.getFirst() + dir, piece.getSecond() + 1);\r\n Point right2 = new Point(piece.getFirst() + dest, piece.getSecond() + 2);\r\n // check left eat\r\n if(isValidPosition(left) && isValidPosition(left2)){\r\n if(isRed(piece) && isBlack(left) && isEmpty(left2)) return true;\r\n if(isBlack(piece) && isRed(left) && isEmpty(left2)) return true;\r\n }\r\n // check right eat\r\n if(isValidPosition(right) && isValidPosition(right2)){\r\n if(isRed(piece) && isBlack(right) && isEmpty(right2)) return true;\r\n if(isBlack(piece) && isRed(right) && isEmpty(right2)) return true;\r\n }\r\n // if is a queen\r\n if(isQueen(piece)){\r\n // compute queen move points (invert direction)\r\n Point leftQ = new Point(piece.getFirst() - dir, piece.getSecond() - 1);\r\n Point leftQ2 = new Point(piece.getFirst() - dest, piece.getSecond() - 2);\r\n Point rightQ = new Point(piece.getFirst() - dir, piece.getSecond() + 1);\r\n Point rightQ2 = new Point(piece.getFirst() - dest, piece.getSecond() + 2);\r\n // check left eat\r\n if(isValidPosition(leftQ) && isValidPosition(leftQ2)){\r\n if(isRed(piece) && isBlack(leftQ) && isEmpty(leftQ2)) return true;\r\n if(isBlack(piece) && isRed(leftQ) && isEmpty(leftQ2)) return true;\r\n }\r\n // check right eat\r\n if(isValidPosition(rightQ) && isValidPosition(rightQ2)){\r\n if(isRed(piece) && isBlack(rightQ) && isEmpty(rightQ2)) return true;\r\n if(isBlack(piece) && isRed(rightQ) && isEmpty(rightQ2)) return true;\r\n }\r\n }\r\n return false;\r\n }", "public static int findInPieceList(String piece)\n\t{\n\t\tfor(int loop = 0; loop < pieceList.length; loop++)\n\t\t{\n\t\t\tif(pieceList[loop].equals(piece))\n\t\t\t{\n\t\t\t\treturn loop;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static boolean hasCheckingCondition(int condition, Color colorCheck){ //maybe instead of checking for all each time, just check based on the disc placed\r\n int rownum;\r\n int columnnum;\r\n boolean found = false;\r\n int inARow = 0;\r\n \r\n if(numTurns>=(condition+(condition-1))-2){ //can only have connect 4 if there are a total of 7 total moves at the least\r\n //checking vertically-------------\r\n \r\n for(int i = 0; i<7; i++){ //for each column\r\n \r\n if(arrayCircles[5-(7-condition)][i].getColor()==Color.white){ //say if in the column, there are not even 4 checkers. This way, the checking algorithm is much more efficient\r\n continue; //checks the next column now\r\n }\r\n \r\n inARow=0; //resseting inARow to 0 when the column is done seraching\r\n for(int j = 5; j>=0; j--){ //for each row; 0 check going bottom to top\r\n \r\n if(arrayCircles[j][i].getColor()==colorCheck){\r\n inARow++;\r\n \r\n if(inARow == condition){ \r\n found = true; //returning here because the condition has been found\r\n return found;\r\n }\r\n if(j>0&&arrayCircles[j-1][i].getColor()!=colorCheck){ //if the subsequent chip is not of the same color\r\n inARow = 0; //reset the inARow counter\r\n }\r\n }\r\n }\r\n } \r\n \r\n //checking horizontally------\r\n for(int i = 5; i>=0; i--){ //for each row; going from bottom-top \r\n inARow = 0; //resetting inARow to 0 when the row is finished\r\n \r\n for(int j = 0; j<7; j++){ //for each column - check going across\r\n \r\n if(arrayCircles[i][j].getColor()==colorCheck){\r\n inARow++;\r\n if(inARow == condition){\r\n found = true; //setting found to true because the condition has been met\r\n return found;\r\n }\r\n if(j<6&&arrayCircles[i][j+1].getColor()!=colorCheck){ //if the next one is not the colour, reset the counter\r\n inARow=0; \r\n }\r\n }\r\n }\r\n }\r\n \r\n //checking diagonally now --starting from the bottom left and searching to top right\r\n for(int i = 0; i<7; i++){ //for each column\r\n for(int j = 5; j>=0; j--){ //for each row going bottom to top\r\n \r\n rownum = j; //keeping these variables as j and i but manipulating them when checking\r\n columnnum = i; //[rownum][columnnum] = the starting chip\r\n \r\n if(arrayCircles[j][i].getColor()==colorCheck){ //making sure there is indeed a checker there\r\n \r\n inARow = 0; //resestting in a row counter each time we switch the starting chip\r\n \r\n for(int z = 0; z<6; z++){ //max diagonal is 6 long\r\n \r\n if(rownum>=0&&rownum<=5&&columnnum>=0&&columnnum<=6){\r\n \r\n if(arrayCircles[rownum][columnnum].getColor() == colorCheck){\r\n inARow++;\r\n \r\n rownum--; //moving one up and one right whenever inARow is incremented \r\n columnnum++;\r\n \r\n if(inARow == condition){ //if the condition is met, then return that the player won\r\n found = true;\r\n return found;\r\n }\r\n }\r\n \r\n else{ //if that chip is not equal to the color of the player\r\n inARow = 0;\r\n break; //break out of loop\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n //checking diagonal still but from bottom right to top left; same code as above but different rownum and columnnum\r\n \r\n for(int i = 6; i>=0; i--){ //for each column\r\n for(int j = 5; j>=0; j--){ //for each row going bottom to top\r\n \r\n rownum = j; //keeping these variables as j and i but manipulating them when checking\r\n columnnum = i; //[rownum][columnnum] = the starting chip\r\n \r\n if(arrayCircles[j][i].getColor()==colorCheck){ //making sure there is indeed a checker there of the right color\r\n \r\n inARow = 0; //resetting in a row counter each time we switch the starting chip\r\n \r\n for(int z = 0; z<6; z++){ //max diagonal is 6 long\r\n \r\n if(rownum>=0&&rownum<=5&&columnnum>=0&&columnnum<=6){\r\n \r\n if(arrayCircles[rownum][columnnum].getColor() == colorCheck){ //if the colour matches that of the row and column\r\n inARow++; //incrementing the inARow counter\r\n \r\n rownum--; //moving one up and one right whenever inARow is incremented \r\n columnnum--;\r\n \r\n if(inARow == condition){ //if condition is met, then return true because person has won\r\n found = true;\r\n return found;\r\n }\r\n }\r\n \r\n else{ //if that chip is not the same colour\r\n // rownum--; //moving one up and one right //maybe keep this not sure\r\n // columnnum--;\r\n // if(rownum>=0&&rownum<=5&&columnnum>=0&&columnnum<=6&&arrayCircles[rownum][columnnum].getColor()!=colorCheck){ //checking the next one, if so then break out of loop\r\n inARow = 0;\r\n break; //break out of loop\r\n // }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return found; //if none of the above returns, it will return found, which is false \r\n }", "@Test\n\tpublic void testGettingIndexOfAPiece()\n\t{\n\t\t// arrange\n\t\tData d = new Data();\n\t\t// act\n\t\tint index = d.getIndex(50);\n\n\t\t// assert\n\t\tassertTrue(index < 13); // the piece should be white, i.e. its index is below 13\n\t}", "pieces getPiece(int position)\n {\n int j ;\n if(position == whiteHorse1.position && whiteHorse1.alive == true ) return whiteHorse1;\n if(position == whiteHorse2.position && whiteHorse2.alive == true) return whiteHorse2;\n if(position == whiteQueen.position && whiteQueen.alive == true ) return whiteQueen;\n if(position == whiteKing.position && whiteKing.alive == true) return whiteKing;\n if(position == whiteCastle1.position && whiteCastle1.alive == true ) return whiteCastle1;\n if(position == whiteCastle2.position && whiteCastle2.alive == true) return whiteCastle2;\n if(position == whiteBishop1.position && whiteBishop1.alive == true) return whiteBishop1;\n if(position == whiteBishop2.position && whiteBishop2.alive == true) return whiteBishop2;\n j=0;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];\n \n \n \n if(position == blackHorse1.position && blackHorse1.alive == true ) return blackHorse1;\n if(position == blackHorse2.position && blackHorse2.alive == true) return blackHorse2;\n if(position == blackQueen.position && blackQueen.alive == true ) return blackQueen;\n if(position == blackKing.position && blackKing.alive == true) return blackKing;\n if(position == blackCastle1.position && blackCastle1.alive == true ) return blackCastle1;\n if(position == blackCastle2.position && blackCastle2.alive == true) return blackCastle2;\n if(position == blackBishop1.position && blackBishop1.alive == true) return blackBishop1;\n if(position == blackBishop2.position && blackBishop2.alive == true) return blackBishop2;\n j=0;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];\n\n else return null;\n }", "public boolean checkForVictory() {\n // keep track of whether we have seen any pieces of either color.\n boolean anyWhitePieces = false;\n boolean anyRedPieces = false;\n // iterate through each row\n for (Row row : this.redBoard) {\n // whether we iterate through the red or white board does not matter; they contain the same pieces, just\n // in a different layout\n // iterate through each space in a row\n for (Space space : row) {\n // if there is a piece on this space\n if (space.getPiece() != null) {\n if (space.getPiece().getColor() == Piece.COLOR.RED) {\n // and if it's red, we have now seen at least one red piece\n anyRedPieces = true;\n } else if (space.getPiece().getColor() == Piece.COLOR.WHITE) {\n // and if it's white, we have now seen at least one white piece\n anyWhitePieces = true;\n }\n }\n }\n }\n // if we haven't seen any pieces of a color, then the other player has won\n if (!anyRedPieces) {\n // white player has won\n markGameAsDone(getWhitePlayer().getName() + \" has captured all the pieces.\");\n return true;\n } else if (!anyWhitePieces) {\n // red player has won\n markGameAsDone(getRedPlayer().getName() + \" has captured all the pieces.\");\n return true;\n }\n return false;\n }", "public boolean validCastling(ArrayList<Piece> pieces, Rook k) {\r\n // must be same color, same row\r\n if (k.getColor() != getColor() || k.getY() != getY())\r\n return false;\r\n // already moved\r\n if (k.pMove > 0 || pMove > 0) // Changed to \"> 0\" from \"== 1\" to adjust for moveTo increment\r\n return false;\r\n\r\n // is any piece blocking?\r\n for (Piece piece : pieces) {\r\n if (piece.getY() == getY() &&\r\n (\r\n (piece.getX() > k.getX() && piece.getX() < getX()) ||\r\n (piece.getX() < k.getX() && piece.getX() > getX())\r\n ) )\r\n return false;\r\n }\r\n\r\n if (kingCheck(pieces))\r\n return false;\r\n\r\n // try moved and test checking\r\n int orgX = getX();\r\n int targetX = (k.getX() < getX()) ? (orgX - 2) : (orgX + 2);\r\n int step = (targetX < orgX) ? -1 : 1;\r\n\r\n int x = orgX;\r\n boolean checked = false;\r\n do\r\n {\r\n x += step;\r\n setX(x);\r\n if (kingCheck(pieces))\r\n {\r\n checked = true;\r\n break;\r\n }\r\n\r\n } while (x != targetX);\r\n setX(orgX);\r\n return !checked;\r\n }", "@Test\n public void getColorTest() {\n assertTrue(red_piece.getColor() == Piece.Color.RED);\n assertTrue(white_piece.getColor() == Piece.Color.WHITE);\n }", "private vPiece find_vPiece(ArrayList<vPiece> pieces, Move theMove){\n\t\tfor(vPiece thePiece : pieces){\n\t\t\tif(thePiece.getxLoc() == theMove.i){\n\t\t\t\tif(thePiece.getyLoc() == theMove.j){\n\t\t\t\t\treturn thePiece;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new vPiece(0,0);\n\t}", "boolean moveRed(int piece) {\n\t\treturn ((piece == 1 || piece == 3) && curPlayer == 1);\n\t}", "static boolean canPlace(int row, int col, char[][] piece) {\n for (int r = 0; r < piece.length; r++) {\n for (int c = 0; c < piece[r].length; c++) {\n if (piece[r][c] != '0') {\n if (row + r >= 0 && row + r < board.length && col + c >= 0 && col + c < board[row].length) {\n if (board[row + r][col + c] != '0') {\n return false;\n }\n } else {\n return false;\n }\n }\n }\n }\n\n return true;\n }", "public boolean isAnyPieceOffendingField(Color color, Field field)\r\n\t{\r\n\t\tfor (int y = 7; y >= 0; y--)\r\n\t\t{\r\n\t\t\tfor (int x = 0; x <= 7; x++)\r\n\t\t\t{\r\n\t\t\t\tField pieceField = fields[x][y];\r\n\t\t\t\tPiece piece = pieceField.piece;\r\n\t\t\t\tif (piece == null || !piece.getColor().equals(color)) continue;\r\n\t\t\t\tboolean isOffending = pieceField.isOffending(this, field);\r\n\t\t\t\tif (isOffending) return true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean checkIn(MyPair<Integer, Integer> position){\n Board copy;\n try{\n copy = new Board(getBoard());\n }\n catch(Exception e){\n System.out.println(\"AAA\");\n return true;\n }\n\n copy.removePiece(copy.kingByColour(getColour()));\n copy.addPiece(new King(getColour(), copy, position));\n if(copy.check() == getColour())\n return true;\n return false;\n }", "void highlightCheckSquare(boolean highlight, Button button, int row, int column, CenterPiece piece);", "public boolean isCheck(PieceColor color) {\n \tint[][] map = generateAttackMaps(color);\n \tint x = getKing(color).getX();\n \tint y = getKing(color).getY();\n\n \t//if the king is being threatened, return true\n \tif(map[y][x] > 0) return true;\n \telse return false;\n }", "public ArrayList<Piece> getAllNeedToEatPieces(PrimaryColor playerColor){\n\t\tArrayList<Piece> needToEatPieces= new ArrayList<Piece>();\n\t\tArrayList<Piece> colorPieces=getColorPieces(playerColor);\n\n\t\tfor (Piece p : colorPieces) {\n\t\t\tif(!p.getMustEdiblePieces().isEmpty()) {\n\t\t\t\tneedToEatPieces.add(p);\n\t\t\t}\n\t\t}\n\n\t\treturn needToEatPieces;\n\t}", "public List<Point> getPieces(Color pColor){\r\n List<Point> result = new LinkedList<>();\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if((isBlack(pColor) && isBlack(pos)) || (isRed(pColor) && isRed(pos))){\r\n result.add(pos.clone());\r\n }\r\n }\r\n } \r\n return result;\r\n }", "public boolean inCheck(PieceColor color)\n {\n Piece king = findKing(color);\n if (king==null)\n return false;\n Location loc = getLocation(king);\n return enemyCanAttack(color,loc);\n }", "@Test\n public void typeTest() {\n assertTrue(red_piece.getType() == Piece.Type.SINGLE);\n red_piece.king();\n assertTrue(red_piece.getType() == Piece.Type.KING);\n assertTrue(white_piece.getType() == Piece.Type.SINGLE);\n }", "@Test\n\tpublic void testGetPieces() {\n\t\tPiece[] pieces = Piece.getPieces();\n\n assertTrue(pieces[Piece.S1].equals(s));\n assertTrue(pieces[Piece.L2].equals(l2));\n assertTrue(pieces[Piece.SQUARE].equals(square));\n assertTrue(pieces[Piece.PYRAMID].equals(pyr1));\n \n assertTrue(pieces[Piece.S1].fastRotation().equals(sRotated));\n assertFalse(pieces[Piece.S1].fastRotation().equals(s));\n \n assertTrue(pieces[Piece.L2].fastRotation().equals(l2Rotated));\n assertTrue(pieces[Piece.PYRAMID].fastRotation().equals(pyr2));\n \n\t}", "public boolean hasPiece()\r\n\t{\r\n\t\treturn piece != null;\r\n\t}", "public Piece getPiece(String pieceType, Color color, Square current, Square[][] boardstate) {\n switch (pieceType) {\n case \"KING\":\n return new King(color, current, boardstate);\n case \"QUEEN\":\n return new Queen(color, current, boardstate);\n case \"ROOK\":\n return new Rook(color, current, boardstate);\n case \"BISHOP\":\n return new Bishop(color, current, boardstate);\n case \"KNIGHT\":\n return new Knight(color, current, boardstate);\n case \"PAWN\":\n return new Pawn(color, current, boardstate);\n default:\n return null;\n }\n }", "public boolean hasPieces() {\n return !(pieces.isEmpty());\n }", "public Piece getPiece(int i) { /* ... code ... */ }", "@Test\n public void isRedTest() {\n assertTrue(red_piece.isRed());\n assertTrue(!white_piece.isRed());\n }", "public List<Piece> inCheck(int kingX, int kingY){ // returns list of attacking pieces.\n // Also have to look for opponent king to avoid moving into check.\n // In this case only care whether or not a check occurs, not how many so breaks still ok\n // for regular check tests, want to know if 1 or 2 checks, cannot have multiple diagonal checks.\n List<Piece> attackers = new ArrayList<>();\n // knights\n int knight = turn == WHITE ? BLACK_KNIGHT : WHITE_KNIGHT;\n knightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (kingX + dx >= 0 && kingX + dx < 8 && kingY + dy >= 0 && kingY + dy < 8){\n if (board[kingY+dy][kingX+dx] == knight){\n attackers.add(new Piece(knight, kingX+dx, kingY+dy));\n break knightSearch; // can only be checked by 1 knight at a time\n }\n }\n if (kingX + dy >= 0 && kingX + dy < 8 && kingY + dx >= 0 && kingY + dx < 8){\n if (board[kingY+dx][kingX+dy] == knight){\n attackers.add(new Piece(knight, kingX+dy, kingY+dx));\n break knightSearch;\n }\n }\n }\n }\n // bishop/queen/pawn/king\n int pawn = turn == WHITE ? BLACK_PAWN : WHITE_PAWN;\n int bish = turn == WHITE ? BLACK_BISHOP : WHITE_BISHOP;\n int queen = turn == WHITE ? BLACK_QUEEN : WHITE_QUEEN;\n int king = turn == WHITE ? BLACK_KING : WHITE_KING;\n diagSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (kingX + dx*i >= 0 && kingX + dx*i < 8 && kingY + dy*i >= 0 && kingY + dy*i < 8){\n int piece = board[kingY + dy*i][kingX + dx*i];\n if (piece != 0){\n if (piece == bish || piece == queen || (piece == pawn && i == 1 && dy == turn)\n || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY+dy*i));\n break diagSearch;\n }\n break;\n }\n i++;\n }\n }\n }\n // rook/queen/king\n int rook = turn == WHITE ? BLACK_ROOK : WHITE_ROOK;\n straightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n int i = 1;\n while (kingX + i*dx >= 0 && kingX + i*dx < 8){\n int piece = board[kingY][kingX + dx*i];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n i = 1;\n while (kingY + i*dx >= 0 && kingY + i*dx < 8){\n int piece = board[kingY+dx*i][kingX];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX, kingY+dx*i));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n }\n return attackers;\n }", "private void placePieces(List<Piece> pieces) {\r\n pieces.forEach(\r\n piece -> {\r\n grid[piece.getPosition()] = piece;\r\n // if key doesn't exist create new with array containing piece\r\n // if it does exist add piece to existing array\r\n this.pieces.merge(\r\n piece.getPlayerColor(),\r\n new ArrayList<>(Collections.singletonList(piece)),\r\n (o, n) -> {\r\n o.add(piece);\r\n return o;\r\n });\r\n });\r\n }", "public boolean containsSoldier(Soldier test, ArrayList<Soldier> gamePiece){\n for (int i=0;i<gamePiece.size();i++)\n if(test.i == gamePiece.get(i).i && test.j == gamePiece.get(i).j && test.C.equals(gamePiece.get(i).C))\n return true;\n return false;\n }", "void onCheck(Chess.Color inCheckColor);", "public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "boolean findMove(int row, int col, int[][] someStatusBoard) {\n String leftPieces;\n if (_playerOnMove == ORANGE) {\n leftPieces = Game._orangePieces;\n } else {\n leftPieces = Game._violetPieces;\n }\n String trialMove = \"\";\n int numleftPieces = leftPieces.length();\n int l, ori;\n for (l = 0; l < numleftPieces; l++) {\n for (ori = 0; ori < 8; ori++) {\n String piecename = leftPieces.substring(l, l + 1);\n Pieces thispiece = new Pieces();\n int[][] initialPositions = thispiece.getInitialPositions(piecename);\n int[][] finalPositions = thispiece.processPositions(initialPositions, ori);\n int depth = finalPositions.length;\n int length = finalPositions[0].length;\n\n int m, n;\n for (m = 0; m < depth; m++) {\n for (n = 0; n < length; n++) {\n if (finalPositions[m][n] == 1) {\n int newCol = col - 1 - n;\n int newRow = 15 - row - depth;\n if (newCol >= 0 && newRow >= 0) {\n trialMove = piecename + changeBack(newCol) + changeBack(newRow) + ori;\n System.out.println(newCol);\n System.out.println(newRow);\n System.out.println(trialMove);\n if (isLegal(trialMove)) {\n return true;\n }\n }\n }\n }\n }\n }\n }\n return false;\n }", "public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }", "public boolean checkCheckMate() {\n\t\t// \n\t\tboolean checked = false;\n\t\tfor (int i = 0; i < 32; i++) { \n\t\t\tif (pieces[i].handlePieceCheckMate()) {\n\t\t\t\tchecked = true;\n\n\t\t\t\tswitch (pieces[i].getColor())\n\t\t\t\t{\n\t\t\t\tcase BLACK:\n\t\t\t\t\twhichKing = 28;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WHITE:\n\t\t\t\t\twhichKing = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\twhichKing = 40;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} \t\n\t\t}\n\t\treturn checked;\n\t}", "public boolean canCastle(PieceColor color, boolean kingSide) {\n \tif(color == PieceColor.White) {\n \t\tif(kingSide) return castle[0];\n \t\telse return castle[1];\n \t}\n \telse if(color == PieceColor.Black) {\n \t\tif(kingSide) return castle[2];\n \t\telse return castle[3];\n \t}\n \treturn false;\n }", "public void findShipPiece() {\r\n\t\tshipPiecesFound += 1;\r\n\t}", "private boolean obligatoryEats(Color pColor){\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if(isBlack(pColor) && !isEmpty(pos) && isBlack(pos) && canEats(pos))\r\n return true;\r\n if(isRed(pColor) && !isEmpty(pos) && isRed(pos) && canEats(pos))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private static boolean anyObstacles(ArrayList<CharacterSprite> pieces, int[] position, int[] destination,\n moveMode mode, boolean inclusive) {\n switch (mode) {\n case X_AXIS:\n int h = destination[0] < position[0] ? -1 : 1;\n for (int i = position[0] + h; i != destination[0]; i += h) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(i * CharacterSprite.size, position[1] * CharacterSprite.size)) {\n return true;\n }\n }\n }\n break;\n\n case Y_AXIS:\n h = destination[1] < position[1] ? -1 : 1;\n for (int i = position[1] + h; i != destination[1]; i += h) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(position[0] * CharacterSprite.size, i * CharacterSprite.size)) {\n return true;\n }\n }\n }\n break;\n\n case DIAGONAL:\n int i = destination[0], j = destination[1];\n i += i > position[0] ? -1 : 1;\n j += j > position[1] ? -1 : 1;\n\n while (i != position[0]) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(i * CharacterSprite.size, j * CharacterSprite.size)) {\n return true;\n }\n }\n\n i += i > position[0] ? -1 : 1;\n j += j > position[1] ? -1 : 1;\n }\n break;\n\n default:\n return true;\n }\n\n if (inclusive) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(destination[0] * CharacterSprite.size, destination[1] * CharacterSprite.size)) {\n return true;\n }\n }\n }\n\n return false;\n }", "public Piece.COLOR checkColor (int x, int y){\n\t\treturn board[x][y].getColor();\n\t}", "private void drawFallingPiece() {\r\n\t\t// loops through each rectangle of the shape type (always 4), and draws it\r\n\t\t// based on it's status and position.\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tdrawSquare(game.fallingPiece.x + game.fallingPiece.coord[game.fallingPiece.status][i][0],\r\n\t\t\t\t\t game.fallingPiece.y + game.fallingPiece.coord[game.fallingPiece.status][i][1],\r\n\t\t\t\t\t game.fallingPiece.color);\r\n\t\t}\r\n\t}", "private boolean endSquareContainsPiece(Chessboard chessboard, Piece piece, int end) {\n\t\tif (!(0 <= end && end < 64)) {\n\t\t\treturn false;\n\t\t}\n\t\tPiece endContents = chessboard.getSquareContents(end);\n\t\tif (endContents == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (endContents.getSign() != piece.getSign()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn white ? endContents.amIWhite() : !endContents.amIWhite();\n\t}", "public static void validationcheck2(int row, int column, String piecevalue){\n\t\tString oppositepiece;\n\t\tif(piecevalue.equals(\"x\")){\n\t\t\toppositepiece=\"o\";\n\t\t}\n\t\telse if(piecevalue.equals(\"o\")){\n\t\t\toppositepiece=\"x\";\n\t\t}\n\t\telse{\n\t\t\toppositepiece=\"-\";\n\t\t}\n\t\t//R=right, L=left, T=top, B=bottom, and there are diagonals such as TL=top left.\n\t\tboolean foundR=false,foundL=false,foundT=false,foundB=false,foundTL=false,foundTR=false,foundBL=false,foundBR=false;\n\t\tint checkfurtherR=1,checkfurtherL=1,checkfurtherT=1,checkfurtherB=1,checkfurtherTL=1,checkfurtherTR=1,checkfurtherBL=1,checkfurtherBR=1;\n\t\twhile(board[row][column+checkfurtherR].equals(oppositepiece)){\n\t\t\tcheckfurtherR++;\n\t\t}\n\t\tif(board[row][column+checkfurtherR].equals(piecevalue)&&checkfurtherR>1){\n\t\t\tfoundR=true;\n\t\t}\n\t\twhile(board[row][column-checkfurtherL].equals(oppositepiece)){\n\t\t\tcheckfurtherL++;\n\t\t}\n\t\tif(board[row][column-checkfurtherL].equals(piecevalue)&&checkfurtherL>1){\n\t\t\tfoundL=true;\n\t\t}\n\t\twhile(board[row+checkfurtherB][column].equals(oppositepiece)){\n\t\t\tcheckfurtherB++;\n\t\t}\n\t\tif(board[row+checkfurtherB][column].equals(piecevalue)&&checkfurtherB>1){\n\t\t\tfoundB=true;\n\t\t}\n\t\twhile(board[row-checkfurtherT][column].equals(oppositepiece)){\n\t\t\tcheckfurtherT++;\n\t\t}\n\t\tif(board[row-checkfurtherT][column].equals(piecevalue)&&checkfurtherT>1){\n\t\t\tfoundT=true;\n\t\t}\n\t\twhile(board[row-checkfurtherTR][column+checkfurtherTR].equals(oppositepiece)){\n\t\t\tcheckfurtherTR++;\n\t\t}\n\t\tif(board[row-checkfurtherTR][column+checkfurtherTR].equals(piecevalue)&&checkfurtherTR>1){\n\t\t\tfoundTR=true;\n\t\t}\n\t\twhile(board[row-checkfurtherTL][column-checkfurtherTL].equals(oppositepiece)){\n\t\t\tcheckfurtherTL++;\n\t\t}\n\t\tif(board[row-checkfurtherTL][column-checkfurtherTL].equals(piecevalue)&&checkfurtherTL>1){\n\t\t\tfoundTL=true;\n\t\t}\n\t\twhile(board[row+checkfurtherBL][column-checkfurtherBL].equals(oppositepiece)){\n\t\t\tcheckfurtherBL++;\n\t\t}\n\t\tif(board[row+checkfurtherBL][column-checkfurtherBL].equals(piecevalue)&&checkfurtherBL>1){\n\t\t\tfoundBL=true;\n\t\t}\n\t\twhile(board[row+checkfurtherBR][column+checkfurtherBR].equals(oppositepiece)){\n\t\t\tcheckfurtherBR++;\n\t\t}\n\t\tif(board[row+checkfurtherBR][column+checkfurtherBR].equals(piecevalue)&&checkfurtherBR>1){\n\t\t\tfoundBR=true;\n\t\t}\n\t\tif(foundR==true||foundL==true||foundT==true||foundB==true||foundTL==true||foundTR==true||foundBL==true||foundBR==true){\n\t\t\tvalidation=true;\n\t\t}\n\t\telse{\n\t\t\tvalidation=false;\n\t\t}\n\t}", "private static void checkGridPos(int pos) {\n // Verifies if the colors in the position are all the same\n int[] pcs = pieces[pos - 1];\n int f = 0;\n for (; f < ColorFrames.FRAMES_DIM; ++f) {\n int color = pcs[f];\n if (color != pcs[0] || color == ColorFrames.NO_FRAME)\n break;\n }\n\n if (f == ColorFrames.FRAMES_DIM) {\n // If a piece is filled with one color only, then delete this piece\n clearGridPosition(pos);\n } else {\n // Verifies for lines, columns and diagonals that have colors different that NO_FRAME\n for (int fr = 0; fr < ColorFrames.FRAMES_DIM; ++fr) {\n int color = pcs[fr];\n if (color != ColorFrames.NO_FRAME) {\n checkLine(pos, color);\n checkColumn(pos, color);\n\n if (isInDiagonal(pos))\n checkDiagonals(pos, color);\n }\n }\n }\n\n Scoreboard.addPoints(pointsToAdd);\n pointsToAdd = 0;\n }", "public Piece(int x , int y, PlayerType color,Names type){\n this.x = x;\n this.y = y;\n \n this.color = color;\n this.type = type;\n }", "public boolean placePiece(Piece piece,String side, int row, int col)\n {\n\tboolean placed = true;\n\tint[][] shape = piece.getShape(); //shape of the piece\n\tString[][] fBoard = new String[rows][cols]; //temp front board\n\tString[][] bBoard = new String[rows][cols]; //temp back board\n\tfor(int i=0;i<rows;i++)\n\t {\n\t\tfor(int j=0;j<cols;j++)\n\t\t {\n\t\t\tfBoard[i][j] = frontBoard[i][j];\n\t\t\tbBoard[i][j] = backBoard[i][j];\n\t\t }\n\t }\n\tint insertRow = row; //row on the board being altered\n\tint insertCol = col; //column on the board being altered\n\tfor(int i=0;i<piece.getPieceRows();i++)\n\t {\n\t\tfor(int j=0;j<piece.getPieceCols();j++)\n\t\t {\n\t\t\tif(insertRow<0 || insertRow>rows-1 || insertCol<0 || insertCol>cols-1) //checks that the row and column numbers are valid\n\t\t\t {\n\t\t\t\tplaced = false;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\tif(side==\"front\") //places the piece relative to the front of the board\n\t\t\t\t {\n\t\t\t\t\tif(fBoard[insertRow][insertCol].equals(\"0\") || fBoard[insertRow][insertCol].charAt(1)=='0') \n\t\t\t\t\t //if the front board has a 0\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=0)//if the piece does not have a 0 in the spot\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tfBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2; //front gets a color and a 2\n\t\t\t\t\t\t\tbBoard[insertRow][rows-insertCol] = piece.getColor().charAt(0) + \"\" + shape[i][j]; //back gets a color and a 1\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\telse if(fBoard[insertRow][insertCol].charAt(1)=='1')\n\t\t\t\t\t //if the front board has a 1\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=2) //if the piece does not have a 2\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tfBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2; //front of the board gets a 2\n\t\t\t\t\t\t }\n\t\t\t\t\t\telse\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tplaced = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\telse\n\t\t\t\t\t //if the front of the board has a 2, only a piece with a 0 can be placed there\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=0)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t placed = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\telse //places the piece relative to the back of the board (same rules as above only reversed)\n\t\t\t\t {\n\t\t\t\t\tif(bBoard[insertRow][insertCol].equals(\"0\") || bBoard[insertRow][insertCol].charAt(1)=='0')\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=0)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tbBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2;\n\t\t\t\t\t\t\tfBoard[insertRow][rows-insertCol] = piece.getColor().charAt(0) + \"\" + shape[i][j];\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\telse if(bBoard[insertRow][insertCol].charAt(1)=='1')\n\t\t\t\t\t {\n\t\t\t\t\t\tif(shape[i][j]!=2)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tbBoard[insertRow][insertCol] = piece.getColor().charAt(0) + \"\" + 2;\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\telse\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tplaced = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\telse\n\t\t\t\t\t {\n\t\t\t\t\t if(shape[i][j]!=0)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t placed = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t\tinsertCol++;\n\t\t }\n\t\tinsertRow++;\n\t\tinsertCol = col;\n\t }\n\tif(placed) //if the piece did not encounter a collision, change the actual front and back of the board\n\t{\n\t\tfrontBoard = fBoard;\n\t\tbackBoard = bBoard;\n\t\tString color = piece.getColor();\n\t\tint index = 0;\n\t\twhile(!unused[index].getColor().equals(color))\n\t\t{\n\t\t\tindex++;\n\t\t}\n\t\tfor(int j=index;j<unused.length-1;j++)\n\t {\n\t\t\tunused[j] = unused[j+1];\n\t }\n\t\tunused[unused.length-1] = null;\n\t\tindex = 0;\n\t\tif(onBoard.length>0)\n\t\t{\n\t\t\twhile(onBoard[index]!=null && index<10)\n\t\t\t{\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tif(index<10)\n\t\t{\n\t\t\tonBoard[index] = color;\n\t\t}\n\t}\n\treturn placed;\n }", "public String getPieceColor(){\n\t\t\n\t\tif(xPosition>=ColumnNumber.firstColumn.ordinal() && xPosition<=ColumnNumber.eightColumn.ordinal() && xPosition>=RowNumber.firstRow.ordinal() && xPosition<=RowNumber.eightRow.ordinal()){\n\t\t\t\n\t\t\tif(isIcon){\n\t\t\t\treturn piece.getColor();\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t}", "private boolean canAddBlueTile() {\n\t\tint soldierCount=0,queenCount=0;\n\n\n\t\tArrayList<Piece> playerPieces = Board.getInstance().getColorPieces(Game.getInstance().getCurrentPlayerColor());\n\t\tfor(Piece p:playerPieces)\n\t\t{\n\t\t\tif(p instanceof Soldier)\n\t\t\t{\n\t\t\t\tsoldierCount++;\n\t\t\t}\n\t\t\tif(p instanceof Queen)\n\t\t\t{\n\t\t\t\tqueenCount++;\n\t\t\t}\n\t\t}\n\t\treturn (soldierCount == 2 && queenCount == 1);\n\t}", "private boolean isWinning(Piece[] arr) {\n if (arr[0] == X) {\n for (Piece piece : arr) {\n if (piece != X) {\n return false;\n }\n }\n }\n else {\n for (Piece piece : arr) {\n if (piece != O) {\n return false;\n }\n }\n }\n return true;\n }", "public int checkWin(Piece piece) {\n\t\t//check winning and losing\n\t\tint color=piece.getColor();\n\t\tif(piece.isRabbit()) {\n\t\t\tif(((Rabbit)piece).isOtherSide()) {\n\t\t\t\treturn color;\n\t\t\t}\n\t\t}\n\t\tif(rabbitcount[color]<=0) {\n\t\t\treturn 3-color;//the opponent wins\n\t\t}\n\t\treturn 0;\n\t}", "public boolean isPeace() {\r\n\t\tfor (int i=0; i<piece.size(); i++) {\r\n\t\t\tChessPiece p = piece.get(order[i]);\r\n\t\t\tif (p.chessPlayer.equals(\"black\") || p.chessPlayer.equals(\"white\")) {\r\n\t\t\t\tVector<ChessBoardBlock> blocks = this.getMovablePosition(p);\r\n\t\t\t\tif (blocks.size()>1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isCheckBlockable(Piece.PieceColorOptions playerColor) {\n Coordinate[] coordinatesToBlock;\n Coordinate kingCoordinate, oppCoordinate, allyCoordinate;\n int blockCounter, diffX, diffY, spacesToVerify, xIncrement, yIncrement;\n\n coordinatesToBlock = new Coordinate[VERTICAL_BOARD_LENGTH];\n kingCoordinate = getKingCoordinate(playerColor);\n oppCoordinate = null;\n blockCounter = 0;\n\n outerloop:\n for (int i = 0; i < VERTICAL_BOARD_LENGTH; i++) {\n for (int j = 0; j < HORIZONTAL_BOARD_LENGTH; j++) {\n oppCoordinate = new Coordinate(j, i);\n if (isValidEndpoints(oppCoordinate, kingCoordinate, oppositeColor(playerColor))) {\n if (isValidPath(oppCoordinate, kingCoordinate, oppositeColor(playerColor), false)) {\n coordinatesToBlock[blockCounter] = oppCoordinate;\n blockCounter++;\n // if there is more than one piece checking the King\n // the check is not blockable\n break outerloop;\n }\n }\n }\n }\n\n diffX = subtractXCoordinates(oppCoordinate, kingCoordinate);\n diffY = subtractYCoordinates(oppCoordinate, kingCoordinate);\n xIncrement = calculateIncrement(diffX);\n yIncrement = calculateIncrement(diffY);\n spacesToVerify = Math.max(Math.abs(diffX), Math.abs(diffY)) - 1;\n\n // moving a piece to oppCoordinate capture's the opposing piece\n // only opposing Bishops, Rooks, and Queens can be blocked\n if (isValidDiagonalPath(oppCoordinate, kingCoordinate) || isValidStraightPath(oppCoordinate, kingCoordinate)) {\n for (int i = 0; i < spacesToVerify; i++) {\n Coordinate betweenCoordinate = new Coordinate(oppCoordinate);\n betweenCoordinate.addVals(xIncrement, yIncrement);\n coordinatesToBlock[blockCounter] = betweenCoordinate;\n blockCounter++;\n }\n }\n\n // loop through all Coordinates in coordinatesToBlock and see if any can block the check\n for (int i = 0; i < blockCounter; i++) {\n oppCoordinate = coordinatesToBlock[i];\n for (int j = 0; j < VERTICAL_BOARD_LENGTH; j++) {\n for (int k = 0; k < HORIZONTAL_BOARD_LENGTH; k++) {\n allyCoordinate = new Coordinate(k, j);\n if (isValidEndpoints(allyCoordinate, oppCoordinate, playerColor)) {\n if (isValidPath(allyCoordinate, oppCoordinate, playerColor, false)) {\n if (isMovePossibleWithoutCheck(allyCoordinate, oppCoordinate, playerColor, false)) {\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n }", "boolean setPiece(int x, int y, Piece.OthelloPieceColour colour) {\n return false;\n }", "private static Collection<Piece> getCorrectRedPieces() {\n\t\tfinal Collection<Piece> pieces = new ArrayList<Piece>();\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.MARSHAL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.FLAG, PlayerColor.RED));\n\t\treturn pieces;\n\t}", "Piece getPieceAt(int col, int row);", "public void setType(String type) {\n List<String> types = new ArrayList<String>();\n types.add(\"bR\"); types.add(\"bN\"); types.add(\"bB\"); types.add(\"bQ\");\n types.add(\"bK\"); types.add(\"bp\"); types.add(\"wR\"); types.add(\"wN\");\n types.add(\"wB\"); types.add(\"wQ\"); types.add(\"wK\"); types.add(\"wp\");\n\n if(types.contains(type))\n this.type = type;\n else\n System.out.println(\"invalid piece type\");\n }", "public void getNewPiece(){\n\t\tthis.next_piece_index= rand.nextInt(18);\n\t\tthis.next_piece_colour= rand.nextInt(10);\n\t\tnext_currentPiece = Pentominoes.Pentomino_array[this.next_piece_index];\n\t\tnext_currentColor = Pentominoes.color_array[this.next_piece_colour];\n\t\tfor(int i = 0; i < next_pieces_array.length; i++){\n\t\t\tfor(int j = 0; j<next_pieces_array[0].length; j++){\n\t\t\t\t\tnext_pieces_array[i][j] = Color.WHITE;\n\t\t\t}\n\t\t}\n\t\tfor(Point p: next_currentPiece){\n\t\t\tnext_pieces_array[p.x + pieceOrigin2.x][p.y + pieceOrigin2.y] = next_currentColor;\n\t\t}\n\t}", "@Test\n\t\tpublic void testGetColour() {\n\t\t\tgreenSix = new Card (Card.Colour.Green, 6);\n\t\t\tblueSix = new Card (Card.Colour.Blue, 6);\n\t\t\twild = new Card (Card.Wild.Wild);\n\t\t\twild_Draw4 = new Card (Card.Wild.WildDraw4);\n\t\t\tblueSkip = new Card(Card.Colour.Blue, Card.Action.Skip);\n\t\t\tredDraw2 = new Card(Card.Colour.Red, Card.Action.Draw2);\n\t\t\tgreenReverse = new Card (Card.Colour.Green, Card.Action.Reverse);\n\t\t\tassertEquals(\"black\", wild.getColour());\n\t\t\tassertEquals(\"black\", wild_Draw4.getColour());\n\t\t\tassertEquals(\"Blue\", blueSkip.getColour());\n\t\t\tassertEquals(\"Red\", redDraw2.getColour());\n\t\t\tassertEquals(\"Green\", greenReverse.getColour());\n\t\t}", "public static boolean isGameWon(final char piece){\n\t\tif (board[0][0] == piece){\t\t\t\t\t\t\t\t// top-left corner\n\t\t\tif (board[1][1] == piece && board[2][2] == piece)\t\t// diagonal\n\t\t\t\treturn true;\n\t\t\telse if (board[0][1] == piece && board[0][2] == piece)\t// going right\n\t\t\t\treturn true;\n\t\t\telse if (board[1][0] == piece && board[2][0] == piece)\t// going down\n\t\t\t\treturn true;\n\t\t}\n\t\tif (board[2][2] == piece){\t\t\t\t\t\t\t\t// bottom-right corner\n\t\t\tif (board[2][1] == piece && board[2][0] == piece)\t\t// going left\n\t\t\t\treturn true;\n\t\t\telse if (board[1][2] == piece && board[0][2] == piece)\t// going up\n\t\t\t\treturn true;\n\t\t}\n\t\tif (piece == board[1][1]){\t\t\t\t\t\t\t\t// middle slot\n\t\t\tif (board[0][2] == piece && board[2][0] == piece)\t\t// the other diagonal\n\t\t\t\treturn true;\n\t\t\telse if (piece == board[1][0] && piece == board[1][2])\t// horizontal through and through\n\t\t\t\treturn true;\n\t\t\telse if (piece == board[0][1] && piece == board[2][1])\t// vertical through and through\n\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false; \t\n\t}", "boolean finishRedMoves(int piece) {\n\t\treturn (piece == 0 && curPlayer == 1);\n\t}", "public boolean hasMoves(int clr) {\n if(clr != 0){\n activePieces = getPiece();\n\n for(int i = 0; i < activePieces.size(); i++){\n Piece curr = activePieces.get(i);\n\n if(curr.possibleMoves(state).size() > 0){\n //curr.printSpecial();\n return true;\n }\n }\n return false;\n }\n System.out.println(\"Empty stop error\");\n return false;\n }", "public boolean move (int x,int y, OthelloPiece colour){\n boolean valid = false;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_2,colour)) valid=true;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_1,colour)) valid=true;\n if(move(x,y,VALID_MOVE_2,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_2,VALID_MOVE_1,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_2,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_1,colour)) valid=true;\n setThePieces();\n if(valid){\n m_PieceCount++;\n }\n return (valid);\n }", "public boolean isCheckmate()\n {\n Game g = Game.getInstance();\n\n int sum = 0;\n\n for(Piece[] p1 : g.m_board.m_pieces)\n {\n for(Piece p2 : p1)\n {\n if(p2 != null)\n {\n if(p2.m_color == this.m_color)\n {\n sum += p2.getLegalMoves().size();\n }\n }\n }\n }\n\n if(sum == 0){ return true; } else { return false; }\n }", "void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }", "private void checkInFront(Tile[][] chessBoard,int pawnX,int pawnY, char pawnColor) {\r\n\t\tint direction;\r\n\t\tBoolean extraStep = false;\r\n\t\tif (pawnColor =='w') {\r\n\t\t\tdirection = 1;\r\n\t\t\tif (pawnY == 1){\r\n\t\t\t\textraStep = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t\tif (pawnY == 6) {\r\n\t\t\t\textraStep = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (extraStep) {\r\n\t\t\tcheckMove(chessBoard, pawnX, pawnY, direction);\r\n\t\t\tcheckMove(chessBoard, pawnX, pawnY, 2*direction);\r\n\t\t} else {\r\n\t\t\tcheckMove(chessBoard, pawnX, pawnY,direction);\r\n\t\t}\r\n\t}", "public boolean checkWin (int totalPieces){\n\t\treturn isFull();\n\t}", "private void checkForConversions() {\n\n for(int r=0; r<COLUMN_ROW_COUNT; r++) {\n for(int c=0; c<COLUMN_ROW_COUNT; c++) {\n Piece p = cells[r][c];\n if(p == null) continue;\n\n if (p.getType().equals(Type.GUARD)) {\n int surroundingDragons = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c + 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+ 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n\n if (surroundingDragons >= 3) {\n cells[r][c].changeType(Type.DRAGON);\n }\n }\n\n /*\n if(p.getType().equals(Type.KING)) {\n int blockedDirections = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c - 2) >= COLUMN_ROW_COUNT && cells[r][c-2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r - 2) >= COLUMN_ROW_COUNT && cells[r-2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c+1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c + 2) < COLUMN_ROW_COUNT && cells[r][c+2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r + 2) < COLUMN_ROW_COUNT && cells[r+2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if(blockedDirections == 4) {\n //gameOver = true;\n }\n }*/\n }\n }\n }", "private boolean findChess(int x,int y){\r\n for(Point c:chessList){\r\n if(c!=null&&c.getX()==x&&c.getY()==y)\r\n return true;\r\n }\r\n return false;\r\n }", "public Piece(Color color) {\r\n this.type = Type.SINGLE;\r\n this.color = color;\r\n }", "private boolean checkColor(boolean walkingHere) {\n\t\tint x = getMouse().getPosition().x,\n\t\t\ty = getMouse().getPosition().y + 1,\n\t\t\ti = 0;\n\t\t\n\t\tdo {\n\t\t\tsleep(10);\n\t\t\tc = getColorPicker().colorAt(x, y);\n\t\t\tif (c.getRed() == 255 && c.getGreen() == 0 && c.getBlue() == 0) {\n\t\t\t\tdebug(\"Interact color check: \"+(walkingHere ? \"failure\" : \"success\")+\" (red)!\");\n\t\t\t\treturn walkingHere ? false : true;\n\t\t\t}\n\t\t\tif (c.getRed() == 255 && c.getGreen() == 255 && c.getBlue() == 0) {\n\t\t\t\twarning(\"Interact color check: \"+(!walkingHere ? \"failure\" : \"success\")+\" (yellow)!\");\n\t\t\t\treturn walkingHere ? true : false;\n\t\t\t}\n\t\t} while (i++ < 50);\n\t\t\n\t\t// Default to true, as no color we want was found!\n\t\twarning(\"Interact color check: defaulted\");\n\t\treturn true;\n\t}", "int contains(int pgNum, int clock, char act)\r\n {\r\n for(int i = 0; i <size; i++)\r\n if(pm[i][0]==pgNum)\r\n {\r\n pm[i][1] = clock;\r\n pm[i][2] = act=='W' ? 1 : 0;\r\n return i;\r\n }\r\n\r\n return -1;\r\n }", "boolean testIsTouchingIGamePiece(Tester t) {\n return t.checkExpect(los2.isTouching(ship2), false)\n && t.checkExpect(los3.isTouching(bullet8), true)\n && t.checkExpect(lob2.isTouching(ship2), true)\n && t.checkExpect(lob3.isTouching(ship11), false)\n && t.checkExpect(lob3.isTouching(ship3), true)\n && t.checkExpect(mt.isTouching(ship6), false);\n }", "boolean testIsTouchingILoGamePieceShip(Tester t) {\n return t.checkExpect(ship2.isTouching(los2), false)\n && t.checkExpect(ship2.isTouching(lob2), true)\n && t.checkExpect(ship3.isTouching(lob3), true)\n && t.checkExpect(ship3.isTouching(mt), false);\n }", "public boolean isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }", "void highlightSquare(boolean highlight, Button button, int row, int column, ChessPiece piece);", "public void gossipGirl(){\n\t\tfor(Point p: currentPiece){\n\t\t\twell[p.x + pieceOrigin.x][p.y + pieceOrigin.y] = currentColor;\n\t\t}\n\t\trowChecked();\n\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}", "public static String findPiece(String piece)\n\t{\n\t\tfor(int rows = 0; rows < 8; rows++)\n\t\t{\n\t\t\tfor(int cols = 0; cols < 8; cols++)\n\t\t\t{\n\t\t\t\tif(occuMap[rows][cols].equals(piece))\n\t\t\t\t\treturn posMap[rows][cols];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public abstract Collection<Piece> getActivePieces();", "public abstract Collection<Piece> getActivePieces();", "private static Collection<Piece> getCorrectBluePieces() {\n\t\tfinal Collection<Piece> pieces = new ArrayList<Piece>();\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.MARSHAL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.FLAG, PlayerColor.BLUE));\n\t\treturn pieces;\n\t}", "boolean isLegal(String move) {\n int[][] theStatusBoard;\n if (_playerOnMove == ORANGE) {\n theStatusBoard = _orangeStatusBoard;\n } else {\n theStatusBoard = _violetStatusBoard;\n }\n Pieces thispiece = new Pieces();\n String piecename = move.substring(0, 1);\n int col = getCoordinate(move.substring(1, 2));\n int row = getCoordinate(move.substring(2, 3));\n int ori = Integer.parseInt(move.substring(3, 4));\n int[][] initialPositions = thispiece.getInitialPositions(piecename);\n int[][] finalPositions = thispiece.processPositions(initialPositions, ori);\n int depth = finalPositions.length;\n int length = finalPositions[0].length;\n\n if (row + depth - 1 > 13 || col + length - 1 > 13) {\n System.out.println(\"Your move makes your piece out of the board, try again!\");\n return false;\n }\n\n boolean has1 = false;\n boolean no2 = true;\n\n int i, j;\n for (i = 0; i < depth; i++) {\n for (j = 0; j < length; j++) {\n if (finalPositions[i][j] == 1) {\n if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 1) {\n has1 = true;\n } else if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 2) {\n return false;\n }\n }\n }\n }\n System.out.println(\"has1: \" + has1);\n return has1;\n }", "private String findBestColor(ArrayList<String> missingPieces) {\n if(missingPieces.size() > 0) {\n String bestColor = \"\";\n int maxVolume = 0;\n for (int i = 0; i < missingPieces.size(); i++) {\n String colorKey = missingPieces.get(i);\n Block piece = new Block(colorKey);\n int volume = piece.getVolume();\n if (volume > maxVolume) {\n maxVolume = volume;\n bestColor = colorKey;\n }\n }\n return bestColor;\n } else return null;\n }", "void oppInCheck(Piece[] B,Player J2,boolean moveFound);", "public boolean checkmate(PieceColor color)\n {\n Piece king = findKing(color);\n if (king==null||!getMoveLocations(king).isEmpty()||!inCheck(color))\n return false;\n for (Piece p: getPieces(color))\n if (!p.equals(king)&&!getMoveLocations(p).isEmpty())\n return false;\n return true;\n }", "public static void boardcheck(String piecevalue){\n\t\t//in all check methods, an opposite piece value must be set which holds the opposite piece to the current one (ie. x's opposite piece is o, o's opposite piece is x)\n\t\tString oppositepiece;\n\t\tif(piecevalue.equals(\"x\")){\n\t\t\toppositepiece=\"o\";\n\t\t}\n\t\telse if(piecevalue.equals(\"o\")){\n\t\t\toppositepiece=\"x\";\n\t\t}\n\t\t//This step is needed or JAVA will think that the piecevalue may not have been initialized\n\t\telse{\n\t\t\toppositepiece=\"-\";\n\t\t}\n\t\t//With the 2 for loops and the if statement, the program will go through the whole board but only check the value if it is on a blank space [-].\n\t\tfor(int row=1;row<=boardwidth;row++){\n\t\t\tfor(int column=1;column<=boardlength;column++){\n\t\t\t\tif(board[row][column].equals(\"-\")){\n\t\t\t\t\t//found booleans will turn into true if a 'connection' is available and an action can be made with the current row/column in the loop. \n\t\t\t\t\tboolean foundR=false,foundL=false,foundT=false,foundB=false,foundTL=false,foundTR=false,foundBL=false,foundBR=false;\n\t\t\t\t\t//checkfurther all begin as 1 and will increase in value if an opposite piece is found in the direction it is checking, this lets the while loop continue and check more in that direction.\n\t\t\t\t\tint checkfurtherR=1,checkfurtherL=1,checkfurtherT=1,checkfurtherB=1,checkfurtherTL=1,checkfurtherTR=1,checkfurtherBL=1,checkfurtherBR=1;\n\t\t\t\t\t//R=right, L=left, T=top, B=bottom, and there are diagonals such as TL=top left.\n\t\t\t\t\t//program will check all directions using this scheme.\n\t\t\t\t\t//If the board in this direction holds and opposite piece, it will advance and check further, until something other than an opposite piece is reached.\n\t\t\t\t\twhile(board[row][column+checkfurtherR].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherR++;\n\t\t\t\t\t}\n\t\t\t\t\t//If the piece after the check furthers have stopped is the same-type piece, then everything in between will be converted to the current piece. A 'connection' is made as explained in the tutorial/user manual.\n\t\t\t\t\tif(board[row][column+checkfurtherR].equals(piecevalue)&&checkfurtherR>1){\n\t\t\t\t\t\tfoundR=true;\n\t\t\t\t\t}\n\t\t\t\t\twhile(board[row][column-checkfurtherL].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherL++;\n\t\t\t\t\t}\n\t\t\t\t\tif(board[row][column-checkfurtherL].equals(piecevalue)&&checkfurtherL>1){\n\t\t\t\t\t\tfoundL=true;\n\t\t\t\t\t}\n\t\t\t\t\twhile(board[row+checkfurtherB][column].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherB++;\n\t\t\t\t\t}\n\t\t\t\t\tif(board[row+checkfurtherB][column].equals(piecevalue)&&checkfurtherB>1){\n\t\t\t\t\t\tfoundB=true;\n\t\t\t\t\t}\n\t\t\t\t\twhile(board[row-checkfurtherT][column].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherT++;\n\t\t\t\t\t}\n\t\t\t\t\tif(board[row-checkfurtherT][column].equals(piecevalue)&&checkfurtherT>1){\n\t\t\t\t\t\tfoundT=true;\n\t\t\t\t\t}\n\t\t\t\t\twhile(board[row-checkfurtherTR][column+checkfurtherTR].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherTR++;\n\t\t\t\t\t}\n\t\t\t\t\tif(board[row-checkfurtherTR][column+checkfurtherTR].equals(piecevalue)&&checkfurtherTR>1){\n\t\t\t\t\t\tfoundTR=true;\n\t\t\t\t\t}\n\t\t\t\t\twhile(board[row-checkfurtherTL][column-checkfurtherTL].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherTL++;\n\t\t\t\t\t}\n\t\t\t\t\tif(board[row-checkfurtherTL][column-checkfurtherTL].equals(piecevalue)&&checkfurtherTL>1){\n\t\t\t\t\t\tfoundTL=true;\n\t\t\t\t\t}\n\t\t\t\t\twhile(board[row+checkfurtherBL][column-checkfurtherBL].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherBL++;\n\t\t\t\t\t}\n\t\t\t\t\tif(board[row+checkfurtherBL][column-checkfurtherBL].equals(piecevalue)&&checkfurtherBL>1){\n\t\t\t\t\t\tfoundBL=true;\n\t\t\t\t\t}\n\t\t\t\t\twhile(board[row+checkfurtherBR][column+checkfurtherBR].equals(oppositepiece)){\n\t\t\t\t\t\tcheckfurtherBR++;\n\t\t\t\t\t}\n\t\t\t\t\tif(board[row+checkfurtherBR][column+checkfurtherBR].equals(piecevalue)&&checkfurtherBR>1){\n\t\t\t\t\t\tfoundBR=true;\n\t\t\t\t\t}\n\t\t\t\t\t//If any pieces have\n\t\t\t\t\tif(foundR==true||foundL==true||foundT==true||foundB==true||foundTL==true||foundTR==true||foundBL==true||foundBR==true){\n\t\t\t\t\t\tboardavailability=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//This if statement does not have to do with the current method. It is useful to the next nomovecheck method.\n\t\tif(boardavailability==false){\n\t\t\tnomovecount++;\n\t\t}\n\t}", "public Piece getPiece(int num)\n {\n\treturn unused[num];\n }" ]
[ "0.6448963", "0.62775266", "0.62709755", "0.61637646", "0.616139", "0.60021126", "0.5964455", "0.59556603", "0.59376675", "0.5921944", "0.5808018", "0.57672364", "0.576407", "0.5720968", "0.5708747", "0.56766593", "0.56604147", "0.56312877", "0.55917937", "0.55766344", "0.55750483", "0.5555597", "0.5536024", "0.551376", "0.5509644", "0.5503433", "0.5483318", "0.5482902", "0.54653716", "0.5457236", "0.5455493", "0.54455435", "0.54435056", "0.54259634", "0.54142934", "0.54090875", "0.53565514", "0.53443325", "0.5331816", "0.53263605", "0.53127944", "0.53047293", "0.53033465", "0.52955854", "0.52889407", "0.5283206", "0.52779317", "0.52729374", "0.5262018", "0.5252452", "0.524445", "0.5240099", "0.52382916", "0.5235717", "0.52339226", "0.5233699", "0.5228715", "0.5227772", "0.5224569", "0.52164453", "0.5216099", "0.52135605", "0.51943517", "0.51927", "0.51815754", "0.5180908", "0.5174914", "0.51558185", "0.5152152", "0.5148173", "0.5147375", "0.51363677", "0.51314163", "0.5117254", "0.5108123", "0.51007485", "0.5094215", "0.5093193", "0.50872207", "0.50846493", "0.5084249", "0.5082463", "0.5080093", "0.50755537", "0.50719506", "0.5068781", "0.50675416", "0.50666225", "0.50621295", "0.50527835", "0.50483096", "0.5045011", "0.5045011", "0.5043871", "0.5042875", "0.50331", "0.50311106", "0.5021442", "0.502104", "0.5017963" ]
0.69222796
0
Query to check whether the user is playing a game.
public boolean isPlaying() { return state == State.INGAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isPlayableInGame();", "Boolean isPlaying() {\n return execute(\"player.playing\");\n }", "public boolean checkPlays(Player player){\n return true;\n }", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "private boolean doesUserPlay(final long userID, final String game, final IGuild guild) {\n if (gameStatsJSON.has(guild.getStringID())) {\n JSONObject guildJSON = gameStatsJSON.getJSONObject(guild.getStringID());\n if (guildJSON.has(game)) {\n // Game has been played by at least one user of this server\n\n JSONArray gameArray = guildJSON.getJSONArray(game);\n for (int i = 0; i < gameArray.length(); i++) {\n if (gameArray.getLong(i) == userID) {\n // User has played the game\n return true;\n }\n }\n }\n }\n return false;\n }", "public abstract boolean existsPlayerInGame(String username, int game_id) throws SQLException;", "boolean hasFindGamesRequest();", "public boolean isInGame() {\n return this.hasStarted;\n }", "private boolean canPauseGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && gameStateManager.getState().equals(GameState.PLAY);\n }", "public boolean inAnySession() {\n\t\treturn getSession(player).isPresent();\n\t}", "public boolean isPlaying() {\n return params.isPlay();\n }", "boolean isPlayable();", "boolean playerExists() {\n return this.game.h != null;\n }", "@Override\n\tpublic boolean hasAccountGamePlayRights(AccountUId accountuid,\n\t\t\tGameUId gameuid) throws InvalidAccountUIdException,\n\t\t\tRightsManagementException {\n\t\treturn false;\n\t}", "@Override\n public boolean isPlaying()\n {\n final String funcName = \"isPlaying\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%s\", Boolean.toString(playing));\n }\n\n return playing;\n }", "public boolean playGame() {\n\t\tboolean movePlayed = false;\n\t\twhile (!gameOver) {\n\t\t\tSystem.out.println(board);\n\t\t\tmovePlayed = false;\n\t\t\twhile(!movePlayed) {\n\t\t\t\ttry {\n\t\t\t\t\tplayNextTurn();\n\t\t\t\t\tmovePlayed = true;\n\t\t\t\t}\n\t\t\t\tcatch (RuntimeException e) {\n\t\t\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.checkWin = board.checkWin();\n\t\treturn true;\n\t}", "public boolean isPlaying() {\n\t\treturn AL10.alGetSourcei(id, AL10.AL_SOURCE_STATE) == AL10.AL_PLAYING;\n\t}", "public boolean getHaveGame()\n\t{\n\t\treturn this.haveGame;\n\t}", "boolean isGameSpedUp();", "public boolean isMyTurn() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getActivePlayer());\n }", "public boolean isGameRunning()\n\t{\n\t\treturn zegar.isRunning() || wToku;\n\t}", "boolean hasPlayer(String player);", "public abstract boolean isPlayer();", "public boolean hasGame(String gameName)\n {\n \treturn games.containsKey(gameName);\n }", "public boolean startGame() {\n\t\tif(!ackReadyToPlay){\n\t\t\tackReadyToPlay = true;\n\t\t\tSystem.out\n\t\t\t.println(\"PPL: StartGameBean vom typ RESULT empfangen von: \" + jid);\n\t\t\treturn game.playerReadyToPlay(this);\n\t\t}\n\t\treturn false;\n\t}", "public boolean isPlaying() {\n return mPlaying || mStateManager.isPlaying();\n\t}", "@POST(\"/VerifyUserHasPlayer\")\n\tPlayer userCanPlay(@Body GameInstanceData gameInstDat) throws GameNotFoundException;", "boolean hasFindGamesResponse();", "public void checkGame() {\n\n\t}", "public boolean activeFor(String player);", "boolean hasJoinGameRequest();", "public boolean hasFutureGames() {\n /*\n if (this.games.isEmpty()) {\n\n //Pull games from DB\n List<Game> refereeGames = EntityManager.getInstance().getRefereeGames(this);\n for (Game game : refereeGames) {\n if (!this.games.contains(game)) {\n this.games.add(game);\n }\n }\n }\n */\n HashMap<String, Boolean> gamesStatus = EntityManager.getInstance().getRefereeGamesStatus(this);\n for (Map.Entry<String, Boolean> hasGameFinished : gamesStatus.entrySet()) {\n if (!hasGameFinished.getValue()) {\n return true;\n }\n }\n for (Game game : getGames()) {\n if (!game.hasFinished()) {\n return true;\n }\n }\n return false;\n }", "public boolean doesGuiPauseGame()\r\n\t{\r\n\t\treturn false;\r\n\t}", "boolean hasPlayerId();", "public boolean isPlayer() {\n return player != null;\n }", "boolean isGameComplete();", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }", "void play(boolean fromUser);", "@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}", "public boolean isPlayable() {\n return (mFlags & FLAG_PLAYABLE) != 0;\n }", "boolean hasFairplay();", "boolean hasStartGameRequest();", "boolean isPlayerTurn();", "public boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "public boolean doesGuiPauseGame() {\n\t\treturn false;\n\t}", "public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }", "boolean isGameOver();", "boolean isGameOver();", "private boolean canResumeGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && isGamePaused();\n }", "protected boolean hasGameStarted() {\r\n return super.hasGameStarted();\r\n }", "boolean winGame();", "public abstract boolean existsGame2(String username) throws SQLException;", "boolean isPlaying() { return playing; }", "public boolean gameStarted() {\n\t\treturn startGame;\n\t}", "public boolean isPlaying() {\n \t\treturn isPlaying;\n \t}", "boolean hasPlayready();", "public boolean isSetPlayer() {\n return this.player != null;\n }", "public boolean doesGuiPauseGame()\n {\n return !this.doesGuiPauseGame;\n }", "public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}", "public static boolean getIsPlayersTurn()\r\n {\r\n return isPlayersTurn;\r\n }", "public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}", "public synchronized boolean startGame(String gameName) {\n\t\tif(!isActive()) {\n\t\t\tGameProtocolFactory game1 = GameManager.getInstance().searchGame(gameName);\n\t\t\tif (game1!=null){\n\t\t\t\tthis.currentGame = game1.create(this); //when creates called, game starts\n\t\t\t\tlogger.info(gameName + \" game starting\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlogger.info(gameName + \" DOSENT EXIST\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.info(\"A different game is already in session\");\n\t\t\treturn false;\n\t\t}\n\t}", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public boolean isHasPlayer() {\n\t\treturn HasPlayer;\n\t}", "public boolean doesGuiPauseGame()\n {\n return false;\n }", "public boolean isPlaying() {\n return state.isActive();\n }", "public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }", "public static boolean isLoggedIn() {\n\t\treturn arcade.hasPlayer();\n\t}", "public boolean isPlayerPlaying() {\n return this.player.getMasterMediaPlayer().isPlaying();\n }", "@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }", "public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }", "private boolean winGame() {\n if (model.isCompleted()) {\n win.message(\"Winner\");\n return true;\n }\n return false;\n }", "@SuppressWarnings(\"static-access\")\n\tpublic boolean isPlay(){\n\t\treturn this.isPlay;\n\t}", "public boolean isHasPlayers() {\n\t\treturn HasPlayers;\n\t}", "public abstract boolean existsGame(int game_id) throws SQLException;", "public static Boolean playBtn() { \n\t\tboolean startGame= false;\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"secondepage\\\"]/center/button[1]\")).click();\n\t\tif (driver.getPageSource().contains(QandA.getQuestion(0))||driver.getPageSource().contains(QandA.getQuestion(1))||driver.getPageSource().contains(QandA.getQuestion(2))){\n\t\t\tstartGame=true;\n\t\t}\n\t\treturn startGame; \n\t}", "public boolean gameExist(Game g) {\n if (getGame(g.getName()) != null) return true;\n return false;\n }", "public boolean hasPlayList(){\n return numPlayList < MAX_PLAYLIST;\n }", "public boolean playerExists(String username) {\n return getPlayer(username) != null;\n }", "public boolean isPaused(){\r\n\t\tif (this.pauseGame(_p)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}", "boolean hasJoinGameResponse();", "boolean hasFindGameRoomsRequest();", "public boolean isGameOver();", "public boolean isGameOver();", "public int startGame() {\n\t\tint counter = 0;\n\t\twhile (true) {\n\t\t\t\n\t\t\tPlayer current = (counter % 2 == 0) ? getPlayer1() : getPlayer2();\n\t\t\tint column = current.play(getGameBoard());\n\t\t\t\n\t\t\t// Check input validity:\n\t\t\t\n\t\t\tif(column < 0) {\n\t\t\t\tSystem.out.println(current.getName()+\" tries to play a negative column number -> disqualification.\");\n\t\t\t\treturn (current == player1)? 2 : 1;\n\t\t\t}\n\t\t\t\n\t \tif(isColumnFull(column, current)) {\n\t \t\tSystem.out.println(current.getName()+\" tries to play an already full column -> disqualification.\");\n\t \t\treturn (current == player1)? 2 : 1;\n\t \t}\n\t\t\t\n\t\t\tplayColumn(column, current);\n\t\t\tcounter++;\n\t\t\t\n\t\t\tif (isGameDrawn()) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t// For Player 1:\n\t\t\tif (hasWon(getPlayer1())) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// For Player 2:\n\t\t\tif (hasWon(getPlayer2())) {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t\n\t\t\t// continue ...\n\t\t}\n\t}", "public boolean hasOnlinePlayers() {\n for (Player p : players) {\n if (p.isOnline())\n return true;\n }\n return false;\n }", "public boolean gameOver() {\n return winner() != null;\n }", "public boolean isInPlay() {\n\t\tif (getX() < LEFT_FIELD_LIMIT || getX() > RIGHT_FIELD_LIMIT || \n\t\t\t\t getY() <= MINIMUM_FOOTBALL_Y) {\n\t\t\tinPlay_ = false;\n\t\t\treturn inPlay_;\n\t\t} \n\t\treturn inPlay_;\n\t}", "public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }", "public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }", "public abstract boolean existsGameRequest(int game_id, String username1, String username2) throws SQLException;", "public boolean isPlaying() {\n\t\tif(currentPlayingItem==null) return false;\n\t\treturn mediaPlayer.isPlaying();\n\t}", "public boolean isPlaying() {\n\t\treturn isPlaying;\n\t}", "public static boolean musicPlaying()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn musicPlayer.isPlaying();\r\n\t}", "private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }", "boolean addEasyGamePlayed();", "@Override\n public final boolean doesGuiPauseGame() {\n return shouldPauseGame;\n }", "public void setHaveGame()\n\t{\n\t\tthis.haveGame = true;\n\t\tthis.isTurn = true;\n\t\tSystem.out.println(\"Setting have game\");\n\t}", "public boolean gameStarted() {\r\n\t\treturn this.gameStarted;\r\n\t}" ]
[ "0.7274191", "0.684474", "0.6620018", "0.65727335", "0.65255797", "0.6447205", "0.62982", "0.6230612", "0.62017035", "0.6170717", "0.6161958", "0.61485916", "0.6141106", "0.6122708", "0.6100802", "0.6091218", "0.60816896", "0.6070733", "0.6047668", "0.60426086", "0.6025714", "0.59728914", "0.5958117", "0.5957658", "0.595424", "0.59168404", "0.59031636", "0.58937687", "0.589186", "0.5891442", "0.58684", "0.58255357", "0.58239424", "0.581301", "0.58115596", "0.57964456", "0.5786788", "0.5778539", "0.5778311", "0.577788", "0.5774772", "0.5759352", "0.5759284", "0.5754286", "0.57529444", "0.5752232", "0.5749905", "0.5749905", "0.57429326", "0.5730629", "0.5723484", "0.57194537", "0.57080805", "0.56893766", "0.5688864", "0.56748223", "0.56717527", "0.56692636", "0.5666466", "0.5661754", "0.56599796", "0.56598145", "0.56493425", "0.5648451", "0.56459695", "0.56457925", "0.56451476", "0.56427306", "0.56397593", "0.56385845", "0.5634533", "0.5629996", "0.5627448", "0.56217825", "0.5613819", "0.5613288", "0.5611598", "0.560178", "0.5598469", "0.55898595", "0.5585536", "0.5581614", "0.5581418", "0.5575373", "0.5575373", "0.55721724", "0.55623", "0.55480164", "0.5547048", "0.5538941", "0.5534709", "0.55345356", "0.5534458", "0.5529747", "0.552574", "0.55134696", "0.5504011", "0.5503708", "0.5503001", "0.5501696" ]
0.62099665
8
Query to get userIO of this user.
public UserIO getUserIO() { return this.userIO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic UserInfo getUserInfo() {\n\t\tHttpSession session = RpcContext.getHttpSession();\n String auth = (String)session.getAttribute(\"auth\");\n UserInfo ui = null;\n if (auth != null) {\n\t switch(AuthType.valueOf(auth)) {\n\t\t case Database: {\n\t\t String username = (String)session.getAttribute(\"username\");\n\t\t \t\tui = _uim.select(username);\n\t\t \t\tbreak;\n\t\t }\n\t\t case OAuth: {\n\t\t \t\tString googleid = (String)session.getAttribute(\"googleid\");\n\t\t \t\tui = _uim.selectByGoogleId(googleid);\n\t\t \t\tbreak;\n\t\t }\n\t }\n }\n\t\treturn ui;\n\t}", "@Override\n\tpublic Collection<Users> read() {\n\t\treturn userDAO.readAll();\n\t}", "@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "User getUserInformation(Long user_id);", "public People getObjUser() {\n return instance.getObjUser();\n }", "@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "UserSettings getByUser();", "public UserModel getUser() {\n return userRepository.findById(getUserID())\n .orElseThrow(() -> new ResourceNotFoundException(\"User not found with id: \" + getUserID()));\n }", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "@Override\n\tpublic List<User> findUser() {\n\t\treturn userdao.findUser();\n\t}", "public Motile getUser() {\n return user;\n }", "public String getUser()\n {\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n String email=\"\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n email = cursor.getString(1);\n }\n Log.d(TAG, \"Fetching user from Sqlite: \" + email);\n\n return email;\n }", "public Long getUser() {\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public User getUser(){\r\n\t\treturn this.user;\r\n\t}", "public User getUser(){\n\t\treturn this.user;\n\t}", "java.lang.String getUser();", "public User getOwner()\r\n\t\tthrows PermissionDeniedException, BaseException\r\n\t{\r\n throw new UnsupportedOperationException(\"Fix This\"); // ToDo\r\n//\t\treturn getDbControl().getItem(User.class, getData().getOwner());\r\n\t}", "@GET\n\t@Path(\"/allUsers\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Map<String, List<User>> getUser() throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tMap<String, List<User>> user = userDao.getUser();\n\t\t\n\t\treturn user; \n\t}", "User getUser();", "User getUser();", "public MetaUser getMetaUser(int iUser);", "public User getUserData();", "public abstract StreamUser getStreamUser(String uid);", "public User getUser(){\n return this.getAccountController().getUser();\n }", "@Override\n\tpublic IUser getUser() {\n\t\treturn getInnerObject().getUser();\n\t}", "public People getUser() {\n return instance.getUser();\n }", "OiDataCollection getUserCollection() {\n return userCollection;\n }", "public static String getUser() {\r\n return user;\r\n }", "public IUser getUser() {\n \t\treturn null;\n \t}", "synchronized public String getUser()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getUserID();\n\t\t\t\n\t\treturn null;\n\t}", "public UserData getUser() {\n return user;\n }", "public String getUser()\n {\n return this.user;\n }", "public String getUser()\n {\n return this.user;\n }", "public String getUser()\n {\n return this.user;\n }", "public User read(String id);", "public UserDoc getUser(String un) {\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n\n // ----- get document of given username from registeredData -----\n UserDoc doc = new UserDoc();\n\n System.out.println(\"\\nPrint \" + un + \"\\'s data\\n--------------------\\n\");\n FindIterable<Document> docOne = collRU.find(Filters.eq(\"username\", un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor1.hasNext()) {\n doc.doc = cursor1.next();\n return doc;\n }\n } finally {\n cursor1.close();\n }\n\n return null;\n }", "public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}", "@Override\r\n\tpublic List<Map<String, Object>> findAllUser() {\n\t\treturn userMapper.findAllUser();\r\n\t}", "public User getUser();", "public static String getUser() {\n return user;\n }", "public String getUser() {\n return this.user;\n }", "public Object getUserObject()\n\t{\n\t\treturn userObject;\n\t}", "public User getUser(){\n\t\treturn user;\n\t}", "@Override\n\tpublic user getUser(int i) {\n\t\treturn userdb.get(i); \n\t}", "User getOwner();", "public String getUser() {\r\n return user;\r\n }", "People getObjUser();", "public List<UserBean> getUser() {\n\t\tSystem.out.println(\"=========================\");\n\t\treturn userMapper.getUser();\n\t}", "String getUser();", "String getUser();", "public Object getUserObject();", "@Override\n\tpublic Usuario read(String nomuser) {\n\t\tString SQL = \"SELECT * FROM usuario WHERE username=?\";\n\t\treturn jdbc.queryForObject(SQL, new Object[] {nomuser}, new BeanPropertyRowMapper<Usuario>(Usuario.class));\n\n\t}", "public final User getUser() {\t\r\n\t\treturn this.user;\r\n\t}", "public List selectAllFromUsuario() throws IOException {\n erro = false;\n List usuarios = null;\n try {\n usuarios = con.query(\"Select * from usuario\", new BeanPropertyRowMapper(Usuario.class));\n } catch (CannotGetJdbcConnectionException ex) {\n logger.gravarDadosLog(\"ERRO\", \"SELECT\" , \"Não foi possivel realizar a consulta dos usuário cadastrados.\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n \n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"SELECT\" , \"A busca de usuários cadastrados foi realizada com sucesso.\");\n }\n erro = false;\n return usuarios;\n }", "@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}", "public User getUser() { return this.user; }", "private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }", "public String getUser() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "public abstract User getOwner();", "public String getUser(){\n \treturn user;\n }", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "public java.lang.String getUser() {\n return user;\n }", "public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }", "public User getUser() {\n\treturn user;\n }", "public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }", "com.lxd.protobuf.msg.result.user.User.User_ getUser();", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "public UserHandle getUser() {\n return mUser;\n }", "@Override\n\tpublic UserOperations userOperations() {\n\t\t\n\t\treturn this.userOperations;\n\t}", "public User getUser() {\r\n return user;\r\n }", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}", "@Override\n\tpublic Epuser queryById(String epUserId) throws Exception {\n\t\treturn epuserMapper.load(epUserId);\n\t}", "@Override\n\tpublic List<User> getAllItem() {\n\t\treturn userRepository.findAll();\n\t}", "public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}", "public Vector getUsers(TIdentifiable resource) {\r\n int column = m_resources.getIndex(resource);\r\n Vector result = new Vector();\r\n TUseStatus useStatus;\r\n\t if (column >= 0) {\r\n for (int b=0; b < m_current_users_count; b++)\r\n if (m_associations[column][b]!=null) {\r\n useStatus = m_associations[column][b];\r\n if (useStatus.getStatus()!=useStatus.NO_ASSOCIATION) result.addElement(useStatus);\r\n }\r\n return result;\r\n } else return null;\r\n }", "public static ArrayList<User> findAllUsers() {\n\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findAllUsers = \"SELECT * FROM public.member where type = 0\";\n PreparedStatement stmt = DBConnection.prepare(findAllUsers);\n ArrayList<User> userList = new ArrayList<User>();\n\n try {\n ResultSet rs = stmt.executeQuery();\n\n while(rs.next()) {\n User user = load(rs);\n\n targetUser = userIdentityMap.get(user.getId());\n if (targetUser == null) {\n userList.add(user);\n userIdentityMap.put(user.getId(), user);\n } else {\n userList.add(targetUser);\n }\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n return userList;\n }", "ApplicationUser getUser();", "@GET\n\t @Path(\"/topUser\")\n\t public Response getProfile() throws ProfileDaoException {\n\t return Response\n\t .ok(api.getTopUser(datastore))\n\t .build();\n\t }", "public boolean getUser () {\n return user;\n }", "public eu.aladdin_project.xsd.User getUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.xsd.User target = null;\n target = (eu.aladdin_project.xsd.User)get_store().find_element_user(USER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getUser() {\r\n\t\treturn user;\r\n\t}", "public String getUser() {\r\n\t\treturn user;\r\n\t}", "public List<ImageFile> getUserImage(int userID) {\n List<ImageFile> listOfImages = null;\n Session session = sessionFactory.openSession();\n // Try to return the user by the given nickname\n try {\n session.beginTransaction();\n \n // if mode equals MINE then get just users ID\n Criteria criteria = session.createCriteria(ImageFile.class);\n criteria.add(Restrictions.eq(\"ownerUser.userID\", userID));\n listOfImages = (List<ImageFile>) criteria.list();\n \n session.getTransaction().commit();\n session.flush();\n } \n catch (HibernateException e) { e.printStackTrace(); return null;} \n finally { session.close(); }\n // Return userID if seted\n return listOfImages;\n }", "public String getUser()\n {\n return _user;\n }", "public User getUser() {\n\t\treturn this.user;\n\t}", "public User getUser() {\n\t\treturn this.user;\n\t}", "public String getUser() {\n\t\t\treturn user;\n\t\t}", "@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}", "public Multimap<String, String> getUsers() throws IOException {\n ImmutableMultimap.Builder<String, String> users = ImmutableSetMultimap.builder();\n for (ChildData child : mCache.getCurrentData()) {\n String nodeName = Iterables.getLast(Splitter.on('/').split(child.getPath()));\n String[] split = nodeName.split(ZooKeeperUtils.ZK_NODE_NAME_SEPARATOR);\n if (split.length != 2) {\n LOG.error(\"Ignoring invalid ZooKeeper table user node: {}.\", nodeName);\n continue;\n }\n final String userID = URLDecoder.decode(split[0], Charsets.UTF_8.displayName());\n final String layoutID = URLDecoder.decode(split[1], Charsets.UTF_8.displayName());\n\n users.put(userID, layoutID);\n }\n return users.build();\n }", "@Override\n public User queryByOpenId(String openId) {\n return null;\n }", "public Usuario getUser() {\n return user;\n }", "public Dao<User, Integer> getUserDao() throws SQLException {\n\t\tif (userDao == null) {\n\t\t\tuserDao = getDao(User.class);\n\t\t}\n\t\treturn userDao;\n\t}", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }" ]
[ "0.59161747", "0.5689082", "0.5614941", "0.561156", "0.55587196", "0.55472606", "0.5542704", "0.5527781", "0.5522837", "0.54514855", "0.54397357", "0.5424798", "0.5413492", "0.5393711", "0.5377067", "0.5374666", "0.53704846", "0.5370122", "0.53677905", "0.53489494", "0.53433377", "0.53433377", "0.5340231", "0.5328774", "0.5324459", "0.5322097", "0.5321458", "0.5303766", "0.529903", "0.529729", "0.5296259", "0.5293528", "0.52919346", "0.52772164", "0.52772164", "0.52772164", "0.52746475", "0.52715635", "0.52604455", "0.5258768", "0.5258499", "0.5257956", "0.5256412", "0.52475893", "0.5246916", "0.5243014", "0.5240197", "0.52379394", "0.52360404", "0.52318144", "0.52204955", "0.52204955", "0.5220019", "0.5219812", "0.5219797", "0.52142256", "0.5213735", "0.5212537", "0.521077", "0.5204337", "0.5202121", "0.5202121", "0.5202121", "0.5199678", "0.5199269", "0.51977986", "0.5194859", "0.5191092", "0.5183715", "0.5183686", "0.51825154", "0.51822644", "0.5179549", "0.5174856", "0.5169883", "0.5163514", "0.515591", "0.51517224", "0.51505375", "0.5145705", "0.5145331", "0.51448727", "0.51443046", "0.5143565", "0.51423025", "0.51393354", "0.51393354", "0.5138382", "0.51367784", "0.5135869", "0.5135869", "0.51345843", "0.51339185", "0.51306766", "0.5130369", "0.51298463", "0.5129682", "0.5128602", "0.5128602", "0.5128602" ]
0.71454537
0
TODO Autogenerated method stub
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Declare integer variables and initialize
public static void main(String[] args) { byte num1 = 100; short num2 = 123; int num3 = 1200; long num4 = 234763458476L; // Print min and maximum values System.out.println("Maximum value of byte is " + Byte.MAX_VALUE); System.out.println("Minimum value of byte is " + Byte.MIN_VALUE); System.out.println("Maximum value of short is " + Short.MAX_VALUE); System.out.println("Minimum value of short is " + Short.MIN_VALUE); System.out.println("Maximum value of int is " + Integer.MAX_VALUE); System.out.println("Minimum value of int is " + Integer.MIN_VALUE); System.out.println("Maximum value of long is " + Long.MAX_VALUE); System.out.println("Minimum value of long is " + Long.MIN_VALUE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final int initializeInt() {\n\t\treturn 0;\r\n\t}", "private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }", "private final int[] initializeInstanceVariable() {\n\t\tint n = 10;\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {temp[i] = i;}\n\t\treturn temp;\n\t}", "public IntHolder() {\r\n\t}", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "protected void initVars() {}", "public Int() {\n super(Expression.X_IS_UNDEFINED);\n this.value = 0;\n }", "protected Int() {}", "private void initializeNumbers() {\n\t\tthis.longitude_e6=Integer.MIN_VALUE;\n\t\tthis.latitude_e6=Integer.MIN_VALUE;\n\t\tthis.visibilityRadius=Integer.MIN_VALUE;\n\t\tthis.visibilityLongitude_e6=Integer.MIN_VALUE;\n\t\tthis.visibilityLatitude_e6=Integer.MIN_VALUE;\n\t\tthis.joinRadius=Integer.MIN_VALUE;\n\t\tthis.joinLongitude_e6=Integer.MIN_VALUE;\n\t\tthis.joinLatitude_e6=Integer.MIN_VALUE;\n\t\tthis.joinStartTime=Long.MIN_VALUE;\n\t\tthis.joinEndTime=Long.MIN_VALUE;\n\t\tthis.startTime=Long.MIN_VALUE;\n\t\tthis.endTime=Long.MIN_VALUE;\n\t}", "public MyInteger(){\n //initialize to 0\n Integer myint = new Integer(0);\n }", "public Happy_Number()\r\n\t{\r\n\t\tnumberHolder = new int[20];\r\n\t\tfor(int ii = 0; ii < numberHolder.length; ii++)\r\n\t\t{\r\n\t\t\tnumberHolder[ii] = 0;\r\n\t\t}\r\n\t}", "public Variables() {\n this.numCliente = 0;\n this.tiempoSalida = 999;\n }", "public void init() {\n l0 = new EmptyList();\n l1 = FListInteger.add(l0, new Integer(5));\n l2 = FListInteger.add(l1, new Integer(4));\n l3 = FListInteger.add(l2, new Integer(7));\n l4 = new EmptyList();\n l5 = FListInteger.add(l2, new Integer(7));\n }", "public Int() {\n this(0);\n }", "public intHolder(int number)\n {\n storageInt=number;\n \n }", "public Counter(int init){\n \tvalue = init;\n }", "public MutableInt() {}", "public static void initializeVariables() {\n // System.out.println(\"initializeVariables()\");\n for (int i = 1; i <= 20; i++) {\n\n\n List<Variable> variablecopies = new LinkedList<Variable>();\n List<Integer> siteList = new LinkedList<Integer>();\n\n Variable var = null;\n if (i % 2 == 0) {\n for (int j = 1; j <= 10; j++) {\n sites.get(j).addVariable(i, 10 * i);\n var = sites.get(j).getVariable(i);\n siteList.add(j);\n variablecopies.add(var);\n }\n } else {\n for (int j = 1; j <= 10; j++) {\n if (j == 1 + i % 10) {\n sites.get(j).addVariable(i, 10 * i);\n var = sites.get(j).getVariable(i);\n variablecopies.add(var);\n siteList.add(j);\n }\n }\n }\n variable_site_map.put(i, siteList);\n variable_copies_map.put(i, variablecopies);\n }\n }", "private void initCounts() {\n this.angry_count = findViewById(R.id.anger_count);\n this.fear_count = findViewById(R.id.fear_count);\n this.joyful_count = findViewById(R.id.joy_count);\n this.love_count = findViewById(R.id.love_count);\n this.sad_count = findViewById(R.id.sad_count);\n this.suprise_count = findViewById(R.id.suprise_count);\n\n this.updateCounts();\n }", "private FinalIntegerNode() { }", "public int getInitialValue()\n {\n return _init;\n }", "void init(int n);", "void init(int n);", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "private void initVars(){\n this.dice = new Dice();\n this.playing = true;\n this.currentPlayer = 0;\n this.turn = 0;\n this.xPlayers=new ArrayList<>(); \n this.players = new Player[4];\n this.diceRoller=true;\n this.xTokens=new ArrayList<>();\n this.winners=new ArrayList<>();\n this.computerPlayer= new Autoplay();\n this.gameResults = \"\";\n this.debug = false;\n }", "public static void initialisations() {\n\t\tit = 0;\r\n\t\tbc = 1;\r\n\r\n\t\t// pile des reprises pour compilation des branchements en avant\r\n\t\tpileRep = new TPileRep(); \r\n\t\t// programme objet = code Mapile de l'unite en cours de compilation\r\n\t\tpo = new ProgObjet();\r\n\t\t// COMPILATION SEPAREE: desripteur de l'unite en cours de compilation\r\n\t\tdesc = new Descripteur();\r\n\r\n\t\t// initialisation necessaire aux attributs lexicaux\r\n\t\tUtilLex.initialisation();\r\n\r\n\t\t// initialisation du type de l'expression courante\r\n\t\ttCour = NEUTRE;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de param�tres de chaque proc�dure \r\n\t\tnbParamProc = 0;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de variables d�clar�es\r\n\t\tnbVar++;\r\n\r\n\t\t//Initialisation vTmp\r\n\t\tvTmp = 0;\r\n\t\t\r\n\t\tdesc.setUnite(\"programme\");\r\n\t\t\r\n\t}", "public void init()\n {\n list = new int[k];\n\n // Initialise my list of integers\n for (int i = 0; i < k; i++) {\n int b = 1;\n while (CommonState.r.nextBoolean())\n b++;\n list[i] = b;\n }\n }", "public static void main(String[] args) {\n\nint x = 5;\nint y;\n// int z = x+y; // DOES NOT COMPILE\n // Local variables need to be initialized before use\n\n\n}", "public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }", "public MyInteger( int x )\n {\n value = x;\n }", "public IntegerRegFile()\n {\n //REGISTER FILE INITIALIZATION (with dummy values)\n registerFile = new int[32]; //create 32 integer registers\n for (int i = 0; i < registerFile.length; i++) {\n registerFile[i] = i + (i/2);\n }\n }", "public static void populateValues()\n\t{\n\t\tvalues = new int[127];\n\t\tfor(int i = 0; i < 127; i++)\n\t\t{\n\t\t\tif(i < 64)\n\t\t\t\tvalues[i] = 1;\n\t\t\telse if (i < 96)\n\t\t\t\tvalues[i] = 2;\n\t\t\telse if (i < 112)\n\t\t\t\tvalues[i] = 4;\n\t\t\telse if (i < 120)\n\t\t\t\tvalues[i] = 8;\n\t\t\telse if (i < 124)\n\t\t\t\tvalues[i] = 16;\n\t\t\telse if (i < 126)\n\t\t\t\tvalues[i] = 32;\n\t\t\telse \n\t\t\t\tvalues[i] = 64;\n\t\t}\n\t}", "@Override\r\n public void init(ArrayList<String> args) {\r\n n = Integer.parseInt(args.get(0));\r\n }", "public Value(int i) {\n integer = i;\n itemClass = Integer.class;\n type = DataType.INT;\n }", "public void createCounters() {\n // COUNTERS CREATION //\n //create a new counter for the blocks.\n this.blockCounter = new Counter();\n //create a new counter for the blocks.\n this.ballCounter = new Counter();\n }", "private void initializeVariables() {\n rnd = new Random();\n\n pieceKind = rnd.nextInt() % 7;\n if(pieceKind < 0) pieceKind *= -1;\n pieceKind2 = rnd.nextInt() % 7;\n if(pieceKind2 < 0) pieceKind2 *= -1;\n\n piece = new Piece(pieceKind,this);\n newPiece();\n startedGame = true;\n\n for(i=0; i<276; i++) {\n modulo = i%12;\n if(modulo == 0 || modulo == 11 || i>251) {\n matrix[i] = 0; colMatrix[i] = true;\n } else {\n matrix[i] = -1; colMatrix[i] = false;\n }\n }\n\n for(i=0; i<5; i++) completeLines[i] = -1;\n for(i=0; i<4; i++) keybl.setMovTable(i, false);\n }", "Int(int v){\n val = v;\n }", "public Int(int value) {\n super(Expression.X_IS_UNDEFINED);\n this.value = value;\n }", "private void init() {\r\n\tlocals = new float[maxpoints * 3];\r\n\ti = new float[] {1, 0, 0};\r\n\tj = new float[] {0, 1, 0};\r\n\tk = new float[] {0, 0, 1};\r\n\ti_ = new float[] {1, 0, 0};\r\n\tk_ = new float[] {0, 0, 1};\r\n }", "static public int getDefaultInt () {\n return defaultInt;\n }", "IntConstant createIntConstant();", "public Int(int v) {\n value = v;\n }", "public IntegerField() {\r this(3, 0, 0, 0);\r }", "public Initialization()\r\n {\r\n C.cinit();\r\n init(\"2\",0);\r\n \r\n init(\"2\",1);\r\n \r\n init(\"4\",2);\r\n init(\"4\",3);\r\n init(\"4\",4);//ss\r\n init(\"6\",5);\r\n init(\"6\",6);\r\n init(\"6\",7); //ss\r\n init(\"8\",8);\r\n init(\"8\",9);\r\n init(\"8\",10);//ss4 7 10\r\n }", "private\tNum(int num) { value = num; }", "public IntPar(int val) { value = val; }", "public void initialiser() {\n double inf = Double.POSITIVE_INFINITY;\n create_add(\"bagel\", 20, 8);\n create_add(\"burger\", 10, 10);\n create_add(\"smoothie\", 30, 5);\n create_add(\"café\", (int)inf, 2);\n }", "public void inicializarVariables(boolean inicializa){\n\t\tif(inicializa){\n\t\t\tx = 1;\n\t\t\ty = 3*x;\n\t\t\t//TODO cómo se resuelve este problema?\n\t\t\tDouble temp = Math.pow(x, 2) + y;\n\n\t\t\tz = temp.intValue(); \n\t\t\tSystem.out.println(\"Valor de z\"+z);\n\t\t}else{\n\t\t\t// No hacer nada\n\t\t}\t\t\n\t}", "public Generator() {\n identificationNumbers = new int[100][31];\n }", "IntValue createIntValue();", "IntValue createIntValue();", "private void initializeVariable() {\n\n\t\tlearn = (Button) findViewById(R.id.learnButton);\n\t\tlearn.setOnClickListener(this);\n\t\tplay = (Button) findViewById(R.id.playButton);\n\t\tplay.setOnClickListener(this);\n\t\tmode = (Button) findViewById(R.id.b_mode);\n\t\tmode.setOnClickListener(this);\n\t\tmode.setText(Global.currentMode + \" MODE\");\n\t\tclassID_SD = \"com.example.northamericanwildlifesounds.SOUNDDISPLAY\";\n\t\tsetUpAnimalData();\n\t}", "public static void main(String[] args)\n {\n int varInt1 = 10;\n int varInt2 = 20;\n int varInt3;\n\n varInt3 = 30;\n\n System.out.println(\"varInt1=\" + varInt1);\n System.out.println();\n System.out.println(\"varInt2=\" + varInt2);\n System.out.println();\n System.out.println(\"varInt3=\" + varInt3);\n\n varInt1 = 5;\n varInt2 = 55;\n varInt3 = 555;\n\n System.out.println(\"varInt1=\" + varInt1);\n System.out.println();\n System.out.println(\"varInt2=\" + varInt2);\n System.out.println();\n System.out.println(\"varInt3=\" + varInt3);\n\n {\n double varDouble1;\n varDouble1 = 10.5;\n double varDouble2;\n varDouble2 = 21.5;\n System.out.println(\"varInt1=\" + varInt1);\n System.out.println();\n System.out.println(\"varInt2=\" + varInt2);\n System.out.println();\n System.out.println(\"varInt3=\" + varInt3);\n System.out.println();\n System.out.println(\"varDouble1=\" + varDouble1);\n System.out.println();\n System.out.println(\"varDouble2=\" + varDouble2);\n System.out.println();\n }\n }", "public void foo() {\n\tint j;\n\tint jj = 0;\n\t// System.out.println(i); Will not compile; local variables must be initialized\n\tSystem.out.println(jj);\n }", "Variables createVariables();", "public static void initializeCount(int[] count){\n\t\tif (count != null){\n\t\t\tfor (int i = 0; i < count.length; i++)\n\t\t\t\tcount[i] = 0;\n\t\t}\n\t}", "private void initializeVariables() {\n\t\tseekBar = (SeekBar) findViewById(R.id.seekBar1);\n\t\ttextView = (TextView) findViewById(R.id.finishText);\n\t\tspinner = (Spinner) findViewById(R.id.algorithm);\n\t\tsetSeekBarListener();\n\t\taddListenerOnAlgorithmSelection();\n\t}", "public IntegerIdentifier(String name, int type, int value) {\n super(name, type); //String and integer declaration\n this.value = value;//set this.value to value\n }", "protected void aInit()\n {\n \ta_available=WindowSize;\n \tLimitSeqNo=WindowSize*2;\n \ta_base=1;\n \ta_nextseq=1;\n }", "public IntNode(int initData, IntNode initLink){\n data = initData;\n link = initLink;\n }", "public static void init() {\n init(block -> IntStream.range(0, 16));\n }", "public DataInt() {\n }", "public void setVar232(java.lang.Integer value) {\n this.var232 = value;\n }", "public void setVar231(java.lang.Integer value) {\n this.var231 = value;\n }", "extern(int i) {\n var = i;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint num1=123;\n\t\tint num2=6767;\n\t\tint num3= 786876;\n\t\tchar num4='A';\n\t\t\n\t\t// 2. declare variable first and then assign value\n\t\tint n1;\n\t\tint n2;\n\t\tint n3;\n\t\t\n\t\tn1= 56;\n\t\tn2=7676;\n\t\tn3=767;\n\t\t// 3. declare all variables together and then assign value\n\t\tint number1, number2, number3;\n\t\t\n\t\tnumber1=12;\n\t\tnumber2=15;\n\t\tnumber3=676;\n\t\t\n\t\tnumber3= 1000;\n\t\t\n\t\tchar myVariable;\n\t\tmyVariable='*';\n\t\t\n\t\tnumber2=number1;\n\t\tSystem.out.println(number2);// it will run 12\n\t\t\n\t\t// number2=false; it will show compiler error and will ask for change the data type for variable2\n\t\t\n\t\tboolean isRain=false;\n\t\t\n\t}", "public IntArrays()\n\t{\n\t\tthis(10);\n\t}", "public MyInteger( )\n {\n this( 0 );\n }", "public void init() {\n\n\n verdiend = 133;\n\n verdeling = verdiend / 4;\n }", "public void setVar123(java.lang.Integer value) {\n this.var123 = value;\n }", "private void initValues() {\n \n }", "public IntList() { // doesn't HAVE to be declared public, but doesn't hurt\n theList = new int[STARTING_SIZE];\n size = 0;\n }", "public void setVar132(java.lang.Integer value) {\n this.var132 = value;\n }", "public TumpukanInteger(){\r\n this(KAPASITAS_DEFAULT);\r\n }", "private void initializeGlobalVariables()\n\t{\n\t\t_continue = (Button) findViewById(R.id.es_continue);\n\t\t\n\t\t_points = (CheckBox) findViewById(R.id.es_points);\n\t\t_score = (CheckBox) findViewById(R.id.es_score);\n\t}", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "public A151843(final int... inits) {\n mInits = inits;\n mFaj0 = mInits[3];\n mFaj1 = mInits[4];\n }", "@Override\n public Integer reduceInit() { return 0; }", "public void setVar28(java.lang.Integer value) {\n this.var28 = value;\n }", "public void set_int(int param) {\n this.local_int = param;\n }", "private void initializeVariables() {\n\t\ttvTimeShow= (TextView) findViewById(R.id.tvTimeTracker);\r\n\t}", "protected abstract int getInitialValue();", "public List<IntegerVariable> getIntegerVariables() {\n return integerVariables;\n }", "private void init() {\n setMinutes(new int[] {});\n setHours(new int[] {});\n setDaysOfMonth(new int[] {});\n setMonths(new int[] {});\n setDaysOfWeek(new int[] {});\n }", "private Numbers() {\n\t}", "public abstract void setVarCount(int varCount);", "public Variable(String name, int initialValue){\n this.name = name;\n this.initialValue = initialValue;\n }", "static int getInt(){\n return j;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "public IntHolder( final int value ) {\r\n\t\tthis.value = value;\r\n\t}", "public void init(int value) {\n\t\tthis.open5 = value;\r\n\t\tthis.high5 = value;\r\n\t\tthis.low5 = value;\r\n\t\tthis.close5 = value;\r\n\t\tthis.extra = value;\r\n\t}", "public static void main(String[] args) {\n\t\tint num=10;\n\t\t\n\t\t//2 way\n\t\tint number; //declare\n\t\tnumber=100;\t//initialize or assign the value\n\t\t\n\t\t//declare multiple variables of same type\n\t\t\n\t\tdouble num1, num2, num3;\n\t\tnum1=1.99;\n\t\tnum2=2.99;\n\t\tnum3=4.99;\n\n\t}", "public DataInt(Integer b) {\n this.i = b;\n }", "public void setVar34(java.lang.Integer value) {\n this.var34 = value;\n }", "private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }", "public void setInital_value(int inital_value){\n this.inital_value= inital_value;\n }", "public static void updateVars() {\n IntVar tempo;\n for (Vars vars: getArrayutcc() ){\n tempo = (IntVar) Store.getModelStore().findVariable(vars.varname);\n vars.vinf = tempo.value();\n }\n\n }", "@Override\r\n\tprotected void initVariableSet() {\n\t\tthis.lineImpetanz = this.initVariable(\"lineImpetance\", new NumericValue(0.1,0.2), EnumUnit.ohm, true, true);\r\n\t\tthis.lineCharge = this.initVariable(\"lineCharge\", new NumericValue(0), EnumUnit.ohm, true, true);\r\n\t\t\t\t\r\n\t}" ]
[ "0.7649768", "0.6749592", "0.66450065", "0.64620984", "0.64485544", "0.64084184", "0.63358766", "0.62487966", "0.61863256", "0.6168731", "0.61112416", "0.6039555", "0.60160446", "0.60079885", "0.60013396", "0.59674907", "0.59632254", "0.5944729", "0.59442693", "0.5884154", "0.5877789", "0.5873242", "0.5873242", "0.58650243", "0.5859568", "0.58399284", "0.5838138", "0.5812548", "0.5808536", "0.5761418", "0.57541955", "0.5730124", "0.57027894", "0.56880134", "0.56813383", "0.56747556", "0.56623876", "0.56539255", "0.56388354", "0.5634245", "0.56333894", "0.56219584", "0.56172353", "0.55995363", "0.5597437", "0.559609", "0.559456", "0.5594486", "0.55894136", "0.55848545", "0.55710036", "0.55710036", "0.5558123", "0.555485", "0.55472034", "0.554017", "0.55379766", "0.5537686", "0.5533025", "0.5531136", "0.5530665", "0.55301404", "0.55271536", "0.5516662", "0.5510845", "0.55077916", "0.549204", "0.5484221", "0.54802746", "0.5479921", "0.5478263", "0.547808", "0.5468504", "0.5461257", "0.5460292", "0.54561895", "0.54537505", "0.54537505", "0.54468966", "0.54450554", "0.54429024", "0.5431795", "0.5429077", "0.5422504", "0.5421905", "0.54151106", "0.540763", "0.5406633", "0.54049957", "0.54048795", "0.5401023", "0.5401023", "0.53995776", "0.539854", "0.53957903", "0.53929174", "0.5372352", "0.537041", "0.53701067", "0.5365937", "0.5360715" ]
0.0
-1
hien thi thong tin cua 1 DiaChi
@Override public String toString() { return "Tinh: "+ this.tinh + "; Huyen: "+ this.huyen + "; Xa: "+ this.xa; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static void HienThiChiTiet() {\n\t\t\n\t\ttry {\n\n\t\t\tdtm1.setRowCount(0);\n\n\t\t\tString Sql = \"select SanPham.TenSP, Soluong,DonGia,DVT, DonGia*Soluong from SanPham,HoaDonTiec,ChiTietHoaDonTiec where SanPham.MaSP=ChiTietHoaDonTiec.MaSP and HoaDonTiec.MaHD=ChiTietHoaDonTiec.MaHD and HoaDonTiec.MaHD=?\";\n\t\t\tPreparedStatement prepare = conn.prepareStatement(Sql);\n\t\t\tprepare.setString(1, maHD);\n\t\t\tResultSet result = prepare.executeQuery();\n\t\t\twhile (result.next()) {\n\t\t\t\tVector<Object> vec = new Vector<Object>();\n\t\t\t\tvec.add(result.getString(1));\n\t\t\t\tvec.add(result.getInt(2));\n\t\t\t\tvec.add(result.getInt(3));\n\t\t\t\tvec.add(result.getString(4));\n\t\t\t\tvec.add(result.getInt(5));\n\t\t\t\t//maHD = result.getString(8);\n\t\t\t\t\n\t\t\t\tdtm1.addRow(vec);\n\t\t\t\t//int i = tbl.getRowCount();\n\t\t\t\t//txtMaHD.setText(maHD);// hiển thị mã HD theo bàn\n\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}", "public int getTrangthaiChiTiet();", "@Override\n public String hienThiTT() {\n String thongTin = \"\";\n thongTin = \"ho ten: \" + this.hoTen + \", tuoi: \" + this.tuoi + \", dia chi: \" + this.diaChi\n + \", sdt: \" + this.sdt + \", mon day: \" + this.monDay + \", to bo mon: \" + this.toBoMon;\n \n System.out.println(thongTin);\n return thongTin;\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }", "public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }", "private void hienThi() {\n try {\n if (isInsert) {\n txtMaThucAn.setText(ThucPhamController.hienMa());\n txtMaThucAn.setEnabled(false);\n hienTrangThai();\n } else {\n txtMaThucAn.setText(tp.getMathucpham());\n txtMaThucAn.setEnabled(false);\n txtTenThucAn.setText(tp.getTenthucpham());\n jSpinSoLuong.setValue(tp.getSoluong());\n String sDonGia = Integer.toString((int) tp.getDongia());\n txtDonGia.setText(sDonGia);\n hienTrangThai();\n if (tp.getTrangthai() == 1) {\n cbbTrangThai.setSelectedIndex(0);\n } else {\n cbbTrangThai.setSelectedIndex(1);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public void eisagwgiSintagis() {\n\t\t//Elegw ean mporei na eisaxthei suntagi\n\t\tif(numOfMedicine != 0 && numOfDoctors != 0 && numOfPatient != 0 && numOfPrescription < 1000) \n\t\t{\n\t\t\ttmp_1 = numOfPrescription + 1;\n\t\t\t// Emfanizw to synolo twn giatrwn pou yparxoun sto farmakeio\n\t\t\tfor(i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA IATROU: \");\n\t \t \tdoctor[i].print();\n\t \t \tSystem.out.println();\n\t\t\t}\n\t\t\t// O xristis epilegei ton ari8mo pou antistoixei ston giatro pou egrapse thn syntagh\n\t\t\ttmp_1 = sir.readPositiveInt(\"EPILEKSTE TON GIATRO POU EGGRAPSE THN SYNTAGH: \"); \n\t\t\t// Elegxw an o yparxei o giatros pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfDoctors - 1)\n\t \t {\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"DEN YPARXEI GIATROS ME TO NOUMERO POU PLIKTROLOGISATE! PARAKALW KSANADWSTE ARITHMO: \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t\n\t\t\ti = numOfPrescription + 1;\n\t\t\t// Emfanizw to synolo twn asthenwn pou yparxoun sto farmakeio\n\t\t\tfor(i = 0; i < numOfPatient; i++)\n\t\t {\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA ASTHENOUS: \");\n\t patient[i].print();\n\t System.out.println();\n\t\t }\n\t\t\t// O xristis epilegei ton ari8mo pou antistoixei ston as8enh gia ton opoio proorizetai i syntagh\n\t\t\ti = sir.readPositiveInt(\"EPILEKSTE TON ASTHENH GIA TON OPOIO PROORIZETAI H SYNTAGH: \"); \n\t\t\t// Elegxw an o yparxei o as8enhs pou edwse o xristis\n\t\t\twhile(i < 0 || i > numOfPatient - 1)\n\t \t {\n\t\t\t\ti = sir.readPositiveInt(\"DEN YPARXEI ASTHENHS ME TO NOUMERO POU PLIKTROLOGISATE! PARAKALW KSANADWSTE ARITHMO: \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t\n\t\t\t// O xristis eisagei tn synoliko ar8mo farmakwn pou 8a exei h syntagh\n\t\t\tSystem.out.println();\n\t\t\ttmp_2= sir.readPositiveInt(\"EISAGETAI TON ARITHMO TWN FARMAKWN POU EPITHUMEITAI NA EXEI H SYNTAGH(1-6): \");\n\t\t\t// Elegxw an o ari8mos twn farmakwn pou edwse o xristis einai egkyros\n\t\t\twhile(tmp_2 < 0 || tmp_2 > 6)\n\t \t {\n\t\t\t\ttmp_2 = sir.readPositiveInt(\"PARAKALW KSANAEISAGETAI SYNOLIKO ARITHMO FARMAKWN(1-6): \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t// Apo8ikeuw tis times ston constructor Syntagi\n\t\t\tprescription[numOfPrescription] = new Syntagi(doctor[tmp_1], patient[i], sir.readDate(\"\\nEISAGETAI THN HMEROMHNIA EGGRAFHS THS SYNTAGHS: \"), tmp_2);\n\t\t\t\n\t\t\tprescription[numOfPrescription].dimiourgiaPinakaFarmakwn(); // Kalw tin methodo auti gia na dimiourgisw ton pinaka me ton arithmo twn farmakwn pou mou edwse o xrhsths\n\t\t\t\n\t\t\t// Emfanizw to synolo twn farmakwn\n\t\t\tfor(i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tmedicine[i].print();\n\t\t\t}\n\t\t\t\n\t\t\tfor(i = 0; i < tmp_2; i++)\n \t \t{\n\t\t\t\ta = i + 1; \n\t\t\t\t// An h syntagh apoteleitai apo perissotera tou enos farmaka tote...\n\t\t\t\tif(tmp_2 != 1)\n \t \t \t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_1 = sir.readPositiveInt(\"ARITHMOS \" + a + \"ou FARMAKOU: \");\n\t\t\t\t\ttmp_3 = sir.readPositiveInt(\"POSOTHTA \" + a + \"ou FARMAKOU: \");\n \t \t \tSystem.out.println();\n \t \t \t}\n\t\t\t\t// An h syntagh apoteleitai apo ena farmako tote...\n\t\t\t\telse\n \t \t \t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_1 = sir.readPositiveInt(\"ARITHMOS FARMAKOU: \");\n\t\t\t\t\ttmp_3 = sir.readPositiveInt(\"POSOTHTA FARMAKOU: \");\n \t \t\t \tSystem.out.println();\n \t \t \t}\n \t \t \t// Elegxw an o ari8mos pou edwse o xristis einai egkyros\n\t\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine - 1)\n \t \t \t{\n \t \t \t\ttmp_1 = sir.readPositiveInt(\"EISAGATAI LATHOS DEDOMENA!DWSTE KSANA TIMH: \");\n \t \t\t \tSystem.out.println();\n \t \t \t}\n \t \t \t\n\t\t\t\tprescription[numOfPrescription].gemismaPinakaFarmakwn(i, medicine[tmp_1], tmp_3); // Kalw tin methodo auti gia na gemisw ton pinaka twn farmakwn pou dimiourgisa proigoumenws\n \t \t}\n\t\t\tnumOfPrescription++;\n\t\t}\n\t\t// Elegxw pote den mporei na eisaxthei syntagh\n\t\telse\n\t\t{\n\t\t\t// An oi syntages pou exoun eisaxthei xeperasan to epitrepto orio\n\t\t\tif(numOfPrescription >= 1000)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN MPOREITAI NA EISAGETAI ALLES SYNTAGES!EXEI KALIFTHEI O MEGISTOS ARITHMOS TOUS\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t\t// An den yparxoun iatroi, astheneis kai farmaka sto farmakeio\n\t\t\telse if(numOfDoctors == 0 && numOfPatient == 0 && numOfMedicine == 0)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI, ASTHENEIS KAI FARMAKA WSTE NA OLOKLIRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS, ASTHENEIS KAI FARMAKA!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t\t// An den yparxoun iatroi kai astheneis\n\t\t\telse if(numOfDoctors == 0 && numOfPatient == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI KAI ASTHENEIS GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS KAI ASTHENEIS!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun iatroi kai farmaka\n\t\t\telse if(numOfDoctors == 0 && numOfMedicine == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI KAI FARMAKA GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS KAI FARMAKA!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun astheneis kai farmaka\n\t\t\telse if(numOfPatient == 0 && numOfMedicine == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS KAI FARMAKA GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI ASTHENEIS KAI FARMAKA!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun iatroi\n\t\t\telse if (numOfDoctors == 0)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n \t\t \t// An den yparxoun astheneis\n\t\t\telse\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI ASTHENEIS!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t}\n\t}", "public void anazitisiSintagisVaseiGiatrou() {\n\t\tString doctorName = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tdoctorName = sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \"); // Zitaw apo ton xrhsth na mou dwsei to onoma tou giatrou pou exei grapsei thn sintagh pou epithumei\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tif(doctorName.equals(prescription[i].getDoctorLname())) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou exei grapsei o giatros\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t// Emfanizw thn/tis sintagh/sintages pou exoun graftei apo ton sygkekrimeno giatro\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON IATRO ME EPWNYMO: \" + doctorName);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\n\tpublic void nghienCuu() {\n\t\tSystem.out.println(\"Nghiên cứu\");\n\t}", "String sayHI(String msg){\n return msg + \"juga nama saya\" + this.nama;\n }", "@Override\n\tpublic void getThongTin() {\n\t\tSystem.out.print(\"Ghế \");\n\t\tvatlieu.getMoTa();\n\t}", "public void eisagwgiAstheni() {\n\t\t// Elegxw o arithmos twn asthenwn na mhn ypervei ton megisto dynato\n\t\tif(numOfPatient < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tpatient[numOfPatient] = new Asthenis();\n\t\t\tpatient[numOfPatient].setFname(sir.readString(\"DWSTE TO ONOMA TOU ASTHENH: \")); // Pairnei to onoma tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU ASTHENH: \")); // Pairnei to epitheto tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setAMKA(rnd.nextInt(1000000)); // To sistima dinei automata ton amka tou asthenous\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t//Elegxos monadikotitas tou amka tou astheni\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tif(patient[i].getAMKA() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfPatient++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS ASTHENEIS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "public static void Latihan() {\n Model.Garis();\n System.out.println(Model.subTitel[0]);\n Model.Garis();\n\n System.out.print(Model.subTitel[1]);\n Model.nilaiTebakan = Model.inputUser.nextInt();\n\n System.out.println(Model.subTitel[2] + Model.nilaiTebakan);\n\n // Operasi Logika\n Model.statusTebakan = (Model.nilaiTebakan == Model.nilaiBenar);\n System.out.println(Model.subTitel[3] + Model.hasilTebakan(Model.TrueFalse) + \"\\n\\n\");\n }", "public void ektypwsiSintagis() {\n\t\t// Elegxw an yparxoun syntages\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"INFO FOR PRESCRIPTION No.\" + (i+1) + \":\");\n\t\t\t\tprescription[i].print();\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES PROS EMFANISH!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public NhanVien(String ten, int tuoi, String diachi, double tienluong, int tongsogiolam)\n {\n this.ten = ten;\n this.tuoi = tuoi;\n this.diachi = diachi;\n this.tienluong = tienluong;\n this.tongsogiolam = tongsogiolam;\n }", "private void xuLyThanhToanDichVu() {\n if(checkGia(txtThanhToanDVSoLuongCu.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongCu.requestFocus();\n return;\n }//Kiem tra so luong cu\n \n if(checkGia(txtThanhToanDVSoLuongMoi.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongMoi.requestFocus();\n return;\n }//kiem tra so luong moi\n \n float soLuongCu = Float.valueOf(txtThanhToanDVSoLuongCu.getText().trim());\n float soLuongMoi = Float.valueOf(txtThanhToanDVSoLuongMoi.getText().trim());\n float soLuong = soLuongMoi - soLuongCu;\n txtThanhToanDVSoLuong.setText(soLuong+\"\");\n tongCong += soLuong * Float.valueOf(txtThanhToanDVGiaDV.getText().trim());\n txtThanhToanTongCong.setText(tongCong+\" VNĐ\");\n \n }", "public void setTrangthaiChiTiet(int trangthaiChiTiet);", "public String creerDureeJtable(String chaine){\r\n\t\tif(chaine.length() == 1){\r\n\t\t\treturn chaine+\"h00\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn chaine.substring(0, 1)+\"h\"+chaine.substring(1, chaine.length());\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n int chieuDai = 10;\n int chieuRong = 20;\n\n int chuViHinhCN = HinhChuNhat.chuVi(chieuDai, chieuRong);\n int dienTichHCN = HinhChuNhat.dienTich(chieuDai,chieuRong);\n System.out.println(\"Chu vi va dien tich hinh Chu Nhat\");\n System.out.println(\"Chu vi hinh chu nhat la: \" + chuViHinhCN);\n System.out.println(\"Dien tich hinh chu nhat la: \" + dienTichHCN);\n\n //tinh chu vi va dien tich hinh vuong\n int canhHinhVuong = 50;\n int chuViHV = HinhVuong.chuVi(canhHinhVuong);\n int dientichHV = HinhVuong.dienTich(canhHinhVuong);\n System.out.println(\"Chu vi va dien tich Hinh Tron \");\n System.out.println(\"Chu vi hinh vuong la:\" + chuViHV);\n System.out.println(\"Dien tich hinh vuong la:\" + dientichHV);\n\n //tinh chu vi va dien tich Hinh Tron\n float bankinh = 2.6f;\n float chuViHC = HinhTron.chuViHinhTron(bankinh);\n float dienTichHC = HinhTron.dienTichHinhTron(bankinh);\n System.out.println(\"Chu vi va dien tich hinh tron\");\n System.out.println(\"Chu vi hinh tron: \" + chuViHC);\n System.out.println(\"Dien tich hinh tron: \" + dienTichHC);\n }", "public void ektypwsiAstheni() {\n\t\t// Elegxw an yparxoun astheneis\n\t\tif(numOfPatient != 0)\n\t\t{\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"INFO FOR PATIENT No.\" + (i+1) + \":\");\n\t\t\t\tpatient[i].print();\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS PROS EMFANISH!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "static void cetak_data(String nama, int usia) {\n int tahun_sekarang = 2020, tahun_lahir = tahun_sekarang - usia;\r\n System.out.println(\"---------\\nNama Saya : \" + nama + \"\\nUsia Saya : \" + usia + \"\\nTahun Lahir : \" + tahun_lahir);\r\n }", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "public static void main(String[] args) {\n int yaricap=4;\n double alan= 4*4*Constans.pi;\n\n\n // kullanicidan alacaginiz saat , dakika ve gun bilgisinin saniyeyey ceviriniz\n\n int gun =23;\n int saat=7;\n int dakika=25;\n\n int saniyeCinsinden =\n gun * Constants.hourInDay *Constants.minuteInHour* Constants.secondInMinute+\n saat* Constants.minuteInHour* Constants.secondInMinute+\n dakika * Constants.secondInMinute;\n System.out.println(\"saniyeCinsinden = \" + saniyeCinsinden);\n\n\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "@Override\n public String comer(String c)\n {\n c=\"Gato No puede Comer Nada\" ;\n \n return c;\n }", "@Override\n\tpublic void nhap() {\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\" nhap ten:\");\n\t\tString ten = reader.nextLine();\n\t\tSystem.out.println(\" nhap tuoi:\");\n\t\ttuoi = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap can nang:\");\n\t\tcanNang = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\"nhap chieu chieuCao\");\n\t\tchieuCao = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap chieu chieuDai:\");\n\t\tchieuDai = Double.parseDouble(reader.nextLine());\n\t}", "public void diagrafiSintagis() {\n\t\t// Elegxw an yparxoun syntages\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages \n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t\t\t\tSystem.out.println();\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO THS SYNTAGHS POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfPrescription)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO SYNTAGHS: \");\n\t\t\t}\n\t\t\t// Metakinw tis epomenes syntages mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfPrescription - 1; k++)\n\t\t\t{\n\t\t\t\tprescription[k] = prescription[k+1]; // Metakinw thn syntagh sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfPrescription--; // Meiwse ton ari8mo twn syntagwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMES SYNTAGES PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void inQuyetDinhv3(HttpServletRequest request, HttpServletResponse reponse, GiaHanForm giaHanForm, ApplicationContext appConText) throws Exception {\r\n\t\tString fileIn = request.getRealPath(\"/docin\") + \"\\\\TTNB11.doc\";\r\n\t\tString fileOut = request.getRealPath(\"/docout\") + \"\\\\TTNB11_Out\" + System.currentTimeMillis() + request.getSession().getId() + \".doc\";\r\n\r\n\t\tString fileTemplate = null;\r\n\t\tfileTemplate = \"ttnb11\"; // (ngon, chuan)\r\n\t\tString idCuocTtkt = giaHanForm.getIdCuocTtKt();\r\n\t\tTtktKhCuocTtkt cuocTtkt = CuocTtktService.getCuocTtktWithoutNoiDung(appConText, idCuocTtkt);\r\n\r\n\t\tTtktCbQd cbQd = TtktService.getQuyetDinh(idCuocTtkt, appConText);\r\n\t\tString hinhThuc = (cuocTtkt.getHinhThuc().booleanValue()) ? \"ki\\u1EC3m tra\" : \"thanh tra\";\r\n\t\tStringBuffer sb = new StringBuffer(hinhThuc);\r\n\r\n\t\tMsWordUtils word = new MsWordUtils(fileIn, fileOut);\r\n\t\ttry {\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText).toUpperCase());\r\n\t\t\tword.put(\"[cqt_ra_quyet_dinh]\", cuocTtkt.getTenDonViTh().toUpperCase());\r\n\t\t\tif (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t\tword.put(\"[so_qd]\", \"....../Q\\u0110-.......\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[so_qd]\", giaHanForm.getSoQd().toString());\r\n\t\t\t}\r\n\t\t\tString ngaylap = giaHanForm.getNgayRaQd();\r\n\t\t\tString[] arrngaylap = ngaylap.split(\"/\");\r\n\t\t\tif (giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t}\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\tif (CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()).equals(\"N/A\")) {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", KtnbUtil.inFieldNull(104) + \";\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()));\r\n\t\t\t}\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tString ngayxet = Formater.date2str(cbQd.getNgayRaQuyetDnh());\r\n\t\t\tString[] arrngayxet = ngayxet.split(\"/\");\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\tword.put(\"[ttkt1]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ngay_lv]\", giaHanForm.getSoNgayRaHan());\r\n\t\t\t// tu ngay\r\n\t\t\tString tungay = giaHanForm.getRaHanTuNgay();\r\n\t\t\tString[] arrtungay = tungay.split(\"/\");\r\n\t\t\tword.put(\"[tu_ngay]\", \"ng\\u00E0y \" + arrtungay[0] + \" th\\u00E1ng \" + arrtungay[1] + \" n\\u0103m \" + arrtungay[2]);\r\n\t\t\t// den ngay\r\n\t\t\tString denngay = giaHanForm.getRaHanDenNgay();\r\n\t\t\tString[] arrdenngay = denngay.split(\"/\");\r\n\t\t\tword.put(\"[den_ngay]\", \"ng\\u00E0y \" + arrdenngay[0] + \" th\\u00E1ng \" + arrdenngay[1] + \" n\\u0103m \" + arrdenngay[2]);\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tif (Formater.isNull(giaHanForm.getDvCaNhanLq())) {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \"\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \", \" + giaHanForm.getDvCaNhanLq());\r\n\t\t\t}\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText));\r\n\t\t\tword.put(\"[chuc_danh_thu_truong]\", KtnbUtil.getChucVuThuTruongByMaCqt(appConText.getMaCqt()).toUpperCase());\r\n\t\t\t// if (Formater.isNull(appConText.getTenThuTruong())) {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", \"\");\r\n\t\t\t// } else {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", appConText.getTenThuTruong());\r\n\t\t\t// }\r\n\t\t\tword.saveAndClose();\r\n\t\t\tword.downloadFile(fileOut, \"Mau TTNB11\", \".doc\", reponse);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// ex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Download Error: \" + ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tword.saveAndClose();\r\n\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws Exception {\nSystem.out.println(\"i love nayanthara\");\nSystem.out.println(\"i love trisha\");\nSystem.out.println(\"i love keerthisuresh\");\n\n \n \n\t }", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public String cekPengulangan(String kata) throws IOException{\n String hasil=\"\";\n if(cekUlangSemu(kata)){\n return kata+\" kata ulang semu \";\n }\n if(kata.contains(\"-\")){\n String[] pecah = kata.split(\"-\");\n String depan = pecah[0];\n String belakang = pecah[1];\n ArrayList<String> depanList = new ArrayList<String>();\n ArrayList<String> belakangList = new ArrayList<String>();\n if(!depan.equals(\"\")){\n depanList.addAll(morpParser.cekBerimbuhan(depan, 0));\n }\n if(!belakang.equals(\"\")){\n belakangList.addAll(morpParser.cekBerimbuhan(belakang, 0));\n }\n for(int i = 0; i < depanList.size(); i++){\n for(int j = 0; j < belakangList.size(); j++){\n if(depanList.get(i).equals(belakangList.get(j))){\n return depan+\" kata ulang penuh \";\n }\n }\n }\n if(depan.equals(belakang)){\n return depan+\" kata ulang penuh \";\n }\n char[] isiCharDepan = depan.toCharArray();\n char[] isiCharBelakang = belakang.toCharArray();\n boolean[] sama = new boolean[isiCharDepan.length];\n int jumlahSama=0;\n int jumlahBeda=0;\n for(int i =0;i<sama.length;i++){\n if(isiCharDepan[i]==isiCharBelakang[i]){\n sama[i]=true;\n jumlahSama++;\n }\n else{\n sama[i]=false;\n jumlahBeda++;\n }\n }\n \n if(jumlahBeda<jumlahSama && isiCharDepan.length==isiCharBelakang.length){\n return depan+\" kata ulang berubah bunyi \";\n }\n \n \n }\n else{\n if(kata.charAt(0)==kata.charAt(2)&&kata.charAt(1)=='e'){\n if((kata.charAt(0)=='j'||kata.charAt(0)=='t')&&!kata.endsWith(\"an\")){\n return kata.substring(2)+\" kata ulang sebagian \";\n }\n else if(kata.endsWith(\"an\")){\n return kata.substring(2,kata.length()-2)+\" kata ulang sebagian \";\n }\n \n }\n }\n return hasil;\n }", "public String suaTaiKhoan(){\n\t\ttaiKhoanDao.suaTaiKhoan(ttCaNhan);\r\n\t\t\r\n\t\t//kiem tra quyen dang nhap\r\n\t\tint kt=kiemTraquyenDN();\r\n\t\tif(kt==1){\r\n\t\t\treturn \"QLTaiKhoan_Admin?faces-redirect=true\";\r\n\t\t}else if(kt==3){\r\n\t\t\treturn \"QLTaiKhoan_NV?faces-redirect=true\";\r\n\t\t}else{\r\n\t\t\treturn \"QLTaiKhoan_NVDH?faces-redirect=true\";\r\n\t\t}\r\n\t}", "public void tampilKarakterC(){\r\n System.out.println(\"Saya adalah binatang \");\r\n }", "private void inQuyetDinhv4(HttpServletRequest request, HttpServletResponse reponse, GiaHanForm giaHanForm, ApplicationContext appConText) throws Exception {\r\n\t\tString fileIn = request.getRealPath(\"/docin/v4\") + \"\\\\TTNB11.doc\";\r\n\t\tString fileOut = request.getRealPath(\"/docout\") + \"\\\\TTNB11_Out\" + System.currentTimeMillis() + request.getSession().getId() + \".doc\";\r\n\r\n\t\tString fileTemplate = null;\r\n\t\tfileTemplate = \"ttnb11\"; // (ngon, chuan)\r\n\t\tString idCuocTtkt = giaHanForm.getIdCuocTtKt();\r\n\t\tTtktKhCuocTtkt cuocTtkt = CuocTtktService.getCuocTtktWithoutNoiDung(appConText, idCuocTtkt);\r\n\r\n\t\tTtktCbQd cbQd = TtktService.getQuyetDinh(idCuocTtkt, appConText);\r\n\t\tString hinhThuc = (cuocTtkt.getHinhThuc().booleanValue()) ? \"ki\\u1EC3m tra\" : \"thanh tra\";\r\n\t\tStringBuffer sb = new StringBuffer(hinhThuc);\r\n\t\t//giaHanForm.setSoQd(KtnbUtil.getMaNvu(appConText, \"Q\\u0110\"));\r\n\t\t//if (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t//sb.append(\"....../Q\\u0110-.......\");\r\n\t\t//} else {\r\n\t\t\t//sb.append(giaHanForm.getSoQd() + KtnbUtil.getMaNvu(appConText, \"Q\\u0110\") );\r\n\t\t//}\r\n\t\tMsWordUtils word = new MsWordUtils(fileIn, fileOut);\r\n\t\ttry {\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText).toUpperCase());\r\n\t\t\tword.put(\"[cqt_ra_quyet_dinh]\", cuocTtkt.getTenDonViTh().toUpperCase());\r\n\t\t\tif (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t\tword.put(\"[so_qd]\", \"....../Q\\u0110-.......\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[so_qd]\", giaHanForm.getSoQd().toString()+KtnbUtil.getMaNvu1(appConText, \"Q\\u0110\") );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t//word.put(\"[so_qd]\", sb.toString().toUpperCase());\r\n\t\t\tString ngaylap = giaHanForm.getNgayRaQd();\r\n\t\t\tString[] arrngaylap = ngaylap.split(\"/\");\r\n\t\t\tif (giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t}\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\tword.put(\"[luat_so]\", giaHanForm.getCanCuLuat());\r\n\t\t\tif (CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()).equals(\"N/A\")) {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", KtnbUtil.inFieldNull(104) + \";\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()));\r\n\t\t\t}\r\n\t\t\tword.put(\"[qdinh_so]\", giaHanForm.getCanCuQd());\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tString ngayxet = Formater.date2str(cbQd.getNgayRaQuyetDnh());\r\n\t\t\tString[] arrngayxet = ngayxet.split(\"/\");\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\t//word.put(\"[ttkt1]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ngay_lv]\", giaHanForm.getSoNgayRaHan());\r\n\t\t\t// tu ngay\r\n\t\t\tString tungay = giaHanForm.getRaHanTuNgay();\r\n\t\t\tString[] arrtungay = tungay.split(\"/\");\r\n\t\t\tword.put(\"[tu_ngay]\", \"ng\\u00E0y \" + arrtungay[0] + \" th\\u00E1ng \" + arrtungay[1] + \" n\\u0103m \" + arrtungay[2]);\r\n\t\t\t// den ngay\r\n\t\t\tString denngay = giaHanForm.getRaHanDenNgay();\r\n\t\t\tString[] arrdenngay = denngay.split(\"/\");\r\n\t\t\tword.put(\"[den_ngay]\", \"ng\\u00E0y \" + arrdenngay[0] + \" th\\u00E1ng \" + arrdenngay[1] + \" n\\u0103m \" + arrdenngay[2]);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tif (Formater.isNull(giaHanForm.getDvCaNhanLq())) {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \"\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \", \" + giaHanForm.getDvCaNhanLq());\r\n\t\t\t}\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText));\r\n\t\t\tword.put(\"[chuc_danh_thu_truong]\", KtnbUtil.getChucVuThuTruongByMaCqt(appConText.getMaCqt()).toUpperCase());\r\n\t\t\t// if (Formater.isNull(appConText.getTenThuTruong())) {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", \"\");\r\n\t\t\t// } else {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", appConText.getTenThuTruong());\r\n\t\t\t// }\r\n\t\t\tword.saveAndClose();\r\n\t\t\tword.downloadFile(fileOut, \"Mau TTNB11\", \".doc\", reponse);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// ex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Download Error: \" + ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tword.saveAndClose();\r\n\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void tampilKarakterA(){\r\n System.out.println(\"Saya mempunyai kaki empat \");\r\n }", "public void Jomijoma()\n {\n System.out.println(\"Ami dadar jomi joma paya geci\");\n }", "public void anazitisiSintagisVaseiAstheni() {\n\t\tint amkaCode = 0;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tamkaCode = sir.readPositiveInt(\"EISAGETAI TO AMKA TOU ASTHENH: \"); // Zitaw apo ton xrhsth na mou dwsei ton amka tou asthenh pou thelei\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t\tif(amkaCode == prescription[i].getPatientAmka()) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou proorizetai gia ton sygkekrimeno asthenh\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t\tprescription[i].print(); // Emfanizw thn/tis sintagh/sintages oi opoies proorizontai gia ton sigkekrimeno asthenh\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\ttmp_2++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON ASTHENH ME AMKA: \" + amkaCode);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "String[] chiediSecondaScommessa();", "public static void main(String[] args) {\n String name=\"이효리\";\r\n String department=\"개발부\";\r\n String position=\"대리\";\r\n int sal=1500000;\r\n \r\n System.out.println(\"이름:\"+name);\r\n System.out.printf(\"부서:\"+department+\"\\n\");\r\n System.out.print(\"대리:\"+position+\"\\n\"+\"급여:\"+sal+\"원\");\r\n \r\n \t\t\r\n\t}", "@Override\r\n public void convert(int wa) {\n hasil1 = wa / menit;\r\n String wat = Integer.toString(hasil1);\r\n hasil = wat + \" Menit \";\r\n }", "@Test\n public void kaasunKonstruktoriToimiiOikeinTest() {\n assertEquals(rikkihappo.toString(),\"Rikkihappo Moolimassa: 0.098079\\n tiheys: 1800.0\\n lämpötila: 298.15\\n diffuusiotilavuus: 50.17\\npitoisuus: 1.0E12\");\n }", "public static void main(String[] args) {\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"--Selamat Datang Di Kuis Matematika--\");\n System.out.println(\"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\");\n System.out.println(\"Daftar soal: \");\n soal();\n System.out.println(\"Silahkan input angka sesuai dengan nomer soal: \");\n pilihan();\n \n \n \n }", "public static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\tint soDien;\n\t\tSystem.out.println(\"Mời nhập số điện\");\n\t\tsoDien=sc.nextInt();\n\t\tif(soDien<50) {\n\t\t\tSystem.out.println(\"số điện tiêu thụ trong tháng là: \" +soDien*1000);\n\t\t}\n\t\telse System.out.println(\"số điện tiêu thụ trong tháng là: \" +soDien*1200);\n\t\t\n\t\t\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public void TampilkanHasil(String isi_hasil){\n TextView hasil = (TextView) findViewById(R.id.txt_mainactivity_hasilBMI);\n hasil.setText(isi_hasil);\n }", "public static void main(String[] args) {\n\n String text= \"merhaba arkadaslar \";\n System.out.println( \"1. bolum =\" + text .substring(1,5));// 1 nolu indexten 5 e kadar. 5 dahil degil\n System.out.println(\"2. bolum =\"+ text.substring(0,3));\n System.out.println(\"3. bolum =\"+ text.substring(4));// verilen indexten sonun akadar al\n\n String strAlinan= text.substring(0,3);\n\n\n\n\n\n }", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "static String stringCutter1(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n\n // pemotongan string untuk pemotongan kelompok pertama\n String sentence1 = s.substring(0, value);\n\n // perulangan untuk menggeser nilai setiap karakter\n String wordNow = \"\";\n for (int i = 0; i < sentence1.length(); i++) {\n char alphabet = sentence1.toUpperCase().charAt(i);\n // pengubahan setiap karakter menjadi int\n // untuk menggeser 3 setiap nilai nya\n int asciiDecimal = (int) alphabet;\n // pengecekan kondisi apabila karakter melewati kode ascii nya\n if (asciiDecimal > 124) {\n int alphabetTransfer = 0 + (127 - asciiDecimal);\n wordNow += (char) alphabetTransfer;\n\n } else {\n int alphabetTrasfer = asciiDecimal + 3;\n wordNow += (char) alphabetTrasfer;\n }\n }\n return wordNow;\n }", "public void TongSL() {\n System.out.println(\"|-> Tong So Luong cua Giao Dich Vang: \" + sum1 + \" <-|\");\n System.out.println(\"|-> Tong So Luong cua Giao Dich Tien Te:\" + sum2 + \" <-|\");\n }", "void kiemTraThangHopLi() {\n }", "private void startYuyin() {\n try {\n StringBuilder content = new StringBuilder();\n content.append(\"气温:\");\n JSONObject jsonObject = new JSONObject(jsond);\n String adaf = jsonObject.getJSONObject(\"now\").getString(\"tmp\");\n if (Float.parseFloat(adaf) < 0) {\n content.append(\"零下\").append(adaf.substring(1, adaf.length()));\n } else {\n content.append(adaf);\n }\n content.append(\"度:\");\n JSONArray daily_forecast = jsonObject\n .getJSONArray(\"daily_forecast\");\n String dfdff = daily_forecast.getJSONObject(0).getString(\"txt_n\");\n String adfsff = daily_forecast.getJSONObject(0).getString(\"txt_d\");\n if (!dfdff.equals(adfsff)) {\n adfsff = (adfsff + \"转\" + dfdff);\n }\n content.append(adfsff);\n content.append(\":\"\n + jsonObject.getJSONObject(\"now\").getString(\"wind_dir_txt\")\n + jsonObject.getJSONObject(\"now\").getString(\"wind_sc\")\n + \"级:湿度:百分之\"\n + jsonObject.getJSONObject(\"now\").getString(\"hum\"));\n content.append(\":\").append(\n \"气压:\" + jsonObject.getJSONObject(\"now\").getString(\"pres\")\n + \"百帕\");\n fatherParent.sasasas(content.toString());\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"isminizi giriniz\");\n//\t\tString isim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.println(\"soyadinizi giriniz\");\n//\t\tString soyisim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.print(isim.substring(0, 1).toUpperCase()+isim.substring(1, isim.length()));\n//\t\tSystem.out.print(\" \" +soyisim.substring(0, 1).toUpperCase() +soyisim.substring(1, soyisim.length()));\n\n\t\t/// hocanin cozumu\n\t\t// int ikinciBasNok = isimSoyIsim.indexOf(\" \");\n// System.out.print(isimSoyIsim.substring(0,1).toUpperCase());\n// System.out.print(isimSoyIsim.substring(1, ikinciBasNok+1).toLowerCase());\n// System.out.print(isimSoyIsim.substring(ikinciBasNok+1, ikinciBasNok+2).toUpperCase());\n// System.out.println(isimSoyIsim.substring(ikinciBasNok+2).toLowerCase());\n\n\t\t/// Array ile cozum\n\t\tString isimSoyIsim = scan.nextLine();\n\t\t\n// 0/fedai 1/ocak //isimler.length => 2 - 1 1 != 1\n\t\tString[] isimler = isimSoyIsim.split(\" \");\n\n\t\tfor (int i = 0; i < isimler.length; i++) {\n\t\t\tisimler[i] = isimler[i].toLowerCase();\n\t\t\t\tif(isimler.length-1 != i ) //\n\t\t\tSystem.out.print(isimler[i].substring(0, 1).toUpperCase() + isimler[i].substring(1) + \" \");\n\t\t\t\telse\n\t\t System.out.print(isimler[i].substring(0,1).toUpperCase()+isimler[i].substring(1));\n\t\t}\nscan.close();\n\t}", "public static void laukiHorizontalaIrudikatu(int neurria, char ikurra) {\n int altuera=neurria/2;\n int zabalera=neurria;\n for(int i=1; i<=altuera; i++){//altuera\n System.out.println(\" \");\n \n \n for(int j=1; j<=zabalera; j++){//zabalera\n \n System.out.print(ikurra);\n }\n\n}\n }", "@Override\n\tpublic void nhap() {\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\" so cmnd:\");\n\t\tthis.cmnd = reader.nextLine();\n\t\tSystem.out.println(\" nhap ho ten khach hang:\");\n\t\tthis.hoTenKhachHang = reader.nextLine();\n\t\tSystem.out.println(\" so tien gui:\");\n\t\tthis.soTienGui = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap ngay lap:\");\n\t\tthis.ngayLap = reader.nextLine();\n\t\tSystem.out.println(\" lai suat:\");\n\t\tthis.laiSuat = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" so thang gui:\");\n\t\tthis.soThangGui = Integer.parseInt(reader.nextLine());\n\t\tSystem.out.println(\" nhap ky han:\");\n\t\tthis.kyHan = Integer.parseInt(reader.nextLine());\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Nhập số nguyên tố:\");\n\t\tint n=Nhap();\n\t\tSystem.out.println(\"Liệt kê:\");\n\t\tlietke(n);\n\t}", "public String dimeTuTiempo()\n {\n String cadResultado=\"\";\n if (horas<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+horas;\n cadResultado=cadResultado+\":\";\n if(minutos<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+minutos;\n \n return cadResultado;\n }", "public void nhapMonHoc() {\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Ten mon hoc: \");\n\t\t\ttenMonHoc= scanner.nextLine();\n\t\t\tSystem.out.println(\"So tin chi\");\n\t\t\ttinChi= Integer.parseInt(scanner.nextLine());\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Nhap sai du lieu!\");\n\t\t}\n\t}", "bdm mo1784a(akh akh);", "public static List<PhuThuocHam> phuToithieu(List<PhuThuocHam> list) {\n\t\tList<PhuThuocHam> listPTH = new ArrayList<PhuThuocHam>(); \n\t\t\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tPhuThuocHam pth = list.get(i);\n\t\t\tfor (int j = 0; j < pth.getVePhai().length(); j++) {\n\t\t\t\tlistPTH.add(new PhuThuocHam(pth.getVeTrai(),Character.toString(pth.getVePhai().charAt(j))));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//bo cac thuoc tinh du thua ben trai\n\t\tint index = 0;\n\t\twhile (index < listPTH.size()) {\n\t\t\tPhuThuocHam pth = listPTH.get(index);\n\t\t\t//ve ben trai chi co 1 thuoc tinh thi khong can xet\n\t\t\tif (pth.getVeTrai().length() != 1) {\n\t\t\t\tfor (int i = 0; i < pth.getVeTrai().length(); i++) {\n\t\t\t\t\tString chuoiBo = Character.toString(pth.getVeTrai().charAt(i));\n\t\t\t\t\tString chuoiSauKhiBo = CongCu.catChuoi(pth.getVeTrai(), i);\n\t\t\t\t\tif (TimBaoDong.timBaoDong(listPTH, chuoiSauKhiBo).contains(chuoiBo)) {\n//\t\t\t\t\t\tSystem.out.println(\"Delete \" + chuoiBo + \" From \" + pth.getVeTrai() + \" -> \" + pth.getVePhai());\n\t\t\t\t\t\tlistPTH.get(index).setVeTrai(chuoiSauKhiBo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\t//bo phu thuoc ham du thua\n\t\tindex = 0;\n\t\twhile (index < listPTH.size()) {\n\t\t\tString trai = listPTH.get(index).getVeTrai();\n\t\t\tString phai = listPTH.get(index).getVePhai();\n\t\t\t\tlistPTH.remove(index);\n\t\t\t\tif(!TimBaoDong.timBaoDong(listPTH, trai).contains(phai)) {\n\t\t\t\tlistPTH.add(index, new PhuThuocHam(trai, phai));\n\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\telse {\n//\t\t\t\t\tSystem.out.println(\"Delete \" + trai + \" -> \" + phai);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn listPTH;\n\t}", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"구구단\");\n\t\t\n\t\tfor (int dan =1; dan <= 9; dan++) {\n\t\t\tSystem.out.print(dan + \"단 : \"); //9번 수행\n\t\t\tfor (int num = 1; num <= 9; num++) {\n\t\t\t\tSystem.out.print(dan + \"*\" + num + \"=\" + dan * num + \"\\t\"); //81번 수행\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();//줄 내리기\n\t\t}\n\n\t}", "public static void main(String[] args) {\n int a;\n int b;\n int c;\n a = doDai(\"Nhap canh a\");\n b = doDai(\"Nhap canh b\");\n c = doDai(\"Nhap canh c\");\n if (((a + b) < c) || ((a + c) < b) || ((c + b) < a)) {\n System.out.println(\"khong the la 3 canh cua 1 tam giac \");\n } else {\n System.out.println(\"Canh tam giac hop le\");\n }\n }", "@Override\r\n\tpublic String sonido() {\n\t\treturn \"Miauu\";\r\n\t}", "public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }", "public static void main(String[] args) {\n\t\t int sayi=10;\n\t \n\t for (int i = 0; i < 10000; i++) {\n\t i++;\n\t sayi++;\n\t }\n\t \n\t // Bu kodu calistirdigimizda 13.satira kadar Java kac obje uretir\n\t // Bu soruyu cevaplamak icin degiskenin data turune bakmaliyiz\n\t // sayi ve i'nin veri turu : int\n\t // int mutable\n\t \n\t String str=\"A\";\n\t for (int i = 0; i < 10000; i++) {\n\t\t\t\tstr+=\" \";\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t \n\t /*\n\t * 20.satir ile 24.satir arasındakı kac obje olur\n\t * i int oldugu icin sadece bir tane variavl olusturulur\n\t * ancak str string oldugunda 10002 tane obje olustururlur\n\t * \t */\n\t}", "public void diagrafiAstheni() {\n\t\tif(numOfPatient != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA ASTHENWN\");\n\t\t\t// Emfanizw olous tous astheneis\n\t\t\tfor(int j = 0; j < numOfPatient; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA ASTHENOUS: \");\n\t\t\t\tSystem.out.println();\n\t \t \tpatient[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU ASTHENH POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfPatient)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO ASTHENOUS: \");\n\t\t\t}\n\t\t\t// Metakinw tous epomenous astheneis mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfPatient - 1; k++)\n\t\t\t{\n\t\t\t\tpatient[k] = patient[k+1]; // Metakinw ton astheni sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfPatient--; // Meiwse ton ari8mo twn asthenwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMOI ASTHENEIS PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public String overLoadingMeth(String huruf) {\n for (int i = 0; i < normalword.length; i++) {\n for (int j = 0; j < 10; j++) {\n if (huruf.equalsIgnoreCase(normalword[i])) {\n valuenum = num[i];\n } else if (huruf.equalsIgnoreCase(normalword[i])) {\n valuenum = num[i];\n } else if (huruf.equalsIgnoreCase(normalword[i] + \" belas\")) {\n valuenum = num[1] + num[i];\n } else if (huruf.equalsIgnoreCase(normalword[i] + \" puluh\")) {\n valuenum = num[i] + num[0];\n } else if (huruf.equalsIgnoreCase(normalword[i] + \" puluh \" + normalword[j])) {\n valuenum = num[i] + num[j];\n } else if (huruf.equalsIgnoreCase(\"Seratus\")) {\n valuenum = num[1] + num[0] + num[0];\n }\n }\n }\n return valuenum;\n }", "public void setNguoiThamDu(String nguoiThamDu);", "@Override\n\tpublic double tinhTienLai() {\n\t\tdouble tienLai=0;\n\t\tif(soThangGui>=kyHan){\n\t\t\t tienLai=soTienGui*laiSuat*soThangGui;\n\t\t}\n\t\treturn tienLai;\n\t}", "public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "private static int num_vokal(String word) {\n int i;\n int jumlah_vokal = 0;\n\n for (i = 0; i < word.length(); i++) {\n if (word.charAt(i) == 'a' ||\n word.charAt(i) == 'i' ||\n word.charAt(i) == 'u' ||\n word.charAt(i) == 'e' ||\n word.charAt(i) == 'o') {\n jumlah_vokal++;\n }\n }\n return jumlah_vokal;\n }", "private String tulostuksenApu(){\r\n String apu = \"Rivitiedosto: \";\r\n for(int i = 0; i<rivitiedot.length; i++){\r\n apu = apu + i+\": \";\r\n for(int k = 1; k <= rivitiedot[i].getKoko(); k++){\r\n apu = apu + \" \"+rivitiedot[i].get(k);\r\n }\r\n apu = apu + \" \";\r\n }\r\n\r\n return apu;\r\n }", "public static void main(String[] args) {\n\t\tString a = \"한우 꽃등심\";\n\t\tint aa = 112500;\n\t\t\n\t\tString b = \"참치 선물팩\";\n\t\tint bb = 25500;\n\t\t\n\t\tString c = \"맥스봉 한팩\";\n\t\tint cc = 500;\n\n\t\tSystem.out.println(\"품명: \"+a+\" \"+\"가격: \"+aa);\n\t\tSystem.out.println(\"품명: \"+b+\" \"+\"가격: \"+bb);\n\t\tSystem.out.println(\"품명: \"+c+\" \"+\"가격: \"+cc);\n\n\t}", "public QLVatTu() {\n initComponents();\n VatTu.doc();\n VatTu.setIndex( VatTu.lenth() - 1);\n hienThi();\n labHienThi.setText(( VatTu.getIndex() + 1) + \"/\" + VatTu.lenth());\n }", "public static void main(String[] args) {\n\t\t\n\t\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"Hangi islemi yapmak istersiniz 1) hesabi goruntuleme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 2)Para cekme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 3) Para yatirma\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 4)Cikis\");\n\t\t\t\t\n\t\t\t\tint islem = scan.nextInt();\n\t\t\t\tdouble toplamTutar = 5000;\n\t\t\t\tswitch(islem) {\n\t\t\t\tcase 1:\n\t\t\t\t\tSystem.out.println(\"Hesabinizda \" +toplamTutar + \"tl bulunmaktadir\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"Cekmek istediginiz miktari giriniz \");\n\t\t\t\t\tint miktar = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para cekiminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar-miktar));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tSystem.out.println(\"Yatirmak istediginiz miktari giriniz\");\n\t\t\t\t\tint yatirilanPara = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para yatirma isleminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar + yatirilanPara));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Bizleri tercih ettiginiz icin tesekkur ederiz Iyi gunler dileriz\");\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Yanlis giris yaptiniz lutfen tekrar deneyin\");\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tscan.close();\n\t\t\n\t\t\t\t\n\t}", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String word = \"Tenet\";\n String word3 = \"tenet\";\n System.out.println(\"word \" + word);\n word.toLowerCase(); //porównanie bez wielkosci znakow\n //charAt(0) - zero,\n String[] Tablica = new String[word.length()];\n for (int i = 0; i < word.length(); i++) {\n Tablica[i] = String.valueOf(word.charAt(i));\n }\n String word2 = \"\";\n\n for (int i = (word.length() - 1); i >= 0; i--) {\n //System.out.print(Tablica[i]);\n word2 = word2 + Tablica[i];\n }\n //System.out.println();\n System.out.println(\"word 2 \" + word2);\n System.out.println(\"word 3 \" + word3);\n\n System.out.print(\"word 3 i word 2 \");\n if (word3.toLowerCase().equals(word2.toLowerCase())) {\n System.out.println(\"jest palidronem\");\n } else {\n System.out.println(\"nie jest palidronem\");\n }\n\n//koniec\n\n }", "private String parseStringtoInt(String welcome,Student s1){\n\n String time = TimeUitl.getTime(s1);\n\n String slogan = welcome + time;\n\n return slogan;\n }", "public static void main(String[] args) {\n\t\tint a=0,b=0,cnt=0;\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\ta=in.nextInt();\r\n\t\tString str=\"\";\r\n\t\tin.close();\r\n\t\tif(a<0){\r\n\t\t\tstr=\"fu \";\r\n\t\t\ta=-a;\r\n\t\t}\r\n\t\twhile(a!=0){\r\n\t\t\tb=b*10+a%10;\r\n\t\t\tif(b==0){\r\n\t\t\t\tcnt++;\r\n\t\t\t}\r\n\t\t\ta=a/10;\r\n\t\t}\r\n\t\tdo{\r\n\t\t\tswitch(b%10)\r\n\t\t\t{\r\n\t\t\t\tcase 0:str+=\"ling\";break;\t\t\r\n\t\t\t\tcase 1:str+=\"yi\";break;\r\n\t\t\t\tcase 2:str+=\"er\";break;\r\n\t\t\t\tcase 3:str+=\"san\";break;\r\n\t\t\t\tcase 4:str+=\"si\";break;\r\n\t\t\t\tcase 5:str+=\"wu\";break;\r\n\t\t\t\tcase 6:str+=\"liu\";break;\r\n\t\t\t\tcase 7:str+=\"qi\";break;\r\n\t\t\t\tcase 8:str+=\"ba\";break;\r\n\t\t\t\tcase 9:str+=\"jiu\";break;\r\n\t\t\t}\r\n\t\t\tb/=10;\r\n\t\t\tif(b!=0){\r\n\t\t\t\tstr+=\" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}while(b!=0);\t\r\n\t\tfor(int i=1;i<=cnt;i++)\r\n\t\t{\r\n\t\t\tstr=str+\" ling\";\r\n\t\t}\t\r\n\t\tSystem.out.print(str);\r\n\r\n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public void anazitisiSintagisVaseiHmerominias() {\n\t\tDate firstDt = null, lastDt = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t\t\t\tprescription[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\t// Zitaw apo ton xrhsth to xroniko euros kata to opoio exei graftei sintagh\n\t\t\tfirstDt = sir.readDate(\"DWSTE ARXIKH HMEROMHNIA: \");\n\t\t\tlastDt = sir.readDate(\"DWSTE TELIKH HMEROMHNIA: \");\n\t\t\tSystem.out.println();\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t// An h hmeromhnia eggrafhs ths syntaghs einai anamesa sta xronika oria pou exei dwsei o xrhsths ektypwnetai\n\t\t\t\tif(firstDt.before(prescription[i].getDate()) && (lastDt.after(prescription[i].getDate()))) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH METAKSY:\" + firstDt + \" KAI: \" + lastDt);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n int kor,eng,math;\r\n char score='A';\r\n // 사용자가 입력 \r\n /*Scanner scan=new Scanner(System.in);\r\n System.out.print(\"국어 점수 입력:\");\r\n kor=scan.nextInt();\r\n System.out.print(\"영어 점수 입력:\");\r\n eng=scan.nextInt();\r\n System.out.print(\"수학 점수 입력:\");\r\n math=scan.nextInt();*/\r\n kor=input(\"국어\");\r\n eng=input(\"영어\");\r\n math=input(\"수학\");\r\n \r\n // 학점 \r\n int avg=(kor+eng+math)/30;\r\n score=hakjum(avg);// 메소드는 호출 => 메소드 처음부터 실행 => 결과값을 넘겨주고 다음문장으로 이동\r\n /*switch(avg)\r\n {\r\n case 10:\r\n case 9:\r\n \tscore='A';\r\n \tbreak;\r\n case 8:\r\n \tscore='B';\r\n \tbreak;\r\n case 7:\r\n \tscore='C';\r\n \tbreak;\r\n case 6:\r\n \tscore='D';\r\n \tbreak;\r\n default:\r\n \tscore='F';\r\n }*/\r\n \r\n System.out.println(\"국어:\"+kor);\r\n System.out.println(\"영어:\"+eng);\r\n System.out.println(\"수학:\"+math);\r\n System.out.println(\"총점:\"+(kor+eng+math));\r\n System.out.printf(\"평균:%.2f\\n\",(kor+eng+math)/3.0);\r\n System.out.println(\"학점:\"+score);\r\n\t}", "private static void saluti() {\n\t\tUtilityIO.header(MSG_CHIUSURA, SIMBOLO_MESSAGGIO_BENV_USCITA);\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Tạp Chí: \"+\" Tựa đề: \"+ tuaDe+\", Số Trang: \"+soTrang+\", Nhà xuất bản: \"+nxb+\", Số Bài Viết: \"+soBaiViet;\n\t}", "public String comunica() {\r\n// ritorna una stringa\r\n// posso usare il metodo astratto \r\n return msg + AggiungiQualcosa();\r\n }", "private void inToTrinhv3(HttpServletRequest request, HttpServletResponse reponse, GiaHanForm giaHanForm, ApplicationContext appConText) throws Exception {\r\n\r\n\t\tString fileIn = request.getRealPath(\"/docin\") + \"\\\\TTNB10.doc\";\r\n\t\tString fileOut = request.getRealPath(\"/docout\") + \"\\\\TTNB10_Out\" + System.currentTimeMillis() + request.getSession().getId() + \".doc\";\r\n\r\n\t\tString fileTemplate = null;\r\n\t\tfileTemplate = \"ttnb10\"; // (ngon, chuan)\r\n\t\tString idCuocTtkt = giaHanForm.getIdCuocTtKt();\r\n\t\tTtktKhCuocTtkt cuocTtkt = CuocTtktService.getCuocTtktWithoutNoiDung(appConText, idCuocTtkt);\r\n\r\n\t\tTtktCbQd cbQd = TtktService.getQuyetDinh(idCuocTtkt, appConText);\r\n\t\tString hinhThuc = (cuocTtkt.getHinhThuc().booleanValue()) ? \"ki\\u1EC3m tra\" : \"thanh tra\";\r\n\t\tStringBuffer sb = new StringBuffer(hinhThuc);\r\n\r\n\t\tMsWordUtils word = new MsWordUtils(fileIn, fileOut);\r\n\t\ttry {\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText).toUpperCase());\r\n\t\t\t// hinh thuc thanh tra kiem tra\r\n\t\t\tif (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t\tsb.append(\" Q\\u0110 S\\u1ED0......\");\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(\" Q\\u0110 S\\u1ED0 \" + giaHanForm.getSoQd());\r\n\t\t\t}\r\n\t\t\tword.put(\"[doan_ttkt_so]\", sb.toString().toUpperCase());\r\n\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\t\t\tword.put(\"[thu_truong_cqt_ra_qd]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tif (Formater.isNull(cbQd.getSoQuyetDinh())) {\r\n\t\t\t\tword.put(\"[qd_so]\", \"............\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\t}\r\n\r\n\t\t\tString ngayxet = Formater.date2str(cbQd.getNgayRaQuyetDnh());\r\n\t\t\tString[] arrngayxet = ngayxet.split(\"/\");\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ngay_lv]\", giaHanForm.getSoNgayRaHan());\r\n\t\t\tString tungay = giaHanForm.getRaHanTuNgay();\r\n\t\t\tString[] arrtungay = tungay.split(\"/\");\r\n\t\t\tword.put(\"[tu_ngay]\", \"ng\\u00E0y \" + arrtungay[0] + \" th\\u00E1ng \" + arrtungay[1] + \" n\\u0103m \" + arrtungay[2]);\r\n\t\t\t// den ngay\r\n\t\t\tString denngay = giaHanForm.getRaHanDenNgay();\r\n\t\t\tString[] arrdenngay = denngay.split(\"/\");\r\n\t\t\tword.put(\"[den_ngay]\", \"ng\\u00E0y \" + arrdenngay[0] + \" th\\u00E1ng \" + arrdenngay[1] + \" n\\u0103m \" + arrdenngay[2]);\r\n\t\t\tword.put(\"[ly_do]\", giaHanForm.getLyDoRaHan());\r\n\t\t\tword.put(\"[thu_truong_cqt_ra_qd]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\tword.put(\"[noi_duyet]\", giaHanForm.getNoiPheDuyet());\r\n\t\t\t// ngay duyet\r\n\t\t\tString ngayduyet = giaHanForm.getNgayPheDuyet();\r\n\t\t\tString[] arrngayduyet = ngayduyet.split(\"/\");\r\n\t\t\tif (arrngayduyet.length >= 2) {\r\n\t\t\t\tword.put(\"[ngay_duyet]\", \"ng\\u00E0y \" + arrngayduyet[0] + \" th\\u00E1ng \" + arrngayduyet[1] + \" n\\u0103m \" + arrngayduyet[2]);\r\n\t\t\t}\r\n\t\t\tword.put(\"[noi_lap]\", giaHanForm.getNoiTrinh());\r\n\t\t\t// ngay lap to trinh\r\n\t\t\tString ngaylaptotrinh = giaHanForm.getNgayTrinh();\r\n\t\t\tString[] arrngaylaptotrinh = ngaylaptotrinh.split(\"/\");\r\n\t\t\tif (arrngaylaptotrinh.length >= 2) {\r\n\t\t\t\tword.put(\"[ngay_lap_to_trinh]\", \"ng\\u00E0y \" + arrngaylaptotrinh[0] + \" th\\u00E1ng \" + arrngaylaptotrinh[1] + \" n\\u0103m \" + arrngaylaptotrinh[2]);\r\n\t\t\t}\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[y_kien_phe_duyet]\", giaHanForm.getKienPheDuyet());\r\n\t\t\tword.put(\"[ten_truong_doan]\", cuocTtkt.getTenTruongDoan());\r\n\t\t\tword.put(\"[chuc_danh_thu_truong]\", KtnbUtil.getChucVuThuTruongByMaCqt(appConText.getMaCqt()).toUpperCase());\r\n\t\t\t// if (Formater.isNull(appConText.getTenThuTruong())) {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", \"\");\r\n\t\t\t// } else {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", appConText.getTenThuTruong());\r\n\t\t\t// }\r\n\t\t\tword.saveAndClose();\r\n\t\t\tword.downloadFile(fileOut, \"Mau TTNB10\", \".doc\", reponse);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// ex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Download Error: \" + ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tword.saveAndClose();\r\n\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main (String[] args){\n int y = 1;\n for (y = 1; y <= 4; y++){\n // He usat bucles per no duplicar codi i per optimització.\n int x =1;\n // Bucle\n for (x = 1; x <= 4; x++){\n String abc = \"AAAAABCÇDEEEEEFGHIIIIIJKLMNOOOOOPQRSTUUUUUVWXYZ\"; //47\n int lletra = (int) (abc.length() * Math.random());\n char a = abc.charAt(lletra);\n System.out.print(\"\\u001B[36m\"+a); \n } \n System.out.println(\"\");\n }\n }", "public void Makan()\n\t{\n\tSystem.out.println(\"Harimau Makan Daging dan minum susu\");\n\tSystem.out.println();\n\t}", "public double tongDoanhThuNgoaiThanh() {\n double doanhThu = 0;\n for (ChuyenXe cx : dsChuyenXe) {\n if (cx instanceof ChuyenXeNgoaiThanh) {\n doanhThu += cx.doanhThu;\n }\n }\n return doanhThu;\n }", "private void yas(){\n System.out.println(namn);\n \n try{\n String fraga = \"SELECT TEXT FROM INLAGG WHERE RUBRIK = 'Borttappad strumpa'\";\n String XD = db.fetchSingle(fraga);\n System.out.println(XD);\n txtInlagg.append(XD);\n }\n catch(InfException e){\n JOptionPane.showMessageDialog(null, \"Kunde ej hämta inlägg\");\n }\n }", "@RequestMapping(value = \"/chuyenthemlichsunql\", method = RequestMethod.GET, produces = \"application/x-www-form-urlencoded;charest=UTF-8\")\n\tprivate String chuyenThemLichSuNQL(@RequestParam(name = \"id\", required = false) int maXuat, Model model) {\n\t\tmodel.addAttribute(\"maXuatThemLSNQL\", baoTriDAO.layMaXuat(maXuat));\n\t\tmodel.addAttribute(\"formThem\", new TbLichSuNguoiQuanLy());\n\t\tmodel.addAttribute(\"danhsachnguoidung\", nhanVienDAO.layDanhSachNguoiDung());\n\t\treturn \"bt-lich-su-nguoi-them\";\n\t}", "private String Interpretar(String num) {\r\n\t\tif(num.length() > 3)\r\n\t\t\treturn \"\";\r\n\t\tString salida=\"\";\r\n\t\t\r\n\t\tif(Dataposi(num,2) != 0)\r\n\t\t\tsalida = Centenas[Dataposi(num,2)-1];\r\n\t\t\r\n\t\tint k = Integer.parseInt(String.valueOf(Dataposi(num,1))+String.valueOf(Dataposi(num,0)));\r\n\r\n\t\tif(k <= 20)\r\n\t\t\tsalida += Numero[k];\r\n\t\telse {\r\n\t\t\tif(k > 30 && Dataposi(num,0) != 0)\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + \"Y \" + Numero[Dataposi(num,0)];\r\n\t\t\telse\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + Numero[Dataposi(num,0)];\r\n\t\t}\r\n\t\t//Caso especial con el 100\r\n\t\tif(Dataposi(num,2) == 1 && k == 0)\r\n\t\t\tsalida=\"CIEN\";\r\n\t\t\r\n\t\treturn salida;\r\n\t}", "protected String decrisToi(){\r\n return \"\\t\"+this.nomVille+\" est une ville de \"+this.nomPays+ \", elle comporte : \"+this.nbreHabitants+\" habitant(s) => elle est donc de catégorie : \"+this.categorie;\r\n }", "public int kiemTraquyenDN(){\r\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);\r\n\t NhanVien x= new NhanVien();\r\n\t x.setMaNV(session.getAttribute(\"manv\").toString());\r\n\t NhanVienDao nvDao=new NhanVienDao();\r\n\t NhanVien nv=nvDao.layNhanVien(x);\r\n\t\t PhanQuyen pq=nv.getMaPQ();\r\n\t\t return pq.getMaPQ();\r\n\t}", "private void inToTrinhv4(HttpServletRequest request, HttpServletResponse reponse, GiaHanForm giaHanForm, ApplicationContext appConText) throws Exception {\r\n\r\n\t\tString fileIn = request.getRealPath(\"/docin/v4\") + \"\\\\TTNB10.doc\";\r\n\t\tString fileOut = request.getRealPath(\"/docout\") + \"\\\\TTNB10_Out\" + System.currentTimeMillis() + request.getSession().getId() + \".doc\";\r\n\r\n\t\tString fileTemplate = null;\r\n\t\tfileTemplate = \"ttnb10\"; // (ngon, chuan)\r\n\t\tString idCuocTtkt = giaHanForm.getIdCuocTtKt();\r\n\t\tTtktKhCuocTtkt cuocTtkt = CuocTtktService.getCuocTtktWithoutNoiDung(appConText, idCuocTtkt);\r\n\r\n\t\tTtktCbQd cbQd = TtktService.getQuyetDinh(idCuocTtkt, appConText);\r\n\t\tString hinhThuc = (cuocTtkt.getHinhThuc().booleanValue()) ? \"ki\\u1EC3m tra\" : \"thanh tra\";\r\n\t\tString hinhthuc_in = (cuocTtkt.getHinhThuc().booleanValue()) ? \"KI\\u1EC2M TRA\" : \"THANH TRA\";\r\n\t\tString hinhthuc_inT = (cuocTtkt.getHinhThuc().booleanValue()) ? \"KT\" : \"TT\";\r\n\t\t//StringBuffer sb = new StringBuffer(\"\\u0110OA\\u0300N\");\r\n\t\t//sb.append(hinhthuc);\r\n\t\tMsWordUtils word = new MsWordUtils(fileIn, fileOut);\r\n\t\ttry {\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText).toUpperCase());\r\n\t\t\t// hinh thuc thanh tra kiem tra\r\n\t\t\tStringBuffer sb = new StringBuffer(\"\\u0110OA\\u0300N \");\r\n\t\t\tsb.append(hinhthuc_inT);\r\n\t\t\t\r\n\t\t\tif (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t\tsb.append(\" Q\\u0110 S\\u1ED0......\");\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(\" Q\\u0110 S\\u1ED0 \" + giaHanForm.getSoQd());\r\n\t\t\t}\r\n\t\t\tword.put(\"[doan_ttkt_so]\", sb.toString().toUpperCase());\r\n\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\t\t\tword.put(\"[thu_truong_cqt_ra_qd]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[quyet_dinh_so]\", giaHanForm.getCanCuQd());\r\n\t\t\t\r\n\t\t\tif (Formater.isNull(cbQd.getSoQuyetDinh())) {\r\n\t\t\t\tword.put(\"[qd_so]\", \"............\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\t}\r\n\r\n\t\t\tString ngayxet = Formater.date2str(cbQd.getNgayRaQuyetDnh());\r\n\t\t\tString[] arrngayxet = ngayxet.split(\"/\");\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ngay_lv]\", giaHanForm.getSoNgayRaHan());\r\n\t\t\tString tungay = giaHanForm.getRaHanTuNgay();\r\n\t\t\tString[] arrtungay = tungay.split(\"/\");\r\n\t\t\tword.put(\"[tu_ngay]\", \"ng\\u00E0y \" + arrtungay[0] + \" th\\u00E1ng \" + arrtungay[1] + \" n\\u0103m \" + arrtungay[2]);\r\n\t\t\t// den ngay\r\n\t\t\tString denngay = giaHanForm.getRaHanDenNgay();\r\n\t\t\tString[] arrdenngay = denngay.split(\"/\");\r\n\t\t\tword.put(\"[den_ngay]\", \"ng\\u00E0y \" + arrdenngay[0] + \" th\\u00E1ng \" + arrdenngay[1] + \" n\\u0103m \" + arrdenngay[2]);\r\n\t\t\tword.put(\"[ly_do]\", giaHanForm.getLyDoRaHan());\r\n\t\t\tword.put(\"[thu_truong_cqt_ra_qd]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toLowerCase());\r\n\t\t\tword.put(\"[noi_duyet]\", giaHanForm.getNoiPheDuyet());\r\n\t\t\t// ngay duyet\r\n\t\t\tString ngayduyet = giaHanForm.getNgayPheDuyet();\r\n\t\t\tString[] arrngayduyet = ngayduyet.split(\"/\");\r\n\t\t\tif (arrngayduyet.length >= 2) {\r\n\t\t\t\tword.put(\"[ngay_duyet]\", \"ng\\u00E0y \" + arrngayduyet[0] + \" th\\u00E1ng \" + arrngayduyet[1] + \" n\\u0103m \" + arrngayduyet[2]);\r\n\t\t\t}\r\n\t\t\tword.put(\"[noi_lap]\", giaHanForm.getNoiTrinh());\r\n\t\t\t// ngay lap to trinh\r\n\t\t\tString ngaylaptotrinh = giaHanForm.getNgayTrinh();\r\n\t\t\tString[] arrngaylaptotrinh = ngaylaptotrinh.split(\"/\");\r\n\t\t\tif (arrngaylaptotrinh.length >= 2) {\r\n\t\t\t\tword.put(\"[ngay_lap_to_trinh]\", \"ng\\u00E0y \" + arrngaylaptotrinh[0] + \" th\\u00E1ng \" + arrngaylaptotrinh[1] + \" n\\u0103m \" + arrngaylaptotrinh[2]);\r\n\t\t\t}\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[y_kien_phe_duyet]\", giaHanForm.getKienPheDuyet());\r\n\t\t\tword.put(\"[ten_truong_doan]\", cuocTtkt.getTenTruongDoan());\r\n\t\t\t//word.put(\"[chuc_danh_thu_truong]\", \"ABC\");\r\n\t\t\t//word.put(\"[chuc_danh_thu_truong]\", KtnbUtil.getChucVuThuTruongByMaCqt(appConText.getMaCqt()).toUpperCase());\r\n\t\t\t// if (Formater.isNull(appConText.getTenThuTruong())) {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", \"\");\r\n\t\t\t// } else {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", appConText.getTenThuTruong());\r\n\t\t\t// }\r\n\t\t\tword.saveAndClose();\r\n\t\t\tword.downloadFile(fileOut, \"Mau TTNB10\", \".doc\", reponse);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// ex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Download Error: \" + ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tword.saveAndClose();\r\n\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"1.숫자\");\n\t\tSystem.out.println(\"1_1 정수------------------\");\n\t\tbyte bb = 127;\n\t\tshort sh = 32767;\n\t\tint x =2100000000;\n\t\tlong lo = 9223372036854775807L;\n\t\t\n\t\tSystem.out.println(bb);\n\t\tSystem.out.println(sh);\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(lo);\n\t\t\n\t\tSystem.out.println(\"1_2 실수-------------------\");\n\t\t\n\t\tfloat ff = 123.456f;\n\t\tdouble dd = 123.456;\n\t\tSystem.out.println(ff);\n\t\tSystem.out.println(dd);\n\t\t\n\t\tSystem.out.println(\"2. boolean----------------\");\n\t\tboolean bo = true;\n\t\tSystem.out.println(bo);\n\t\t\n\t\tSystem.out.println(\"3. 문자----------------\");\n\t\tchar ch = 'a';\n\t\tchar ch2 = 'b';\n\t\tSystem.out.println(ch);\n\t\t\n\t\tString str = \"선생님은 귀여워요\";\n\t\tSystem.out.println(str);\n\t\t\n\t\t\n\t\t\n\t}", "private void tbChongChiDinhMouseClicked(java.awt.event.MouseEvent evt) {\n TrangChuUI trangChuUI = new TrangChuUI();\n \n cbThuocSua.removeAllItems();\n cbBenhSua.removeAllItems();\n hienThiToanBenhSua();\n hienThiToanBoThuocSua();\n \n int row = tbChongChiDinh.getSelectedRow();\n String maBenhVaTenBenh = tbChongChiDinh.getValueAt(row, 0).toString();\n String maThuocVaTenThuoc = tbChongChiDinh.getValueAt(row, 1).toString();\n\n maBenh = trangChuUI.ngatChuoi(maBenhVaTenBenh, \"-\", 0);\n maThuoc = trangChuUI.ngatChuoi(maThuocVaTenThuoc, \"_\", 0);\n\n \n cbBenhSua.setSelectedItem(maBenhVaTenBenh);\n cbThuocSua.setSelectedItem(maThuocVaTenThuoc);\n }", "private void inQuyetDinh(HttpServletRequest request, ApplicationContext appConText, GiaHanForm giaHanForm, HttpServletResponse reponse) throws Exception {\r\n\t\tCuocTtktService service = new CuocTtktService();\r\n\t\tString cuocTtktId=giaHanForm.getIdCuocTtKt();\r\n\t\tSystem.out.println(\"Id cuoc ttkt : \"+cuocTtktId );\r\n\t\tif(!Formater.isNull(cuocTtktId))\r\n\t\t{\r\n\t\t\tif(Constants.DON_VERSION.equals(service.getDonVerionTtkt(appConText, cuocTtktId)))\r\n\t\t\t{\r\n\t\t\t\tinQuyetDinhv4(request, reponse, giaHanForm, appConText);\r\n\t\t\t}\r\n\t\t\telse inQuyetDinhv3(request, reponse, giaHanForm, appConText);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tif(Constants.DON_VERSION.equals(Constants.APP_DEP_VERSION))\r\n\t\t\t\tinQuyetDinhv4(request, reponse, giaHanForm, appConText);\r\n\t\t\telse inQuyetDinhv3(request, reponse, giaHanForm, appConText);\r\n\t\t}\r\n\t}" ]
[ "0.69736636", "0.64827245", "0.64420086", "0.6390491", "0.63768655", "0.63080573", "0.6220722", "0.61809635", "0.6160549", "0.59819883", "0.5980519", "0.59760404", "0.59351707", "0.5932524", "0.58775073", "0.5852666", "0.5845014", "0.58325666", "0.5818766", "0.58114976", "0.58105415", "0.5809158", "0.580433", "0.57945764", "0.5779823", "0.5778294", "0.5774054", "0.5766972", "0.57544535", "0.5748223", "0.57479507", "0.5744325", "0.5742767", "0.5742286", "0.57384217", "0.5737044", "0.57264316", "0.5720939", "0.5718285", "0.57106113", "0.57017124", "0.5699962", "0.56964135", "0.56918705", "0.56882507", "0.5685426", "0.568509", "0.56742513", "0.56639314", "0.5661135", "0.56579304", "0.5647019", "0.56373054", "0.5635323", "0.56349957", "0.56296784", "0.56254524", "0.56148195", "0.5612609", "0.56075436", "0.5599835", "0.5598295", "0.55917114", "0.559046", "0.558286", "0.5569807", "0.5567952", "0.55672157", "0.55639696", "0.556011", "0.5558518", "0.55556047", "0.5555523", "0.55532795", "0.5553067", "0.5549778", "0.55426025", "0.5540434", "0.5540158", "0.5538841", "0.55376375", "0.5537553", "0.5529932", "0.55269873", "0.5513967", "0.5508532", "0.55076796", "0.55053747", "0.5502983", "0.54979247", "0.54943424", "0.5491098", "0.5488613", "0.54819864", "0.54815584", "0.54807264", "0.54772705", "0.54762", "0.5473362", "0.547147", "0.5467941" ]
0.0
-1
trong pham vi cua class ben trong, co the truy cap duoc tat cac cac thanh phan cua class ben ngoai
public void showOuterNguoi() { System.out.println("Ten Nguoi: "+ ten + "; Tuoi: "+ age); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String word = \"Tenet\";\n String word3 = \"tenet\";\n System.out.println(\"word \" + word);\n word.toLowerCase(); //porównanie bez wielkosci znakow\n //charAt(0) - zero,\n String[] Tablica = new String[word.length()];\n for (int i = 0; i < word.length(); i++) {\n Tablica[i] = String.valueOf(word.charAt(i));\n }\n String word2 = \"\";\n\n for (int i = (word.length() - 1); i >= 0; i--) {\n //System.out.print(Tablica[i]);\n word2 = word2 + Tablica[i];\n }\n //System.out.println();\n System.out.println(\"word 2 \" + word2);\n System.out.println(\"word 3 \" + word3);\n\n System.out.print(\"word 3 i word 2 \");\n if (word3.toLowerCase().equals(word2.toLowerCase())) {\n System.out.println(\"jest palidronem\");\n } else {\n System.out.println(\"nie jest palidronem\");\n }\n\n//koniec\n\n }", "public static void main(String[] args) throws Exception {\nSystem.out.println(\"i love nayanthara\");\nSystem.out.println(\"i love trisha\");\nSystem.out.println(\"i love keerthisuresh\");\n\n \n \n\t }", "public static void main(String[] args) {\n\t\t\r\n\t\tString[] testSentence = new String[]{\r\n\t\t\t\t\"西三旗硅谷先锋小区半地下室出租,便宜可合租硅谷工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t\t\"这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。\",\r\n\t\t\t \"我不喜欢日本和服。\",\r\n\t\t\t \"雷猴回归人间。\",\r\n\t\t\t \"工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t \"我需要廉租房\",\r\n\t\t\t \"永和服装饰品有限公司\",\r\n\t\t\t \"我爱北京天安门\",\r\n\t\t\t \"abc\",\r\n\t\t\t \"隐马尔可夫\",\r\n\t\t\t \"雷猴是个好网站\",\r\n\t\t\t \"“Microsoft”一词由“MICROcomputer(微型计算机)”和“SOFTware(软件)”两部分组成\",\r\n\t\t\t \"草泥马和欺实马是今年的流行词汇\",\r\n\t\t\t \"伊藤洋华堂总府店\",\r\n\t\t\t \"中国科学院计算技术研究所\",\r\n\t\t\t \"罗密欧与朱丽叶\",\r\n\t\t\t \"我购买了道具和服装\",\r\n\t\t\t \"PS: 我觉得开源有一个好处,就是能够敦促自己不断改进,避免敞帚自珍\",\r\n\t\t\t \"湖北省石首市\",\r\n\t\t\t \"湖北省十堰市\",\r\n\t\t\t \"总经理完成了这件事情\",\r\n\t\t\t \"电脑修好了\",\r\n\t\t\t \"做好了这件事情就一了百了了\",\r\n\t\t\t \"人们审美的观点是不同的\",\r\n\t\t\t \"我们买了一个美的空调\",\r\n\t\t\t \"线程初始化时我们要注意\",\r\n\t\t\t \"一个分子是由好多原子组织成的\",\r\n\t\t\t \"祝你马到功成\",\r\n\t\t\t \"他掉进了无底洞里\",\r\n\t\t\t \"中国的首都是北京\",\r\n\t\t\t \"孙君意\",\r\n\t\t\t \"外交部发言人马朝旭\",\r\n\t\t\t \"领导人会议和第四届东亚峰会\",\r\n\t\t\t \"在过去的这五年\",\r\n\t\t\t \"还需要很长的路要走\",\r\n\t\t\t \"60周年首都阅兵\",\r\n\t\t\t \"你好人们审美的观点是不同的\",\r\n\t\t\t \"买水果然后去世博园\",\r\n\t\t\t \"但是后来我才知道你是对的\",\r\n\t\t\t \"存在即合理\",\r\n\t\t\t \"的的的的的在的的的的就以和和和\",\r\n\t\t\t \"I love你,不以为耻,反以为rong\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"很好但主要是基于网页形式\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"为什么我不能拥有想要的生活\",\r\n\t\t\t \"后来我才\",\r\n\t\t\t \"此次来中国是为了\",\r\n\t\t\t \"使用了它就可以解决一些问题\",\r\n\t\t\t \",使用了它就可以解决一些问题\",\r\n\t\t\t \"其实使用了它就可以解决一些问题\",\r\n\t\t\t \"好人使用了它就可以解决一些问题\",\r\n\t\t\t \"是因为和国家\",\r\n\t\t\t \"老年搜索还支持\",\r\n\t\t\t \"干脆就把那部蒙人的闲法给废了拉倒!RT @laoshipukong : 27日,全国人大常委会第三次审议侵权责任法草案,删除了有关医疗损害责任“举证倒置”的规定。在医患纠纷中本已处于弱势地位的消费者由此将陷入万劫不复的境地。 \",\r\n\t\t\t \"他说的确实在理\",\r\n\t\t\t \"长春市长春节讲话\",\r\n\t\t\t \"结婚的和尚未结婚的\",\r\n\t\t\t \"结合成分子时\",\r\n\t\t\t \"旅游和服务是最好的\",\r\n\t\t\t \"这件事情的确是我的错\",\r\n\t\t\t \"供大家参考指正\",\r\n\t\t\t \"哈尔滨政府公布塌桥原因\",\r\n\t\t\t \"我在机场入口处\",\r\n\t\t\t \"邢永臣摄影报道\",\r\n\t\t\t \"BP神经网络如何训练才能在分类时增加区分度?\",\r\n\t\t\t \"南京市长江大桥\",\r\n\t\t\t \"应一些使用者的建议,也为了便于利用NiuTrans用于SMT研究\",\r\n\t\t\t \"长春市长春药店\",\r\n\t\t\t \"邓颖超生前最喜欢的衣服\",\r\n\t\t\t \"胡锦涛是热爱世界和平的政治局常委\",\r\n\t\t\t \"程序员祝海林和朱会震是在孙健的左面和右面, 范凯在最右面.再往左是李松洪\",\r\n\t\t\t \"一次性交多少钱\",\r\n\t\t\t \"两块五一套,三块八一斤,四块七一本,五块六一条\",\r\n\t\t\t \"小和尚留了一个像大和尚一样的和尚头\",\r\n\t\t\t \"我是中华人民共和国公民;我爸爸是共和党党员; 地铁和平门站\",\r\n\t\t\t \"张晓梅去人民医院做了个B超然后去买了件T恤\",\r\n\t\t\t \"AT&T是一件不错的公司,给你发offer了吗?\",\r\n\t\t\t \"C++和c#是什么关系?11+122=133,是吗?PI=3.14159\",\r\n\t\t\t \"你认识那个和主席握手的的哥吗?他开一辆黑色的士。\",\r\n\t\t\t \"枪杆子中出政权\",\r\n\t\t\t \"张三风同学走上了不归路\",\r\n\t\t\t \"阿Q腰间挂着BB机手里拿着大哥大,说:我一般吃饭不AA制的。\",\r\n\t\t\t \"在1号店能买到小S和大S八卦的书,还有3D电视。\"\r\n\r\n\t\t};\r\n\t\t\r\n\t\tSegment app = new Segment();\r\n\t\t\r\n\t\tfor(String sentence : testSentence)\r\n\t\t\tSystem.out.println(app.cut(sentence));\r\n\t}", "public static void main(String arg[]) {\n String frase1 = \"Había vez circo alegraba el\";\n String frase2 = \"una un que siempre carazón sin temer jamás\";\n String frase3 = \"\";\n\n int inicio1 = 0;\n int fin1 = frase1.indexOf(\" \");\n int inicio2 = 0;\n int fin2 = frase2.indexOf(\" \");\n\n while ((fin1 != -1) || (fin2 != -1)) {\n if (fin1 != -1) {\n frase3 = frase3.concat(frase1.substring(inicio1, fin1 + 1));\n inicio1 = fin1 + 1;\n fin1 = frase1.indexOf(\" \", inicio1);\n }\n if (fin2 != -1) {\n frase3 = frase3.concat(frase2.substring(inicio2, fin2 + 1));\n inicio2 = fin2 + 1;\n fin2 = frase2.indexOf(\" \", inicio2);\n }\n }\n System.out.println(frase3);\n }", "public static void main(String[] args) {\n String exclamation1 = \"Ouch!\";\n String exclamation2 = \"Hoorah!\";\n String exclamation3 = \"Amazing!\";\n String adverb1 = \"stupidly\";\n String adverb2 = \"happily\";\n String adverb3 = \"shamefully\";\n String noun1 = \"car\";\n String noun2 = \"book\";\n String noun3 = \"bird\";\n String adjective1 = \"tall\";\n String adjective2 = \"smart\";\n String adjective3 = \"funny\";\n System.out.println( exclamation1+ \" he said \" + adverb1 +\n \" as he jumped into his convertible \" + noun1 +\n \" and drove off with his \" + adjective1 + \" wife.\");\n\n\n\n\n }", "@Test(timeout = 4000)\n public void test50() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you can help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you can help th reader by giv th compl addr.\", string0);\n }", "static String stringCutter1(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n\n // pemotongan string untuk pemotongan kelompok pertama\n String sentence1 = s.substring(0, value);\n\n // perulangan untuk menggeser nilai setiap karakter\n String wordNow = \"\";\n for (int i = 0; i < sentence1.length(); i++) {\n char alphabet = sentence1.toUpperCase().charAt(i);\n // pengubahan setiap karakter menjadi int\n // untuk menggeser 3 setiap nilai nya\n int asciiDecimal = (int) alphabet;\n // pengecekan kondisi apabila karakter melewati kode ascii nya\n if (asciiDecimal > 124) {\n int alphabetTransfer = 0 + (127 - asciiDecimal);\n wordNow += (char) alphabetTransfer;\n\n } else {\n int alphabetTrasfer = asciiDecimal + 3;\n wordNow += (char) alphabetTrasfer;\n }\n }\n return wordNow;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\" J a v v a\");\r\n\t\tSystem.out.println(\" J aa vv aa\");\r\n\t\tSystem.out.println(\"JJ aaaaa vv aaaaa\");\r\n\t\tSystem.out.println(\"JJ a a va a\");\r\n\t\t\t\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\");\n assertEquals(\"th nam of a ser or se of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-vol se in which th book is publ.\", string0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "public void anazitisiSintagisVaseiGiatrou() {\n\t\tString doctorName = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tdoctorName = sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \"); // Zitaw apo ton xrhsth na mou dwsei to onoma tou giatrou pou exei grapsei thn sintagh pou epithumei\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tif(doctorName.equals(prescription[i].getDoctorLname())) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou exei grapsei o giatros\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t// Emfanizw thn/tis sintagh/sintages pou exoun graftei apo ton sygkekrimeno giatro\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON IATRO ME EPWNYMO: \" + doctorName);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test53() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced.\");\n assertEquals(\"th databas key of th entr being cros refer. any field that ar mis from th cur record ar inherit from th field being cros refer.\", string0);\n }", "public static void main(String[] args) {\n\t\tString str = \" Жизнь и Смерть. Что мы знаем о них? Немного. \";\n\t\tint a = 0;\n\t\tchar b;\n\t\tchar word;\n\n\t\tfor (int i = 1; i < str.length(); i++) {\n\t\t\tb = str.charAt(i);\n\t\t\ta = i - 1;\n\t\t\tif (b == ' ' || b == '.' || b == ',' || b == '?' || b == '!') {\n\t\t\t\tword = str.charAt(a);\n\t\t\t\tif (word == ' ' || word == '.' || word == ',' || word == '?' || word == '!') {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(word);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"how someth strang ha been publ. th first word should be capital.\");\n assertEquals(\"how someth strang ha been publ. th first word should be capit.\", string0);\n }", "public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }", "public void eisagwgiSintagis() {\n\t\t//Elegw ean mporei na eisaxthei suntagi\n\t\tif(numOfMedicine != 0 && numOfDoctors != 0 && numOfPatient != 0 && numOfPrescription < 1000) \n\t\t{\n\t\t\ttmp_1 = numOfPrescription + 1;\n\t\t\t// Emfanizw to synolo twn giatrwn pou yparxoun sto farmakeio\n\t\t\tfor(i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA IATROU: \");\n\t \t \tdoctor[i].print();\n\t \t \tSystem.out.println();\n\t\t\t}\n\t\t\t// O xristis epilegei ton ari8mo pou antistoixei ston giatro pou egrapse thn syntagh\n\t\t\ttmp_1 = sir.readPositiveInt(\"EPILEKSTE TON GIATRO POU EGGRAPSE THN SYNTAGH: \"); \n\t\t\t// Elegxw an o yparxei o giatros pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfDoctors - 1)\n\t \t {\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"DEN YPARXEI GIATROS ME TO NOUMERO POU PLIKTROLOGISATE! PARAKALW KSANADWSTE ARITHMO: \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t\n\t\t\ti = numOfPrescription + 1;\n\t\t\t// Emfanizw to synolo twn asthenwn pou yparxoun sto farmakeio\n\t\t\tfor(i = 0; i < numOfPatient; i++)\n\t\t {\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA ASTHENOUS: \");\n\t patient[i].print();\n\t System.out.println();\n\t\t }\n\t\t\t// O xristis epilegei ton ari8mo pou antistoixei ston as8enh gia ton opoio proorizetai i syntagh\n\t\t\ti = sir.readPositiveInt(\"EPILEKSTE TON ASTHENH GIA TON OPOIO PROORIZETAI H SYNTAGH: \"); \n\t\t\t// Elegxw an o yparxei o as8enhs pou edwse o xristis\n\t\t\twhile(i < 0 || i > numOfPatient - 1)\n\t \t {\n\t\t\t\ti = sir.readPositiveInt(\"DEN YPARXEI ASTHENHS ME TO NOUMERO POU PLIKTROLOGISATE! PARAKALW KSANADWSTE ARITHMO: \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t\n\t\t\t// O xristis eisagei tn synoliko ar8mo farmakwn pou 8a exei h syntagh\n\t\t\tSystem.out.println();\n\t\t\ttmp_2= sir.readPositiveInt(\"EISAGETAI TON ARITHMO TWN FARMAKWN POU EPITHUMEITAI NA EXEI H SYNTAGH(1-6): \");\n\t\t\t// Elegxw an o ari8mos twn farmakwn pou edwse o xristis einai egkyros\n\t\t\twhile(tmp_2 < 0 || tmp_2 > 6)\n\t \t {\n\t\t\t\ttmp_2 = sir.readPositiveInt(\"PARAKALW KSANAEISAGETAI SYNOLIKO ARITHMO FARMAKWN(1-6): \");\n\t\t\t\tSystem.out.println();\n\t \t }\n\t\t\t// Apo8ikeuw tis times ston constructor Syntagi\n\t\t\tprescription[numOfPrescription] = new Syntagi(doctor[tmp_1], patient[i], sir.readDate(\"\\nEISAGETAI THN HMEROMHNIA EGGRAFHS THS SYNTAGHS: \"), tmp_2);\n\t\t\t\n\t\t\tprescription[numOfPrescription].dimiourgiaPinakaFarmakwn(); // Kalw tin methodo auti gia na dimiourgisw ton pinaka me ton arithmo twn farmakwn pou mou edwse o xrhsths\n\t\t\t\n\t\t\t// Emfanizw to synolo twn farmakwn\n\t\t\tfor(i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(i + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tmedicine[i].print();\n\t\t\t}\n\t\t\t\n\t\t\tfor(i = 0; i < tmp_2; i++)\n \t \t{\n\t\t\t\ta = i + 1; \n\t\t\t\t// An h syntagh apoteleitai apo perissotera tou enos farmaka tote...\n\t\t\t\tif(tmp_2 != 1)\n \t \t \t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_1 = sir.readPositiveInt(\"ARITHMOS \" + a + \"ou FARMAKOU: \");\n\t\t\t\t\ttmp_3 = sir.readPositiveInt(\"POSOTHTA \" + a + \"ou FARMAKOU: \");\n \t \t \tSystem.out.println();\n \t \t \t}\n\t\t\t\t// An h syntagh apoteleitai apo ena farmako tote...\n\t\t\t\telse\n \t \t \t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_1 = sir.readPositiveInt(\"ARITHMOS FARMAKOU: \");\n\t\t\t\t\ttmp_3 = sir.readPositiveInt(\"POSOTHTA FARMAKOU: \");\n \t \t\t \tSystem.out.println();\n \t \t \t}\n \t \t \t// Elegxw an o ari8mos pou edwse o xristis einai egkyros\n\t\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine - 1)\n \t \t \t{\n \t \t \t\ttmp_1 = sir.readPositiveInt(\"EISAGATAI LATHOS DEDOMENA!DWSTE KSANA TIMH: \");\n \t \t\t \tSystem.out.println();\n \t \t \t}\n \t \t \t\n\t\t\t\tprescription[numOfPrescription].gemismaPinakaFarmakwn(i, medicine[tmp_1], tmp_3); // Kalw tin methodo auti gia na gemisw ton pinaka twn farmakwn pou dimiourgisa proigoumenws\n \t \t}\n\t\t\tnumOfPrescription++;\n\t\t}\n\t\t// Elegxw pote den mporei na eisaxthei syntagh\n\t\telse\n\t\t{\n\t\t\t// An oi syntages pou exoun eisaxthei xeperasan to epitrepto orio\n\t\t\tif(numOfPrescription >= 1000)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN MPOREITAI NA EISAGETAI ALLES SYNTAGES!EXEI KALIFTHEI O MEGISTOS ARITHMOS TOUS\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t\t// An den yparxoun iatroi, astheneis kai farmaka sto farmakeio\n\t\t\telse if(numOfDoctors == 0 && numOfPatient == 0 && numOfMedicine == 0)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI, ASTHENEIS KAI FARMAKA WSTE NA OLOKLIRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS, ASTHENEIS KAI FARMAKA!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t\t// An den yparxoun iatroi kai astheneis\n\t\t\telse if(numOfDoctors == 0 && numOfPatient == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI KAI ASTHENEIS GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS KAI ASTHENEIS!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun iatroi kai farmaka\n\t\t\telse if(numOfDoctors == 0 && numOfMedicine == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI KAI FARMAKA GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS KAI FARMAKA!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun astheneis kai farmaka\n\t\t\telse if(numOfPatient == 0 && numOfMedicine == 0)\n \t \t{\n\t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS KAI FARMAKA GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI ASTHENEIS KAI FARMAKA!\");\n \t \t \tSystem.out.println();\n \t \t}\n\t\t\t// An den yparxoun iatroi\n\t\t\telse if (numOfDoctors == 0)\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI GIATROI GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI GIATROUS!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n \t\t \t// An den yparxoun astheneis\n\t\t\telse\n \t\t \t{\n \t\t\t\tSystem.out.print(\"DEN YPARXOUN DIATHESIMOI ASTHENEIS GIA NA OLOKLHRWTHEI H EISAGWGH SYNTAGHS!PARAKALW EISAGETAI ASTHENEIS!\");\n \t\t\t\tSystem.out.println();\n \t\t \t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test68() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"probToLogOdds: probability must be in [0,1] \");\n assertEquals(\"probtologod: prob must be in [0,1] \", string0);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you &an help th reader by giv th compl addr.\", string0);\n }", "public void TongSL() {\n System.out.println(\"|-> Tong So Luong cua Giao Dich Vang: \" + sum1 + \" <-|\");\n System.out.println(\"|-> Tong So Luong cua Giao Dich Tien Te:\" + sum2 + \" <-|\");\n }", "public static void main(String[] args) {\r\n // feed the generator a fixed random value for repeatable behavior\r\n MarkovTextGeneratorLoL gen = new MarkovTextGeneratorLoL(new Random(42));\r\n //String textString = \"hi there hi Leo\";\r\n //String textString = \"\";\r\n \r\n String textString = \"Hello. Hello there. This is a test. Hello there. Hello Bob. Test again.\";\r\n System.out.println(textString);\r\n gen.train(textString);\r\n System.out.println(gen);\r\n System.out.println(\"Generator: \" + gen.generateText(0));\r\n String textString2 = \"You say yes, I say no, \" +\r\n \"You say stop, and I say go, go, go, \" +\r\n \"Oh no. You say goodbye and I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"I say high, you say low, \" +\r\n \"You say why, and I say I don't know. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"Why, why, why, why, why, why, \" +\r\n \"Do you say goodbye. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"You say yes, I say no, \" +\r\n \"You say stop and I say go, go, go. \" +\r\n \"Oh, oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello,\";\r\n System.out.println(textString2);\r\n gen.retrain(textString2);\r\n System.out.println(gen);\r\n System.out.println(gen.generateText(20));\r\n }", "public void generateWithTrigramModel (String start) {\n\t\tRandom r = new Random();\n\t\tList<String> biList = new ArrayList<>();\n\t\tfor (Map.Entry<String, Integer> entry : this.bi.entrySet()) {\n\t\t\tif (entry.getKey().startsWith(start)) {\n\t\t\t\tfor (int i = 0; i < entry.getValue(); i++) {\n\t\t\t\t\tbiList.add(entry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint maxLen = 200;\n\t\tstart = biList.get(r.nextInt(biList.size()));\n\t\tStringBuilder sb = new StringBuilder(start);\n\t\tList<String> triList = null;\n\t\twhile (sb.charAt(0) != '$' || maxLen > 0) {\n\t\t\tSystem.out.print(sb.charAt(0));\n\t\t\tsb.deleteCharAt(0);\n\t\t\ttriList = new ArrayList<>();\n\t\t\tfor (Map.Entry<String, Integer> entry : this.tri.entrySet()) {\n\t\t\t\tif (entry.getKey().startsWith(sb.toString())) {\n\t\t\t\t\tfor (int i = 0; i < entry.getValue(); i++) {\n\t\t\t\t\t\ttriList.add(entry.getKey());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (triList.size() > 0) {\n\t\t\t\tsb = new StringBuilder(triList.get(r.nextInt(triList.size())));\n\t\t\t}\n\t\t\t\n\t\t\tmaxLen--;\n\t\t}\n\t\tSystem.out.println();\n\t}", "public abstract void substitutedWords(long ms, int n);", "public static void main(String[] args){\r\n String first = \"jin\";\r\n String last = \"jung\";\r\n String ay = \"ay\";\r\n/*\r\n use substring() and toUpperCase methods to reorder and capitalize\r\n*/\r\n\r\n String letFirst = first.substring(0,1);\r\n String capFirst = letFirst.toUpperCase();\r\n String letLast = last.substring(0,1);\r\n String capLast = letLast.toUpperCase();\r\n\r\n String nameInPigLatin = first.substring(1,3) + capFirst + ay + \" \" + last.substring(1,4) + capLast + ay;\r\n\r\n/*\r\n output resultant string to console\r\n*/\r\n\r\n System.out.println(nameInPigLatin);\r\n\r\n }", "public static void main(String[] args) {\n\t\tSpeechTokenizer s = new SpeechTokenizer(\"도쿄에서 신주쿠까지 가는 방법은\");\n\t\tVector<String> x = s.getTokens();\n\t\t\n\t\tWordAnalyzer w = new WordAnalyzer(x);\n\t\tw.parsePosition();\n\t\t\n\t\tVector<String> answer = w.getAnalyzed();\n\t\t\n\t\tfor(String a : answer)\n\t\t{\n\t\t\tSystem.out.println(a);\n\t\t\t\n\t\t}\n\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString text = \"本报讯 (记者 王京) 联想THINKPAD近期几乎全系列笔记本电脑降价促销,最高降幅达到800美元,降幅达到42%。这是记者昨天从联想美国官方网站发现的。联想相关人士表示,这是为纪念新联想成立1周年而在美国市场推出的促销,产品包括THINKPAD T、X以及Z系列笔记本。促销不是打价格战,THINK品牌走高端商务路线方向不会改变。\";\r\n\t\tString[] terms = null;\r\n\t\tterms= ChineseSpliter.split(text, \" \").split(\" \");//中文分词处理(分词后结果可能还包含有停用词)\r\n\t\tterms = DropStopWords(terms);//去掉停用词,以免影响分类\r\n\t\t\r\n\t\tfor(int i=0;i<terms.length;i++)\r\n\t\tSystem.out.println(terms[i]);\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test65() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"How somethig strange haseen published. Thefirst word should be capitalized.\");\n assertEquals(\"how somethig strang haseen publ. thefirst word should be capital.\", string0);\n }", "public static void main(String[] args) {\n\n\t\tSystem.out.println(180%30);\n\t\tSystem.out.println(12%30);\n\t\tSystem.out.println(179%30);\n\t\tSystem.out.println(30%30);\n\t\tint docNum= 10, docCount=10;\n\t\tSystem.out.println(\"Math.log docNum / docCount:\"+ Math.log((double) docNum / docCount));\n\t\tSystem.out.println(SvmUtil.parseWord(\"你愛我嗎\"));\n\t\tString test = \"中華民國,中華民國,中華民國,中華民國,中華民國,中華民國,中華民國,中華民國,中華民國,中華民國\";\n\t\tString ssss = \"中華民國\";\n\t\tSystem.out.println(ssss.matches(\"[\\\\u4e00-\\\\u9fa5]+\"));\n\n\t\tSvmUtil.init();\n\t\tSystem.out.println(SvmUtil.labelToName(3d));\n\t\tSystem.out.println(SvmUtil.nameToLabel(\"資管處\"));\n\t\tSystem.out.println(\"frequency:\" + SvmUtil.frequency(test, \"中華\"));\n\t\tlong startTime = System.currentTimeMillis();\n\t\tfor (int i = 0; i <= 1000; i++)\n\t\t\tSvmUtil.frequency(test, \"中\");\n\t\tSystem.out.println(\"search Time:\" + (double) (System.currentTimeMillis() - startTime) / 1000d + \" s\");\n\n\t\tSet<String> testSet = new HashSet<String>();\n\t\ttestSet.add(\"中華民國\");\n\t\ttestSet.add(\"中華\");\n\t\ttestSet.add(\"中華民國\");\n\t\tSystem.out.println(testSet);\n\n\t\tjiebaAnalysis();\n\t\t// float value = (float) Math.log(987654 / 999);\n\t\t// System.out.println(value);\n\t\t// int i=100;\n\t\t// long l =9999;\n\t\t// System.out.println(String.format(\"% 5d\", i));\n\t\t// System.out.println(String.format(\"% 5d\", l));\n\t}", "public static void main(String[] args) {\n String input_one = \"Fourscore and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battlefield of that war. We have come to dedicate a portion of that field as a final resting-place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we cannot dedicate — we cannot consecrate — we cannot hallow — this ground. The brave men, living and dead, who struggled here have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us — that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion — that we here highly resolve that these dead shall not have died in vain — that this nation shall have a new birth of freedom and that government of the people, by the people, for the people, shall not perish from the earth.\";\r\n String input_two = \"Oh, say can you see, by the dawn's early light,What so proudly we hailed at the twilight's last gleaming?Whose broad stripes and brightstars,through the perilous fight,O'er the ramparts we watched, were so gallantly streaming?And the rockets' red glare, the bombs bursting in air,Gave proof through the night that our flag was still there.O say, does that star-spangled banner yet waveO'er the land of the free and the home of the brave?On the shore, dimly seen through the mists of the deep,Wherethe foe's haughty host in dread silence reposes,What isthatwhichthe breeze, o'er the towering steep,As it fitfully blows, now conceals, now discloses?Now it catches the gleam of the morning's first beam,In full glory reflected now shines on the stream:'Tis the starspangled banner! O long may it waveO'er the land of the free and the home of the brave. And where is that band who so vauntingly swore That the havoc of war and the battle's confusionA home and a country should leaveus no more?Their blood has wiped out their foulfootstep'spollution.Norefuge could save the hireling and slaveFrom the terror of flight, or the gloom of the grave:And the star-spangled banner in triumph doth waveO'er theland of the free and the home of the brave.Oh! thus be it ever, when freemen shall stand Between their loved homes and the war's desolation!Blest with victory and peace, may the heaven-rescued land Praise the Power that hath made and preserved us a nation.Then conquer we must, for our cause it is just,And this be our motto: In God is our trust. And the star-spangled banner forever shall waveO'er the land of the free and the home of \";\r\n\r\n String input_upper = input_one.toUpperCase();\r\n String input_upper2 = input_two.toUpperCase();\r\n // System.out.println(input_upper);\r\n String[] pattern = { \"FREE\", \"BRAVE\", \"NATION\" };\r\n // Brute Force algorithm\r\n System.out.println();\r\n System.out.println(\"**************************** OUTPUT OF FIRST INPUT FILE: *****************************\");\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBRUTE FORCE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BF_Search bf = new BF_Search();\r\n long bf_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n bf.brute_force_search(input_upper, pattern[i]);\r\n }\r\n long bf_endTime = System.nanoTime();\r\n bf.printBF_Comparison();\r\n System.out.println(\"It took: \" + (bf_endTime - bf_startTime) + \" nanoseconds\");\r\n\r\n // Knuth Moris Pratt algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tKNUTH MORIS PRATT ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n KMP_Search kmp = new KMP_Search();\r\n long kmp_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n kmp.KMPSearch(pattern[i], input_upper);\r\n if (i == pattern.length - 1) {\r\n kmp.printKM_Comparisons();\r\n }\r\n }\r\n long kmp_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (kmp_endTime - kmp_startTime) + \" nanoseconds\");\r\n\r\n // Boyer Moore algorithm\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBOYER MOORE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BM_Search bm = new BM_Search();\r\n char[] bm_input = input_upper.toCharArray();\r\n char[] bm_pattern = new char[] {};\r\n long bm_startTime = System.nanoTime();\r\n for (String i : pattern) {\r\n bm_pattern = i.toCharArray();\r\n bm.bm_search(bm_input, bm_pattern);\r\n if (pattern[pattern.length - 1] == i) {\r\n bm.printBM_Comparison();\r\n }\r\n }\r\n long bm_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (bm_endTime - bm_startTime) + \" nanoseconds\");\r\n\r\n // Rabin Karp algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tRABIN KARP ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n RKA_Search rk = new RKA_Search();\r\n int q = 101;\r\n long rk_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n rk.rka_search(pattern[i], input_upper, q);\r\n if (i == pattern.length - 1) {\r\n rk.printRKA_Comparison();\r\n }\r\n }\r\n long rk_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (rk_endTime - rk_startTime) + \" nanoseconds\");\r\n System.out.println();\r\n System.out.println(\"************************* OUTPUT OF SECOND INPUT FILE: *******************************\");\r\n // Brute Force algorithm\r\n System.out.println();\r\n // System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBRUTE FORCE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BF_Search bf2 = new BF_Search();\r\n long bf_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n bf.brute_force_search(input_upper2, pattern[i]);\r\n }\r\n long bf_endTime2 = System.nanoTime();\r\n bf2.printBF_Comparison();\r\n System.out.println(\"It took: \" + (bf_endTime2 - bf_startTime1) + \" nanoseconds\");\r\n\r\n // Knuth Moris Pratt algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tKNUTH MORIS PRATT ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n KMP_Search kmp2 = new KMP_Search();\r\n long kmp_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n kmp2.KMPSearch(pattern[i], input_upper2);\r\n if (i == pattern.length - 1) {\r\n kmp2.printKM_Comparisons();\r\n }\r\n }\r\n long kmp_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (kmp_endTime2 - kmp_startTime1) + \" nanoseconds\");\r\n\r\n // Boyer Moore algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tBOYER MOORE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BM_Search bm2 = new BM_Search();\r\n char[] bm_input2 = input_upper.toCharArray();\r\n char[] bm_pattern2 = new char[] {};\r\n long bm_startTime1 = System.nanoTime();\r\n for (String i : pattern) {\r\n bm_pattern2 = i.toCharArray();\r\n bm.bm_search(bm_input2, bm_pattern2);\r\n if (pattern[pattern.length - 1] == i) {\r\n bm2.printBM_Comparison();\r\n }\r\n }\r\n long bm_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (bm_endTime2 - bm_startTime1) + \" nanoseconds\");\r\n\r\n // Rabin Karp algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tRABIN KARP ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n RKA_Search rk2 = new RKA_Search();\r\n int q2 = 101;\r\n long rk_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n rk2.rka_search(pattern[i], input_upper2, q2);\r\n if (i == pattern.length - 1) {\r\n rk2.printRKA_Comparison();\r\n }\r\n }\r\n long rk_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (rk_endTime2 - rk_startTime1) + \" nanoseconds\");\r\n }", "public void highLightWords(){\n }", "static ArrayList<String> tag(ArrayList<String> rawWords){\n\t\tArrayList<String> outSentence = new ArrayList<String>();\n\t\t//String[][] chart = new String[rawWords.size()][rawWords.size()];\n\t\tfor(int i = 0; i<rawWords.size(); i++){\n\t\t\tString[] entry = rawWords.get(i).split(\"\\\\s+\");\n\t\t\tString word = entry[0];\n\t\t\tString pos = entry[1];\n\t\t\tSystem.out.println(word);\n\t\t\tif((pos.equals(\"NNP\")||word.equals(\"tomorrow\"))&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"due\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j = i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNP\")||next.equals(\"NNS\")||next.equals(\"NNPS\")||next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse if (pos.equals(\"CD\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tif((rawWords.get(j).split(\"\\\\s\")[1].equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(\"CD\")&&rawWords.get(j+1).split(\"\\\\s\")[1].equals(\"CD\"))||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NN\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNP\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNPS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"%\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s\")[0].equals(\"to\")&&rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"up\")){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"#\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"PRP$\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJ\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJR\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"$\")){\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"POS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"DT\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"approximately\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"around\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"almost\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"about\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[0].equals(\"as\")&&(rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"many\")||rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"much\"))&&rawWords.get(j-2).split(\"\\\\s\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning-=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if((rawWords.get(j).split(\"\\\\s\")[1].equals(\"RBR\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t\t}\n\t\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\t}\n\t\t\t\t\ti=ending;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else if(pos.equals(\"CD\")&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"$\")&&rawWords.get(i-2).split(\"\\\\s+\")[1].equals(\"IN\")){\n\t\t\t\tint beginning=i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j=i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString prior=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tString priorWord = rawWords.get(j).split(\"\\\\s\")[0];\n\t\t\t\t\tif(prior.equals(\"$\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s+\")[0].equals(\"as\")&&rawWords.get(j-1).split(\"\\\\s+\")[0].equals(\"much\")&&rawWords.get(j-2).split(\"\\\\s+\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning -=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\tj -=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"IN\")){\n\t\t\t\t\t\tbeginning --;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}*/\n\t\t\t//else if(pos.equals(arg0))\n\t\t\telse if(pos.equals(\"PRP\")||pos.equals(\"WP\")||word.equals(\"those\")||pos.equals(\"WDT\")){\n\t\t\t\tint beginning = i;\n\t\t\t\t//int ending = i;\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}\n\t\t\telse if(word.equals(\"anywhere\")&&rawWords.get(i+1).split(\"\\\\s+\")[0].equals(\"else\")){\n\t\t\t\toutSentence.add(\"anywhere\\tB-NP\");\n\t\t\t\toutSentence.add(\"else\\tI-NP\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t/*else if (word.equals(\"same\")&&rawWords.get(i-1).split(\"\\\\s\")[0].equals(\"the\")){\n\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\tString nounGroupLine = \"the\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tnounGroupLine = \"same\\tI-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}*/\n\t\t\telse if(pos.equals(\"NN\")||pos.equals(\"NNS\")||pos.equals(\"NNP\")||pos.equals(\"NNPS\")||pos.equals(\"CD\")/*||pos.equals(\"PRP\")*/||pos.equals(\"EX\")||word.equals(\"counseling\")||word.equals(\"Counseling\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean endFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNS\")||next.equals(\"NNP\")||next.equals(\"NNPS\")||next.equals(\"CD\")||(next.equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(rawWords.get(j+1).split(\"\\\\s\")[1]))){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString[] pArray = rawWords.get(j).split(\"\\\\s+\");\n\t\t\t\t\tString prior = pArray[1];\n\t\t\t\t\tif(j>2 &&prior.equals(rawWords.get(j-2).split(\"\\\\s+\")[1])&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"CC\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\"))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if(prior.equals(\"JJ\")||prior.equals(\"JJR\")||prior.equals(\"JJS\")||prior.equals(\"PRP$\")||prior.equals(\"RBS\")||prior.equals(\"$\")||prior.equals(\"RB\")||prior.equals(\"NNP\")||prior.equals(\"NNPS\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBG\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((prior.equals(\"RBR\")||pArray[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((pArray[0].equals(\"Buying\")||pArray[0].equals(\"buying\"))&&rawWords.get(j+1).split(\"\\\\s+\")[0].equals(\"income\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(pArray[0].equals(\"counseling\")||pArray[0].equals(\"Counseling\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s+\")[1].equals(\"NN\")){\n\t\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (prior.equals(\"DT\")||prior.equals(\"POS\")){\n\t\t\t\t\t\t//j--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tif(!rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\"))\n\t\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString outLine = word+\"\\tO\";\n\t\t\t\toutSentence.add(outLine);\n\t\t\t}\n\t\t}\n\t\toutSentence.remove(0);\n\t\toutSentence.remove(outSentence.size()-1);\n\t\toutSentence.add(\"\");\n\t\treturn outSentence;\n\t}", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.\");\n assertEquals(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\", string0);\n }", "@Test(timeout = 4000)\n public void test41() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usually the address of the publisher or other type of institution. for major publishing houses, van leunen recommends omitting the information entirely. for small publishers, on the other hand, you &an help the reader by giving the complete address.\");\n assertEquals(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\", string0);\n }", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"how something strange has been published. the first word should be capitalized.end\");\n assertEquals(\"how someth strang ha been publ. th first word should be capital.ens\", string0);\n }", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a word\");\n\t\tString a=scan.nextLine();\n\n\t\tint sayac=0;\n\t\tint sayac1=0;\n\t\tint sayac2=0;\n\t\tint sayac3=0;\n\t\tint sayac4=0;\n\t\tint sayac5=0;\n\t\tint sayac6=0;\n\t\tint sayac7=0;\n\t\tint sayac8=0;\n\t\tint sayac9=0;\n\t\n\t\n\tint b=a.toLowerCase().length();\n\t\nchar[] alphabet= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','u','p','r','s','t','u','z','w','x','v'};\n\t\n\t\n\t\t\n\tfor(int i=0; i<=b-1; i++) {\n\t\tfor(int j=0; j<alphabet.length; j++) {\n\t\tif(a.charAt(i)==alphabet[j] ) {\n\t\t\tSystem.out.println(\"a harfi \"+(i+1)+\". siradadir\");\n\t\t\tsayac++;\n\t\t\tSystem.out.println(sayac+\"tane a.charAt(i) harfi vardir\");\n\t\t}\n\t\t\n\t\t\n\t\n\t\t}}\n\n\n\t}", "public String getCorrectionWord(String misspell);", "public String propergram(String word){\n // word.toLowerCase();\n String[] tempstr =word.split(\"_\");\n String tempstr2;\n\n for(int i=0;i<tempstr.length;i++){\n if((tempstr[i].charAt(0))>='A'&&(tempstr[i].charAt(0))<='Z') {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0)));\n }\n else {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0))).toUpperCase();\n }\n tempstr[i] = tempstr2.concat(tempstr[i].substring(1));\n if (i != 0) {\n word=word.concat(\" \").concat(tempstr[i]);\n } else {\n word = tempstr[i];\n }\n\n }\n return word;\n\n\n }", "@Override\n protected List<Term> segSentence(char[] sentence)\n {\n WordNet wordNetAll = new WordNet(sentence);\n ////////////////生成词网////////////////////\n generateWordNet(wordNetAll);\n ///////////////生成词图////////////////////\n// System.out.println(\"构图:\" + (System.currentTimeMillis() - start));\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"粗分词网:\\n%s\\n\", wordNetAll);\n }\n// start = System.currentTimeMillis();\n List<Vertex> vertexList = viterbi(wordNetAll);\n// System.out.println(\"最短路:\" + (System.currentTimeMillis() - start));\n\n if (config.useCustomDictionary)\n {\n if (config.indexMode > 0)\n combineByCustomDictionary(vertexList, this.dat, wordNetAll);\n else combineByCustomDictionary(vertexList, this.dat);\n }\n\n if (HanLP.Config.DEBUG)\n {\n System.out.println(\"粗分结果\" + convert(vertexList, false));\n }\n\n // 数字识别\n if (config.numberQuantifierRecognize)\n {\n mergeNumberQuantifier(vertexList, wordNetAll, config);\n }\n\n // 实体命名识别\n if (config.ner)\n {\n WordNet wordNetOptimum = new WordNet(sentence, vertexList);\n int preSize = wordNetOptimum.size();\n if (config.nameRecognize)\n {\n PersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.translatedNameRecognize)\n {\n TranslatedPersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.japaneseNameRecognize)\n {\n JapanesePersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.placeRecognize)\n {\n PlaceRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.organizationRecognize)\n {\n // 层叠隐马模型——生成输出作为下一级隐马输入\n wordNetOptimum.clean();\n vertexList = viterbi(wordNetOptimum);\n wordNetOptimum.clear();\n wordNetOptimum.addAll(vertexList);\n preSize = wordNetOptimum.size();\n OrganizationRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (wordNetOptimum.size() != preSize)\n {\n vertexList = viterbi(wordNetOptimum);\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"细分词网:\\n%s\\n\", wordNetOptimum);\n }\n }\n }\n\n // 如果是索引模式则全切分\n if (config.indexMode > 0)\n {\n return decorateResultForIndexMode(vertexList, wordNetAll);\n }\n\n // 是否标注词性\n if (config.speechTagging)\n {\n speechTagging(vertexList);\n }\n\n return convert(vertexList, config.offset);\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"any addit inform that can help th reader. th first word should be capital.\");\n assertEquals(\"any addit inform that can help th reader. th first word should be capit.\", string0);\n }", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "@Test(timeout = 4000)\n public void test56() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Used for alphabetizing, cross referencing, and creating a label when the ``author'' information is missing. This field should not be confused with the key that appears in the cite command and at the beginning of the database entry.\");\n assertEquals(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\", string0);\n }", "@Test(timeout = 4000)\n public void test61() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Usually the address of the publisher or other type of institution. For major publishing houses, van Leunen recommends omitting the information entirely. For small publishers, on the other hand, you can help the reader by giving the complete address.\");\n assertEquals(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you can help th reader by giv th comples addres.\", string0);\n }", "public String generateSentence(Hashtable<String, Vector<String>> aHashTable) {\n\t\t\n\t\t// Vector to hold the phrase\n\t\tVector<String> newPhrase = new Vector<String>();\n\t\t\n\t\t// String for the next word\n\t\tString nextWord = \"\";\n\t\t\t\t\n\t\t// Select the first word\n\t\tVector<String> startWords = aHashTable.get(\"_start\");\n\t\tint startWordsLen = startWords.size();\n\t\tnextWord = startWords.get(rnd.nextInt(startWordsLen));\n\t\tnewPhrase.add(nextWord);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// Keep looping through the words until we've reached the end\n\t\t\twhile (nextWord.charAt(nextWord.length()-1) != '^') \n\t\t\t{\n\t\t\t\tVector<String> wordSelection = aHashTable.get(nextWord);\n\t\t\t\tint wordSelectionLen = wordSelection.size();\n\t\t\t\tnextWord = wordSelection.get(rnd.nextInt(wordSelectionLen)).trim();\n\t\t\t\tnewPhrase.add(nextWord);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tString _tryAgain = generateSentence(aHashTable); \n\t\t\tnewPhrase.add(_tryAgain);\n\t\t}\n\t\t\n\t\tString _returnString = newPhrase.toString();\n\t\t_returnString = _returnString.substring(1, _returnString.length() -2); // remove [ and ^]\n\t\t\n\t\tString _finalString = \"\";\n String[] _splitBySpace = _returnString.split(\"[,\\\\,\\\\(\\\\)]\");\n\t\tfor(int i = 0 ; i < _splitBySpace.length ; i++)\n\t\t{\n\t\t\tif(_splitBySpace[i].trim() != \"\")\n\t\t\t\t_finalString += _splitBySpace[i].replace(\"\\\"\", \"\").trim() + \" \";\n\t\t}\n\t\t\n\t\treturn _finalString.trim();//_returnString.substring(1, _returnString.length() -2); // remove [ and ^]\t\n\t}", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The year of publication or, for an unpublished work, the year it was written. Generally2it should consist of four numerals, such as 1984, although the standard styles can handle any year whose last four n\\npunctuation characters are numerals, such as `hbox{(about 1984)}'.\");\n assertEquals(\"th year of public or, for an unpubl work, th year it wa writ. generally2it should cons of four numer, such as 1984, although th standard styl can handl any year whos last four n\\npunctu character ar numer, such as `hbox{(about 1984)}'.\", string0);\n }", "public static String Rule3(String para_word) {\n\t\tint last = para_word.length();\r\n\r\n\t\tswitch (para_word.charAt(last - 2)) {\r\n\t\tcase 'a':\r\n\t\t\tif (endsWith(\"ational\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"ational\", \"ate\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"tional\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"tional\", \"tion\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\tcase 'c':\r\n\r\n\t\t\tif (endsWith(\"enci\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"enci\", \"ence\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"anci\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"anci\", \"ance\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tcase 'e':\r\n\t\t\tif (endsWith(\"izer\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"izer\", \"ize\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\tcase 'l':\r\n\t\t\tif (endsWith(\"bli\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"bli\", \"ble\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"alli\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"alli\", \"al\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"entli\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"entli\", \"ent\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"eli\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"eli\", \"e\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"ousli\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"ousli\", \"ous\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\tcase 'o':\r\n\t\t\tif (endsWith(\"ization\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"ization\", \"ize\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"ation\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"ation\", \"ate\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"ator\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"ator\", \"ate\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tcase 's':\r\n\t\t\tif (endsWith(\"alism\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"alism\", \"al\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"iveness\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"iveness\", \"ive\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"fulness\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"fulness\", \"ful\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"ousness\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"ousness\", \"ous\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tcase 't':\r\n\t\t\tif (endsWith(\"aliti\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"aliti\", \"al\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"iviti\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"iviti\", \"ive\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (endsWith(\"biliti\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"biliti\", \"ble\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tcase 'g':\r\n\t\t\tif (endsWith(\"logi\", para_word)) {\r\n\t\t\t\tpara_word = transformS(\"logi\", \"log\", para_word);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn para_word;\r\n\t}", "java.lang.String getNewSentence();", "public String dispaly(String result, String which) {\n String fword=\"\";\n String dump=result;\n Log.i(\"result \"+which,result);\n if(result!=null){\n result=result.replaceAll(\"lang=en\",\"\");\n String ts;\n if(result.contains(\"[[\")||result.contains(\"{{\"))\n {\tdump=dump.replaceAll(\"[^a-zA-Z0-9.\\\\[\\\\]|,;}\\\\s+]\", \"\").trim();\n if(dump.startsWith(\"[[\"))\n {\n int i=result.indexOf(\"[[\");\n int j=result.indexOf(\"]]\");\n fword=result.substring(i,j);\n int k=fword.indexOf('|');\n fword=fword.substring(k+1);\n //System.out.println(\"First Word \"+fword);\n //System.out.println(\"FIND \"+result);\n result=result.substring(j+2);\n //\tSystem.out.println(\"FIND \"+result);\n result=fword.concat(result);\n result=result.replace('|',' ');\n\n }\n else\n {\n System.out.println(\"Esle called \"+result);\n dump=dump.replaceAll(\"[^a-zA-Z0-9.\\\\[\\\\]|,;}\\\\s+]\", \"\").trim();\n String arr[]=dump.split(\" \");\n for(int aa=0;aa<arr.length;aa++)\n {\n\n if(arr[aa].contains(\"[[\")&&arr[aa].contains(\"|\"))\n {\n //System.out.println(arr[aa]);\n String min=arr[aa];\n //System.out.println(\"MINNN \"+min);\n int x=min.indexOf(\"[[\");\n int y=min.indexOf(\"|\");\n min=min.substring(y+1);\n //System.out.println(min);\n result=result.replace(arr[aa], min);\n }\n }\n result=result.replace('|',' ');\n }\n }\n //if(result.matches(\"[[[a-zA-Z|]\"))\n send+=\"<h3>\"+which+\"</h3>\"+\"\\n\";\n // System.out.println(\"Meaning for \"+which);\n if(result.contains(\"}}\"))\n {\n int resultindex=result.indexOf(\"}}\");\n //\t System.out.println(resultindex);\n result=result.substring(resultindex);\n }\n\n result = result.replaceAll(\"[^a-zA-Z0-9.,;\\\\s+]\", \"\");\n result=result.replaceAll(\";\",\".\\n\");\n\n // result.endsWith(\".\");\n // System.out.println(result);\n int newline=0;\n for(int i=0;i<result.length();i++)\n {\n if(result.charAt(i)=='\\n')\n {\n newline++;\n }\n }\n\n // System.out.println(\"New Line \"+newline);\n for(int i=0;i<newline;i++)\n {\n int nn=result.indexOf(\"\\n\");\n // System.out.println(\"First line \"+nn);\n String res=result.substring(0,nn);\n result=result.substring(nn+1);\n // System.out.println(res);\n send+=res+\"\\n\";\n }\n int nn=result.indexOf(\"\\n\");\n\n\n result=result.substring(nn+1);\n send+=result+\"\\n\";\n // System.out.println(result);\n /* fword=fword.trim();\n if(!fword.isEmpty())\n {\n\n fword=fword.concat(\" \");\n // send=fword+send;\n send=fword.concat(send);\n\n // System.out.println(\"Called\");\n return send;\n }*/\n\n\n\n }\n /*else {\n result1.setText(\"Wrorng\");\n send+=\"Enter Correct word\";\n // System.out.println(\"Enter correct word\");\n return \"Wrong\";\n }*/\n\n return send;\n }", "@Test(timeout = 4000)\n public void test64() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Used for alphabetizing, cross referencing, and creating a label when the ``author'' information is missing. This field should not be confused with the key that appears in the cite command and at the beginning of the database entry.\");\n assertEquals(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\", string0);\n }", "public static String generateAristocratHint(String plaintext) {\n String[] words = plaintext.split(\" \");\n int freqhigh = 1;\n String mostfreq = null;\n for(String w : words) {\n int wf = freq(words,w);\n if (wf > freqhigh) {\n freqhigh = wf;\n mostfreq = w;\n }\n }\n int hintid = 0;\n if (mostfreq != null) {\n int choice = (int)(Math.random()*3);\n hintid = choice;\n } else {\n int choice = (int)(Math.random()*2);\n hintid = choice*2;\n }\n String hint = \"\";\n if (hintid == 0) {\n int variant = (int)(Math.random()*4);\n if (variant == 0) {\n hint = \"The first word is \" + words[0];\n } else if (variant == 1) {\n hint = \"The second word is \" + words[1];\n } else if (variant == 2) {\n hint = \"The third word is \" + words[2];\n } else if (variant == 3) {\n hint = \"The last word is \" + words[words.length-1];\n }\n } else if (hintid == 1) {\n hint = \"The word \" + mostfreq + \" appears \" + getNumWord(freqhigh);\n } else if (hintid == 2) {\n hint = \"The two most common letters are \" + mostCommonTwo(plaintext)[0] + \" and \" + mostCommonTwo(plaintext)[1];\n }\n return hint;\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"probToLogOdds: probability must be in [0,1] \");\n assertEquals(\"probtologod: prob must be in [0,1] \", string0);\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public static String addPuctuation(String input) {\n // Sentence Openers \n input = input.replace(\"hello\", \"hello,\");\n input = input.replace(\"hi\", \"hi!\");\n input = input.replace(\"heya\", \"heya!\");\n input = input.replace(\"hey\", \"hey,\");\n input = input.replace(\"greetings\", \"greetings,\");\n input = input.replace(\"good morning\", \"good morning,\");\n input = input.replace(\"good evening\", \"good evening,\");\n input = input.replace(\"good afternoon\", \"good afternoon!\");\n \n\n // Words ending in nt \n input = input.replace(\"isnt\", \"isn't\");\n input = input.replace(\"cant\", \"can't\");\n input = input.replace(\"wont\" , \"won't\");\n input = input.replace(\"dont\" , \"don't\");\n input = input.replace(\"would\", \"wouldn't\");\n input = input.replace(\"hadnt\", \"hadn't\");\n input = input.replace(\"aint\", \"ain't\");\n input = input.replace(\"arent\", \"aren't\");\n input = input.replace(\"didnt\", \"didn't\");\n input = input.replace(\"doesnt\" , \"doesn't\");\n input = input.replace(\"dont\" , \"don't\");\n input = input.replace(\"dont\", \"don't\");\n input = input.replace(\"hasnt\", \"hasn't\");\n input = input.replace(\"shoudlnt\", \"shouldn't\");\n input = input.replace(\"couldnt\", \"couldn't\");\n input = input.replace(\"wasnt\", \"wasn't\");\n input = input.replace(\"werent\" , \"were't\");\n input = input.replace(\"wouldnt\" , \"wouldn't\");\n\n //Questions\n String q1 = \"what\";\n String q2 = \"when\";\n String q3 = \"where\";\n String q4 = \"which\";\n String q5 = \"who\";\n String q6 = \"whom\";\n String q7 = \"whose\";\n String q8 = \"why\";\n String q9 = \"how\";\n\n if (input.contains(q1) || input.contains(q2) || input.contains(q3) \n || input.contains(q4) || input.contains(q5) || input.contains(q6) \n || input.contains(q7) || input.contains(q8) || input.contains(q9)) \n {\n input = input + \"?\";\n }\n\n else\n {\n input = input + \".\";\n }\n\n\n //Other\n input = input.replace(\"however\", \"however,\");\n input = input.replace(\"ill\" , \"i'll\");\n input = input.replace(\"im\", \"i'm\");\n return input;\n }", "public static void main(String[] args) {\n\t\tBoolean[] b= new Boolean[26];\n\t\tArrays.fill(b, false);\n\t\tint index=0;\n\t\tString test =\"aabbcc\";\n\t\tfor(int i=0;i<test.length();i++)\n\t\t{\n\t\t\tindex=(int)test.charAt(i)-'a';\n\t\t\tb[index]=true;\n\t\t}\n\t\tfor(int i=0;i<b.length;i++)\n\t\t{\n\t\t\tif(b[i]==false)\n\t\t\t{\n\t\t\t//\tSystem.out.println(\"Not pangram\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t String str = \"Happy%^&*Christmas*&*&*)NewYear\"; \n \n\t // similar to Matcher.replaceAll \n\t str = str.replaceAll(\"\\\\p{Punct}\",\" \"); \n\t \n\t System.out.println(str); \n\n\t}", "static String stringCutter2(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n // pemotongan string untuk kelompok ke dua\n String sentence2 = s.substring(value, s.length());\n\n // perulangan untuk membalik setiap karakter pada kelompok kata ke dua\n String sentence2reverse = \"\";\n for (int i = sentence2.length() - 1; i >= 0; i--) {\n sentence2reverse += sentence2.toUpperCase().charAt(i);\n }\n return sentence2reverse;\n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"isminizi giriniz\");\n//\t\tString isim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.println(\"soyadinizi giriniz\");\n//\t\tString soyisim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.print(isim.substring(0, 1).toUpperCase()+isim.substring(1, isim.length()));\n//\t\tSystem.out.print(\" \" +soyisim.substring(0, 1).toUpperCase() +soyisim.substring(1, soyisim.length()));\n\n\t\t/// hocanin cozumu\n\t\t// int ikinciBasNok = isimSoyIsim.indexOf(\" \");\n// System.out.print(isimSoyIsim.substring(0,1).toUpperCase());\n// System.out.print(isimSoyIsim.substring(1, ikinciBasNok+1).toLowerCase());\n// System.out.print(isimSoyIsim.substring(ikinciBasNok+1, ikinciBasNok+2).toUpperCase());\n// System.out.println(isimSoyIsim.substring(ikinciBasNok+2).toLowerCase());\n\n\t\t/// Array ile cozum\n\t\tString isimSoyIsim = scan.nextLine();\n\t\t\n// 0/fedai 1/ocak //isimler.length => 2 - 1 1 != 1\n\t\tString[] isimler = isimSoyIsim.split(\" \");\n\n\t\tfor (int i = 0; i < isimler.length; i++) {\n\t\t\tisimler[i] = isimler[i].toLowerCase();\n\t\t\t\tif(isimler.length-1 != i ) //\n\t\t\tSystem.out.print(isimler[i].substring(0, 1).toUpperCase() + isimler[i].substring(1) + \" \");\n\t\t\t\telse\n\t\t System.out.print(isimler[i].substring(0,1).toUpperCase()+isimler[i].substring(1));\n\t\t}\nscan.close();\n\t}", "public static void main (String args []) {\n\r\n String str = \"\\\"क\\\", \\\"का\\\", \\\"कि\\\", \\\"की\\\", \\\"कु\\\", \\\"कू\\\", \\\"के\\\", \\\"कै\\\", \\\"को\\\", \\\"कौ\\\", \\\"कं\\\", \\\"क:\\\"\" ;\r\n String strEng = \"\\\"ka\\\", \\\"kā\\\", \\\"ki\\\", \\\"kī\\\", \\\"ku\\\", \\\"kū\\\", \\\"kē\\\", \\\"kai\\\", \\\"ko\\\", \\\"kau\\\", \\\"kṁ\\\", \\\"ka:\\\"\" ;\r\n\r\n String additionalConsonants = \"\\\"क़\\\", \\\"क़ा\\\", \\\"क़ि\\\", \\\"क़ी\\\", \\\"क़ु\\\", \\\"क़ू\\\", \\\"क़े\\\", \\\"क़ै\\\", \\\"क़ो\\\", \\\"क़ौ\\\", \\\"क़ं\\\", \\\"क़:\\\"\"; \r\n String additionalConsonantsEng = \"\\\"qa\\\", \\\"qā\\\", \\\"qi\\\", \\\"qī\\\", \\\"qu\\\", \\\"qū\\\", \\\"qē\\\", \\\"qai\\\", \\\"qo\\\", \\\"qau\\\", \\\"qṁ\\\", \\\"qa:\\\"\" ;\r\n\r\n //String str = \"क, का, कि, की, कु, कू, के, कै, को, कौ, कं, क:\" ;\r\n \r\n \r\n \r\n //generateNP(str);\r\n //generateEN(strEng);\r\n //System.out.println();\r\n generateNPAdditionalConsonants(additionalConsonants);\r\n generateENAdditionalConsonants(additionalConsonantsEng);\r\n\r\n\r\n\r\n }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.\");\n assertEquals(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th book or collect in which th refer appear.\", string0);\n }", "@Override\n\tpublic void talk(String s) {\n\t\tString[] stuff=s.split(\" \");\n\t\tString talkString=\"\";\n\t\tfor (String string : stuff) {\n\t\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\t\tif(i<string.length()/2) {\n\t\t\t\t\ttalkString+=\"o\";\n\t\t\t\t}else {\n\t\t\t\ttalkString+=\"i\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttalkString+=\"nk \";\n\t\t}\n\t\tSystem.out.println(talkString);\n\t}", "public static void main(String[] args) {\n\t\tString sentence = \"He said hi, then she replied hi. hi guys!\";\n\t\t//print letter in pairs\n\t\tSystem.out.println(sentence.substring(7,10));//hi\n System.out.println(sentence.substring(28,31));//hi\n System.out.println(sentence.substring(32,36));//hi\n \n System.out.println(sentence.substring(0,3));//he\n System.out.println(sentence.substring(1,2));//e\n System.out.println(sentence.substring(3,4));//s\n System.out.println(sentence.substring(4,6));//ai\n //two characters at the time\n //check if temp equals \"hi\", if true,add 1 to count\n int count=0;\n for(int i=0;i<sentence.length()-1;i++) {\n \tString temp=sentence.substring(i,i+2);//2 letters\n \t//System.out.println(temp);\n \tif(temp.equals(\"hi\")) {//count how many \"hi\"\n \t\tcount++;\n \t\t\n \t}\n \t\n }\n //count:3\n System.out.println(\"Count: \"+count);//Count: 3\n\t}", "public static void main(String[] args) {\r\n //Letter J composed of \"J\",\"A\",\"V\",\"A\"\r\n System.out.println(\"JAVAJAVAJAVA\");\r\n System.out.println(\"JAVAJAVAJAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\" JAVA\");\r\n System.out.println(\"J JAVA\");\r\n System.out.println(\"JA JAVA\");\r\n System.out.println(\" JAVAJAVA\");\r\n System.out.println(\" JAVAJA\");\r\n }", "public static void main(String[] args) {\n String X_awal = \"my name is marouane, and i'm sick, thank you very much\";\n String Y = \"my name is adeleye, but you are very sick, thank you \";\n String X = match(X_awal, Y);\n int[] Penanda_Y = new int[Y.length()];\n int y_length = Y.length();\n for (int k = 0; k < y_length; k++) {\n Penanda_Y[k] = 0;\n }\n int m = X.length();\n int n = Y.length();\n String L = \"\";\n String LSym = \"\";\n int R = 0;\n int i = 1;\n int[] P = new int[100];\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n i = 1;\n while (i <= m) {\n if (i != m) {\n P[i + 1] = posisi(X, Y, (i + 1), Penanda_Y, R);\n }\n if (P[i + 1] == 0) {\n if (P[i] > R) {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n }\n break;\n }\n\n if (P[i + 1] < R || P[i] < R) {\n R = 0;\n }\n if (P[i] > P[i + 1]) {\n if (R == 0 && i > 1) {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n Penanda_Y[P[i] - 1] = 1;\n R = P[i];\n i = i + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n } else {\n L = L + \" \" + Integer.toString(P[i + 1]);\n LSym = LSym + \" \" + X.charAt(i + 1 - 1);\n Penanda_Y[P[i + 1] - 1] = 1;\n R = P[i + 1];\n i = (i + 1) + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n }\n\n } else {\n\n if (R == 0 && i > 1) {\n L = L + \" \" + Integer.toString(P[i + 1]);\n LSym = LSym + \" \" + X.charAt(i + 1 - 1);\n Penanda_Y[P[i + 1] - 1] = 1;\n R = P[i + 1];\n i = (i + 1) + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n } else {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n Penanda_Y[P[i] - 1] = 1;\n R = P[i];\n i = i + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n }\n }\n }\n System.out.println(\"X = \" + X_awal);\n System.out.println(\"X = \" + Y);\n System.out.println(\"L = \" + L);\n System.out.println(\"LSym = \" + LSym);\n System.out.println(\"Length = \" + LSym.length() / 2);\n}", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Mxn index (ints)d \");\n assertEquals(\"mxn indic (int)d \", string0);\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tString S=\"Good Morning to all\";\n\t\tString[] split=S.split(\" \");\n\t\tString Output=\"\";\n\t\t//String Reverse_word=\" \";\n\t\t\n\t\tfor(int i=0;i<split.length;i++)\n\t\t{\n\t\t\tString word=split[i];\n\t\t\tString Reverse_word=\"\";\n\t\t\tfor(int j=word.length()-1;j>=0;j--)\n\t\t\t{\n\t\t\t\tReverse_word=Reverse_word+word.charAt(j);\n\t\t\t\t\n\t\t\t}\n\t\t\tOutput=Output+Reverse_word+\" \";\n\t\t}\n\t\tSystem.out.println(Output);\n\n\t}", "void solution() {\n\t\t/* Write a RegEx matching repeated words here. */\n\t\tString regex = \"(?i)\\\\b([a-z]+)\\\\b(?:\\\\s+\\\\1\\\\b)+\";\n\t\t/* Insert the correct Pattern flag here. */\n\t\tPattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);\n\n\t\tString[] in = { \"I love Love to To tO code\", \"Goodbye bye bye world world world\",\n\t\t\t\t\"Sam went went to to to his business\", \"Reya is is the the best player in eye eye game\", \"in inthe\",\n\t\t\t\t\"Hello hello Ab aB\" };\n\t\tfor (String input : in) {\n\t\t\tMatcher m = p.matcher(input);\n\n\t\t\t// Check for subsequences of input that match the compiled pattern\n\t\t\twhile (m.find()) {\n\t\t\t\t// /* The regex to replace */, /* The replacement. */\n\t\t\t\tinput = input.replaceAll(m.group(), m.group(1));\n\t\t\t}\n\n\t\t\t// Prints the modified sentence.\n\t\t\tSystem.out.println(input);\n\t\t}\n\n\t}", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the bok or cllection in which the reference appears.\");\n assertEquals(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "public static String turnIntoCV(String para_word) {\n\t\tString temp = \"\";\r\n\t\tfor (int i = 0; i < para_word.length() - 1; i++) {\r\n\r\n\t\t\t// beginning special cases\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tif (para_word.charAt(i) == 'y'\r\n\t\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i + 1)))\r\n\t\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t}\r\n\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tif (para_word.charAt(i) == 'y'\r\n\t\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i + 1))\r\n\t\t\t\t\t\t&& !(checkIfVowel(para_word.charAt(i + -1)))) {\r\n\t\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// normal cases\r\n\t\t\tif ((checkIfVowel(para_word.charAt(i)))\r\n\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i + 1))) {\r\n\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t} else if (!checkIfVowel(para_word.charAt(i))\r\n\t\t\t\t\t&& (para_word.charAt(i + 1) == 'y' || checkIfVowel(para_word\r\n\t\t\t\t\t\t\t.charAt(i + 1)))) {\r\n\t\t\t\ttemp = temp + \"C\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// ending special cases\r\n\t\t\tif (para_word.length() >= 3) {\r\n\t\t\t\tif (i == para_word.length() - 2) {\r\n\t\t\t\t\tif (para_word.charAt(i + 1) == 'y'\r\n\t\t\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i - 1)))\r\n\t\t\t\t\t\ttemp = temp + \"V\";\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif (para_word.length() >= 2) {\r\n\t\t\t\tif (i == para_word.length() - 2) {\r\n\t\t\t\t\tif (checkIfVowel(para_word.charAt(i + 1)))\r\n\t\t\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttemp = temp + \"C\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn temp;\r\n\t}", "public static void main(String[] args) {\n String name = \"I love Java I Love Java Java Java\";\n System.out.println(\"starting from 0 \" +name.indexOf(\"Java\"));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 7));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 8));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 9));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 19));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 20));\n // ilk java gosterecek yani location of// simdi ise ikinci javayi ariyor +1 ile! (ava I Love )\n //or you can start here + 4 nereden biliyorum +4 cunku\n //java 4 character!!!!!!!!!!! yada ilk aradigin kelimeyi\n // bitiri bitirmez +1 koyarsin eger bilmiyorsam +word.lenght();\n\n int firstJavaLocation = name.indexOf(\"Java\");\n int startingPointToSearchSecondJava = firstJavaLocation+1;\n int secondJavaLocation = name.indexOf(\"Java\",startingPointToSearchSecondJava);\n System.out.println(\"secondJavaLocation = \" + secondJavaLocation);\n //eger cumlede nekadar kelime oldugunu bilmiyorsam I only know there are 3+ words\n // ve sadece ikinci kelimeyi biliyorsam;\n //the word in between first space and second space is second word\n int firstSpaceLocation = name.indexOf(\" \");\n int secondSpace = name.indexOf(\" \", firstJavaLocation + 1);\n System.out.println(\"second word in this sentence is \"\n +name.substring(firstJavaLocation + 1, secondSpace));\n\n\n\n\n }", "public static void main(String[] args) {\n\t\t/*\n\t\t * T\n\t\t * e\n\t\t * c\n\t\t * h\n\t\t * ...\n\t\t */\n\t\t\n\t\t//0123456789\n\t\t//Techtorial\n\t\t\n\t\tString word=\"Techtorial\";\n\t\t\n\t for(int index=0, lenght=word.length() ; index<lenght ; index++ ) {\n\t \tSystem.out.println(word.charAt(index));\n\t }\n \n//\t\t\n//\t for(int index=0, lenght=word.length()-1 ; lenght>=index ; lenght-- ) {\n//\t \tSystem.out.println(word.charAt(lenght));\n// \t}\n\t for(int index=word.length()-1 ; index>=0 ; index--) {\n\t \tSystem.out.println(word.charAt(index));\n\t }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner info = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the phrase:\");\r\n\t\tString sentence = info.nextLine();\r\n\t\t\r\n\t\tsentence = sentence.trim().toUpperCase();\r\n\t\t\r\n\t\tfor (int i = 0; i < sentence.length(); i++) {\r\n\t\t\tif (sentence.charAt(i) <'A' || sentence.charAt(i) > 'Z' ) {\r\n\t\t\t\tsentence = sentence.replace(\"\"+sentence.charAt(i), \"/\");\r\n//\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString[] word = sentence.split(\"/\") ;\r\n\t\t\r\n\t\tint total = 0;\r\n\t\tif (word.length < 1) {\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\tHashMap hMap = new HashMap();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (word[0].length() > 0) {\r\n\t\t\t\thMap.put(word[0].length(), 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (int i = 1; i < word.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\tif (word[i].length() == word[j].length()) {\r\n\t\t\t\t\t\tint cnt = (int) hMap.get(word[i].length());\r\n\t//\t\t\t\t\tSystem.out.println(\"cnt==>\"+cnt);\r\n\t\t\t\t\t\thMap.put(word[i].length(),++cnt);\r\n\t\t\t\t\t\t\t\r\n\t//\t\t\t\t\tSystem.out.println(word[i].length()+\"==>\"+hMap.get(word[i].length()));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (j == (i-1)){\r\n\t\t\t\t\t\t\thMap.put(word[i].length(), 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSet<Integer> keys1 = hMap.keySet();\r\n\t\r\n\t\t\tfor(int key:keys1) {\r\n\t\t\t\tif (key !=0) {\r\n\t\t\t\t\tSystem.out.println(hMap.get(key)+\" \"+key +\" letter words\");\r\n\t\t\t\t\ttotal += (int)hMap.get(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(total+\" total words\");\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\tint[] num = {25,28,23,12,53,67};\n\t\t\n\t\tboolean result = true ;\n\t\t\n\t\tfor (int i = 0; i < num.length; i++) {\n\t\t\tif(num[i]<=10) {\n\t\t\t\tresult = false ;\n\t\t\t\tbreak ;\n//\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t\t\n\n\n\t/*//Task 2 :\n\tgiven : \n\tString str = \"Cybertek Batch Spartan is most hardworking Batch ever\";\n\n\tuse the method your learned to get each words\n\tand store it into String array: \n\n\tloop through each items -- \n\t in each iteratrion loop : \n\t \t turn each word into char array \n\t \t print each char out with seperated by -\n\toutput : \n\t\tC-y-b-e-r-t-e-k-\n\t\tB-a-t-c-h-\n\t\tS-p-a-r-t-a-n-\n\t\ti-s-\n\t\tm-o-s-t-\n\t\th-a-r-d-w-o-r-k-i-n-g-\n\t\th-c-t-a-B-\n\t\te-v-e-r-\n*/\n\n\t\tString str = \"Cybertek Batch Spartan is most hardworking Batch ever\";\n\n\t\tString[] words = str.split(\" \");\n//\t\tSystem.out.println(Arrays.toString(words));\n\n//\t\t\n//\t\tfor (int i = 0; i < words.length; i++) {\n////\t\t\tSystem.out.println(words[i]);\n//\t\t\n//\t\tString one = words[i] ;\n//\t\tchar[] cyberChars =one.toCharArray() ;\n//\t\t\n//\t\tfor (int j = 0; j < cyberChars.length; j++) {\n//\t\t\tSystem.out.print(cyberChars[j] + \"-\");\n//\t\t}\n//\t\tSystem.out.println();\n//\t\t}\n\n\n\n\n\t/*// Optional : Reverse each word in sentence\n\tyour output should be \n\tketrebyC hctaB natrapS si tsom gnikrowdrah eno reve \n\t\t*/\n\t\t\n//\t\tString str = \"Cybertek Batch Spartan is most hardworking Batch ever\";\n\t\tString[] word = str.split(\" \");\n\t\t\n\t\tfor (int k = 0; k < word.length; k++) {\n\t\t\t\n\t\t\n\t\tString ones = \"Cybertek\" ;\n\t\tchar[] wordChars = ones.toCharArray() ;\n\t\tint lastIndex = wordChars.length-1 ;\n\t\tfor (int h = 0; h < wordChars.length/2; h++) {\n\t\t\n\t\tchar temp = wordChars[h];\n\t\twordChars[h] = wordChars[lastIndex-h] ;\n\t\twordChars[lastIndex-h] = temp ;\n\t\t\t\n\t\t}\n\t\t\n//\t\tSystem.out.println(Arrays.toString(wordChars));\n\t\t\n\t\tString reversed = new String(wordChars) ;\n//\t\tSystem.out.println(reversed);\n\t\t}\n\t\n}", "public static String vibrateTranslate(String st) {\n String s = st.toLowerCase(); //upper and lower case represented by same character in Morse code\n\n // StringBuilder class makes it easier to append to String objects\n StringBuilder sb = new StringBuilder();\n // goes through user inputted String to translate to Morse code\n for (char ch : s.toCharArray()) {\n if (ch >= 'a' && ch <= 'z') { // between a and z\n int i = ch - 'a'; // specific index of mAlphabet\n sb.append(mAlphabet[i]).append(\"!\"); // in vibration this symbolizes a space between a letter in morse code\n } else if (ch >= '0' && ch <= '9') { // between 0 and 9\n int j = ch - '0';\n sb.append(mNumbers[j]).append(\"!\"); // in vibration this symbolized a space between a number in morse code\n } else if (ch == ' ') {\n sb.append(\"~\");// in vibration, this symbolizes a space between a word in morse code\n }\n else{\n return\"x\";\n }\n\n }\n // appended char array is then returned as a String\n return sb.toString().trim();\n }", "@Test(timeout = 4000)\n public void test58() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The WWW Universal Resource Locator that points to the item being referenced. This often is used for technical reports to point to the ftp site where the postscript source of the report is located.\");\n assertEquals(\"th www univers resourc loc that point to th item being refer. th oft is us for techn report to point to th ftp sit whes th postscript sourc of th report is loc.\", string0);\n }", "public static void main(String[] args) {\n\t\tString str1=\"This is the thread that given\";\n\t\tSystem.out.println(\"original String :\\n\" +str1);\n\t\tString str2=\"th\";\n\t\twhile(str1.toLowerCase().contains(str2)) {\n\t\t\tint i1=str1.toLowerCase().indexOf(str2);\n\t\t\tString temp=\"\"+str1.charAt(i1+1)+str1.charAt(i1);\n\t\t\tstr1=str1.replaceAll((str1.substring(i1, i1+2)), temp);\n\t\t}\n\t\tSystem.out.println(\"String after replace HT with TH :\\n\"+str1);\n\t}", "public String acronym(String phrase) {\n /*StringBuilder acronymFeed = new StringBuilder(\"\");\n String wordHolder = \"\";\n int spaceIndex;\n char firstLetter;\n do{\n spaceIndex = phrase.indexOf(\" \");\n wordHolder = phrase.substring(0,spaceIndex);\n acronymFeed.append(wordHolder.charAt(0));\n phrase = phrase.replaceFirst(wordHolder, \"\");\n } while (spaceIndex != -1 && wordHolder != \"\" && phrase != \"\");\n \n \n \n \n \n String acronymResult = acronymFeed.toString().toUpperCase();\n return acronymResult;\n */\n \n char[] letters = phrase.toCharArray();\n String firstLetters = \"\";\n firstLetters += String.valueOf(letters[0]);\n for (int i = 1; i < phrase.length();i++){\n if (letters[i-1] == ' '){\n firstLetters += String.valueOf(letters[i]);\n }\n }\n firstLetters = firstLetters.toUpperCase();\n return firstLetters;\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The edition of a book---for example, ``Second''. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.\");\n assertEquals(\"th edit of a book---for exampl, ``second''. th should be an ordin, and should hav th first letter capital, as shown hes; th standard styl convers to lower cas when neces.\", string0);\n }", "void translate(Sentence sentence);", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public static void main(String[] args) {\n String frase;\n String frase2 = \"\";//debe ser inicializada\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Ingrese una frase\");\n frase = sc.nextLine();\n\n int i = 0;\n\n while (i < frase.length()) {//ou con for et if y else, los i++ estarian solo en el for\n if (frase.charAt(i) != ' ') {\n frase2 = frase2.concat(frase.substring(i, i + 1));\n } else {//el else solo pedia tranformar los espacios en alterisco que se hace solo con\n frase2 = frase2.concat(\"*\");//esto//y esto\n while (frase.charAt(i) == ' ') {\n i++;\n }\n frase2 = frase2.concat(frase.substring(i, i + 1));\n }\n i++;\n }//faltaria una primera condicion como en los 2 ejercicios precedentes pa que no imprima asteriscos antes de la 1era letra\n System.out.println(frase2);\n }", "public static void main(String[] args) {\n\t\tString word = \"Amazon\";\n\t\t//print each character one by one in separate lines\n\t\tint idx = 0;\n\t\t\n\t\twhile (idx < word.length()) {\n\t\t\tSystem.out.println(word.charAt(idx++));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(); //empty line\n\t\t\n\t\t// print the word back to front Amazon --> nozamA\n\t\tint idx2 = word.length()-1; //5\n\t\t\n\t\twhile (idx2 >= 0) {\n\t\t\tSystem.out.println(word.charAt(idx2--));\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/*int idx = 0;\n\t\tSystem.out.println(word.charAt(idx));\n\t\tidx++;\n\t\tSystem.out.println(word.charAt(idx));\n\t\t\n\t\tidx++;\n\t\tSystem.out.println(word.charAt(idx));\n\t\t\n\t\tidx++;\n\t\tSystem.out.println(word.charAt(idx));\n\t\t\n\t\tidx++;\n\t\tSystem.out.println(word.charAt(idx));\n\t\t\n\t\tidx++;\n\t\tSystem.out.println(word.charAt(idx));\n\t\t*/\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public static void main(String[] args) {\n\t\tint a=0,b=0,cnt=0;\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\ta=in.nextInt();\r\n\t\tString str=\"\";\r\n\t\tin.close();\r\n\t\tif(a<0){\r\n\t\t\tstr=\"fu \";\r\n\t\t\ta=-a;\r\n\t\t}\r\n\t\twhile(a!=0){\r\n\t\t\tb=b*10+a%10;\r\n\t\t\tif(b==0){\r\n\t\t\t\tcnt++;\r\n\t\t\t}\r\n\t\t\ta=a/10;\r\n\t\t}\r\n\t\tdo{\r\n\t\t\tswitch(b%10)\r\n\t\t\t{\r\n\t\t\t\tcase 0:str+=\"ling\";break;\t\t\r\n\t\t\t\tcase 1:str+=\"yi\";break;\r\n\t\t\t\tcase 2:str+=\"er\";break;\r\n\t\t\t\tcase 3:str+=\"san\";break;\r\n\t\t\t\tcase 4:str+=\"si\";break;\r\n\t\t\t\tcase 5:str+=\"wu\";break;\r\n\t\t\t\tcase 6:str+=\"liu\";break;\r\n\t\t\t\tcase 7:str+=\"qi\";break;\r\n\t\t\t\tcase 8:str+=\"ba\";break;\r\n\t\t\t\tcase 9:str+=\"jiu\";break;\r\n\t\t\t}\r\n\t\t\tb/=10;\r\n\t\t\tif(b!=0){\r\n\t\t\t\tstr+=\" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}while(b!=0);\t\r\n\t\tfor(int i=1;i<=cnt;i++)\r\n\t\t{\r\n\t\t\tstr=str+\" ling\";\r\n\t\t}\t\r\n\t\tSystem.out.print(str);\r\n\r\n\t}", "public String makeUpMetaphysics() {\n\t\treturn \"Yes I know what I'm talking about and I understand existence more than everyone else. As \"\n\t\t\t\t+ \"you can see I wrote all these books: \" + books + \". I am truly the wokest being alive.\";\n\t}", "private String encodageMot(String message) {\n if (message == null || message.equals(\"\")) {\n throw new AssertionError(\"Texte non saisie\");\n } \n return transformWords(message, 1); \n }", "private void print3(String word, int height) {\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tta.append(spece);\n\t\t\t}\n\t\t\tfor (int j = height - i; j > 0; j--) {\n\t\t\t\tta.append(word);\n\t\t\t}\n\t\t\tta.append(\"\\r\\n\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"认真背单词\");\r\n\t\tSystem.out.println(\"好好敲代码\");\r\n\t\tSystem.out.println(\"努力找到好工作\");\r\n\r\n\t}", "public void process() {\n int secondSpace = songLine.indexOf(' ', (songLine.indexOf(' ') + 1));\n \n if(secondSpace != -1) {\n String firstTwoWords = songLine.substring(0, secondSpace);\n String rest = songLine.substring(secondSpace);\n System.out.printf(\"First two words: %s%n\",firstTwoWords);\n System.out.printf(\"Rest of the words: %s%n\",rest.substring(1));\n }\n \n int thirdSpace = songLine.indexOf(' ', (songLine.indexOf(' ') + 2));\n char firstLetterThirdWord = songLine.charAt(thirdSpace + 1);\n \n int firstOccurance = songLine.indexOf('b');\n \n System.out.printf(\"Length is: %d%n\", songLine.length());\n \n System.out.printf(\"Last character is: %c%n\", songLine.charAt(songLine.length() - 1) );\n \n System.out.printf(\"First letter of the third word: %c%n\",firstLetterThirdWord);\n \n System.out.printf(\"Replaced spaces with x's: %s%n\", songLine.replace(\" \", \"x\"));\n \n System.out.printf(\"Uppercase: %s%n\", songLine.toUpperCase());\n \n System.out.printf(\"Index of first occurence of 'b': %d%n%n\", firstOccurance);\n \n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "public static void main(String[] args) {\n\n\t\tString s=\"jai hello njcn jeelos hellos\";\n\t\tString c[]=s.split(\" \");\n\t\t\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\t\n\t\t\tif(c[i].equals(\"hellos\")) {\n\t\t\t\tSystem.out.println(\"preset\");\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void frases() {\n\t\t\r\n\t\tthis.frase.add(\"Não há que ser forte. Há que ser flexível.\");\r\n this.frase.add(\"Gente todo dia arruma os cabelos, por que não o coração?\");\r\n this.frase.add(\"Há três coisas que jamais voltam; a flecha lançada, a palavra dita e a oportunidade perdida.\");\r\n this.frase.add(\"Melhor pensar alto do que não pensar nada.\");\r\n this.frase.add(\"A juventude não é uma época da vida, é um estado de espírito.\");\r\n this.frase.add(\" Podemos escolher o que semear, mas somos obrigados a colher o que plantamos.\");\r\n this.frase.add(\"Dê toda a atenção para a formação dos teus filhos, sobretudo por exemplos de tua própria vida.\");\r\n \r\n\t\t\r\n\t}", "public static void main(String[] args) {\n System.out.println(censorLetter(\"computer science\", 'e')); //\"comput*r sci*nc*\"\n System.out.println(censorLetter(\"trick or treat\", 't')); //\"*rick or *rea*\"\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\tSystem.out.println(\"Veillez saisir une phrase :\");\n\t\tString phrase = sc.nextLine();\n\t\tSystem.out.println(phrase);\n\t\tSystem.out.println(\"M : \" + phrase.toUpperCase());\n\t\tfor(int i = 0; i < phrase.length(); i++)\n\t\t{\n\t\t\tif(phrase.charAt(i) == 'e')\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(\"C : \" + phrase.length());\n\t\tSystem.out.println(\"Le nombre de 'e' dans la phrase : \" + count);\n\t\tif(count > 0)\n\t\t\tSystem.out.println(\"R : \" + phrase.replace('e', '*'));\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint total = sc.nextInt();\n\t\tString text[] = new String[total]; //total要大於1\n\t\tfor(int i=0;i<total;i++) {\n\t\t\t//每列輸入一組字串\n\t\t\ttext[i] = sc.nextLine();; //輸入到字串中切勿使用nextLine\t\t\n\t\t}\n\n//\t\tSystem.out.println(text.length); //total = 5 輸出5\n\t\t\n\t\t//5列 把text陣列長度找出\n\t\t//幾列 做幾次\n\t\tfor(int i=1;i<text.length;i++)\n\t\t{\n\t\t\t//分割字串 空白字元\n\t\t\tString[] textSplit = text[i].split(\" \"); //空白分隔\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\tfor(int j=0;j<textSplit.length;j++) {\n\n//\t\t\t\tSystem.out.println(\"textSplit\"+textSplit[j]);\n\t\t\t\tswitch(textSplit[j]){\n\t\t\t\t\tcase \".-\":System.out.print(\"A\");break;\n\t\t\t\t\tcase \"-...\":System.out.print(\"B\");break;\n\t\t\t\t\tcase \"-.-.\":System.out.print(\"C\");break;\n\t\t\t\t\tcase \"-..\":System.out.print(\"D\");break;\n\t\t\t\t\tcase \".\":System.out.print(\"E\");break;\n\t\t\t\t\tcase \"..-.\":System.out.print(\"F\");break;\n\t\t\t\t\tcase \"--.\":System.out.print(\"G\");break;\n\t\t\t\t\tcase \"....\":System.out.print(\"H\");break;\n\t\t\t\t\tcase \"..\":System.out.print(\"I\");break;\n\t\t\t\t\tcase \".---\":System.out.print(\"J\");break;\n\t\t\t\t\tcase \"-.-\":System.out.print(\"K\");break;\n\t\t\t\t\tcase \".-..\":System.out.print(\"L\");break;\n\t\t\t\t\tcase \"--\":System.out.print(\"M\");break;\n\t\t\t\t\tcase \"-.\":System.out.print(\"N\");break;\n\t\t\t\t\tcase \"---\":System.out.print(\"O\");break;\n\t\t\t\t\tcase \".--.\":System.out.print(\"P\");break;\n\t\t\t\t\tcase \"--.-\":System.out.print(\"Q\");break;\n\t\t\t\t\tcase \".-.\":System.out.print(\"R\");break;\n\t\t\t\t\tcase \"...\":System.out.print(\"S\");break;\n\t\t\t\t\tcase \"-\":System.out.print(\"T\");break;\n\t\t\t\t\tcase \"..-\":System.out.print(\"U\");break;\n\t\t\t\t\tcase \"...-\":System.out.print(\"V\");break;\n\t\t\t\t\tcase \".--\":System.out.print(\"W\");break;\n\t\t\t\t\tcase \"-..-\":System.out.print(\"X\");break;\n\t\t\t\t\tcase \"-.--\":System.out.print(\"Y\");break;\n\t\t\t\t\tcase \"--..\":System.out.print(\"Z\");break;\n\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\nScanner scn=new Scanner(System.in);\nSystem.out.println(\"你好 請問你是\");\nString a = scn.next();\nSystem.out.println(\"你好\"+a+\"請問你就讀哪所學校\");\nString b=scn.next();\nSystem.out.println(a+\"原來你是\"+b+\"畢業的阿\");\nSystem.out.println(\"請問你就讀甚麼科系\");\nString c=scn.next();\nSystem.out.println(\"挖~~\"+c+\"是很好的科系耶,你實在太厲害了:)\");\nSystem.out.println(\"你畢業後要做甚麼工作啊?\");\nString d=scn.next();\nSystem.out.println(d+\"這個工作不錯啊,真羨慕你!~~\");\n\t}", "@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }", "public static String getAlignedWord(String word, int length) {\n SpreedWord pivot = new SpreedWord();// to get the pivot.\n String alignWord = \"<html>\"; // get the align word.\n double align; // get number of spaces\n double count = 0; // count the number of spaces\n double leftSpace; // geting left space\n double rightSpace = 0; // get right space\n int getPivot; // get pivot number\n // this check to see if the length is even add one\n if (length % 2 == 0) {\n length = length + 1;\n }\n // this checks for commas and semicolons and periods.\n for (int i = 0; i < word.length(); i++) {\n if (word.charAt(i) == '.') {\n word = word.substring(0, word.length() - 1);\n break;\n } else if (word.charAt(i) == ';') {\n word = word.substring(0, word.length() - 1);\n break;\n } else if (word.charAt(i) == ',') {\n word = word.substring(0, word.length() - 1);\n break;\n }\n }\n // this gets the pivot\n getPivot = pivot.getPivot(word);\n // takes half the length\n align = length / 2;\n // gets the numbers space before the pivot.\n char[] letters = word.toCharArray();\n for (int i = 0; i < word.length(); i++) {\n if (!Character.isLetter(letters[i])) {\n count++;\n } else {\n break;\n }\n }\n // get left spaces\n align = align - (getPivot + count);\n\n leftSpace = align;\n\n // adding the left spaces\n for (int i = 0; i < leftSpace; i++) {\n alignWord += \"&nbsp;\";\n }\n // add the word\n alignWord += word.substring(0, getPivot);\n alignWord += \"<font color=\\\"yellow\\\">\";\n alignWord += word.charAt(getPivot);\n alignWord += \"</font>\";\n for (int i = getPivot + 1; i < word.length(); i++)\n alignWord += word.charAt(i);\n //alignWord += word.substring(getPivot + 1, word.length() - getPivot + 1);\n // adding the right space or truncate\n if (alignWord.length() > length) {\n\n } else {\n rightSpace = length - alignWord.length();\n for (int j = 0; j < rightSpace; j++) {\n alignWord += \" \";\n }\n }\n\n alignWord += \"</html>\";\n System.out.println(alignWord);\n\n return alignWord;\n }", "@Override\n public String hienThiTT() {\n String thongTin = \"\";\n thongTin = \"ho ten: \" + this.hoTen + \", tuoi: \" + this.tuoi + \", dia chi: \" + this.diaChi\n + \", sdt: \" + this.sdt + \", mon day: \" + this.monDay + \", to bo mon: \" + this.toBoMon;\n \n System.out.println(thongTin);\n return thongTin;\n }", "public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }", "@Test(timeout = 4000)\n public void test66() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n naiveBayesMultinomialText0.setLowercaseTokens(true);\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertTrue(naiveBayesMultinomialText0.getLowercaseTokens());\n }" ]
[ "0.6238645", "0.61330485", "0.6043717", "0.597549", "0.5956778", "0.5906874", "0.5845286", "0.58411556", "0.5829324", "0.58216476", "0.5782014", "0.57726145", "0.5762337", "0.5742395", "0.5735834", "0.56983334", "0.56828177", "0.5668947", "0.56674707", "0.5661096", "0.5658408", "0.5657317", "0.5652587", "0.56522286", "0.5636168", "0.56236506", "0.56204116", "0.56181914", "0.56149155", "0.5613965", "0.5611546", "0.5606707", "0.56066316", "0.5606392", "0.5604884", "0.5598149", "0.5596375", "0.5593407", "0.55863374", "0.55759114", "0.55662054", "0.5562036", "0.5558989", "0.55446565", "0.55427825", "0.5529081", "0.5528031", "0.55231583", "0.55172557", "0.55153745", "0.5504392", "0.5502639", "0.5497322", "0.5495959", "0.5487267", "0.54830927", "0.5480341", "0.54802144", "0.5467174", "0.5465263", "0.54645", "0.54599726", "0.54573566", "0.54570985", "0.5456855", "0.5454722", "0.544772", "0.54400754", "0.5434282", "0.54330397", "0.5431133", "0.54252887", "0.5424707", "0.5423291", "0.5421537", "0.542004", "0.5418648", "0.54153836", "0.5414117", "0.5411108", "0.53971386", "0.5395434", "0.5391355", "0.53850067", "0.5383387", "0.5382944", "0.53826165", "0.53779095", "0.5373088", "0.5373011", "0.5372306", "0.5364191", "0.53548294", "0.53522915", "0.5347321", "0.53414094", "0.5331857", "0.5329549", "0.5329533", "0.5328491", "0.5325156" ]
0.0
-1
trong static member class chi truy cap duoc cac thanh phan static cua class ben ngoai
public void showOuterNguoi() { System.out.println("LOAI DOI TUONG: "+ Nguoi.type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTrangthaiChiTiet();", "public PhanSo(){\n tuSo = 0;\n mauSo = 1;\n }", "public void checkVung() {\n\t\tint i = 10;\n\t\tclass Vung{\n\t\t\tpublic String noiSinh;\n\t\t\tpublic String noiCapCMT;\n\t\t\tpublic Vung() {\n\t\t\t\tsuper();\n\t\t\t\t// TODO Auto-generated constructor stub\n\t\t\t}\n\t\t\tpublic Vung(String noiSinh, String noiCapCMT) {\n\t\t\t\tsuper();\n\t\t\t\tthis.noiSinh = noiSinh;\n\t\t\t\tthis.noiCapCMT = noiCapCMT;\n\t\t\t}\n\t\t\tpublic String soSanhQueQuan() {\n\t\t\t\tif (this.noiSinh != null && this.noiSinh.equals(this.noiCapCMT)) {\n\t\t\t\t\treturn \"Ban dang song tai que huong noi sinh\";\n\t\t\t\t} else {\n\t\t\t\t\treturn \"Ban hien khong song tai que huong noi sinh\";\n\t\t\t\t}\n\t\t\t}// end function soSanhQueQuan\n\t\t}// end Vung\n\t\t// tao doi tuong local class\n\t\tVung vung = new Vung();\n\t\tvung.noiCapCMT = cmt.getNoiCap();\n\t\tvung.noiSinh = diachi.getTinh();\n\t\tSystem.out.println(vung.soSanhQueQuan());\n\t\t/*\n\t\tif (cmt.getNoiCap().equals(diachi.getTinh())) {\n\t\t\tSystem.out.println( \"Ban dang song tai que huong noi sinh\" );\n\t\t} else {\n\t\t\tSystem.out.println( \"Ban hien khong song tai que huong noi sinh\");\n\t\t}\n\t\t*/\n\t}", "Makhluk() { // kosong\n\n }", "private UsineJoueur() {}", "void kiemTraThangHopLi() {\n }", "public Chauffeur() {\r\n\t}", "public static void main(String[] args) {\n persegi_panjang pp = new persegi_panjang();\r\n pp.lebar=30;\r\n pp.panjang=50;\r\n Segitiga s = new Segitiga();\r\n s.alas=20;\r\n s.tinggi=40;\r\n Persegi p = new Persegi();\r\n p.sisi=40;\r\n lingkaran l= new lingkaran();\r\n l.jari=20;\r\n \r\npp.luas();\r\npp.keliling();\r\np.luas();\r\np.keliling();\r\ns.luas();\r\ns.keliling();\r\nl.luas();\r\nl.keliling();\r\n}", "private static void cajas() {\n\t\t\n\t}", "public static void main(String[] args) {\n int chieuDai = 10;\n int chieuRong = 20;\n\n int chuViHinhCN = HinhChuNhat.chuVi(chieuDai, chieuRong);\n int dienTichHCN = HinhChuNhat.dienTich(chieuDai,chieuRong);\n System.out.println(\"Chu vi va dien tich hinh Chu Nhat\");\n System.out.println(\"Chu vi hinh chu nhat la: \" + chuViHinhCN);\n System.out.println(\"Dien tich hinh chu nhat la: \" + dienTichHCN);\n\n //tinh chu vi va dien tich hinh vuong\n int canhHinhVuong = 50;\n int chuViHV = HinhVuong.chuVi(canhHinhVuong);\n int dientichHV = HinhVuong.dienTich(canhHinhVuong);\n System.out.println(\"Chu vi va dien tich Hinh Tron \");\n System.out.println(\"Chu vi hinh vuong la:\" + chuViHV);\n System.out.println(\"Dien tich hinh vuong la:\" + dientichHV);\n\n //tinh chu vi va dien tich Hinh Tron\n float bankinh = 2.6f;\n float chuViHC = HinhTron.chuViHinhTron(bankinh);\n float dienTichHC = HinhTron.dienTichHinhTron(bankinh);\n System.out.println(\"Chu vi va dien tich hinh tron\");\n System.out.println(\"Chu vi hinh tron: \" + chuViHC);\n System.out.println(\"Dien tich hinh tron: \" + dienTichHC);\n }", "public static void main(String[] args) {\nNhanVienChinhThuc linh= new NhanVienChinhThuc(2,\"ngo thi phuong linh\");\nNhanVienThoiVu thao= new NhanVienThoiVu(3,\"ngo thi phuong thao\");\nlinh.tinhLuong();\nthao.tinhLuong();\n\t}", "public Cgg_jur_anticipo(){}", "public abstract Member mo23408O();", "public RptPotonganGaji() {\n }", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public NhanVien(String ten, int tuoi, String diachi, double tienluong, int tongsogiolam)\n {\n this.ten = ten;\n this.tuoi = tuoi;\n this.diachi = diachi;\n this.tienluong = tienluong;\n this.tongsogiolam = tongsogiolam;\n }", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }", "@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}", "@Override\n\tpublic void nghienCuu() {\n\t\tSystem.out.println(\"Nghiên cứu\");\n\t}", "ConjuntoTDA claves();", "public Zadatak1() {\r\n\t\tSystem.out.println(ucitajBroj(\"1. broj\") + ucitajBroj(\"2. broj\"));\r\n\t}", "MaquinaCafetera(){\n }", "public void jeu() {\n\n }", "public Tbdcongvan36() {\n super();\n }", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tpublic void nhanTinNhan() {\n\n\t}", "Lingua getLingua();", "@Override\n\tpublic void chi(String pinzhong, String xingming) {\n\t\n\t}", "public Clade() {}", "public void mo97906c() {\n }", "static void jhat() {\n\n }", "Petunia() {\r\n\t\t}", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "@SuppressWarnings(\"static-access\")\r\n\tpublic static void main(String[] args) {\n jiajia ta=new jiajia();\r\n ta.name=\"周奇\";\r\n ta.fuming();\r\n ta.xinwei();\r\n \r\n\t}", "@Override\n\tdouble chuVi() {\n\t\treturn canhA + canhB + canhC;\n\t}", "public SimpleCitizen(){\n super();\n information = \"let's help to find mafias and take them out\";\n }", "abstract C0451h mo1607e();", "static void test(){\n\t }", "public Chant(){}", "public static void hehe(){\n \n }", "public QLNhanVien(){\n \n }", "public CowMeat(){\n\t\tsuper(\"CowMeat\", 100000);\n\t}", "private TMCourse() {\n\t}", "private ObiWanKenobi(){\n }", "public double tongDoanhThuNgoaiThanh() {\n double doanhThu = 0;\n for (ChuyenXe cx : dsChuyenXe) {\n if (cx instanceof ChuyenXeNgoaiThanh) {\n doanhThu += cx.doanhThu;\n }\n }\n return doanhThu;\n }", "abstract String mo1748c();", "@Override\n\tpublic double tinhTienLai() {\n\t\tdouble tienLai=0;\n\t\tif(soThangGui>=kyHan){\n\t\t\t tienLai=soTienGui*laiSuat*soThangGui;\n\t\t}\n\t\treturn tienLai;\n\t}", "public abstract C0707b mo9237au();", "public static void main(String[] args)\r\n\t{\r\n\t\t//static members belong to the class instead of a specific instance\r\n\t\t/*\r\n\t\t * Podsumowujac:\r\n\t\t * static oznacza, ze sa wykonywane dzialania na KLASIE a nie na obiekcie\r\n\t\t * bez znacznika static metoda/zmienna jest zalezna od instancji\r\n\t\t * a static powoduje zmiany na CAŁEJ KLASIE\r\n\t\t * \r\n\t\t * \r\n\t\t * w przypadku klasy NIE MOZNA uzywac metod które nie maja słowa klucz 'static'\r\n\t\t * w przypadku instancji NIE POWINNO sie uzywac metod ktore maja slowo klucz 'static'\r\n\t\t */\r\n\t\t\r\n\t\tHello hello = new Hello();\r\n\t\tHello hello1 = new Hello();\r\n\t\t\r\n\t\t//tak powinno sie uzywac metod z 'static' (czyli nazwa klasy a nie instancji)\r\n\t\tHello.DoSomething(\"Hi youtube\");\r\n\r\n\t\t//tak powinno sie uzywac metod bez 'static' (nazwa instancji)\r\n\t\thello.DoSomethingElse(\"hello world\");\r\n\t\t\r\n\t\t//tak NIE powinno sie uzywac zmiennych z 'static' \r\n\t\thello.age= 10;\r\n\t\t\r\n\t\tSystem.out.println(hello.age);\r\n\t\t\r\n\t\thello1.age =50;\r\n\t\tSystem.out.println(hello1.age);\r\n\t\tSystem.out.println(hello.age);\r\n\t\t\r\n\t\t//tak powinno sie uzywac zmniennych z 'static'\r\n\t\tHello.age = 15;\r\n\t\tSystem.out.println(Hello.age);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public NhanVien()\n {\n }", "public static void main(String[] args) {\n\t\tNhanVienChinhThuc teo = new NhanVienChinhThuc(1, \"Teo Theo\");\n\t\tteo.tinhluong();\n\t\tNhanVienThoiVu ty = new NhanVienThoiVu(2, \"Ty Suu\");\n\t\tty.tinhluong();\n\t}", "public static void main(String[] args){\n All_in_One<String> nama = new All_in_One<>();\r\n nama.setManusia(\"Wildan\");\r\n System.out.println(\"Nama Saya: \"+nama.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Integer\r\n All_in_One<Integer> umur = new All_in_One<>();\r\n umur.setManusia(19);\r\n System.out.println(\"Usia Saya: \"+umur.getManusia()+\" Tahun\");\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Boolean\r\n All_in_One<Boolean> kondisi = new All_in_One<>();\r\n kondisi.setManusia(true);\r\n System.out.println(\"Saya Sedang Belajar Java: \"+kondisi.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Float\r\n All_in_One<Float> IPK = new All_in_One<>();\r\n IPK.setManusia(3.5f);\r\n System.out.println(\"Nilai IPK Saya: \"+IPK.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Character\r\n All_in_One<Character> Karakter = new All_in_One<>();\r\n Karakter.setManusia('W');\r\n System.out.println(\"Huruf Awalan Nama Saya Adalah: \"+Karakter.getManusia());\r\n }", "@Override\n public String hienThiTT() {\n String thongTin = \"\";\n thongTin = \"ho ten: \" + this.hoTen + \", tuoi: \" + this.tuoi + \", dia chi: \" + this.diaChi\n + \", sdt: \" + this.sdt + \", mon day: \" + this.monDay + \", to bo mon: \" + this.toBoMon;\n \n System.out.println(thongTin);\n return thongTin;\n }", "protected abstract T mo2623i();", "public abstract C mo29734a();", "public void mo5099c() {\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "protected FanisamBato(){\n\t}", "public abstract String mo9239aw();", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "@Override\n // khi extends class abstract thi tu mat key abstract trong method;\n public double rice() {\n System.out.println(\"$1000\");\n return 0;\n }", "abstract void mo4372a(zzwt zzwt, cu cuVar);", "public static void main(String[] args) {\n APerson p = new Chinese();\n APerson p2 = new American();\n p.say();\n p2.say();\n }", "public void mo21879u() {\n }", "public int getClase() {return clase;}", "abstract void mo4366a(int i, zzwt zzwt, cu cuVar);", "public int generateRoshambo(){\n ;]\n\n }", "static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }", "@Override\n\tpublic void getThongTin() {\n\t\tSystem.out.print(\"Ghế \");\n\t\tvatlieu.getMoTa();\n\t}", "public static void main(String[] args){\n Hello hello = new Hello();\n hello.age = 10;\n System.out.println(hello.age);\n //Hello.DoSomething(\"Hi youtube\");\n //hello.DoSomethingElse(\"hello world\");\n Hello hello1 = new Hello();\n hello1.age = 50;\n System.out.println(hello1.age);\n System.out.println(\"*****************\");\n\n //second example of static keyword\n Student mark = new Student();\n Student tom = new Student();\n System.out.println(Student.getNoOfStudents());\n\n }", "public abstract String mo9751p();", "@Override\n public double tuition(){\n return 2500;\n }", "private void Nice(){\n }", "public final Class<PrimitiveT> zzawu() {\n return this.zzhiy;\n }", "public interface CaracteristiquesJoueurDeChamps{\n /**\n * This method is for a celebration when a goal is scored\n */\n \n void celebrer();\n \n /**\n * This method is for shoot on the goal\n * @return double, the stat of shoot\n */\n \n double tirer();\n \n /**\n * This method is for pass the ball\n * @return double, the stat of pass\n */\n \n double passer();\n \n /**\n * This method is for defend on the ball\n * @return double, the stat of defense\n */\n \n double defendre();\n \n /**\n * This method is for injury a player\n * @return double, the stat of injury\n */\n double seBlesser();\n \n /**\n * This method is for the mood of the player\n * @return double, the stat of agressivity\n */\n double agression();\n \n \n /**\n * This method is for run\n */\n void courir();\n \n \n double fatigue();\n \n \n }", "public Bytypeandyiji() {\r\n\t\tsuper();\r\n\t}", "private stendhal() {\n\t}", "public static void main(String[] args) {\n\t\tDemo_1 tt = new Demo_1();\n\t\ttt.sayHello();\n\t\t\n\t\t//this is how you print variable unlikely than a method\n\t\tSystem.out.println(tt.nonStaticVar); \n\t\t\n\t\t//static method can be called in two different ways:\n\t\t\n\t\tsayHI(); //This is not a recommended practice. However method from other non static class needs to make object. \n\t\t\n\t\tDemo_1.sayHI(); //Calling static method in this way is regarded as the best practices, which indicates class name as well. \n\t\tSystem.out.println(Demo_1.staticVar);//Always do this way, which clearly shows original method. \n\t}", "public interface AbstractC0537ba {\n public static final AbstractC0537ba A00 = new C1195uw();\n\n List A3h(C0544bh bhVar);\n}", "public void mo9233aH() {\n }", "public TTau() {}", "public static void hvitetest1w(){\r\n\t}", "public static void main(String[] args){\n // isveda teksta i konsole\n // sout - greitai atspausdina\n System.out.println(\"Hello world\");\n // metodo kvietimas maine\n\n int a = 10;\n\n // sukurtas objektas\n // tipas pavadinimas = new tipas\n MyFirstClass myFirstClass = new MyFirstClass();\n\n // per objekta kvieciamas metodas\n // ne statinis kvieciamas statiniame per klases objekta\n myFirstClass.myNotStaticMethod(a);\n\n // tiesiogiai per varda toje pacioje klaseje\n myStaticMethod();\n\n // float visada su f\n float b = 4.6f;\n\n // galima pridet d, bet nebutina\n double c = 2.4;\n\n // saugo true arba false(1 bito)\n boolean d = true;\n\n // viena raide, simbolis\n char e = 'A';\n\n // Javoj string neturi atskiro tipo, todel naudoja klase ir rasomas is didziosios(nes klase)\n String f = \"This is string!!!\";\n }", "@Override\n\tpublic int xuatLuong() {\n\t\treturn 3000;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tNhanVien nv1 = new NhanVien(\"Đặng\", \"Hoa\", 273);\n\t\tNhanVien nv2 = new NhanVien(\"Đặng\", \"Nam\", 863);\n\t\t\n\t\tSystem.out.println(\"Lương của \"+nv1.getTen()+\"\\t\"+ nv1.getLuong());;\n\t\tSystem.out.println(\"Lương của \"+nv2.getTen()+\"\\t\"+nv2.getLuong());\n\t\t\n\n\t\tif(nv1.lonHon(nv2)) \n\t\t\tSystem.out.println(nv1.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv2.getTen()+\": \"+ (nv1.getSoSP()-nv2.getSoSP())+\" sản phẩm\");\n\t\telse\n\t\t\tSystem.out.println(nv2.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv1.getTen()+\": \"+ (nv2.getSoSP()-nv1.getSoSP())+\" sản phẩm\");\n\t\t\n\t\tif(nv1.getSoSP()> nv2.getSoSP()) \n\t\t\tSystem.out.println(nv1.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv2.getTen()+\": \"+ (nv1.getSoSP()-nv2.getSoSP())+\" sản phẩm\");\n\t\telse\n\t\t\tSystem.out.println(nv2.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv1.getTen()+\": \"+ (nv2.getSoSP()-nv1.getSoSP())+\" sản phẩm\");\n\t}", "public TebakNusantara()\n {\n }", "public PhanSo(int tuSo, int mauSo){\n this.tuSo = tuSo;\n this.mauSo = mauSo;\n }", "static void testCaculator(){\n }", "@Test\n public void test6(){\n System.out.println(Son.son);\n System.out.println(Parent.parent);\n }", "public Coup coupAJouer();", "@Test\r\n\tpublic void HealthyPersonConstTest() {\n\t\tAssert.assertEquals(\"HP getReason incorrect\", \"allergies\", hp1.getReason());\r\n\t\tAssert.assertEquals(\"HP getName incorrect\", \"Alex\", hp1.getName());\r\n\t\tAssert.assertEquals(\"HP getAge incorrect\", 20, hp1.getAge(),0.0001);\r\n\t}", "public Pitonyak_09_02() {\r\n }", "int tinhSoNgay() {\n return soNgay;\n }", "T mo16685a();", "public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }", "public void mo21787L() {\n }", "public double tongDoanhThuNoiThanh() {\n double doanhThu = 0;\n for (ChuyenXe cx : dsChuyenXe) {\n if (cx instanceof ChuyenXeNoiThanh) {\n doanhThu += cx.doanhThu;\n }\n }\n return doanhThu;\n }", "void mo67924c();", "public void mo38117a() {\n }", "public abstract long mo9750o();", "private SingletonLectorPropiedades() {\n\t}" ]
[ "0.5795114", "0.57821935", "0.57122743", "0.5705902", "0.56589746", "0.5648929", "0.56236404", "0.561894", "0.56185865", "0.56162244", "0.5615232", "0.5608928", "0.55940527", "0.5497014", "0.5479617", "0.5449965", "0.544104", "0.5433143", "0.5407245", "0.5388925", "0.53856796", "0.5369334", "0.5363993", "0.5360526", "0.5359054", "0.5357436", "0.53424144", "0.53409857", "0.53174484", "0.5317042", "0.53131115", "0.53129405", "0.53035176", "0.52924305", "0.52917254", "0.52817273", "0.5280136", "0.52774996", "0.5275914", "0.52694374", "0.5251853", "0.52420056", "0.5234517", "0.5230118", "0.521061", "0.52075", "0.52002573", "0.5191457", "0.51832235", "0.51820195", "0.5173436", "0.51733166", "0.5169731", "0.51665795", "0.5151768", "0.51495683", "0.51351434", "0.51346624", "0.5132198", "0.51319104", "0.51234865", "0.5123266", "0.5121113", "0.512104", "0.51138437", "0.5110774", "0.5110454", "0.51091754", "0.509969", "0.50942165", "0.5093596", "0.5091102", "0.50893325", "0.50863725", "0.50827444", "0.5082234", "0.5081518", "0.50789225", "0.50788265", "0.50753146", "0.5072278", "0.5066092", "0.5062636", "0.5046777", "0.5045359", "0.5042015", "0.5041485", "0.5038356", "0.50381124", "0.5037548", "0.5036798", "0.503637", "0.5032772", "0.50303155", "0.5027866", "0.5024779", "0.5024328", "0.5020016", "0.5019248", "0.50189316", "0.50183827" ]
0.0
-1
end ChungMinhThu class local la class nam trong 1 ham pham vi cua no cung chi trong ham do ma thoi
public void checkVung() { int i = 10; class Vung{ public String noiSinh; public String noiCapCMT; public Vung() { super(); // TODO Auto-generated constructor stub } public Vung(String noiSinh, String noiCapCMT) { super(); this.noiSinh = noiSinh; this.noiCapCMT = noiCapCMT; } public String soSanhQueQuan() { if (this.noiSinh != null && this.noiSinh.equals(this.noiCapCMT)) { return "Ban dang song tai que huong noi sinh"; } else { return "Ban hien khong song tai que huong noi sinh"; } }// end function soSanhQueQuan }// end Vung // tao doi tuong local class Vung vung = new Vung(); vung.noiCapCMT = cmt.getNoiCap(); vung.noiSinh = diachi.getTinh(); System.out.println(vung.soSanhQueQuan()); /* if (cmt.getNoiCap().equals(diachi.getTinh())) { System.out.println( "Ban dang song tai que huong noi sinh" ); } else { System.out.println( "Ban hien khong song tai que huong noi sinh"); } */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String hienThiTT() {\n String thongTin = \"\";\n thongTin = \"ho ten: \" + this.hoTen + \", tuoi: \" + this.tuoi + \", dia chi: \" + this.diaChi\n + \", sdt: \" + this.sdt + \", mon day: \" + this.monDay + \", to bo mon: \" + this.toBoMon;\n \n System.out.println(thongTin);\n return thongTin;\n }", "@Override\n\tpublic void getThongTin() {\n\t\tSystem.out.print(\"Ghế \");\n\t\tvatlieu.getMoTa();\n\t}", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "protected static void HienThiChiTiet() {\n\t\t\n\t\ttry {\n\n\t\t\tdtm1.setRowCount(0);\n\n\t\t\tString Sql = \"select SanPham.TenSP, Soluong,DonGia,DVT, DonGia*Soluong from SanPham,HoaDonTiec,ChiTietHoaDonTiec where SanPham.MaSP=ChiTietHoaDonTiec.MaSP and HoaDonTiec.MaHD=ChiTietHoaDonTiec.MaHD and HoaDonTiec.MaHD=?\";\n\t\t\tPreparedStatement prepare = conn.prepareStatement(Sql);\n\t\t\tprepare.setString(1, maHD);\n\t\t\tResultSet result = prepare.executeQuery();\n\t\t\twhile (result.next()) {\n\t\t\t\tVector<Object> vec = new Vector<Object>();\n\t\t\t\tvec.add(result.getString(1));\n\t\t\t\tvec.add(result.getInt(2));\n\t\t\t\tvec.add(result.getInt(3));\n\t\t\t\tvec.add(result.getString(4));\n\t\t\t\tvec.add(result.getInt(5));\n\t\t\t\t//maHD = result.getString(8);\n\t\t\t\t\n\t\t\t\tdtm1.addRow(vec);\n\t\t\t\t//int i = tbl.getRowCount();\n\t\t\t\t//txtMaHD.setText(maHD);// hiển thị mã HD theo bàn\n\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}", "void kiemTraThangHopLi() {\n }", "public void mo21783H() {\n }", "void nhap(String tenHinh) {\n this.tenHinh = tenHinh;\n }", "@Override\n\tpublic void nhanTinNhan() {\n\n\t}", "public void jeu() {\n\n }", "@Override\n\tpublic void nghienCuu() {\n\t\tSystem.out.println(\"Nghiên cứu\");\n\t}", "public static void main(String[] args) {\n int chieuDai = 10;\n int chieuRong = 20;\n\n int chuViHinhCN = HinhChuNhat.chuVi(chieuDai, chieuRong);\n int dienTichHCN = HinhChuNhat.dienTich(chieuDai,chieuRong);\n System.out.println(\"Chu vi va dien tich hinh Chu Nhat\");\n System.out.println(\"Chu vi hinh chu nhat la: \" + chuViHinhCN);\n System.out.println(\"Dien tich hinh chu nhat la: \" + dienTichHCN);\n\n //tinh chu vi va dien tich hinh vuong\n int canhHinhVuong = 50;\n int chuViHV = HinhVuong.chuVi(canhHinhVuong);\n int dientichHV = HinhVuong.dienTich(canhHinhVuong);\n System.out.println(\"Chu vi va dien tich Hinh Tron \");\n System.out.println(\"Chu vi hinh vuong la:\" + chuViHV);\n System.out.println(\"Dien tich hinh vuong la:\" + dientichHV);\n\n //tinh chu vi va dien tich Hinh Tron\n float bankinh = 2.6f;\n float chuViHC = HinhTron.chuViHinhTron(bankinh);\n float dienTichHC = HinhTron.dienTichHinhTron(bankinh);\n System.out.println(\"Chu vi va dien tich hinh tron\");\n System.out.println(\"Chu vi hinh tron: \" + chuViHC);\n System.out.println(\"Dien tich hinh tron: \" + dienTichHC);\n }", "public PhanSo(){\n tuSo = 0;\n mauSo = 1;\n }", "public void mo9233aH() {\n }", "Makhluk() { // kosong\n\n }", "abstract C0451h mo1607e();", "bdm mo1784a(akh akh);", "void NhapGT(int thang, int nam) {\n }", "public SachGiaoKhoa(String masach, LocalDate ngaynhap, String nxb, double dongia, int soluong, String tinhtrang) {\n\t\tsuper(masach, ngaynhap, nxb, dongia, soluong);\n\t\tif (setTinhtrang(tinhtrang) == false)\n\t\t\ttrangthai += 32;\n\t}", "public void mo97906c() {\n }", "public void mo21800a() {\n }", "public int getTrangthaiChiTiet();", "@Override\n\tpublic String hablar() {\n\t\treturn \"Hola, soy un Buitre y sť volar\";\n\t}", "public Lechuga(Hamburguesa h){\n this.hamburguesa = h;\n }", "public static void hehe(){\n \n }", "public NhanVien(String ten, int tuoi, String diachi, double tienluong, int tongsogiolam)\n {\n this.ten = ten;\n this.tuoi = tuoi;\n this.diachi = diachi;\n this.tienluong = tienluong;\n this.tongsogiolam = tongsogiolam;\n }", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public Tbdcongvan36() {\n super();\n }", "public SinhVien(String MaSo, String HoTen, String NamSinh, String Email, String Nganh, String Khoa, float Diem, String GioiTinh, String Lop) {\r\n this.MaSo = MaSo;\r\n this.HoTen = HoTen;\r\n this.NamSinh = NamSinh;\r\n this.Email = Email;\r\n this.Nganh = Nganh;\r\n this.Khoa = Khoa;\r\n this.Diem = Diem;\r\n this.GioiTinh = GioiTinh;\r\n this.Lop = Lop;\r\n }", "public static void main(String[] args) {\nNhanVienChinhThuc linh= new NhanVienChinhThuc(2,\"ngo thi phuong linh\");\nNhanVienThoiVu thao= new NhanVienThoiVu(3,\"ngo thi phuong thao\");\nlinh.tinhLuong();\nthao.tinhLuong();\n\t}", "@Override\n\tpublic double tinhTienLai() {\n\t\tdouble tienLai=0;\n\t\tif(soThangGui>=kyHan){\n\t\t\t tienLai=soTienGui*laiSuat*soThangGui;\n\t\t}\n\t\treturn tienLai;\n\t}", "public void mo21879u() {\n }", "public void mo5097b() {\n }", "@Override\n\tpublic String getVehiclName() {\n\t\treturn \"Hundai\";\n\t}", "public RptPotonganGaji() {\n }", "private zza.zza()\n\t\t{\n\t\t}", "private UsineJoueur() {}", "public void changerJoueur() {\r\n\t\t\r\n\t}", "@Override\n\tpublic void habla() {\n\t\tSystem.out.println(\"Miau, Miau!!\");\n\t}", "public void muere() {\n System.out.println(\"Ugh... Llegó mi hora... Adios.\");\n }", "void mo1501h();", "@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}", "@Override\n\tpublic void giangDay() {\n\t\tSystem.out.println(\"Giảng dạy\");\n\t}", "public void mo97908d() {\n }", "public void mo9241ay() {\n }", "public void introducirhora(){\n int horadespertar; \n }", "public void mo12628c() {\n }", "public void sugangSincheong(CSugang sugang) {\n\t\t\r\n\t}", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }", "public void mo5099c() {\n }", "public void mo21788M() {\n }", "public void mo21780E() {\n }", "@Override\n\tpublic void chi(String pinzhong, String xingming) {\n\t\n\t}", "public String getMA_CHUYENNGANH()\n {\n return this.MA_CHUYENNGANH;\n }", "public void mo21782G() {\n }", "public void mo21878t() {\n }", "@Override\n\tpublic void bolumSoyle() {\n\t\tSystem.out.println(\"Benim Bölümüm Psi\");\n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public void main(String[] args) {\n\t\tManipulationChaine car = new ManipulationChaine();\n\n\t\tchar premierCaractere = car.chaine.charAt(0);\n\t\tint longueur = car.chaine.length();\n\t\tint index = car.chaine.indexOf(';');\n\t\tString familyName = car.chaine.substring(0,index);\n\t\tString majName = familyName.toUpperCase();\n\t\tString minName = familyName.toLowerCase();\n\t\tString[] allChar = car.chaine.split(\";\");\n\t\tSystem.out.println(\"Premier caractère: \" + premierCaractere);\n\t\tSystem.out.println(\"Le longueur de la chaine est de: \" + longueur);\n\t\tSystem.out.println(\"Le caractère ; se trouve a l'index: \" + index);\n\t\tSystem.out.println(\"Le nom de famille est : \" + familyName);\n\t\tSystem.out.println(\"Le nom de famille en majuscule est: \" + majName);\n\t\tSystem.out.println(\"Le nom de famille en minuscule est: \" + minName);\n\t\tSystem.out.println(Arrays.toString(allChar));\n\t\tallChar[2] = allChar[2].replace(\" \",\"\");\n\t\tdouble salaire = Double.parseDouble(allChar[2]); \n\t\tSalarie newSalarie = new Salarie(allChar[0],allChar[1],salaire);\n\t\t\n\t\tSystem.out.println(newSalarie.toString());\n\t\t\n\t\t\n\t\t\n\t}", "public void setTrangthaiChiTiet(int trangthaiChiTiet);", "public void mo3370l() {\n }", "public void mo2471e() {\n }", "@Override\r\n\tpublic String sonido() {\n\t\treturn \"Miauu\";\r\n\t}", "public void mo3749d() {\n }", "public void mo1405e() {\n }", "public QLNhanVien(){\n \n }", "@Override\n\tpublic String gettenMonHoc() {\n\t\treturn \"Lâp trình front-end\";\n\t}", "@Override\n\tpublic int xuatLuong() {\n\t\treturn 3000;\n\t}", "public void Makan()\n\t{\n\tSystem.out.println(\"Harimau Makan Daging dan minum susu\");\n\tSystem.out.println();\n\t}", "public void mo115188a() {\n }", "public void mo1406f() {\n }", "public static void main(String[] args) {\n\t\t\n\t\tNhanVien nv1 = new NhanVien(\"Đặng\", \"Hoa\", 273);\n\t\tNhanVien nv2 = new NhanVien(\"Đặng\", \"Nam\", 863);\n\t\t\n\t\tSystem.out.println(\"Lương của \"+nv1.getTen()+\"\\t\"+ nv1.getLuong());;\n\t\tSystem.out.println(\"Lương của \"+nv2.getTen()+\"\\t\"+nv2.getLuong());\n\t\t\n\n\t\tif(nv1.lonHon(nv2)) \n\t\t\tSystem.out.println(nv1.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv2.getTen()+\": \"+ (nv1.getSoSP()-nv2.getSoSP())+\" sản phẩm\");\n\t\telse\n\t\t\tSystem.out.println(nv2.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv1.getTen()+\": \"+ (nv2.getSoSP()-nv1.getSoSP())+\" sản phẩm\");\n\t\t\n\t\tif(nv1.getSoSP()> nv2.getSoSP()) \n\t\t\tSystem.out.println(nv1.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv2.getTen()+\": \"+ (nv1.getSoSP()-nv2.getSoSP())+\" sản phẩm\");\n\t\telse\n\t\t\tSystem.out.println(nv2.getTen()+\" có số lượng sản phẩm lớn hơn \"+nv1.getTen()+\": \"+ (nv2.getSoSP()-nv1.getSoSP())+\" sản phẩm\");\n\t}", "Vaisseau_ordonneeLaPlusHaute createVaisseau_ordonneeLaPlusHaute();", "public abstract C0707b mo9237au();", "@Override\n\tpublic String maju() {\n\t\tif (gigiMasuk) {\n\t\t\treturn super.maju();\n\t\t}else {\n\t\t\treturn \"..............\";\n\t\t}\n\t}", "int tinhSoNgay() {\n return soNgay;\n }", "public void mo21794S() {\n }", "private void processTiepNhanVanThu(long idThuTucHanhChinh, long hoSoThuTucId,QlvtThongTinHoSo thongTinHoSo,QlvtThongTinXuLy addThongTinXuLy) throws SystemException, ClassNotFoundException {\n\t\tTthcThanhPhanHoSo ettThanhPhanMauDon = TthcThanhPhanHoSoLocalServiceUtil.findByThuTucHanhChinhIdMauDonOnline(idThuTucHanhChinh);\r\n\t\tList<TthcThanhPhanHoSoBieuMau> listTTHSBM = TthcThanhPhanHoSoBieuMauLocalServiceUtil.findByThanhPhanHoSoId(ettThanhPhanMauDon.getId());\r\n\t\tTthcThanhPhanHoSoBieuMau ettThanhPhanHoSoBieuMau = null;\r\n\t\tTthcBieuMauHoSo ettBMHS = null;\r\n\t\tif(listTTHSBM.size()>0){\r\n\t\t\tettThanhPhanHoSoBieuMau = listTTHSBM.get(0);\r\n\t\t\tettBMHS = TthcBieuMauHoSoLocalServiceUtil.fetchTthcBieuMauHoSo(ettThanhPhanHoSoBieuMau.getBieuMauHoSoId());\r\n\t\t}\r\n\t\tlog.info(idThuTucHanhChinh + \"-- ettThanhPhanMauDon.getId()--\");\r\n//\t\tList<TthcNoidungHoSo> listNoiDungHS = TthcNoidungHoSoLocalServiceUtil.findByHoSoThuTucIdAndThanhPhanHoSoId(hoSoThuTucId, ettThanhPhanMauDon.getId());\r\n\t\tlog.info(hoSoThuTucId + \"-- hoSoThuTucId--\");\r\n\t\tlog.info(ettThanhPhanMauDon.getId() + \"-- ettThanhPhanMauDon.getId() --\");\r\n\t\tTthcNoidungHoSo ettNoiDungHS = TthcNoidungHoSoLocalServiceUtil.fetchByHoSoThuTucDonOnline(hoSoThuTucId, ettThanhPhanMauDon.getId());\r\n//\t\tif(listNoiDungHS.size() > 0){\r\n//\t\t\tettNoiDungHS = TthcNoidungHoSoLocalServiceUtil.findByHoSoThuTucIdAndThanhPhanHoSoId(hoSoThuTucId, ettThanhPhanMauDon.getId()).get(0);\r\n//\t\t}\r\n\t\tList<Object> allMauDon = MauDonFactory.converXMLMessagesContentToObject(ettNoiDungHS.getNoiDungXml());\r\n\t\tObject obj = allMauDon.size()>0?allMauDon.get(0):null;\r\n\t\tif(idThuTucHanhChinh == 1){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh1(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 2){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh1(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 3){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 4){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 5){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 6){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 7){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 8){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh8(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 9){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh8(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 10){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh8(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 11){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh9(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 12){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh9(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 13){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh2(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 14){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh2(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 15){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 16){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 17){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 18){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 19){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 20){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh8(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 21){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh8(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 22){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh8(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 23){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh9(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 24){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh9(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 25){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 26){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 27){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 28){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 29){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 30){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 31){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 32){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 33){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 34){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh1(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 35){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh1(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 36){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 37){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 38){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 39){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh3(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 40){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh2(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 41){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh2(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 42){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 43){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 44){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 45){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh4(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 46){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 47){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh5(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 51){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh7(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 52){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh7(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 53){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh7(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 54){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh7(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 55){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh6(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 56){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh6(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 57){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh6(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 58){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh6(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}else if(idThuTucHanhChinh == 59){\r\n\t\t\tvanThuProcessNghiepVuQuyTrinh6(obj,idThuTucHanhChinh, hoSoThuTucId, thongTinHoSo, addThongTinXuLy);\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void xoaDonHang(String ma_kh) {\n\n\t}", "public void mo5382o() {\n }", "@Override\r\n\tpublic void stop() {\n\t\tSystem.out.println(\"H1型号是这样熄火的.....\");\r\n\t}", "public int getTahunLahir() {\r\n return tahunLahir;\r\n }", "public void mo1400a() {\n }", "public void mo12930a() {\n }", "@Override\n\tpublic int horas_trabajo() {\n\t\treturn 1000;\n\t}", "public void mo1403c() {\n }", "public void mo21877s() {\n }", "public Harimau(String namaHarimau)\n\t{\n\t//mengisi pengubah yang diwarisi oleh kelas abstract\n\tHarimau.nama = namaHarimau;\n\t}", "public Chauffeur() {\r\n\t}", "public IJoueur quiEstMonMaitre();", "@Override\n\t\tpublic String toString() {\n\t\t\treturn \"Tinh: \"+ this.tinh + \"; Huyen: \"+ this.huyen + \"; Xa: \"+ this.xa;\n\t\t}", "public abstract String mo9091a();", "public abstract int mo123249h();", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo6081a() {\n }", "public void mo9848a() {\n }", "public void nhapdltextlh(){\n\n }" ]
[ "0.67670053", "0.6697991", "0.66178817", "0.6580266", "0.64839447", "0.6410804", "0.6389959", "0.6388603", "0.6367913", "0.63547766", "0.6348264", "0.6334635", "0.63046026", "0.6262646", "0.62493944", "0.6230086", "0.62208575", "0.62071097", "0.61825794", "0.6176046", "0.61738324", "0.61537886", "0.6133672", "0.6130971", "0.61287075", "0.6123147", "0.61161226", "0.61128074", "0.61105466", "0.6109243", "0.6108826", "0.60533375", "0.6050071", "0.6042021", "0.6032529", "0.60264146", "0.60252464", "0.60250235", "0.59891236", "0.59861314", "0.59849733", "0.59641814", "0.59619594", "0.5956871", "0.59566826", "0.59504575", "0.5950408", "0.59486395", "0.59319216", "0.59300053", "0.5917483", "0.5917421", "0.59112257", "0.5911095", "0.5903819", "0.59023273", "0.58992594", "0.5898273", "0.58949083", "0.5893592", "0.58853906", "0.58820766", "0.58752733", "0.58739704", "0.5868045", "0.58644396", "0.58608055", "0.58606046", "0.58605474", "0.58573014", "0.5853474", "0.5851003", "0.5844288", "0.58397555", "0.5838876", "0.58345777", "0.5829908", "0.5819671", "0.58171135", "0.5816212", "0.5814585", "0.58145183", "0.5813226", "0.58079123", "0.580401", "0.57955444", "0.5781318", "0.5778077", "0.5777033", "0.57723373", "0.57711357", "0.57693833", "0.5756194", "0.57456094", "0.5742727", "0.57324165", "0.5731884", "0.5730808", "0.5730035", "0.5729328" ]
0.6468211
5
TODO Autogenerated method stub/ / // quiz Scanner sc = new Scanner(System.in); Sec abc = new Sec(); abc.vending(); int abcd = sc.nextInt(); System.out.println(abc.n(abcd));
public static void main666666(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Exception {\n Scanner sc=new Scanner (System.in);\n int n=sc.nextInt();\n pzz(n);\n }", "public static void main(String[] args) throws Exception {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n pzz(n);\n }", "public static void main (String[] args){\n int num;\n Scanner n = new Scanner(System.in);\n num = n.nextInt();\n int sod = sum(num);\n System.out.println(sod);\n\t}", "public static void main(String[] args) {\n\t\tScanner s= new Scanner(System.in);\nEVENODD e=new EVENODD();\nSystem.out.println(\"Enter a number here\");\ne.EO(s.nextInt());\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the value of n : \");\r\n\t\tint n = sc.nextInt();\r\n\t\tSystem.out.println(\"Entered input is : \"+ n);\r\n\t}", "public static void main (String[] args)\n {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int a=sum(n);\n System.out.println(a);\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint k =0;\n\t\tSystem.out.println(fun(n));}", "public static void main(String[] args) {\n\n\t\tScanner s= new Scanner(System.in);\n\t\tDemo d =new Demo();\n\t\tint n= s.nextInt();\n\t\tint j= d.test(n);\n\t\tSystem.out.println(j);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tdouble sqr=Math.sqrt(n);\r\n\t\tif(sqr%2==0)\r\n\t\t{\r\n\t\t\tSystem.out.println(n+\" is a perfect Square\");\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(n+\" is a not perfect Square\");\r\n\t\t\r\n\t\t\r\n\t}", "public static void main9(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n String str = scanner.next();\n String ret = func2(str,n);\n System.out.println(ret);\n\n\n }", "public static void main(String[] args) {\n int n = 0;\n String pass = \"\";\n Scanner scanner = new Scanner(System.in);\n\n n = scanner.nextInt();\n scanner.nextLine();\n pass = scanner.nextLine().toLowerCase();\n\n if (n > 100) {\n System.out.println(\"NO\");\n } else {\n System.out.println(check(n, pass));\n }\n\n }", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Nhap vao n = \");\r\n\t\tint n = keyboard.nextInt();\r\n\t\tint s = 0 ; // khoi tao bien tong s\r\n\t\tint test = 1; //khoi tao mo bien test va gan test = 1\r\n\t\tfor (int i=1; i<=n; i++) {\r\n\t\ttest = test * i;\r\n\t\ts = s + test ; // sau moi lan tang i thi tong s se bang s + (test*i)\r\n\t}\r\n\tSystem.out.println(\"S (\"+n+\") = \"+s+\"\"); //xuat ra man hinh ket qua\r\n}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the number up to which you want to get the series: \");\n\t\tint n=sc.nextInt();\n\t\tSystem.out.println(\"The sum is: \"+calculateSum(n));\n\t\tsc.close();\n\t}", "public static void petsAge() {\n System.out.println(\"What is the age of your pet?\");\n int petAge = sc.nextInt(); \n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tOddAndEvenNumberPrinting(n);\n\t}", "public static void main(String[] args){\n int number = scn.nextInt();\n \n \n int a = num(number);\n System.out.println(a);\n \n \n }", "public static void main(String[] args) {\n\t\tAffinCipher ac = new AffinCipher();\r\n\t\tString p,e,Encrypt,Decrypt;\r\n\t\tint n;\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Choose one option\\n 1.Encryption\\n 2.Decryption\\n 3.brute force\");\r\n\t\tn = sc.nextInt();\r\n\t\tswitch(n)\r\n\t\t{\r\n\t\tcase 1 : System.out.println(\"Enter plaintext\");\r\n\t\t p = sc.next();\r\n\t\t Encrypt = ac.encrypt(p);\r\n\t\t System.out.println(\"Encrypted text : \"+Encrypt);\r\n\t\t ac.bruteforce(Encrypt);\r\n\t\t break;\r\n\t\tcase 2 : System.out.println(\"Enter encrypted text\");\r\n\t\t e = sc.next();\r\n\t\t Decrypt = ac.decrypt(e);\r\n\t\t System.out.println(\"Decrypted text : \"+Decrypt);\r\n\t\t //break;\r\n\t\t//case 3 : System.out.println(\"Enter encrypted text\");\r\n // e = sc.next();\r\n ac.bruteforce(e);\r\n break;\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n \r\n\t}", "public static void main(String[] args) {\n\t\tint a;\r\n\t\tint b;\r\n\t\tint c;\r\n\t\tint d;\r\n\t\tint e;\r\n\t\t\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the value of n :\");\r\n\t\tint n=s.nextInt();\r\n\t\t\r\n\t\ta=n%10;\r\n\t\tb=a*a;\r\n\t\tc=n/100;\r\n\t\td=c*a;\r\n\t\te=b*d;\r\n\t\tSystem.out.println(b+\"\"+d);\r\n\t\tSystem.out.println(e);\r\n\t}", "public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n final int n = scanner.nextInt();\n System.out.println(sign(n));\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\t\tint n = sc.nextInt();\n\t\tint bc=0;\n\t\twhile(n>0){\n\t\t\tif(n%2==1)\n\t\t\t\tbc++;\n\t\t\t\n\t\t\tn/=2;\n\t\t}\n\t\tSystem.out.println(bc);\n\n\t}", "public static void main(String[] args) {\n\t\tint in = 0;\r\n\t\tSystem.out.println(\"Enter a number to check whether it is a perfect number \");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tin = sc.nextInt();\r\n\t\tperfectNumber(in);\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tInteger n;\nScanner sc= new Scanner (System.in);\n System.out.print (\"Introdusca un Numero\");\n\t\tn = sc. nextInt();\n\t\tif (n%2==0);\n\t\t\tSystem.out.print(\"Es un numero par\");\n\t\n\telse\n\t\t\tSystem.out.print(\"es un numero impar\");\n\t\t\n\n\t}", "public static void main(String[] args) {\n\tint n;\r\n\tScanner ss=new Scanner(System.in);\r\n\tn=ss.nextInt();\r\n\tif(n>0){\r\n\t\tSystem.out.println(\"positive\");}\r\n\telse if(n<0){\r\n\t\tSystem.out.println(\"negative\");}\r\n\telse{\r\n\t\tSystem.out.println(\"zero\");\r\n\t}\r\n\t \r\n\t }", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\r\n Function c = new Function();\r\n //System.out.print(c.PrimeMover(s.nextLine()));\r\n System.out.print(c.PrimeMover(16));\r\n }", "public static void main(String[] args) {\n\t\tint n=scn.nextInt();\r\n\t\tint[] arr=takeinput(n);\r\nint[] ans=Inverse(arr);\r\nfor(int val:ans)\r\n\tSystem.out.println(val);\r\n\t}", "public static void main(String args[]) {\n\t\tScanner scan=new Scanner(System.in);\n\t\t// enter the n \n\t\tint n =scan.nextInt();\n\t\t//close scanner object\n\t\tscan.close();\n\t\t\n\t\t//find perfect powers \n\t\tPerfectpower(n);\n\t\t\n\t\t//print numbers\n\t\tprintPerfectNumbers();\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter n\");\r\n\t\tint n=sc.nextInt();\r\n\t\t\r\n\t\tFibo f=new Fibo();\r\n\t\tf.find(n);\r\n\t\tf.findrecur(n);\r\n\t\tint s=f.findrecur(n);\r\n\t\tSystem.out.println(s);\r\n\t}", "public static void main(String[] args) {\n\t\t\n\tSubtractions val=new Subtractions();\n\tint digit=val.subt();\n\tSystem.out.println(\"the no. is \"+ digit);\n\n\t}", "public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter number of times to flip coin\");\n int n=Integer.parseInt(sc.nextLine());\n flipcoins(n);\n\t}", "private static void showvalue(int n) {\n\t\tSystem.out.println(\"n is\"+ n);\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader input=new BufferedReader(new InputStreamReader(System.in));\r\n\t\t\r\n\t\tint i,a=1,b=1,c=0;\r\n\r\n\t\tSystem.out.print(\"Enter value of n: \");\r\n\r\n\t\tk=input.readLine();\r\n\t\tint n=Integer.parseInt(k);\r\n\t\t\r\n\r\n\t\tSystem.out.print(a);\r\n\r\n\t\tSystem.out.print(\" \"+b);\r\n\r\n\t\tfor(i=0;i<n-2;i++) {\r\n\r\n\t\tc=a+b;\r\n\r\n\t\ta=b;\r\n\r\n\t\tb=c;\r\n\r\n\t\tSystem.out.print(\" \"+c);\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\r\n\t\tSystem.out.print(n+\"th number of the series is: \"+c);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tchar n=sc.next().charAt(0);\n\t\tchar v='a';\n\t\tdo {\n\t\t\tSystem.out.print(v+++\" \");\n\t\t\t\n\t\t}while(v<=n);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n \n\t\tSystem.out.print(\"Enter the string\");\n\t\tScanner name = new Scanner(System.in);\n\t\tint n = name.nextInt();\t\n\t\tseries(n);\n\t}", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the number\");\n\t\tint n=sc.nextInt();\n\t\tSystem.out.println(\"Sum of \"+n+\" natural numbers which are divisble by 3 or 5 is \"+calculatesum(n));\n\t}", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.print(\"숫자 입력 : \");\n\t\tint num = s.nextInt();\n\t\t\n\t\tint result = func(num);\n\t\tSystem.out.println(num + \"!=\" + result);\n\t\ts.close();\n\t}", "public static void main(String args[] ) throws Exception {\n Scanner sc = new Scanner(System.in); \n int n = Integer.parseInt(sc.nextLine()); \n Test123 sol = new Test123();\n for(int i=0 ; i < n ; i++){\n String s = sc.nextLine();\n if(sol.isValid(s))System.out.println(\"Valid\");\n else System.out.println(\"Not valid\");\n }\n }", "public static void main(String args[])\n {\n Scanner sc= new Scanner(System.in);\n double a=1,b,x=3,i,n,s=0;\n System.out.println(\"enter a number\");\n n=sc.nextInt();\n for(i=1;i<=n;i++)\n {\n a=a*x;\n b=1/a;\n s=s+b;\n x=x+2;\n }\n \n System.out.println(s);\n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tint a[]=new int[n];\r\n\t\tint even_count=0,odd_count=0;\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\ta[i]=s.nextInt();\r\n\t\t\tif(a[i]%2==0) {\r\n\t\t\t\teven_count+=1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t}\r\n\t\tSystem.out.println(\"even numbers are\"+even_count+\" \"+\"odd numbers are\"+odd_count);\r\n\t\ts.close();\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scn=new Scanner(System.in);\n\t\tint n =scn.nextInt();\n\t\tdouble sum=0;\n\t\twhile(n>=1){\n\t\t\tsum=sum+(Math.pow(2,n));\n\t\t\tn--;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}", "public static void main(String[] args) {\n\t\t\tScanner sc=new Scanner(System.in);\r\n\t\t\tSystem.out.println(\"Enter n\");\r\n\t\t\tint n=sc.nextInt();\r\n\t\t\tPrimeInt p=new PrimeInt();\r\n\t\t\tfor(int i=2;i<=n;i++)\r\n\t\t\t{\r\n\t\t\t\tp.findPrime(i);\r\n\t\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint a = 0;\n\t\tint b = 1;\n\t\tint i = 0;\n\t\twhile (i <= n - 1) {\n\t\t\tint c = a + b;\n\t\t\t//System.out.println(a);\n\t\t\ta = b;\n\t\t\tb = c;\n\t\t\ti = i + 1;\n\t\t}\n\t\tSystem.out.println(a);\n\n\t}", "public static void main(String[] args) {\n\t\tSbi re =new Sbi();\n // re.rateOfIntrest();\n re.rateOfIntrest(4,5);\n\n\t}", "public static void main(String[] args) {\n System.out.println(\"Enter your String\");\r\n //str1 = in.nextLine();\r\n int a = Integer.parseInt(new Scanner(System.in).nextLine());\r\n PrimeNo p = new PrimeNo();\r\n /*boolean b =*/ p.fibonacci(a);\r\n //System.out.println(b);\r\n \r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tSystem.out.println(outcomes(n,\"\"));\n\t\tSystem.out.println(outcomesnoconsecutiveheads(n, \"\", false));\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint p=500;\n\t\tint r =5;\n\t\tint t = 1;\n\t\tint si = (p*r*t)/100;\n\t\tSystem.out.println(si);\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter the number of tosses\");\r\n\t\tint n = scn.nextInt();\r\n\t\tArrayList<String> ans = coinToss(n);\r\n\t\tSystem.out.println(ans);\r\n\t\tSystem.out.println(\"Total cases: \" + ans.size());\r\n\t}", "public static void main (String[] args)\n {\n Scanner in=new Scanner(System.in);\n int n=in.nextInt();\n int k;\n k=mul(n);\n System.out.println(k);\n }", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tarr[i] = scn.nextInt();\n\t\t}\n\t\tSystem.out.println(val(arr));\n\t}", "public static void main(String[] args) {\n\t\tDifferentMethods di = new DifferentMethods();\r\n\t\tdi.ReadNumber();\r\n\t\tint isEven = di.Verify();\r\n\t di.Print(isEven);\r\n\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner src = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the value of n\");\r\n\t\tint n = src.nextInt();\r\n\t\t\r\n\t\tint total = 0;\r\n\t\t//following loop calculates the sum of the squares of first n natural numbers\r\n\t\tfor (int i = 1 ; i<= n; i++) {\r\n\t\t\tint squareOfNumber = (int) Math.pow(i, 2);\r\n\t\t\ttotal += squareOfNumber;\r\n\t\t\t//System.out.println(squareOfNumber);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"The sum of the squares of first \"+n+\" natural numbers = \"+total);\r\n\t\t\r\n\t\t//Following loop calculates the sum of first n natural numbers\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 1; i <= n; i++) {\r\n\t\t\tsum = sum + i;\r\n\t\t\t\r\n\t\t}\r\n\t\t//System.out.println(sum);\r\n\t\t\r\n\t\t//taking square of the sum\r\n\t\tint squareOfsum = (int) Math.pow(sum,2);\r\n\t\tSystem.out.println(\"The square of the sum of first \"+n+\" natural numbers is\" + squareOfsum);\r\n\t\t\r\n\t\tint difference = squareOfsum - total;\r\n\t\tSystem.out.println(\"The difference between the sum of the squares of the first \"+n+\" natural numbers square of the sum = \"+difference );\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner kb = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Input a number: \");\r\n\t\tint n = kb.nextInt();\r\n\t\tdo\r\n\t\t{\r\n\t\t\tn = SoD(n);\r\n\t\t}\r\n\t\twhile (n > 9);\r\n\t\tSystem.out.println(n);\r\n\t}", "public static void main(String[] args) {\n\t\tint n,s=0;\n\t\tScanner sc= new Scanner(System.in);\n\t\tSystem.out.println(\"enter seat no:\");\n\t\tn=sc.nextInt();\n\t\ts=n%12;\n\t\tswitch(s)\n\t\t{\n\t\tcase 0:\n\t\t\tSystem.out.println(\"seat:\"+(n-11)+\" WS\");\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tSystem.out.println(\"seat:\"+(n+11)+\" WS\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"seat:\"+(n+9)+\" MS\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"seat:\"+(n+7)+\" AS\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"seat:\"+(n+5)+\" AS\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"seat:\"+(n+3)+\" MS\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"seat:\"+(n+1)+\" WS\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"seat:\"+(n-1)+\" WS\");\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tSystem.out.println(\"seat:\"+(n-3)+\" MS\");\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tSystem.out.println(\"seat:\"+(n-5)+\" AS\");\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tSystem.out.println(\"seat:\"+(n-7)+\" AS\");\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tSystem.out.println(\"seat:\"+(n-9)+\" MS\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tint n;\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter your number: \");\n\t\tn = sc.nextInt();\n\t\tif(n%2 == 0)\n\t\t\tSystem.out.println(n + \" is even\");\n\t\telse\n\t\t\tSystem.out.println(n + \" is odd\");\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tArrayList<Integer> arr = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tarr.add(sc.nextInt());\n\t\t}\n\t\tint k = sc.nextInt();\n\t\tSolution sol = new Solution();\n\t\tSystem.out.println(sol.solve(arr, k));\n\t\tsc.close();\n\t}", "@Test\n\tpublic void one()\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"enter the value of a\");\n\t\tint a = sc.nextInt();\n\t\tSystem.out.println(\"value of a is: \" +a);\n\t}", "public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tint n = t.nextInt();\n\t\tString s = \"\";\n\t\ts = t.next();\n\n\t\tif (s.length() > n)\n\t\t\tSystem.out.println(-1);\n\t\telse {\n\t\t\tSystem.out.print(s);\n\n\t\t\tfor (int i = 0; i < n - s.length(); i++)\n\t\t\t\tSystem.out.print(0);\n\t\t}\n\n\t}", "public static void main(String[] a){\n System.out.println(\"----Sum of the factors of perfect number is the number itself----\");\r\n System.out.println();\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tint n = sc.nextInt();\r\n\t\t\r\n\t\tboolean b = isperfect(n);\r\n\t\tif(b){\r\n\t\t \tSystem.out.println(\"perfect number\");\r\n\t\t} else{\r\n\t\t\tSystem.out.println(\"Not a perfect number\");\r\n\t\t}\r\n\t\t\r\n\t \r\n\t}", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\r\n System.out.print(\"Enter the number of numbers to be generated: \");\r\n int n = 0;\r\n try{\r\n n = sc.nextInt();\r\n } catch(Exception e){\r\n Ending.ender(-1);\r\n }\r\n sc.close();\r\n int[] str = generate(n); //str --> stream\r\n for(int i = 0; i < str.length; i++){\r\n System.out.println(str[i]);\r\n }\r\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"enter 1st no\");\n\t\tint a=sc.nextInt();\n\t\tSystem.out.println(\"enter the 2nd no\");\n\t\tint b=sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"enter the 3rd no\");\n\t\tint c=sc.nextInt();\n\t\tQuadraticEquation15.quadraticeq(a,b,c);\n\t\t\n\n\t}", "public static void main(String arg[]){\n\t\tint n;\r\n\t\tmyTester mt = new myTester();\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tn = in.nextInt();\r\n\t\tif(mt.isNegative(n)){\r\n\t\t\tSystem.out.print(n + \" is Negative\");\r\n\t\t}else if(mt.isZero(n)){\r\n\t\t\tSystem.out.print(\"You Entered Zero!.\");\r\n\t\t}else{\r\n\t\t\tSystem.out.print( n + \" is Positive\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws Exception {\n Scanner scn=new Scanner (System.in);\r\n int n=scn.nextInt(); \r\n int[] arr=new int[n];\r\n for(int i=0;i<n;i++){\r\n arr[i]=scn.nextInt();\r\n }\r\n System.out.println(lis(arr));\r\n }", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Uneti broj n: \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n\t\tint c = 0;\n\t\tint sum = 0;\n\n\t\twhile (n > 0) {\n\t\t\tc = n % 10;\n\t\t\tn = n / 10;\n\t\t\tif (c % 2 == 0) {\n\t\t\t\tsum = sum + c;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(\"Zbir parnih cifara je: \" + sum);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tif(sc.hasNext())\r\n\t\t{\r\n\t\t\tint dig=sc.nextInt();\r\n\t\t\tif(dig<0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Factorial not defined for negative numbers\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\tSystem.out.println(factorial(dig));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(System.in);\n int x = scan.nextInt();\n int n = scan.nextInt();\n System.out.println(power(x,n));\n \n }", "public static void luckyNumber() {\n System.out.println(\"What is your lucky number? \");\n int luckyNum = sc.nextInt(); \n }", "public static void main(String[] args) {\n\t\tFibonacciSeries ob=new FibonacciSeries();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the no up to wich you wont to print Series := \");\r\n\t\tint n=sc.nextInt();\r\n\t\tfor(int i=0;i<=n;i++) {\r\n\t\tSystem.out.println(ob.fibonacci(i));\r\n\t\t}\r\n\t\t}", "public static void main(String[] args) {\n\t\tint a,b;\r\n\t\tSystem.out.println(\"to check den is zero\");\r\n\t\tScanner scanner =new Scanner(System.in);\r\n\t\ta = scanner.nextInt();\r\n\t\tb=scanner.nextInt();\r\n\t\tnumber(a,b);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\tSystem.out.print(\"수? \");int n = sc.nextInt();\n\t\t\n\t\tif(n<0) break;\n\t\n\t\tSystem.out.printf(\"%d 팩토리얼값: %d\\n\\n\",n,factorial(n)); //call by value\n\t\t}\n\t\t\n\t\tSystem.out.println(\"종료\");\n\t\tsc.close();\n\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tLexicoCountingModi(0,n);\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"enter end\");\n\t\tint n = scn.nextInt();\n\t\tSystem.out.println(numpath(0, n));\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\tint n;\n\t\tScanner sc =new Scanner(System.in);\n\t\tSystem.out.println(\"enter value of n:\");\n\t\tn=sc.nextInt();\n\t\tfor(int i=2;i<n;i++)\n\t\t{\n\t\t\twhile(n%i==0)\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tn=n/i;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tn = in.nextInt(); r = in.nextInt(); c = in.nextInt();\n\t\tint size = 1;\n\t\tfor (int i = 1; i <= n; i++) size *= 2;\n\t\tSystem.out.print(sol(0, 0, size));\n\t}", "public static void main(String[] args) {\n\t\t Scanner input=new Scanner(System.in);//Input through Scanner Class\n\t\t System.out.println(\"You have Rs 500 in account\"); \n\t\t System.out.println(\"Enter the amount to be withdrawed\");\n\t\t int amount = input.nextInt();\n\t\t //Enter the amount \n\t\t CurrentAccount deposit=new CurrentAccount();\n\t\t payment(deposit, amount);\n\t\t //Withdraw the amount from bank\n\t\t System.out.println(\"Enter the amount to be deposited\");\n\t\t amount = input.nextInt();\n\t deposit(new SavingsAccount(), amount);\n //Deposit the amount bank\n }", "public static void main(String[] args) {\n \r\n Scanner sc = new Scanner(System.in);\r\n ArrayList<Integer> digits = new ArrayList<Integer>();\r\n System.out.println(\"Enter the input\");\r\n int n = sc.nextInt();\r\n for (int i=1;i<=n;i++) {\r\n int digit = sc.nextInt();\r\n digits.add(digit);\r\n }\r\n int b = sc.nextInt();\r\n int c = sc.nextInt();\r\n int res = solve(digits, b, c);\r\n\r\n\r\n }", "public static void main(String[] args) {\n\t\tint sum=0;\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a num:\");\r\n\t\tint n=s.nextInt();\r\n\t\tfor (int i=1;i<=n ;i++ )\r\n\t\t{\r\n\t\t\tif(n%i==0)\r\n\t\t\t{\r\n\t\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(sum);\r\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for(int i=0; i <n;i++)\n {\n int num = sc.nextInt();\n if(isPrime(num)){\n System.out.println(\"Prime\");\n }\n else{\n System.out.println(\"Not prime\");\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner scnr = new Scanner(System.in);\n\t\tSwipeCard swipes = new SwipeCard();\n\t\tdouble cash;\n\t\t//= scnr.nextDouble();\n\t\tint meals;\n\t\t//= scnr.nextInt();\n\n\t\tSystem.out.println(swipes.toString());\n\t\t// number 6.\n\n\t\tswipes.swipe();\n\t\tSystem.out.println(swipes.toString());\n\n\t\tswipes.spend(20);\n\t\tSystem.out.println(swipes.toString());\n\n\n\t\tSystem.out.println(swipes.getPossMeals(\"cash\"));\n\n\t\tSystem.out.println(swipes.shouldWorry());\n\n\t\tSystem.out.println(swipes.roundDownToNearestPenny(123.4567));\n\n\t}", "public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n rollTheDice(sc);\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"enter:\");\n\t\tint num=sc.nextInt();\n\t\t\n\t\tint i,sum=0;\n\t\tfor(i=1;i<num;i++)\n\t\t{\n\t\t\tif(num%i==0)\n\t\t\t{\n\t\t\t\tsum+=i;\n\t\t\t}\n\t\t}\n\t\tif(sum==num)\n\t\t\tSystem.out.println(\"Perfect\");\n\t\telse\n\t\t\tSystem.out.println(\"Not Perfect\");\n\t}", "@SuppressWarnings(\"unused\")\r\n\tpublic static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your car number\");\r\n\t\tnumber=sc.nextInt();\r\n\t\tSystem.out.println(\"How many years old car do you have-\"); \r\n\t\tyears=sc.hasNextInt();\t\r\n\t\tSystem.out.println(\"Car Barnd-\");\r\n\t\tbrand=sc.nextLine();\r\n\tsc.nextLine();\r\n\t\t\r\n\t\tCar s=new Service();\r\n\t\ts.sum();\r\n\t\ts. years();\r\n\t\ts.brand();\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Gimme a number: \");\n int numo = scanner.nextInt();\n System.out.println(factorio(numo));\n\n }", "public int initialAsk(){\n System.out.println(\"Hi, what would you like to do? \");\n System.out.println(\"Please type in the number: \");\n System.out.println(\"1. Add a client to the database \");\n System.out.println(\"2. Add an order to the database \");\n System.out.println(\"3. Display all clients from the database \");\n System.out.println(\"4. Display all orders from the database \");\n System.out.println(\"5. Update the client data \");\n System.out.println(\"6. Update the order data \");\n System.out.println(\"7. Delete the client from a database \");\n System.out.println(\"8. Delete the order from a database \");\n System.out.println(\"9. Find the client\");\n System.out.println(\"10. Find the order\");\n System.out.println(\"11. Finish work/ Close app\");\n return inN.nextInt();\n}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString scStr;\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Please input the n: \");\n\t\t\tscStr = sc.next();\n\t\t\tif (validate(scStr))\n\t\t\t\tSystem.out.println(\"The count is: \\n\" + count(Integer.parseInt(scStr)));\n\t\t}\n\t}", "public static void main(String[] args) {\nSystem.out.println(\"enter n\");\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint arr[]=new int[n]; \n\t\tproblem2 pb=new problem2(arr,n);\n\t\tpb.read();\n\t\tpb.display();\n\t\tpb.sort();\n\t\tpb.search();\n\t\t\n\t}", "public static void main(String[] args) {\n Dni dni= new Dni();\n Scanner sc = new Scanner(System.in);\n \n System.out.println(\"Digitos del dni:\");\n dni.setNumero(sc.nextInt());\n \n if(dni.getNumero()!=0){\n System.out.println(\"Letra:\"+dni.getLetra());\n }else{\n System.out.println(\"El numero introducido no es válido\");\n }\n }", "public static void main(String[] args) {\n\t\t \n\t\tScanner scanner=new Scanner(System.in);\n\t\tUtility utility=new Utility();\n\t\n\t\tdouble c;\n\tSystem.out.println(\"enter the number\");\n\t\tc=scanner.nextInt();\n\n\t\tutility.newt(c);\n\t\tscanner.close();\n\t}", "public static void main(String[] args) {\n\t\tint num;long fact;\r\n\t\tSystem.out.println(\"enter number \");\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tnum=s.nextInt();\r\n\t\tQ6_factorial obj=new Q6_factorial();\r\n\t\tfact=obj.FirstFactorial(num);\r\n\t\tSystem.out.println(\"Factorial is: \"+fact);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);//sc is a point of contact for console\n\t\t\n\t\tSystem.out.println(\"enter num1:\");\n\t\tint n1 = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"enter num2:\");\n\t\tint n2 = sc.nextInt();\n\t\t\n\t\t//perform operations\n\t\tint sum = n1 + n2;\n\t\tint sub = n1 - n2;\n\t\tint mul = n1 * n2;\n\t\tint div = n1 / n2;\n\t\t\n\t\tSystem.out.println(\"sum =\" +sum);\n\t\tSystem.out.println(\"sub =\" +sub);\n\t\tSystem.out.println(\"mul =\" +mul);\n\t\tSystem.out.println(\"div =\" +div);\n\t\t\n}", "public static void main (String[] args){\n\t\t\n Scanner k = new Scanner(System.in);\n int l = k.nextInt();\n \n \n System.out.println(sum(l));\n \n \n }", "public static void main(String[] args) {\n\t\tScanner teclado= new Scanner(System.in);\r\n\t\tint n, cont,sal;\r\n\t\tboolean a=false;\r\n\t\tSystem.out.println(\"Escribe el valor de N:\");\r\n\t\tn= teclado.nextInt();\r\n\t\tsal=n;\r\n\t\tif(n<-1) //Para numeros negativos\r\n\t\t{\r\n\t\t\tn=((n/n-n)-1);//Asi conseguimos el positivo del negativo que introducimos Ejem: -4 = 4 ; -7 = 7\r\n\t\t}\t\r\n\t\tcont=n-1;\r\n\t\twhile(cont>1)\r\n\t\t{\r\n\t\t\tif(n%cont==0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"El numero \"+sal+\" no es primo.\");\r\n\t\t\t\tcont=2;\r\n\t\t\t\ta=true;\r\n\t\t\t}\r\n\t\t\t--cont;\r\n\t\t}\r\n\t\tif (n<=1&&n>=-1)\r\n\t\t\tSystem.out.println(\"El numero \"+sal+\" no es primo.\");\r\n\t\telse if (a==false)\r\n\t\t\tSystem.out.println(\"El numero \"+sal+\" es primo.\");\r\n\t}", "public static void main(String[] args) {\n\t\tString answer = JOptionPane.showInputDialog(\"how many times do you want the totoise to spin from 1-10\");\n\t\tint x = Integer.parseInt(answer);\n\t\tdance(x);\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n //%s - Take the next argument and print it as a string\n //%d - Take the next argument and print it as an int\n\n System.out.println(\"Input number: \");\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n System.out.printf(\"%d + %d%d + %d%d%d\\n\", n, n, n, n, n, n);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"ODD OR EVEN\");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the number:\");\r\n\t\tint n=sc.nextInt();\r\n\t\tSystem.out.println(\"odd numbers\");\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t {\r\n\t\t\tif(i%2==1) \r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t System.out.println(\"even numb\");\r\n\t\t\tfor(int i=0;i<=n;i++){\r\n\t\t\t\tif(i%2==0) \r\n\t\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tRandom rnd = new Random();\n\t\tint n = rnd.nextInt(999) + 1;\n\t\tint s[] = fac(n);\n\t\tSystem.out.println(\"Á`¦@\" + n);\n\t\tSystem.out.println(s[0] + \"¤d\"+s[1] + \"¨Õ\"+s[2] + \"¬B\"+s[3] + \"¤¸\");\n\t\t\n\n\t}", "public static void main(String[] args) {\n System.out.println(\"Respect\");\n Nubbers numbers = new Nubbers();\n int r = numbers.sum(5);\n System.out.println(r);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tTest1 test1 = new Test1();\n\t\t\n\t\tSystem.out.println(\"Selects a number.\");\n\t\ttest1.printMenu(); \n\t\t\n\t\tint N = sc.nextInt();\n\t\tSystem.out.println(test1.printPrice(N));\n\t}", "public static void main(String[] args) {\nAddNumbers a=new AddNumbers();\r\na.getInput();\r\na.addNumbers();\r\nint output=a.addNumbers();\r\nSystem.out.println(\"OUTPUT:\");\r\nSystem.out.println(\"The addition of n numbers is: \"+output);\r\n\t}", "public void nhapMonHoc() {\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Ten mon hoc: \");\n\t\t\ttenMonHoc= scanner.nextLine();\n\t\t\tSystem.out.println(\"So tin chi\");\n\t\t\ttinChi= Integer.parseInt(scanner.nextLine());\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Nhap sai du lieu!\");\n\t\t}\n\t}", "public static void main(String[] args) {\nScanner Sc= new Scanner(System.in);\nSystem.out.printf(\"Nhap vao so N = \");\nint N = Sc.nextInt();\nint S=0,i;\nfor (i=1;i<=N;i++)\n S=S+(10*i+i);\nSystem.out.printf(\"\\n%d\",S);\n\n\t}" ]
[ "0.64876", "0.64865816", "0.63561934", "0.6320097", "0.6279788", "0.6137848", "0.6127976", "0.6106728", "0.6020737", "0.6019897", "0.60086745", "0.5990058", "0.598076", "0.59716064", "0.59602666", "0.5936158", "0.5899105", "0.5890293", "0.58816785", "0.58790964", "0.5876006", "0.5871539", "0.58714473", "0.58436316", "0.58359504", "0.583239", "0.58283633", "0.5801648", "0.5798811", "0.577541", "0.5749773", "0.5732038", "0.5727782", "0.5723829", "0.57223356", "0.57205844", "0.5716494", "0.5703952", "0.5703119", "0.56859696", "0.56619483", "0.5660823", "0.56579113", "0.5646855", "0.5631867", "0.562246", "0.56184334", "0.5618382", "0.56117046", "0.561025", "0.5603999", "0.55913895", "0.5589755", "0.55890036", "0.5586591", "0.55814236", "0.5578991", "0.55755055", "0.55702287", "0.55596226", "0.5556222", "0.5549297", "0.5541237", "0.55369973", "0.553182", "0.5521886", "0.5519637", "0.55150247", "0.550227", "0.5500576", "0.5496259", "0.54823434", "0.547783", "0.5476522", "0.5475472", "0.5470461", "0.54669344", "0.54638684", "0.54628855", "0.54626274", "0.5461999", "0.5457595", "0.54490393", "0.54475486", "0.54470766", "0.5444849", "0.54421586", "0.5440721", "0.5437676", "0.5431132", "0.54304755", "0.5429953", "0.5426443", "0.5418968", "0.54184175", "0.5418389", "0.54131305", "0.54125214", "0.54089653", "0.5396007", "0.53949404" ]
0.0
-1
EventBuilder eventBuilder = Event.builder();
protected EventBuilder doEvaluate( Execution execution, AllocationInstructions allocationInstructions, Event previousEvent) { EventBuilder eventBuilder = previousEvent.toBuilder(); Set<ReferenceWithMetaParty> eventParties = new HashSet(); Iterator var6 = eventBuilder.getPrimitive().getAllocation().iterator(); while (var6.hasNext()) { AllocationPrimitiveBuilder allocationBuilder = (AllocationPrimitiveBuilder) var6.next(); Set<ReferenceWithMetaParty> blockExecutionParties = new HashSet( allocationBuilder.build().getBefore().getExecution().getParty()); eventParties.addAll(blockExecutionParties); allocationBuilder.getBefore().getExecution().clearParty() .addParty(this.replacePartyWithReference(blockExecutionParties)); allocationBuilder.getAfter().getOriginalTrade().getExecution().clearParty() .addParty(this.replacePartyWithReference(blockExecutionParties)); allocationBuilder.getAfter().getAllocatedTrade().forEach((allocatedTradeBuilder) -> { List<ReferenceWithMetaParty> allocatedExecutionParties = (List) Optional .ofNullable(allocatedTradeBuilder.build().getExecution()).map(Execution::getParty) .orElse( Collections.emptyList()); eventParties.addAll(allocatedExecutionParties); allocatedTradeBuilder.getExecution().clearParty() .addParty(this.replacePartyWithReference(allocatedExecutionParties)); }); } eventBuilder.addEventIdentifier(this.getIdentifier("allocationEvent1", 1)).setEventDate( DateImpl.of(LocalDate.now())) .addParty((List) eventParties.stream().map(ReferenceWithMetaParty::getValue).collect( Collectors.toList())).addTimestamp(this.getEventCreationTimestamp(ZonedDateTime.now())); this.postProcessors.forEach((postProcessStep) -> { postProcessStep.runProcessStep(Event.class, eventBuilder); }); return eventBuilder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Event createEvent();", "Event createEvent();", "private Event(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Event(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Event() {\n\n }", "public Event() {}", "public Event() {\r\n\r\n\t}", "public static com.opentext.bn.converters.avro.entity.DocumentEvent.Builder newBuilder() {\n return new com.opentext.bn.converters.avro.entity.DocumentEvent.Builder();\n }", "public Event() {\n\t}", "BasicEvent createBasicEvent();", "public Event(){\n \n }", "public\n CreateEvent()\n {}", "BasicEvents createBasicEvents();", "public Event(){\n\n }", "public EventBus build() {\n return new EventBus(this);\n }", "public Event() {\n }", "public Event() {\n }", "EventUse createEventUse();", "Builder addPublication(PublicationEvent.Builder value);", "public Eventd() {\n }", "public static StreamBuilder configure() {\n return new EventStreamBuilder();\n }", "Builder addRecordedAt(Event.Builder value);", "@Test\r\n public void testEvent() {\n Event event = new Event();\r\n }", "Builder addReleasedEvent(PublicationEvent.Builder value);", "EventChannel create();", "private void createEvents() {\n\t}", "EventUses createEventUses();", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "private TradeMsgEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public interface Event<B extends Enum<B> & Event<B>> extends Base {\n\n\t/**\n\t * Event bean builder.\n\t */\n\tinterface Builder<E extends Event<?>, S extends State<?>, A> {\n\n\t\t/**\n\t\t * Bind event to state.\n\t\t */\n\t\tState.Builder<E, S, A> to(S state);\n\n\t}\n\n\t/**\n\t * Name of the event.\n\t */\n\t@Override\n\tString name();\n\n\t/**\n\t * Identity of the event.\n\t */\n\t@Override\n\tint ordinal();\n\n}", "Event () {\n // Nothing to do here.\n }", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "public interface Event {\n\n}", "public interface Event {\n\n}", "public Event() {\n this.name = null;\n this.description = null;\n this.date = new GregorianCalendar();\n }", "public static SourceBuilder builder() {\n return new SourceBuilder() {\n @Override\n public EventSource build(Context ctx,String... argv) {\n if (argv.length == 1) {\n return new HelloWorldSource(argv[0]);\n } else{\n return new HelloWorldSource();\n } \n }\n };\n }", "private Builder() {}", "public AnalyticsEvent build() {\n AnalyticsEvent purchaseEvent = null;\n if(isValid() && doBaseValidation()) {\n purchaseEvent = eventClient.createEvent(PURCHASE_EVENT_NAME);\n\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRODUCT_ID_ATTR, productId);\n purchaseEvent.addAttribute(PURCHASE_EVENT_STORE_ATTR, store);\n purchaseEvent.addMetric(PURCHASE_EVENT_QUANTITY_METRIC, quantity);\n\n if(formattedItemPrice != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRICE_FORMATTED_ATTR, formattedItemPrice);\n }\n\n if(itemPrice != null) {\n purchaseEvent.addMetric(PURCHASE_EVENT_ITEM_PRICE_METRIC, itemPrice);\n }\n\n if(transactionId != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_TRANSACTION_ID_ATTR, transactionId);\n }\n\n if(currency != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_CURRENCY_ATTR, currency);\n }\n }\n \n return purchaseEvent;\n }", "WithCreate withSource(EventChannelSource source);", "public EventRoomBuilder(int capacity){\r\n itemFactory = new ItemFactory();\r\n newRoom = new EventRoom(capacity);\r\n eventRoomItems = new EventRoomItems();\r\n }", "EventBinding createEventBinding();", "void onNewEvent(Event event);", "public LogEvent newInstance()\n {\n return new LogEvent();\n }", "protected MonetizationEventBuilder(EventClient eventClient) {\n this.eventClient = eventClient;\n }", "public static com.opentext.bn.converters.avro.entity.DocumentEvent.Builder newBuilder(com.opentext.bn.converters.avro.entity.DocumentEvent.Builder other) {\n return new com.opentext.bn.converters.avro.entity.DocumentEvent.Builder(other);\n }", "public ScheduleEvent()\n\t{\n\n\t}", "public Builder() {}", "public Builder() {}", "public Builder() {}", "public static LogEvent createEmptyEvent()\n\t{\n\t\treturn new LogEvent();\n\t}", "public static com.opentext.bn.converters.avro.entity.DocumentEvent.Builder newBuilder(com.opentext.bn.converters.avro.entity.DocumentEvent other) {\n return new com.opentext.bn.converters.avro.entity.DocumentEvent.Builder(other);\n }", "public CreateEventFragment() {\n // Required empty public constructor\n }", "@NonNull\n public static CustomEventTriggerBuilder newCustomEventTriggerBuilder() {\n return new CustomEventTriggerBuilder();\n }", "public Builder() { }", "public Builder() {\n }", "private EventMessageMapper() {\n }", "public DocumentEvent() {}", "Event generateEvent(int seed) throws Exception {\n return new Event(\n new Description(\"Event \" + seed),\n new StartTime(\"0900\"),\n new StartDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new EndTime(\"1100\"),\n new EndDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new Location(\"House of \" + seed),\n new UniqueTagList(new Tag(\"tag\" + Math.abs(seed)), new Tag(\"tag\" + Math.abs(seed + 1)))\n );\n }", "public Builder setEvent(EventType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n event_ = value.getNumber();\n onChanged();\n return this;\n }", "ProgramEventEvent createProgramEventEvent();", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "@Test\n public void eventEntityConstructionTest() {\n\n Event event = new EventEntity();\n\n assertThat(event).isNotNull();\n\n }", "public static Builder builder(){ return new Builder(); }", "public QPEvent() {}", "@NonNull\n public Trigger build() {\n if (UAStringUtil.isEmpty(eventName)) {\n return new Trigger(type, goal, null);\n }\n\n JsonPredicate predicate = JsonPredicate.newBuilder()\n .setPredicateType(JsonPredicate.AND_PREDICATE_TYPE)\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(CustomEvent.EVENT_NAME)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(eventName)))\n .build())\n .build();\n return new Trigger(type, goal, predicate);\n }", "interface Event {\n Event TICK = new Event() {\n };\n}", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "public interface Event\n\t{\n\t\tpublic static final String EVENT_ID = \"aether.event.id\";\n\t\tpublic static final String TIME = \"aether.event.time\";\n\t\tpublic static final String EVENT_TYPE = \"aether.event.type\";\n\t}", "public ArticleSearchDoneEvent() {\n\n }", "EventManager()\n {\n }", "public void buildBegin(MonitorEvent event)\n {\n }", "protected ICEvent() {}", "StartEvent createStartEvent();", "EventChannel create(Context context);", "ConferenceScheduleBuilderService startEvent();", "public EventQueue(){}", "private LogEvent()\n\t{\n\t\tsuper();\n\t}", "Event getEvent();", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "EventBus getEventBus();", "private Builder() {\n\t\t}", "public EventoWS() {\n }", "public void setEventCreated() {\n Date now = new Date();\n this.eventCreated = now;\n }", "private InvalidEventPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private FriendEventPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GroupEventPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder clearEvent() {\n\n event_ = 0;\n onChanged();\n return this;\n }", "public interface IEvent {\n}", "public Builder() {\n\t\t}", "public interface EventDefinition extends EObject {\r\n}", "Builder addRecordedAt(Event value);", "static Builder builder() {\n return new Builder();\n }", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "public Builder(){\n }", "private IEvent createEvent() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(IEvent.ELEMENT_TYPE, null, null);\n\t}", "public interface Event {\n public static final String NAMESPACE = \"http://purl.org/NET/c4dm/event.owl#\";\n\n // classes\n public static final URI\n Event = new URIImpl(NAMESPACE + \"Event\"),\n Factor = new URIImpl(NAMESPACE + \"Factor\"),\n Product = new URIImpl(NAMESPACE + \"Product\");\n\n // properties\n public static final URI\n agent = new URIImpl(NAMESPACE + \"agent\"),\n agent_in = new URIImpl(NAMESPACE + \"agent_in\"),\n factor = new URIImpl(NAMESPACE + \"factor\"),\n factor_of = new URIImpl(NAMESPACE + \"factor_of\"),\n hasAgent = new URIImpl(NAMESPACE + \"hasAgent\"),\n hasFactor = new URIImpl(NAMESPACE + \"hasFactor\"),\n hasLiteralFactor = new URIImpl(NAMESPACE + \"hasLiteralFactor\"),\n hasProduct = new URIImpl(NAMESPACE + \"hasProduct\"),\n hasSubEvent = new URIImpl(NAMESPACE + \"hasSubEvent\"),\n isAgentIn = new URIImpl(NAMESPACE + \"isAgentIn\"),\n isFactorOf = new URIImpl(NAMESPACE + \"isFactorOf\"),\n literal_factor = new URIImpl(NAMESPACE + \"literal_factor\"),\n place = new URIImpl(NAMESPACE + \"place\"),\n producedIn = new URIImpl(NAMESPACE + \"producedIn\"),\n produced_in = new URIImpl(NAMESPACE + \"produced_in\"),\n product = new URIImpl(NAMESPACE + \"product\"),\n sub_event = new URIImpl(NAMESPACE + \"sub_event\"),\n time = new URIImpl(NAMESPACE + \"time\");\n}", "public EventMessageExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Test\n public void constructor() {\n Event event1 = new Event(\"Eat Apple\", \"2020-12-12 12:00\", \"2020-12-12 13:00\",\n false);\n Event event2 = new Event(\"Write paper\", \"2020-05-05 12:00\", \"2020-05-06 23:59\",\n true);\n\n assertEquals(\"Eat Apple\", event1.description);\n assertEquals(LocalDateTime.parse(\"2020-12-12 12:00\", Event.PARSER_FORMATTER), event1.startAt);\n assertEquals(LocalDateTime.parse(\"2020-12-12 13:00\", Event.PARSER_FORMATTER), event1.endAt);\n assertEquals(false, event1.isDone);\n assertEquals(\"Write paper\", event2.description);\n assertEquals(LocalDateTime.parse(\"2020-05-05 12:00\", Event.PARSER_FORMATTER), event2.startAt);\n assertEquals(LocalDateTime.parse(\"2020-05-06 23:59\", Event.PARSER_FORMATTER), event2.endAt);\n assertEquals(true, event2.isDone);\n }", "@Inject\n public Builder() {\n }", "@Override\n public Object getEvent() {\n return eventObj;\n }", "public interface Event extends Serializable {\n\n Long getEventId();\n\n String getEventTitle();\n\n String getEventDescription();\n\n Long getEventAssignerId();\n\n Date getOriginalEventStartDate();\n\n Date getEventStartDate();\n\n /***\n * Sets the new start date for new generating event.\n *\n * @param startEventDate\n */\n void setEventStartDate(Date startEventDate);\n\n Date getEventEndDate();\n\n /***\n * Sets the new end date for new generating event.\n *\n * @param endEventDate\n */\n void setEventEndDate(Date endEventDate);\n//\n// Date getEventRemindDate();\n//\n// /***\n// * Sets the new remind date for new generating event.\n// *\n// * @param endEventDate\n// */\n// void setEventRemindDate(Date endEventDate);\n\n /***\n * Return calendarId field generated with system calendar after sync it\n *\n * @return\n * @see SyncUtils\n */\n Long getCalendarId();\n\n /***\n * Sets calendarId field generated with system calendar after sync it\n *\n * @param calendarId\n * @see SyncUtils\n */\n void setCalendarId(Long calendarId);\n\n /***\n * @return repeat period for current entity instance\n * @see EventProperties.RepeatPeriod\n */\n @EventProperties.RepeatPeriod\n int getEventRepeatPeriod();\n\n /***\n * @return event icon url\n */\n String getEventIconUrl();\n\n /***\n * @return boolean which indicates is event editable\n */\n Boolean isEditable();\n\n /***\n * @return boolean which indicates is event length All day long\n */\n Boolean isAllDayEvent();\n}" ]
[ "0.7338239", "0.7338239", "0.72367376", "0.72367376", "0.7236035", "0.7179065", "0.7072442", "0.7037512", "0.7030263", "0.7010884", "0.6998722", "0.6971973", "0.6904558", "0.68893594", "0.6864251", "0.67946714", "0.67946714", "0.6779456", "0.67502403", "0.6739965", "0.6730247", "0.67245144", "0.6623477", "0.66097444", "0.65589285", "0.654467", "0.6512875", "0.63696593", "0.636259", "0.6337695", "0.6304824", "0.62056327", "0.61982447", "0.61982447", "0.61658174", "0.6150976", "0.61354357", "0.61280334", "0.6126004", "0.61250997", "0.6117873", "0.6101999", "0.6099674", "0.6099651", "0.6090497", "0.6087461", "0.60866445", "0.60866445", "0.60866445", "0.6074318", "0.6073875", "0.6063551", "0.6050003", "0.6046945", "0.6045238", "0.6029986", "0.6029709", "0.6019988", "0.601993", "0.5977672", "0.595705", "0.5949317", "0.5932524", "0.5925908", "0.5902839", "0.5899788", "0.5895605", "0.58950746", "0.5887656", "0.5868303", "0.5862244", "0.58549565", "0.5847911", "0.5840767", "0.583544", "0.5833014", "0.58227175", "0.5816299", "0.5801449", "0.57972103", "0.57957435", "0.57912695", "0.5782781", "0.5779317", "0.57623994", "0.5759031", "0.5753879", "0.5753052", "0.5746136", "0.5745749", "0.5735045", "0.5726368", "0.5724298", "0.57185", "0.57157207", "0.57143754", "0.5712829", "0.5706926", "0.570691", "0.5704724", "0.5704114" ]
0.0
-1
TODO Autogenerated method stub
@Override public BaseService<Object> getService() { return analyticsService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public Query getQuery(JSONObject json) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public Class<Object> getEntityClass() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public Pager<Object> getPager() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public String getCollection() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
add by Daniel 08/20/2015
@ApiOperation(value = "upload data", notes = "add data from csv file") @RequestMapping(value = "/uploadData", method = RequestMethod.POST) public ResponseEntity<?> uploadData(HttpServletRequest request) throws IOException { CommonsMultipartResolver commonsMultipartResolver = new CustomMultipartResolver( request.getServletContext()); if (commonsMultipartResolver.isMultipart(request)) { MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request; Iterator<String> iter = multiRequest.getFileNames(); while (iter.hasNext()) { MultipartFile multipartFile = multiRequest.getFile(iter.next()); if (multipartFile != null) { InputStream inputStream = multipartFile.getInputStream(); String fileName = multipartFile.getOriginalFilename(); File tmpFile = File.createTempFile(fileName, ".tmp"); String path = tmpFile.getPath(); String appID = request.getParameter("appId"); // Judging file format String prefix = fileName.substring(fileName .lastIndexOf(".") + 1); // System.out.println(prefix); if (prefix.equals("gz")) { inputStream = new GZIPInputStream(inputStream); } FileUtils.copyInputStreamToFile(inputStream, tmpFile); // System.out.println(tmpFile.getName()); if (prefix.equals("csv")) { Csv2Data csv2data = new Csv2Data(); List data = csv2data.change2data(path, appID); String collectionName = fileName.substring(12, (fileName.length() - 4)); // System.out.println(collectionName); // System.out.println(appID); try { analyticsService.insertMany(collectionName, data); } catch (Exception e) { log.error("{}", e); return ResponseUtils.fail(e.getMessage(), HttpStatus.FOUND); } } if (prefix.equals("txt") || prefix.equals("gz")) { ReadTxtData readtxtdata = new ReadTxtData(); List data = readtxtdata.readTXT(path, appID); String collectionName = "sale_report_ios"; try { analyticsService.insertMany(collectionName, data); } catch (Exception e) { log.error("{}", e); return ResponseUtils.fail(e.getMessage(), HttpStatus.FOUND); } } // else { // return ResponseUtils.fail("File format is not correct"); // } tmpFile.delete(); } } } return ResponseUtils.successWithStatus(HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void add() {\n\n\t}", "public void add() {\n\t\t\n\t}", "@Override\n\tpublic void add() {\n\t\t\n\t}", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "private void add(String thestring) {\n\t\t\n\t}", "protected int addInfo(syntaxMap toAdd){\n if(index == 10){\n return 0;\n }\n else if(index < 5) {\n this.array1[index] = toAdd;\n }\n else{\n this.array2[index - 5] = toAdd;\n }\n ++index;\n return 1;\n }", "public Curstomers_add() {\n\t\tsuper();\n\t}", "private void addition()\n\t{\n\t\tFun = Function.ADD;\t//Function set to determine what action should be taken later. \n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "@Override\n\tpublic void addRec() {\n\t\t\n\t}", "public void add() {\n }", "void addData();", "private void addTwoNumbers() {\n\t\t\n\t}", "private static void addShapeless()\n {}", "abstract void add();", "public void add() {\n\n }", "private void addrec() {\n\t\tnmfkpinds.setPgmInd34(false);\n\t\tnmfkpinds.setPgmInd36(true);\n\t\tnmfkpinds.setPgmInd37(false);\n\t\tstateVariable.setActdsp(replaceStr(stateVariable.getActdsp(), 1, 8, \"ADDITION\"));\n\t\tstateVariable.setXwricd(\"INV\");\n\t\ttransactionTypeDescription.retrieve(stateVariable.getXwricd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00003 Trn_Hst_Trn_Type not found on Transaction_type_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwtdsc(all(\"-\", 20));\n\t\t}\n\t\tstateVariable.setXwa2cd(\"EAC\");\n\t\tstateVariable.setUmdes(replaceStr(stateVariable.getUmdes(), 1, 11, um[1]));\n\t\taddrec0();\n\t}", "public void add();", "private Add() {}", "private Add() {}", "@Override\r\n\tpublic void addMe() {\n\t\t\r\n\t}", "public void dvAdded()\r\n/* 76: */ {\r\n/* 77:160 */ this.numDVRecords += 1;\r\n/* 78: */ }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Aa addNewAa();", "static void add_with_mem(String passed){\n\t\tint sum = hexa_to_deci(registers.get('A'));\n\t\t/*\n\t\t * This will be valid only when sign arithematic is being performed\n\t\t * if(S)\n\t\t\tsum*=-1;\n\t\t */\n\t\tsum+=hexa_to_deci(memory.get(memory_address_hl()));\n\t\tCS = sum>255?true:false;\n\t\tregisters.put('A', decimel_to_hexa_8bit(sum));\n\t\tmodify_status(registers.get('A'));\n\t}", "@Override\r\n\tpublic int numCurrentsToAdd() {\n\t\treturn 2;\r\n\t}", "public void mo38117a() {\n }", "static int size_of_add(String passed){\n\t\treturn 1;\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void enableAdd(){\n addSubmit.setDisable(false);\n removeSubmit.setDisable(true);\n setSubmit.setDisable(true);\n addCS.setDisable(false);\n removeCS.setDisable(true);\n setCS.setDisable(true);\n addIT.setDisable(false);\n removeIT.setDisable(true);\n setIT.setDisable(true);\n addECE.setDisable(false);\n removeECE.setDisable(true);\n setECE.setDisable(true);\n partTime.setDisable(false);\n fullTime.setDisable(false);\n management.setDisable(false);\n dateAddText.setDisable(false);\n dateRemoveText.setDisable(true);\n dateSetText.setDisable(true);\n nameAddText.setDisable(false);\n nameRemoveText.setDisable(true);\n nameSetText.setDisable(true);\n hourlyAddText.setDisable(false);\n annualAddText.setDisable(false);\n managerRadio.setDisable(false);\n dHeadRadio.setDisable(false);\n directorRadio.setDisable(false);\n //codeAddText.setDisable(false);\n hoursSetText.setDisable(true);\n }", "@Override\n\t public void printAdd(int a,int b) { \n\t\t super.printAdd(10,20); \n\t }", "@Override\n\tpublic void add(double dx, double dy) {\n\t\t\n\t}", "public void add(String name)\n/* 15: */ {\n/* 16:14 */ this.members.add(name);\n/* 17: */ }", "public void initForAddNew() {\r\n\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "static void add_with_reg(String passed){\n\t\tint sum = hexa_to_deci(registers.get('A'));\n\t\t/*\n\t\t * This will be valid only when sign arithematic is being performed\n\t\t * if(S)\n\t\t\tsum*=-1;\n\t\t */\n\t\tsum+=(hexa_to_deci(registers.get(passed.charAt(4))));\n\t\tCS = sum>255?true:false;\n\t\tregisters.put('A', decimel_to_hexa_8bit(sum));\n\t\tmodify_status(registers.get('A'));\n\t}", "static void perform_add(String passed){\n\t\tint type = type_of_add(passed);\n\t\tif(type==1)\n\t\t\tadd_with_reg(passed);\n\t\telse if(type==2)\n\t\t\tadd_with_mem(passed);\n\t}", "public void add(int add){\n if (!elementOf(add)) {\n int[] added = new int[set.length + 1];\n for(int element = 0; element < set.length; element++){\n added[element] = set[element];\n }\n added[set.length] = add; \n setSet(added);\n added = null;\n }\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void addcode(String code){//להחליף את סטרינג למחלקה קוד או מזהה מספרי של קוד\r\n mycods.add(code);\r\n }", "public void addAndReturnOld() {\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc addNewLoc();", "@Override\n\tpublic void add(T e) {\n\t\t\n\t}", "public A3Add(){}", "public void checkNewAdded(Instance add) {\n List<Instance> keySet = new LinkedList<Instance>();\n keySet.addAll(backRelation.keySet());\n Boolean added = false;\n for (Instance inst : keySet) {\n if (inst.getName().equals(add.getName()) || inst.getMd5().equals(add.getMd5())) {\n added = true;\n ArrayList<Instance> tmp = backRelation.get(inst);\n tmp.add(add);\n backRelation.remove(inst);\n backRelation.put(inst, tmp);\n if (relatedInstances.containsKey(inst)) {\n ArrayList<Instance> tmpRI = relatedInstances.get(add);\n tmpRI.add(inst);\n relatedInstances.remove(add);\n relatedInstances.put(add, tmpRI);\n\n } else {\n ArrayList<Instance> tmpRI = new ArrayList<Instance>();\n tmpRI.add(inst);\n relatedInstances.put(add, tmpRI);\n }\n\n }\n }\n if (added) {\n instances.add(add);\n }\n }", "public void mo1531a() {\n }", "public final void mo51373a() {\n }", "static void add() {\r\n\t\t\r\n\t\tint a = 500;\r\n\t\tint b = 300;\r\n\t\t\r\n\t\tint s = a +b;\r\n\t\tSystem.out.println(s);\r\n\t}", "public void add(Double addedAmount) {\n }", "@Override\npublic void add(VirtualComponent comp, int pos) {\n\t\n}", "public void addPrice(float add) {\n price += add;\n totalPrizeLabel.setText(String.format(\"£%.02f\", price));\n }", "abstract int add(String cruise_add, String advice_add);", "void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() + t;\n\t act.setLocation(act.getMap(), act.getX(), act.getY(), date);\n\t}\n }", "@Override\npublic void add(VirtualContainer parent, VirtualComponent comp, int pos) {\n\t\n}", "public void addCount() {\n \t\tdupCount++;\n \t}", "void add(java.lang.CharSequence r1, java.lang.CharSequence r2, long[] r3, int r4) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.icu.impl.coll.CollationDataBuilder.add(java.lang.CharSequence, java.lang.CharSequence, long[], int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.add(java.lang.CharSequence, java.lang.CharSequence, long[], int):void\");\n }", "@Override\n\tpublic double add(double in1, double in2) {\n\t\treturn 0;\n\t}", "private void mo3747b() {\n this.f1427B.add(this.f1490s);\n this.f1427B.add(this.f1491t);\n this.f1427B.add(this.f1492u);\n this.f1427B.add(this.f1493v);\n this.f1427B.add(this.f1495x);\n this.f1427B.add(this.f1496y);\n this.f1427B.add(this.f1497z);\n this.f1427B.add(this.f1494w);\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo12930a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "void addStartingHadithNo(Object newStartingHadithNo);", "public static String add(String num1, String num2) {\n\t\t// *** WRITE YOUR CODE HERE ***\n\t}", "private void addData() {\n Details d1 = new Details(\"Arpitha\", \"+91-9448907664\", \"25/05/1997\");\n Details d2 = new Details(\"Abhijith\", \"+91-993602342\", \"05/10/1992\");\n details.add(d1);\n details.add(d2);\n }", "private void addOp(final Op op) {\n result.add(op);\n }", "protected int addCE(long r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.icu.impl.coll.CollationDataBuilder.addCE(long):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.addCE(long):int\");\n }", "protected add method_2503(int var1) {\r\n add var10000 = new add;\r\n var10000.method_3721(class_1192.field_6147);\r\n return var10000;\r\n }", "@Override\n\tpublic boolean add(Integer e) {\n\t\t// TODO Auto-generated method stub\n\t\treturn false;\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo4359a() {\n }", "public void add(int v, int p){\n \n \n \n }", "public void mo9848a() {\n }", "public void addYear(){\n\t\tyearAdd++;\n\t}", "public void mo12628c() {\n }", "private void add(){\n if((cells[pointer]&0xff) >= 255){\n cells[pointer] = 0;\n } else {\n cells[pointer]++;\n }\n }", "public void mo55254a() {\n }", "@Override\r\n\tprotected Integer add(Integer x1, Integer x2) {\n\t\treturn x2+x1;\r\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void skystonePos6() {\n }", "@Override\r\n\tpublic int add(int a,int b) {\n\t\treturn a+b;\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public void add(int add) {\r\n value += add;\r\n }", "SongSublist addItem( SongEntry itemToAdd )\n {\n try {\n SongSublist newSub = (SongSublist)this.clone();\n newSub.subs.add(itemToAdd);\n newSub.setDuration(this.duration + itemToAdd.getDuration());\n return newSub;\n }\n catch (CloneNotSupportedException ex)\n {\n System.out.println(\"Clone not supported\");\n return null;\n }\n }", "@Override\n\tpublic int add(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}", "void add(Note note);", "public void addNames() {}", "public void addNames() {}", "@Override\r\n public void add() {\n String ID =id.getText();\r\n String Name =name.getText();\r\n String form_date =date_start.getText();\r\n String to_date =date_finish.getText();\r\n String Status =status.getText();\r\n String MemberID = MemberId.getText();\r\n ArrayList<String> arr = new ArrayList<String>();\r\n arr.add(ID);\r\n arr.add(Name);\r\n arr.add(form_date);\r\n arr.add(to_date);\r\n arr.add(Status);\r\n arr.add(MemberID);\r\n String PathFile = \"/home/yara/Documents/4year/OODP/Task.txt\";\r\n FileFacade facade = new FileFacade();\r\n facade.Add(PathFile, arr);\r\n }", "public void addDelayTime(int add)\r\n\t{\r\n\t\tString[] parts = departureTime.split(\":\");\r\n\t\tString[] parts1 = arrivalTime.split(\":\");\r\n\t\tString departureHour = parts[0];\r\n\t\tString departureMin = parts[1];\r\n\t\tString arrivalHour = parts1[0];\r\n\t\tString arrivalMin = parts1[1];\r\n\t\t// converting string to integer\r\n\t\tint departureHour1 = Integer.parseInt(departureHour);\r\n\t\tint arrivalHour1 = Integer.parseInt(arrivalHour);\r\n\t\t// adding delay time and start form 0 if it is 24\r\n\t\tint departHour = (departureHour1 + add)%24;\r\n\t\tint arriveHour = (arrivalHour1+add)%24;\r\n\t\tString dHour = String.format(\"%02d\",departHour);\r\n\t\tString aHour = String.format(\"%02d\",arriveHour);\r\n\t\t// combining hour and minute.\r\n\t\tthis.departureTime = dHour + \":\" + departureMin;\r\n\t\tthis.arrivalTime = aHour + \":\" + arrivalMin;\r\n\t\t\r\n\t}", "protected int insert(int toAdd){\n\n tnode object = new tnode();\n\n return object.insert(toAdd);\n\n }" ]
[ "0.6948361", "0.62833774", "0.614189", "0.6117237", "0.602875", "0.602875", "0.602875", "0.60231555", "0.59008616", "0.5765709", "0.57291406", "0.56970954", "0.5649942", "0.5638385", "0.56267846", "0.56251", "0.5621403", "0.55960196", "0.55844355", "0.55816114", "0.55784243", "0.55784243", "0.5543852", "0.54728013", "0.5463958", "0.54220724", "0.54193354", "0.53857243", "0.53841525", "0.53818077", "0.5335329", "0.5323923", "0.5322952", "0.52977467", "0.52866125", "0.5280819", "0.5276832", "0.52726734", "0.5268372", "0.5256835", "0.525379", "0.5249959", "0.52385247", "0.52368546", "0.52339685", "0.52297175", "0.5226269", "0.5222949", "0.52036196", "0.52002305", "0.5196933", "0.51935357", "0.51916736", "0.5190033", "0.5185021", "0.51844645", "0.5183628", "0.5179571", "0.51743746", "0.517107", "0.5167495", "0.515857", "0.51580983", "0.51542443", "0.51505214", "0.51505214", "0.51505214", "0.51505214", "0.51505214", "0.51505214", "0.51505214", "0.5149578", "0.51491785", "0.51487875", "0.5136969", "0.51299256", "0.5129615", "0.51268804", "0.51165384", "0.51153004", "0.51149184", "0.5102968", "0.5093312", "0.5091282", "0.5077526", "0.5070946", "0.50707936", "0.50698024", "0.5067532", "0.5063248", "0.50563544", "0.50528", "0.50481725", "0.50466496", "0.50455624", "0.504434", "0.5043685", "0.5043685", "0.50404125", "0.50401807", "0.50401145" ]
0.0
-1
Common function :merge two result list to one
@SuppressWarnings({ "rawtypes", "unchecked" }) private static List<Object> mergeResult(List<Object> list1, List<Object> list2) { List<Object> result = new ArrayList<Object>(); for (int i = 0; i < list1.size(); i++) { for (int j = 0; j < list2.size(); j++) { if (Integer.parseInt(((Map) list1.get(i)).get(MongoDBConstants.DOCUMENT_ID).toString()) == Integer .parseInt(((Map) list2.get(j)).get(MongoDBConstants.DOCUMENT_ID).toString())) { Map data = new HashMap(); int hour = (Integer.parseInt(((Map) list1.get(i)).get(MongoDBConstants.DOCUMENT_ID).toString()) + 8) % 24; data.put(MongoDBConstants.DOCUMENT_ID, hour + ""); data.put("value", Integer.parseInt(((Map) list1.get(i)).get("value").toString()) + Integer.parseInt(((Map) list2.get(j)).get("value").toString())); result.add(data); } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Object> fullUnion(ArrayList<Object> list1 , ArrayList<Object> list2){\r\n ArrayList<Object> retList = new ArrayList<Object>();\r\n retList.addAll(list1);\r\n retList.addAll(list2);\r\n return retList;\r\n }", "public static void main(String[] args) {\n List<Integer> list1 = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n list1.add(2);\n list1.add(3);\n list1.add(4);\n list2.add(1);\n list2.add(5);\n list2.add(6);\n merge(list1, list2).forEach(item -> System.out.print(item + \" \"));\n }", "public static <T extends Comparable<? super T>> \n void union(SLL<T> list1, SLL<T> list2,\n SLL<T> result) {\n \n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n \n T itemlist1=null, itemlist2=null;\n \n // get first item in each list\n if ( iterlist1 != null )\n itemlist1 = iterlist1.info;\n if( iterlist2 != null )\n itemlist2 = iterlist2.info;\n \n while ( itemlist1 != null || itemlist2 != null ) {\n\n int compareResult;\n if( itemlist1 == null ) {\n compareResult = 1;\n } else if ( itemlist2 == null ) {\n compareResult = -1;\n } else {\n compareResult = itemlist1.compareTo(itemlist2);\n }\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //appending to result list \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n result.addToTail(itemlist1); //appending to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n result.addToTail(itemlist2);\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n } \n }", "public List<String> merge(List<String> list1, List<String> list2){\n List<String> res = new ArrayList<>();\n for (String l1 : list1){\n for (String l2 : list2){\n res.add(l1+l2);\n }\n }\n return res;\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "private List<Integer> merge(List<Integer> firstList, List<Integer> secondList) {\n List<Integer> resultList = new ArrayList<>();\n\n if (firstList.size() == 1 && secondList.size() == 1) {\n resultList.add(Math.min(firstList.get(0), secondList.get(0)));\n resultList.add(Math.max(firstList.get(0), secondList.get(0)));\n return resultList;\n }\n\n int firstIndex = 0;\n int secondIndex = 0;\n\n while (firstIndex < firstList.size() && secondIndex < secondList.size()) {\n if (firstList.get(firstIndex) < secondList.get(secondIndex)) {\n resultList.add(firstList.get(firstIndex));\n firstIndex++;\n } else {\n resultList.add(secondList.get(secondIndex));\n secondIndex++;\n }\n }\n\n if (firstIndex < firstList.size()) {\n for (int i = firstIndex; i < firstList.size(); i++) {\n resultList.add(firstList.get(i));\n }\n }\n\n if (secondIndex < secondList.size()) {\n for (int i = secondIndex; i < secondList.size(); i++) {\n resultList.add(secondList.get(i));\n }\n }\n\n return resultList;\n }", "public static <T> List<T> union(List<T> a, List<T> b) {\n\t\t\n\t\tHashMap<T, Boolean> include = new HashMap<T, Boolean>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tinclude.put(elt, true);\n\t\tfor (T elt : b)\n\t\t\tinclude.put(elt, true);\n\t\t\n\t\tList<T> toReturn = new ArrayList<T>();\n\t\tfor (T elt : include.keySet())\n\t\t\ttoReturn.add(elt);\n\t\t\n\t\treturn toReturn;\n\t}", "void merge();", "public static void prefixMerge(Client [] list1, Client [] list2, Client[] result){\n int resultCount = 0;\n for (int i = 0; resultCount < result.length; i++) //goes through list1 up until the end of result\n {\n for (int j = 0; j < list2.length && resultCount < result.length; j++) //goes through list2 up until the end of list2\n {\n for (int k = 0; k < resultCount; k++) { //check if current element of list2 is already in result\n if (list2[j].compareClient(result[k]) == 0) { j++; } //without this there is an issue where the previous element of list1 is\n } //repeated in list2 but the current element of list1 is larger\n\n if (list2[j].compareClient(list1[i]) < 0) { //copies current element of list2 to result if it is smaller\n result[resultCount] = list2[j]; //than current element of list1\n resultCount++;\n }\n }\n if (resultCount < result.length) { //copies current element of list1 to result if there is room in result\n result[resultCount] = list1[i]; // needed if statement because of outOfBounds exception where all elements\n resultCount++; //in result were already filled by list2\n }\n }\n\n }", "private static int[] merge( int[] a, int[] b )\n {\n int[] retList = new int[a.length + b.length];\n\t int aPos = 0, bPos = 0;\n\t for(int x = 0; x < retList.length; x ++) {\n\t\t if(aPos < a.length && bPos < b.length) {\n\t\t\t if(a[aPos] < b[bPos]) {\n\t\t\t\t retList[x] = a[aPos];\n\t\t\t\t aPos ++;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t retList[x] = b[bPos];\n\t\t\t\t bPos ++;\n\t\t\t }\n\t\t }\n\t\t else if(aPos < a.length) {\n\t\t\t retList[x] = a[aPos];\n\t\t\t aPos ++;\n\t\t }\n\t\t else {\n\t\t\t retList[x] = b[bPos];\n\t\t\t bPos ++;\n\t\t }\n\t }\n return retList;\n }", "public ArrayList<Object> union(ArrayList<Object> list1, ArrayList<Object> list2) {\r\n ArrayList<Object> retList = list1;\r\n for(Object o : list2)\r\n if(!list1.contains(o))\r\n retList.add(o);\r\n return retList;\r\n }", "public static void mergeJsonIntoBase(List<Response> r1, List<Response> r2){\n //List of json objects in the new but not old json\n List<String> toAdd = new ArrayList<>();\n for(int i = 0; i < r1.size(); i ++){\n String r1ID = r1.get(i).getId();\n for(int j = 0; j < r2.size(); j ++){\n String r2ID = r2.get(j).getId();\n if(r1ID.equals(r2ID)){\n compareJson(r1.get(i), r2.get(j));\n }else{\n if (!toAdd.contains(r2ID)) {\n toAdd.add(r2ID);\n }\n }\n }\n }\n //Add all new elements into the base element\n List<Response> remainderToAdd = getElementListById(toAdd, r2);\n\n for(Response r: remainderToAdd){\n r1.add(r);\n }\n }", "private static void merge(ArrayList<Integer> leftList, ArrayList<Integer> rightList, ArrayList<Integer> outList) {\n\n int leftIndex = 0;\n int rightIndex = 0;\n int outIndex = 0;\n\n while (leftIndex < leftList.size() && rightIndex < rightList.size()) {\n\n if (leftList.get(leftIndex).compareTo(rightList.get(rightIndex)) <= 0) {\n outList.set(outIndex, leftList.get(leftIndex));\n leftIndex++;\n } else {\n outList.set(outIndex, rightList.get(rightIndex));\n rightIndex++;\n }\n\n outIndex++;\n\n }\n\n if (leftIndex < leftList.size()) {\n copyRemainder(leftList, leftIndex, outList, outIndex);\n } else {\n copyRemainder(rightList, rightIndex, outList, outIndex);\n }\n\n }", "public static void prefixMerge(Client [] list1, Client [] list2,\n Client[] result){\n\n int listOneIndex = 0;\n int listTwoIndex = 0;\n for (int i = 0; i < result.length; i++){\n if (list1[listOneIndex].compareClient(list2[listTwoIndex]) < 0){\n result[i] = list1[listOneIndex];\n listOneIndex++;\n } else if (list1[listOneIndex].compareClient(list2[listTwoIndex]) > 0) {\n result[i] = list2[listTwoIndex];\n listTwoIndex++;\n } else {\n result[i] = list2[listTwoIndex];\n listTwoIndex++;\n listOneIndex++;\n }\n }\n }", "public ArrayList<Posting> mergeTwoPostingList(ArrayList<Posting> a, ArrayList<Posting> b) { \r\n\t\tfor (Posting postingA : a) {\r\n\t\t\tint indexInB = b.indexOf(postingA);\r\n\t\t\tif (indexInB == -1)\r\n\t\t\t\tb.add(postingA);\r\n\t\t\telse\r\n\t\t\t\tb.get(indexInB).increaseTermFrequecyBy(postingA.getTermFrequency());\r\n\t\t}\r\n\t\treturn b;\r\n\t}", "Node[] merge(List<Node> nodeList1, List<Node> nodeList2, List<Node> exhaustedNodes);", "public static ArrayList<Integer> union(ArrayList<Integer> list1,\r\n\t\t\tArrayList<Integer> list2) {\r\n\r\n\t\tArrayList<Integer> union = new ArrayList<>();\r\n\t\t//adding elements from first array list to the new array list\r\n\t\tfor (int i = 0; i < list1.size(); i++) {\r\n\t\t\tunion.add(list1.get(i));\r\n\t\t}\r\n\t\t\r\n\t\t//adding elements from the second array list to the new array list\r\n\t\tfor (int j = 0; j < list2.size(); j++) {\r\n\t\t\tunion.add(list2.get(j));\r\n\t\t}\r\n\r\n\t\t//returning combined list\r\n\t\treturn union;\r\n\t}", "private static MyList Merge(MyList L1, MyList L2)\n\t{\n\t\t//however, one assumption is that the length of L1>L2, because of our mid algorithm\n\t\tMyList merged = new MyList(0);//its next is the resulting merged list\n\t\tMyList current = merged;//current points where we are at the time of merging\n\t\tint turn = 1;//we define a turn to know which list element to be merged per loop cycle\n\t\twhile(L1!=null && L2!=null)\n\t\t{\n\t\t\tif(turn==1)//pick from L1\n\t\t\t{\n\t\t\t\tcurrent.next = L1;\n\t\t\t\tL1 = L1.next;//update L1's index to right\n\t\t\t\tturn = 2;//next loop we pick from L2\n\t\t\t}\n\t\t\telse//pick from L2\n\t\t\t{\n\t\t\t\tcurrent.next = L2;\n\t\t\t\tL2 = L2.next;//update L1's index to right\n\t\t\t\tturn = 1;//back to L1 next cycle\n\t\t\t}\n\t\t\tcurrent = current.next;//update the current pointer\n\t\t}\n\t\t//as we said L1's length may be longer than L2 considering size of array\n\t\tif(L1!=null)//we merge the remaining L1 to our current.next\n\t\t\tcurrent.next = L1;\n\n\t\treturn merged.next;\n\t}", "void doMerge() {\n int[] temp = new int[arr.length + brr.length];\n int count = 0;\n for (int i = 0; i < arr.length; i++) {\n temp[i] = arr[i];\n count++;\n }\n for (int i = 0; i < brr.length; i++) {\n temp[count++] = brr[i];\n }\n for (int i = 0; i < temp.length; i++) {\n System.out.println( temp[i] );\n }\n String a[] = {\"A\", \"E\", \"I\"};\n String b[] = {\"O\", \"U\"};\n List<String> list = new ArrayList( Arrays.asList( a ) );\n list.addAll( Arrays.asList( b ) );\n Object[] c = list.toArray();\n System.out.println( Arrays.toString( c ) );\n }", "public int[] merge(int[] ls, int[] rs) {\n\t int[] result = new int[ls.length + rs.length];\r\n\r\n\t int i, l, r;\r\n\t i = l = r = 0;\r\n\t while (i < result.length) {\r\n\t if (l < ls.length && r < rs.length) {\r\n\t if (ls[l] < rs[r]) {\r\n\t result[i] = ls[l];\r\n\t ++i;\r\n\t ++l;\r\n\t } else {\r\n\t result[i] = rs[r];\r\n\t ++i;\r\n\t ++r;\r\n\t }\r\n\t } else if (l >= ls.length) {\r\n\t while (r < rs.length) {\r\n\t result[i] = rs[r];\r\n\t ++i;\r\n\t ++r;\r\n\t }\r\n\t } else if (r >= rs.length) {\r\n\t while (l < ls.length) {\r\n\t result[i] = ls[l];\r\n\t ++i;\r\n\t ++l;\r\n\t }\r\n\t }\r\n\t }\r\n\t return result;\r\n\t }", "public static void merge (int[] result, int[] a1, int[] a2) {\r\n\t\tint len1 = a1.length;\r\n\t\tint len2 = a2.length;\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\t\r\n\t\twhile (i < len1 && j < len2) {\r\n\t\t\tif (a1[i] < a2[j]) {\r\n\t\t\t\tresult[k] = a1[i];\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tresult[k] = a2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (i < len1) {\r\n\t\t\tresult[k] = a1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (j < len2) {\r\n\t\t\tresult[k] = a2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t}", "public static SinglyLinkedList merge(SinglyLinkedList list1, SinglyLinkedList list2)\n\t{\n\t\tSinglyLinkedList list3 = new SinglyLinkedList();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\twhile((i < list1.size()) && (j < list2.size()))\n\t\t{\n\t\t\tif(list1.getElementAt(i) < list2.getElementAt(j))\n\t\t\t{\n\t\t\t\tlist3.addLast(list1.getElementAt(i));\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if(list1.getElementAt(i) > list2.getElementAt(j))\n\t\t\t{\n\t\t\t\tlist3.addLast(list2.getElementAt(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\telse if(list1.getElementAt(i) == list2.getElementAt(j))\n\t\t\t{\n\t\t\t\tlist3.addLast(list2.getElementAt(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tif(i == list1.size())\n\t\t{\n\t\t\tfor(int k = j; k < list2.size(); k++)\n\t\t\t{\n\t\t\t\tlist3.addLast(list2.getElementAt(k));\n\t\t\t}\n\t\t}\n\t\telse if(j == list2.size())\n\t\t{\n\t\t\tfor(int l = i; l < list1.size(); l++)\n\t\t\t{\n\t\t\t\tlist3.addLast(list1.getElementAt(l));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list3;\n\t}", "@Override\n\tprotected void merge(Object in1, Object in2, Object out) {\n\t\t\n\t}", "public ArrayList<ArrayList> union(ArrayList<ArrayList> data, ArrayList<ArrayList> data2)\n {\n if(data == null || data2 == null)\n {\n return null;\n }\n ArrayList<Document> docs = data.get(0);\n ArrayList<Double> relevance = data.get(1);\n ArrayList<Integer> occurrence = data.get(2);\n ArrayList<Integer> popularity = data.get(3);\n \n ArrayList<Document> docs2 = data2.get(0);\n ArrayList<Double> relevance2 = data2.get(1);\n ArrayList<Integer> occurrence2 = data2.get(2);\n ArrayList<Integer> popularity2 = data2.get(3);\n \n ArrayList<Document> docs3 = new ArrayList<>();\n ArrayList<Double> relevance3 = new ArrayList<>();\n ArrayList<Integer> occurrence3 = new ArrayList<>();\n ArrayList<Integer> popularity3 = new ArrayList<>();\n \n for(int i = 0; i < docs.size(); i++)\n {\n docs3.add(docs.get(i));\n relevance3.add(relevance.get(i));\n occurrence3.add(occurrence.get(i));\n popularity3.add(popularity.get(i));\n }\n \n for(Document d: docs2)\n {\n if(!docs3.contains(d))\n {\n docs3.add(d);\n int docIndex = docs2.indexOf(d);\n relevance3.add(relevance2.get(docIndex));\n occurrence3.add(occurrence2.get(docIndex));\n popularity3.add(d.popularity);\n }\n else\n {\n int docIndex = docs3.indexOf(d);\n int docIndex2 = docs2.indexOf(d);\n double oldRel = (double) relevance3.get(docIndex);\n int oldOcc = (int) occurrence3.get(docIndex);\n relevance3.set(docIndex, oldRel+relevance2.get(docIndex2));\n if(oldOcc > occurrence2.get(docIndex2))\n {\n occurrence3.set(docIndex, occurrence2.get(docIndex2));\n }\n } \n }\n ArrayList<ArrayList> data3 = new ArrayList();\n data3.add(docs3);\n data3.add(relevance3);\n data3.add(occurrence3);\n data3.add(popularity3);\n return data3; \n }", "public static void merge(int[] list1, int[] list2, int[] temp){\n //Current index in three lists\n int current1 = 0;\n int current2 = 0;\n int current3 = 0;\n\n while(current1 < list1.length && current2 < list2.length){\n if(list1[current1] < list2[current2])\n temp[current3++] = list1[current1++];\n else\n temp[current3++] = list2[current2++];\n }\n //Rest of the list1 to temp\n while(current1 < list1.length)\n temp[current3++] = list1[current1++];\n //Rest of the list2 to temp\n while(current2 < list2.length)\n temp[current3++] = list2[current2++];\n }", "public List<Integer> merge(List<Integer> S1, List<Integer> S2) {\n\t\tList<Integer> S = new ArrayList<Integer>();\n\t\twhile(!(S1.isEmpty() || S2.isEmpty())){\n\t\t\tif(comps(S1.get(0), S2.get(0)) && S1.get(0) < S2.get(0)) {\t\t\t\t\t\n\t\t\t\tS.add(S1.remove(0));\n\t\t\t} else {\n\t\t\t\tS.add(S2.remove(0));\n\t\t\t}\n\t\t}\n\t\twhile(!(S1.isEmpty())){\n\t\t\tS.add(S1.remove(0));\n\t\t}while(!(S2.isEmpty())){\n\t\t\tS.add(S2.remove(0));\n\t\t}\n\t\treturn S;\n\t}", "public static <T> List<T> union(List<T> list1, List<T> list2) {\n Set<T> set = new HashSet<T>();\n\n set.addAll(list1);\n set.addAll(list2);\n\n return new ArrayList<T>(set);\n }", "ArrayList<Edge> merge(ArrayList<Edge> l1, ArrayList<Edge> l2) {\n ArrayList<Edge> l3 = new ArrayList<Edge>();\n IComparator<Edge> c = new CompareEdges();\n while (l1.size() > 0 && l2.size() > 0) {\n if (c.apply(l1.get(0), l2.get(0))) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n else {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n }\n while (l1.size() > 0) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n while (l2.size() > 0) {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n return l3;\n }", "private static int[] merge( int[] a, int[] b ) \n { \n\tint[] retArr = new int[a.length + b.length];\n\tint aCounter = 0;\n\tint bCounter = 0;\n\tint index = 0;\n while (aCounter < a.length && bCounter < b.length){\n\t if (a[aCounter] < b[bCounter]){\n\t\tretArr[index] = a[aCounter];\n\t\tindex++;\n\t\taCounter++;\n\t }\n\t else {\n\t\tretArr[index] = b[bCounter];\n\t\tindex++;\n\t\tbCounter++;\n\t }\n\t}\n\tif (aCounter < a.length){\n\t for (int x = aCounter; x < a.length; x++){\n\t\tretArr[index] = a[x];\n\t\tindex++;\n\t }\n\t}\n\telse if (bCounter < b.length){\n\t for (int x = bCounter; x < b.length; x++){\n\t\tretArr[index] = b[x];\n\t\tindex++;\n\t }\n\t}\n\tprintArray(retArr);\n\tSystem.out.println();\n\treturn retArr;\n }", "public Item merge(Item other);", "private List<BlockRecord<N, S>> mergeBlocks(final List<BlockRecord<N, S>> list1, final List<BlockRecord<N, S>> list2) {\n List<BlockRecord<N, S>> list = new ArrayList<>(list1.size() + list2.size());\n Iterator<BlockRecord<N, S>> it1 = list1.iterator();\n Iterator<BlockRecord<N, S>> it2 = list2.iterator();\n\n BlockRecord<N, S> rec1 = null;\n BlockRecord<N, S> rec2 = null;\n while (it1.hasNext() || it2.hasNext() || rec1 != null || rec2 != null) {\n if(it1.hasNext() && rec1 == null) {\n rec1 = it1.next();\n }\n\n if(it2.hasNext() && rec2 == null) {\n rec2 = it2.next();\n }\n\n if(rec2 == null || (rec1 != null && blockComparator.compare(rec1, rec2) < 0)) {\n list.add(rec1);\n rec1 = null;\n }\n else {\n list.add(rec2);\n rec2 = null;\n }\n }\n\n return list;\n }", "public ArrayList<Object> naturalJoin(ArrayList<Movie> list1, ArrayList<Person> list2)\r\n {\n return new ArrayList<Object>();\r\n }", "public ListNode mergeTwoListsIterative(ListNode l1, ListNode l2) {\n ListNode dummy=new ListNode();\n ListNode curr=dummy;\n while(l1!=null && l2!=null){\n if(l1.val<l2.val){\n curr.next=l1;\n l1=l1.next;\n curr=curr.next;\n }\n else{\n curr.next=l2;\n l2=l2.next;\n curr=curr.next;\n }\n }\n while(l1!=null){\n curr.next=l1;\n l1=l1.next;\n curr=curr.next;\n }\n while(l2!=null){\n curr.next=l2;\n l2=l2.next;\n curr=curr.next;\n }\n return dummy.next;\n }", "public List<List<String>> accountsMerge(List<List<String>> accounts) {\n\n List<Account> accts = new ArrayList<>();\n Map<String, Account> mapMailToAccount = new HashMap<>();\n for (List<String> account : accounts) {\n String name = account.get(0);\n Account acct = new Account(name);\n accts.add(acct);\n for(int i=1;i<account.size();i++){\n String mail = account.get(i);\n Account mappedAcct = mapMailToAccount.get(mail);\n if (mappedAcct == null) {\n mapMailToAccount.put(mail, acct);\n acct.mails.add(mail);\n } else {\n union(acct, mappedAcct);\n }\n }\n }\n for (Account acct : accts) {\n if (acct.parent != acct) {\n acct.parent = find(acct);\n acct.parent.mails.addAll(acct.mails);\n }\n }\n List<List<String>> mergedAccounts = new ArrayList<>();\n for (Account acct : accts) {\n if (acct.parent == acct) {\n mergedAccounts.add(acct.convertToList());\n }\n }\n return mergedAccounts;\n}", "int merge(int list1, int list2) {\n\t\t\n\t\t// Get values of the lists\n\t\t\n\t\tComparable c1 = array[list1];\n\t\tComparable c2 = array[list2];\n\n\t\t// compare values\n\t\t\n\t\tint small = list1, big = list2;\n\t\tif (c1 != c2 && c1 != null && c1.compareTo(c2) > 0) {\n\n\t\t\tsmall = list2;\n\t\t\tbig = list1;\n\t\t}\n\n\t\t/*\n\t\t * If small list has no tail - set big list to be small list tail\n\t\t * If small list has tail - merge it with the big list and set result to be small list tail\n\t\t */\n\t\t\n\t\tif (next[small] == NIL)\n\t\t\tnext[small] = big;\n\t\telse\n\t\t\tnext[small] = merge(next[small], big);\n\t\t\n\t\t// return small list with new tail\n\t\t\n\t\treturn small;\n\t}", "private ArrayList<String> joinResults(ArrayList<Message> messages){\n ArrayList<String> joinedResults = messages.get(0).getList();\n int size = messages.size();\n for(int i = 1; i< size; i++){\n ArrayList<String> results = messages.get(i).getList();\n for(String result: results){\n if(!joinedResults.contains(result)){\n joinedResults.add(result);\n }\n }\n }\n return joinedResults;\n }", "T merge(T x);", "private static int[] union(int[] items1, int[] items2) {\n\t\tSet<Integer> itemSet = new HashSet<Integer>();\n\t\tfor(int i : items1) {\n\t\t\titemSet.add(i);\n\t\t}\n\t\tfor(int i : items2){\n\t\t\titemSet.add(i);\n\t\t}\n\t\tint[] items = new int[itemSet.size()];\n\t\tint i = 0;\n\t\tfor(int val : itemSet){\n\t\t\titems[i++] = val; \n\t\t}\n\t\treturn items;\n\t}", "public static <T> List<T> mergeWith(final List<T> extendee, final List<T> list2) {\n for (final T obj : list2) {\n if (!(extendee.contains(obj))) {\n extendee.add(obj);\n }\n }\n return extendee;\n }", "private static int[] merge( int[] a, int[] b )\n {\n int[] ans = new int[(a.length + b.length)]; //create new array with the combined lengths\n int a1 = 0; //counter for a's position\n int b1 = 0; //counter for b's position\n while (a1 < a.length || b1 < b.length) { //iterates while either counter is not at the end of each array\n\t if (a1 == a.length) { //if you finished with all of a add the remaining b elements\n\t ans[a1 + b1] = b[b1]; \n\t b1 += 1;\n\t }\n\t else if (b1 == b.length) { //if you finished with all of b add the remaining a elements\n\t ans[a1 + b1] = a[a1];\n\t a1 += 1;\n\t }\n\t else if (a[a1] > b[b1]) { //if the current element at position a1 is larger than the one at b1, add the lower b1 to the new array and move to next b position\n\t ans[a1 + b1] = b[b1];\n\t b1 += 1;\n\t }\n\t else {\n\t ans[a1 + b1] = a[a1]; //otherwise add the element at a1 and move to next a position \n\t a1 += 1;\n\t }\n }\n return ans; //return the sorted merged array\t \t \n }", "private static <Item extends Comparable> List<Item> catenate(List<Item> q1, List<Item> q2) {\n List<Item> catenated = new ArrayList<>();\n for (Item item : q1) {\n catenated.add(item);\n }\n for (Item item: q2) {\n catenated.add(item);\n }\n return catenated;\n }", "public ArrayList<Object> product(ArrayList<Object> list1, ArrayList<Object> list2)\r\n {\r\n ArrayList<Object> retList = new ArrayList<Object>();\r\n retList.addAll(list1);\r\n retList.addAll(list2);\r\n return retList;\r\n }", "@Override\n public BinaryOperator<List<Integer>> combiner() {\n return (resultList1, resultList2) -> {\n Integer currentTotal1 = resultList1.get(0);\n Integer currentTotal2 = resultList2.get(0);\n currentTotal1 += currentTotal2;\n resultList1.set(0, currentTotal1);\n return resultList1;\n };\n }", "private Map mergeResults(Map first, Map second) {\n/* 216 */ Iterator verb_enum = second.keySet().iterator();\n/* 217 */ Map clonedHash = new HashMap(first);\n/* */ \n/* */ \n/* 220 */ while (verb_enum.hasNext()) {\n/* 221 */ String verb = verb_enum.next();\n/* 222 */ List cmdVector = (List)clonedHash.get(verb);\n/* 223 */ if (cmdVector == null) {\n/* 224 */ clonedHash.put(verb, second.get(verb));\n/* */ continue;\n/* */ } \n/* 227 */ List oldV = (List)second.get(verb);\n/* 228 */ cmdVector = new ArrayList(cmdVector);\n/* 229 */ cmdVector.addAll(oldV);\n/* 230 */ clonedHash.put(verb, cmdVector);\n/* */ } \n/* */ \n/* 233 */ return clonedHash;\n/* */ }", "public void merge(List<Integer> a, List<Integer> l, List<Integer> r, int left, int right) \n {\n \n int i = 0, j = 0, k = 0;\n while (i < left && j < right) \n {\n if (l.get(i) < r.get(j)) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n else \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }\n \n while (i < left) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n while (j < right) \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }", "private String[] mergeStringLists(ArrayList<String>stringlist1, ArrayList<String> stringlist2) {\n if (stringlist1==null || stringlist1.isEmpty()) {\n String[] resultlist=new String[stringlist2.size()];\n return stringlist2.toArray(resultlist);\n }\n else if (stringlist2==null || stringlist2.isEmpty()) {\n String[] resultlist=new String[stringlist1.size()];\n return stringlist1.toArray(resultlist);\n }\n else {\n ArrayList<String> result=new ArrayList<String>(stringlist1.size());\n for (String e:stringlist1) result.add(e.trim());\n for (String e:stringlist2) if (!result.contains(e.trim())) result.add(e.trim());\n String[] resultlist=new String[result.size()];\n resultlist=result.toArray(resultlist);\n return resultlist;\n }\n }", "public ListNode mergeTwoListsWithExtraLinkedList(ListNode l1, ListNode l2) {\n ListNode dummy=new ListNode();\n ListNode curr=dummy,temp;\n while(l1!=null && l2!=null){\n if(l1.val<l2.val){\n temp=new ListNode(l1.val);\n l1=l1.next;\n }\n else{\n temp=new ListNode(l2.val);\n l2=l2.next;\n }\n curr.next=temp;\n curr=curr.next;\n }\n while(l1!=null){\n curr.next=new ListNode(l1.val);\n l1=l1.next;\n curr=curr.next;\n }\n while(l2!=null){\n curr.next=new ListNode(l2.val);\n l2=l2.next;\n curr=curr.next;\n }\n return dummy.next;\n }", "private static <File> void merge(ArrayList<File> firstList, ArrayList<File> secondList,\r\n ArrayList<File> wholeList, Comparator<File> usedComparison) {\r\n int i = 0;\r\n int j = 0;\r\n int k = 0;\r\n while (i < firstList.size() && j < secondList.size()) {\r\n if (usedComparison.compare(firstList.get(i), secondList.get(j)) < 0) {\r\n wholeList.set(k++, firstList.get(i++));\r\n } else {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }\r\n while (i < firstList.size()) {\r\n wholeList.set(k++, firstList.get(i++));\r\n }\r\n while (j < secondList.size()) {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }", "static int[] merge(int[] a, int[] b) {\n\t\tint m = a.length, n = b.length;\n\t\tint[] res = new int[m + n];\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < m || j < n) {\n\t\t\tif (i == m)\n\t\t\t\tres[k++] = b[j++];\n\t\t\telse if (j == n)\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse if (a[i] < b[j])\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse\n\t\t\t\tres[k++] = b[j++];\n\t\t}\n\t\treturn res;\n\t}", "void merge(ListNode curr1, ListNode curr2) {\n while (curr1 != null) {\n ListNode next1 = curr1.next, next2 = curr2.next;\n curr1.next = curr2;\n if (next1 == null)\n break;\n curr2.next = next1;\n curr1 = next1;\n curr2 = next2;\n }\n }", "@Test\n void stringListCombine() {\n PartialResultSet a =\n PartialResultSet.newBuilder()\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"a\"))\n .addValues(Value.newBuilder().setStringValue(\"b\"))))\n .setChunkedValue(true)\n .build();\n PartialResultSet b =\n PartialResultSet.newBuilder()\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"c\"))\n .addValues(Value.newBuilder().setStringValue(\"d\"))))\n .setChunkedValue(false)\n .build();\n ResultSet r = PartialResultSetCombiner.combine(Arrays.asList(a, b));\n assertEquals(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"a\"))\n .addValues(Value.newBuilder().setStringValue(\"bc\"))\n .addValues(Value.newBuilder().setStringValue(\"d\"))\n .build(),\n r.getRows(0).getValues(0).getListValue());\n }", "public static MyLinkedList getUnion(MyLinkedList list1, MyLinkedList list2)\n {\n HashSet<Integer> set = new HashSet<>();\n\n Node temp = list1.getStart();\n while(temp != null)\n {\n set.add(temp.key);\n temp = temp.next;\n }\n\n temp = list2.getStart();\n while(temp != null)\n {\n set.add(temp.key);\n temp = temp.next;\n }\n\n MyLinkedList union = new MyLinkedList();\n for(int key : set)\n {\n union.addNode(new Node(key));\n }\n\n return union;\n }", "public static void main(String[] args) \r\n\t{\n\r\n\t\tint[] A = {1,5,8,7,3,6};\r\n\t\tint[] B = {2,9,4};\r\n\t\t\r\n\t\tList<Integer> list = Arrays.stream(A).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> list2 = Arrays.stream(B).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> combine = new ArrayList<>();\r\n\t\tcombine.addAll(list);\r\n\t\tcombine.addAll(list2);\r\n\t\t\r\n\t\tSystem.out.println(list);\r\n\t\tSystem.out.println(combine);\r\n\t\tCollections.sort(combine);\r\n\t\tSystem.out.println(combine);\r\n\t\r\n\t\tList<Integer> extractA = combine.subList(0, A.length);\r\n\t\tList<Integer> extractB = combine.subList(A.length, A.length+B.length);\r\n\t\t\r\n\t\tSystem.out.println(extractA);\r\n\t\tSystem.out.println(extractB);\r\n\t\t\r\n// second approch for integer to array\t\t\r\n\t\tint[] ints = {1, 2, 3};\r\n\t\tList<Integer> intList = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < ints.length; i++) \r\n\t\t{\r\n\t\t\t intList.add(ints[i]);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(intList);\r\n\t\t\r\n\t}", "public static List<Integer> merge(List<Integer> left,List<Integer> right) {\n\t\tList<Integer> mergeArray = new ArrayList<Integer>();\n\t\tint leftLen = left.size();\n\t\tint rightLen = right.size();\n\t\tint len = leftLen+rightLen;\n\t\tint i=0;\n\t\tint j=0;\n\t\twhile(len!=0) {\n\t\t\tif(i<leftLen && j<rightLen && left.get(i)<right.get(j)) {\n\t\t\t\tmergeArray.add(left.get(i));\n\t\t\t\ti++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}else if(i<leftLen && j<rightLen && left.get(i)>right.get(j)) {\n\t\t\t\tmergeArray.add(right.get(j));\n\t\t\t\tj++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}else if(i<leftLen && j>= rightLen) {\n\t\t\t\tmergeArray.add(left.get(i));\n\t\t\t\ti++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}else if(j<rightLen && i>= leftLen) {\n\t\t\t\tmergeArray.add(right.get(j));\n\t\t\t\tj++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn mergeArray;\n\t}", "public static ListNode mergeTwoList(ListNode list1, ListNode list2){\n if (list1 == null) return list2;\n if (list2 == null) return list1;\n\n ListNode head = null;\n ListNode p = list1;\n ListNode q = list2;\n\n if (p.val <= q.val) {\n head = p;\n p = p.next;\n }\n else {\n head = q;\n q = q.next;\n }\n ListNode point = head;\n\n while (p != null && q != null){\n if (p.val <= q.val){\n point.next = p;\n p = p.next;\n\n }else {\n point.next = q;\n q = q.next;\n\n }\n point = point.next;\n }\n\n if (p == null){\n point.next = q;\n }else {\n point.next = p;\n }\n\n return head;\n }", "private String[] mergeStringLists(String[] stringlist1, String[] stringlist2) {\n if (stringlist1==null || stringlist1.length==0) return stringlist2;\n else if (stringlist2==null || stringlist2.length==0) return stringlist1;\n else {\n ArrayList<String> result=new ArrayList<String>(stringlist1.length);\n for (String e:stringlist1) result.add(e.trim());\n for (String e:stringlist2) if (!result.contains(e.trim())) result.add(e.trim());\n String[] resultlist=new String[result.size()];\n resultlist=result.toArray(resultlist);\n return resultlist;\n }\n }", "public static NBTTagList mergeTagLists(NBTTagList a, NBTTagList b) {\r\n b.forEach(a::appendTag);\r\n return a;\r\n }", "private static Collection<Node> union(Collection<Node> xs, Collection<Node> ys) {\n if (xs == null || xs.size() == 0) {\n return ys;\n }\n if (ys == null || ys.size() == 0) {\n return xs;\n }\n \n List<Node> result = new ArrayList<>(xs);\n for (Node y : ys) {\n if (!result.contains(y)) {\n result.add(y);\n }\n }\n return result;\n }", "public static void main(String[] args) {\n\t\t\t\t\r\n\t\tListNode list1 =new ListNode(1, new ListNode(2, new ListNode(4, null)));\r\n\t\t\r\n\t\tListNode list2 =new ListNode(1, new ListNode(3, new ListNode(4, null)));\r\n\t\t\r\n\t\tListNode result = new MergeTwoSortedLists().mergeTwoLists(list1, list2);\r\n\t\t\r\n\t\twhile(result!=null) {\r\n\t\t\tSystem.out.print(\" \"+result.val);\r\n\t\t\tresult=result.next;\r\n\t\t}\r\n\t\t\r\n\t}", "public List<Integer> interleaveLists(List<Integer> listOne, List<Integer> listTwo) {\n\t\tList<Integer> weave = new ArrayList<>();\n\t\tint i = 0;\n\t\tfor (i = 0; i < listOne.size() && i < listTwo.size(); i++) {\n\t\t\tweave.add(listOne.get(i));\n\t\t\tweave.add(listTwo.get(i));\n\t\t}\n\n\t\tif (listOne.size() > listTwo.size()) {\n\t\t\tfor(int j = i; j < listOne.size(); j++) {\n\t\t\t\tweave.add(listOne.get(j));\n\t\t\t}\n\t\t}\n\n\t\tif (listTwo.size() > listOne.size()) {\n\t\t\tfor(int k = i; k < listTwo.size(); k++) {\n\t\t\t\tweave.add(listTwo.get(k));\n\t\t\t}\n\t\t}\n\t\treturn weave;\n\t\t\n\t}", "public void combine(List<T> parents, List<T> result) {\n assert (parents.size() == 2);\n\n List<T> list1 = Cut(parents.get(0));// A B\n List<T> list2 = Cut(parents.get(1));// C D\n\n /*\n * insert flipped list2 in the middle of list1 so there will be A D C B\n */\n if (list2.size() < 2) {\n list1.add(1, list2.get(0));\n } else {\n list1.add(1, list2.get(0));\n list1.add(1, list2.get(1));\n }\n\n Splice(list1, result);\n }", "public ListNode mergeInBetween(ListNode list1, int a, int b, ListNode list2) {\n final ListNode vituralHead = new ListNode(0);\n vituralHead.next = list1;\n\n ListNode cursor = vituralHead;\n int index = 0;\n\n ListNode aNode = null;\n ListNode bNode = null;\n while (cursor != null) {\n\n if (index == a) {\n aNode = cursor;\n }\n\n if (index == b + 1) {\n bNode = cursor;\n break;\n }\n\n index++;\n cursor = cursor.next;\n }\n\n ListNode tailOfList2 = list2;\n while (tailOfList2.next != null) {\n tailOfList2 = tailOfList2.next;\n }\n\n aNode.next = list2;\n tailOfList2.next = bNode.next;\n return vituralHead.next;\n }", "public static <T extends Comparable<? super T>>\n void intersection(SLL<T> list1, SLL<T> list2, SLL<T> result) {\n\n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n\n T itemlist1=null, itemlist2=null;\n\n // get first item in each list\n if ( iterlist1 != null && iterlist2 != null ) {\n itemlist1 = iterlist1.info;\n itemlist2 = iterlist2.info;\n }\n\n while ( itemlist1 != null && itemlist2 != null ) {\n int compareResult = itemlist1.compareTo(itemlist2);\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //append to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n }\n }", "private static void mergeLists() {\n\t\tint length = (photoList.size() / 2) - 1;\n\t\t\n\t\tif (photoList.size() % 2 == 0) {\n\t\t\tlength++;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tList<String> tL = new ArrayList<String>();\n\t\t\t\n\t\t\tPhoto p1 = photoList.get(i),\n\t\t\t\t p2 = photoList.get(photoList.size() - 1 - i);\n\t\t\t\n\t\t\tfor (String tag : p1.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String tag : p2.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j = 0; j < tL.size() - 1; j++) {\n\t\t\t\tfor (int k = j; k < tL.size(); k++) {\n\t\t\t\t\tif (tL.get(j).equals(tL.get(k))) {\n\t\t\t\t\t\ttL.remove(k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tslideList.add(new Slide(p1.getPhotoId(), p2.getPhotoId(), tL));\n\t\t}\n\t}", "private static int[] merge( int[] a, int[] b ) \n {\n\tint[] c = new int[a.length+b.length];\n\n\tint x=0;\n\tint y=0;\n\tint z=0;\n\n\twhile (x < a.length || y < b.length){\n\t if (x>=a.length) {\n\t\tc[z]=b[y];\n\t\ty++;\n\t }\n\t else if (y>=b.length) {\n\t\tc[z]=a[x];\n\t\tx++;\n\t }\n\n\t else if (a[x] >= b[y]) {\n\t\tc[z] = b[y];\n\t\ty++;\t\t\n\t }\n\t else if (a[x] < b[y]) {\n\t\tc[z] = a[x];\n\t\tx++;\t\t\n\t }\n\t z++;\n\t}\n\treturn c;\n\n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n\t\t//The base condition if one of the list is empty so then return the other list as it is.\n\t\tif (l1 == null) return l2;\n\t\tif (l2 == null) return l1;\n\t\t//Intializing the head of the ans\n\t\tListNode ans = l1;\n\t\tif (l2.val < l1.val) {\n\t\t\tans = l2;\n\t\t\tl2 = l2.next;\n\t\t} else l1 = l1.next;\n\t\t//Initializing ans in another variable so that it should'nt get lost.\n\t\tListNode ans2 = ans;\n\t\twhile (l1 != null && l2 != null) {\n\t\t\tif (l1.val <= l2.val) {\n\t\t\t\tans.next = l1;\n\t\t\t\tl1 = l1.next;\n\t\t\t\tans = ans.next;\n\t\t\t} else {\n\t\t\t\tans.next = l2;\n\t\t\t\tl2 = l2.next;\n\t\t\t\tans = ans.next;\n\t\t\t}\n\t\t}\n\t\t//if list are not same then one list will be left to traverse\n\t\tif (l1 == null && l2 != null) ans.next = l2;\n\t\tif (l2 == null && l1 != null) ans.next = l1;\n\t\treturn ans2;\n\t}", "public void joinTwoArrayList(ArrayList<E> array1 , ArrayList<E> array2){\n\t\tint length2 = array2.size();\n\t\tfor(int i=0 ; i<length2 ; i++){\n\t\t\tarray1.add(array2.getElement(i));\n\t\t}\n\t}", "public EvaluationResult<T> mergeEvaluations(Collection<EvaluationResult<T>> results);", "public static List<Integer> merge2(List<Integer> left, List<Integer> right) {\n ArrayList<Integer> result = new ArrayList<>();\n int leftIndex = 0;\n int rightIndex = 0;\n\n while (leftIndex < left.size() && rightIndex < right.size()) {\n if (left.get(leftIndex) < right.get(rightIndex)) {\n result.add(left.get(leftIndex));\n leftIndex++;\n } else {\n result.add(right.get(rightIndex));\n rightIndex++;\n }\n }\n List<Integer> leftRemaining = left.subList(leftIndex, left.size());\n List<Integer> rightRemaining = right.subList(rightIndex, right.size());\n\n result.addAll(leftRemaining);\n result.addAll(rightRemaining);\n\n return result;\n }", "private List<T> mergeResults( final Rows<R, C> result, final int maxSize ) {\n\n if (logger.isTraceEnabled()) logger.trace( \"Multiple rows have columns. Merging\" );\n\n\n final List<T> mergedResults = new ArrayList<>(maxSize);\n\n\n\n\n for ( final R key : result.getKeys() ) {\n final ColumnList<C> columns = result.getRow( key ).getColumns();\n\n\n for (final Column<C> column :columns ) {\n\n final T returnedValue = columnParser.parseColumn( column );\n\n //Use an O(log n) search, same as a tree, but with fast access to indexes for later operations\n int searchIndex = Collections.binarySearch( mergedResults, returnedValue, comparator );\n\n /**\n * DO NOT remove this section of code. If you're seeing inconsistent results during shard transition,\n * you'll\n * need to enable this\n */\n //\n // if ( previous != null && comparator.compare( previous, returnedValue ) == 0 ) {\n // throw new RuntimeException( String.format(\n // \"Cassandra returned 2 unique columns,\n // but your comparator marked them as equal. This \" +\n // \"indicates a bug in your comparator. Previous value was %s and\n // current value is \" +\n // \"%s\",\n // previous, returnedValue ) );\n // }\n //\n // previous = returnedValue;\n\n //we've already seen it, no-op\n if(searchIndex > -1){\n continue;\n }\n\n final int insertIndex = (searchIndex+1)*-1;\n\n //it's at the end of the list, don't bother inserting just to remove it\n if(insertIndex >= maxSize){\n continue;\n }\n\n if (logger.isTraceEnabled()) logger.trace( \"Adding value {} to merged set at index {}\", returnedValue, insertIndex );\n\n mergedResults.add( insertIndex, returnedValue );\n\n\n //prune the mergedResults\n while ( mergedResults.size() > maxSize ) {\n\n if (logger.isTraceEnabled()) logger.trace( \"Trimming results to size {}\", maxSize );\n\n //just remove from our tail until the size falls to the correct value\n mergedResults.remove(mergedResults.size()-1);\n }\n }\n\n if (logger.isTraceEnabled()) logger.trace( \"Candidate result set size is {}\", mergedResults.size() );\n\n }\n return mergedResults;\n }", "void merge(T other);", "private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }", "public static ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n ListNode dummy = new ListNode(-1), cur = dummy;\n while (l1 != null && l2 != null) {\n if (l1.val < l2.val) {\n cur.next = l1;\n l1 = l1.next;\n } else {\n cur.next = l2;\n l2 = l2.next;\n }\n cur = cur.next;\n }\n cur.next = (l1 != null) ? l1 : l2;\n return dummy.next;\n }", "public ListNode mergeTwoLists(ListNode a, ListNode b) {\r\n\t\tListNode merged = new ListNode(0);\r\n\r\n\t\tListNode first = a;\r\n\t\tListNode second = b;\r\n\t\tListNode third = merged;\r\n\r\n\t\twhile (first != null && second != null) {\r\n\t\t\tif (first.val <= second.val) {\r\n\t\t\t\tthird.next = first;\r\n\t\t\t\tfirst = first.next;\r\n\t\t\t} else {\r\n\t\t\t\tthird.next = second;\r\n\t\t\t\tsecond = second.next;\r\n\t\t\t}\r\n\t\t\tthird = third.next;\r\n\t\t}\r\n\r\n\t\tif (first != null) {\r\n\t\t\tthird.next = first;\r\n\t\t}\r\n\t\tif (second != null) {\r\n\t\t\tthird.next = second;\r\n\t\t}\r\n\r\n\t\treturn merged.next;\r\n\t}", "public static void main(String[] args) {\n\t\tListNode h1 = new ListNode(2);\n\t\tListNode h2 = new ListNode(1);\n\t\tListNode re = mergeTwoLists(h1,h2);\n\t\tSystem.out.println(re.val);\n\t\tSystem.out.println(re.next.val);\n\t}", "public int[] merge(int[] oneArr, int[] twoArr) {\n int lenOneArr = oneArr.length , lenTwoArr = twoArr.length ; // Длинна 1-го и 2-го массива\n int[] threeArr = new int[lenOneArr + lenTwoArr];\n int i = 0, j = 0;\n while (i < lenOneArr && j < lenTwoArr) {\n if (oneArr[i] < twoArr[j]) {\n threeArr[i + j] = oneArr[i];\n i++;\n } else {\n threeArr[i + j] = twoArr[j];\n j++;\n }\n }\n while (i < lenOneArr) { // Если достигнут конец одного из массива цикл дописывает оставшуюся часть доконца.\n threeArr[i + j] = oneArr[i];\n i++;\n }\n while (j < lenTwoArr) {\n threeArr[i + j] = twoArr[j];\n j++;\n }\n return threeArr;\n }", "public static GcResult merge(GcResult a, GcResult b) {\n\t\treturn a.compareTo(b) < 0 ? a : b;\n\t}", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "public static ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n if(l1 == null) {\n return l2;\n }\n\n if(l2 == null) {\n return l1;\n }\n ListNode newList;\n\n if(l1.val < l2.val) {\n newList = l1;\n\n l1 = l1.next;\n } else {\n newList = l2;\n l2 = l2.next;\n }\n\n ListNode head = newList;\n\n while (l1 != null && l2 != null) {\n if(l1.val < l2.val) {\n newList.next = l1;\n newList = newList.next;\n l1 = l1.next;\n } else {\n newList.next = l2;\n newList = newList.next;\n l2 = l2.next;\n }\n }\n\n if(l1 == null){\n newList.next = l2;\n } else {\n newList.next = l1;\n }\n\n return head;\n }", "@Test\n void stringListAndSublistCombine() {\n PartialResultSet a =\n PartialResultSet.newBuilder()\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"a\"))\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"b\"))\n .addValues(Value.newBuilder().setStringValue(\"c\"))))))\n .setChunkedValue(true)\n .build();\n PartialResultSet b =\n PartialResultSet.newBuilder()\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"d\"))))\n .addValues(Value.newBuilder().setStringValue(\"e\"))))\n .setChunkedValue(false)\n .build();\n ResultSet r = PartialResultSetCombiner.combine(Arrays.asList(a, b));\n assertEquals(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"a\"))\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"b\"))\n .addValues(Value.newBuilder().setStringValue(\"cd\"))))\n .addValues(Value.newBuilder().setStringValue(\"e\"))\n .build(),\n r.getRows(0).getValues(0).getListValue());\n }", "public ListNode mergeTwoListsRecursion(ListNode l1, ListNode l2) {\n if(l1==null)return l2;\n if(l2==null)return l1;\n if(l1.val<l2.val){\n l1.next=mergeTwoListsRecursion(l1.next,l2);\n return l1;\n }\n else{\n l2.next=mergeTwoLists(l1,l2.next);\n return l2;\n }\n }", "public static ArrayList<String> joinArrayLists(ArrayList<String> EqList, ArrayList<String> sshList){\n\n\t\t\t\n\t\t\tArrayList<Integer> counteq = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> countssh = new ArrayList<Integer>();\n\t\t\t\n\t\t\tList<String> split1 = new ArrayList<String>();\n\t\t\tList<String> split2 = new ArrayList<String>();\n\t\t\t\n\t\t\tArrayList<String> combine = new ArrayList<String>();\n\t\t\t\n\t\t\t//Checks how many object exist in arrayList and addes their index to a new list\n\t\t\tfor(int i = 0;i<EqList.size();i++){\n\t\t\t\tif(EqList.get(i) == \"Object\"){\n\t\t\t\t\tcounteq.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j = 0;j<sshList.size();j++){\n\t\t\t\tif(sshList.get(j) == \"Object\"){\n\t\t\t\t\tcountssh.add(j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//The size of the matrices must be equal. If it is 1, removes the ID and object index from the second matrix and addes it to the first arrayList\n\t\t\tif(counteq.size() == countssh.size()){\n\t\t\t\tif(counteq.size() == 1){\n\t\t\t\t\tif(EqList.get(1).equals(sshList.get(1))){\n\t\t\t\t\t\tEqList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tcombine.addAll(EqList);\n\t\t\t\t\t\tcombine.addAll(sshList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Based on the IDs of both lists, it splits both lists on the specified index and addes the two parts to the new combined matrix\n\t\t\t\t\t//The indexes are taken from the specified matrices counteq and countssh\n\t\t\t\t\tcounteq.add(EqList.size());\n\t\t\t\t\tcountssh.add(sshList.size());\n\t\t\t\t\tfor(int i = 0;i<counteq.size()-1;i++){\n\t\t\t\t\t\tfor(int j = 0;j<countssh.size()-1;j++){\n\t\t\t\t\t\t\tif(EqList.get(counteq.get(i)+1).equals(sshList.get(countssh.get(j)+1))){\n\n\t\t\t\t\t\t\t\t\tsplit1 = EqList.subList(counteq.get(i),counteq.get(i+1));\n\t\t\t\t\t\t\t\t\tsplit2 = sshList.subList(countssh.get(j)+2,countssh.get(j+1));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcombine.addAll(split1);\n\t\t\t\t\t\t\t\t\tcombine.addAll(split2);\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\telse\n\t\t\t\tSystem.out.println(\"Error! Arraylists size not the same. Please check the data\");\n\t\t\t\n\t\t\t//If any remaining object indexes are left, remove them\n\t\t\tfor(int i = 0;i<combine.size();i++){\n\t\t\t\tif(combine.get(i) == \"Object\"){\n\t\t\t\t\tcombine.remove(i);\n\t\t\t\t\ti=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn combine;\n\t\t}", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n ListNode dummyHead = new ListNode(0);\n ListNode endOfSortedList = dummyHead;\n\n while (l1 != null && l2 != null) {\n if (l1.val < l2.val) {\n endOfSortedList.next = l1;\n l1 = l1.next;\n } else {\n endOfSortedList.next = l2;\n l2 = l2.next;\n }\n\n endOfSortedList = endOfSortedList.next;\n }\n\n if (l1 != null) {\n endOfSortedList.next = l1;\n }\n\n if (l2 != null) {\n endOfSortedList.next = l2;\n }\n\n return dummyHead.next;\n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n ListNode head = new ListNode(0);\n ListNode l3 = head;\n while (l1 != null && l2 != null) {\n if (l1.val <= l2.val) {\n l3.next = l1;\n l1 = l1.next;\n } else {\n l3.next = l2;\n l2 = l2.next;\n }\n l3 = l3.next;\n }\n\n while (l1 != null) {\n l3.next = l1;\n l1 = l1.next;\n l3 = l3.next;\n }\n\n while (l2 != null) {\n l3.next = l2;\n l2 = l2.next;\n l3 = l3.next;\n }\n return head.next;\n }", "public static int[] combine(int[] a, int[] b){\n if(a.length == 0 && b.length == 0)\n return new int[0];\n else if(a.length == 0)\n return b;\n else if(b.length == 0)\n return a;\n else {\n int[] combinedArray = new int[a.length + b.length];\n System.arraycopy(a, 0, combinedArray, 0, a.length);\n System.arraycopy(b, 0, combinedArray, a.length, b.length);\n\n return combinedArray;\n }\n }", "public static ListNode merge(ListNode l1, ListNode l2) {\n if (l1 == null) return l2;\n if (l2 == null) return l1;\n if (l1.val < l2.val) {\n l1.next = merge(l1.next, l2);\n return l1;\n } else {\n l2.next = merge(l1, l2.next);\n return l2;\n }\n }", "static List compareList(List<Integer> test, List<Integer> results) {\r\n\r\n if (test.size() > results.size()) {\r\n results = test;\r\n }\r\n\r\n return results;\r\n }", "public ListNode merge(ListNode h1, ListNode h2){\r\n if(h1 == null){\r\n return h2;\r\n }\r\n if(h2 == null){\r\n return h1;\r\n }\r\n \r\n if(h1.val < h2.val){\r\n h1.next = merge(h1.next, h2);\r\n return h1;\r\n }\r\n else{\r\n h2.next = merge(h1, h2.next);\r\n return h2;\r\n }\r\n \r\n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\r\n if (l1==null) {\r\n\t\t\treturn l2;\r\n\t\t}\r\n if (l2==null) {\r\n\t\t\treturn l1;\r\n\t\t}\r\n ListNode result=new ListNode(0);\r\n ListNode head=result;\r\n while(l1!=null&&l2!=null){\r\n \tif (l1.val<=l2.val) {\r\n\t\t\t\thead.next=l1;\r\n\t\t\t\tl1=l1.next;\r\n\t\t\t}else {\r\n\t\t\t\thead.next=l2;\r\n\t\t\t\tl2=l2.next;\r\n\t\t\t}\r\n \thead=head.next;\r\n }\r\n if (l1!=null) {\r\n\t\t\thead.next=l1;\r\n\t\t}\r\n if (l2!=null) {\r\n\t\t\thead.next=l2;\r\n\t\t}\r\n \r\n return result.next;\r\n }", "static List<StateRef> append(List<StateRef> l1, List<StateRef> l2) {\n l1.addAll(l2);\n return l1;\n }", "ResponseEntity<Response> placesInCommon(String userId1, String listName1, String userId2, String listName2);", "ArrayList<Edge> mergeHelp(ArrayList<Edge> l) {\n if (l.size() <= 1) {\n return l;\n }\n ArrayList<Edge> l1 = new ArrayList<Edge>();\n ArrayList<Edge> l2 = new ArrayList<Edge>();\n for (int i = 0; i < l.size() / 2; i++) {\n l1.add(l.get(i));\n }\n for (int i = l.size() / 2; i < l.size(); i++) {\n l2.add(l.get(i));\n }\n l1 = mergeHelp(l1);\n l2 = mergeHelp(l2);\n return merge(l1, l2);\n }", "private void merge(List<Estado> states1, List<Estado> states2) {\n\t\tfor (Estado state : states2) {\n\t\t\tif (!contain(state, states1)) {\n\t\t\t\tstates1.add(state);\n\t\t\t}\n\n\t\t}\n\t}", "public static StringList createFrom(String list1[], String list2[]) {\n StringList list = new StringList(list1);\n list.merge(list2);\n return list;\n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n ListNode prehead = new ListNode(-1);\n\n ListNode prev = prehead;\n while (l1 != null && l2 != null) {\n if (l1.val <= l2.val) {\n prev.next = l1;\n l1 = l1.next;\n } else {\n prev.next = l2;\n l2 = l2.next;\n }\n prev = prev.next;\n }\n\n // exactly one of l1 and l2 can be non-null at this point, so connect\n // the non-null list to the end of the merged list.\n prev.next = l1 == null ? l2 : l1;\n\n return prehead.next;\n }", "public static LinkedList MergeList(LinkedList element_A, LinkedList element_B) {\n\t\tLinkedList merged = new LinkedList();\n\t\tif (element_B.size() == 0) {\n\t\t\treturn element_A;\n\t\t}\n\t\tif (element_A.size() == 0) {\n\t\t\treturn element_B;\n\t\t}\n\t\tIterator itr = element_A.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tCOMPOUND compound_A = (COMPOUND)itr.next();\n\t\t\tIterator itr2 = element_B.iterator();\n\t\t\twhile (itr2.hasNext()) {\n\t\t\t\tCOMPOUND compound_B = (COMPOUND)itr2.next();\t\t\t\t\n\t\t\t\tCOMPOUND new_compound = merge_compound(compound_A, compound_B);\n\t\t\t\t\n\t\t\t\t// add whether to save this value\n\t\t\t\tif (isGreater(new_compound.TOTALPROB, cutoff)) {\n\t\t\t\t\tmerged.add(new_compound);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn merged;\n\t}", "private Node merge(Node r) {\r\n if (r.op() == Empty) return r;\r\n assert(r.op() == List);\r\n if (r.left().op() == Rule) { merge(r.right()); return r; }\r\n Node n = r.left();\r\n assert(n.op() == List);\r\n r.left(n.left());\r\n if (n.right().op() == Empty) return r;\r\n n.left(n.right());\r\n n.right(r.right());\r\n r.right(n);\r\n merge(r);\r\n return r;\r\n }", "public ListNode mergeKLists(ListNode[] lists) {\n LinkedList<Integer> a= new LinkedList<Integer>();\n \n for(int i=0;i<lists.length;i++) {\n ListNode temp = lists[i];\n \n while(temp!=null) {\n // System.out.println(temp.val);\n a.add(temp.val);\n temp=temp.next;\n }\n }\n Collections.sort(a);\n //copy all the elements into ListNode linked list.\n if(a.size()==0) { return null; }\n ListNode head = new ListNode(a.get(0));\n ListNode res = head;\n if(head== null) {\n head = new ListNode(a.get(0));\n }\n for(int j=1;j<a.size();j++) {\n \n res.next = new ListNode(a.get(j));\n res=res.next;\n \n }\n res=head;\n \n return res;\n \n \n \n \n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n if(l1 == null) {\n return l2;\n }\n\n if(l2 == null) {\n return l1;\n }\n\n ListNode head = null;\n ListNode current = null;\n while(l1 != null && l2 != null) {\n\n if(l1.val < l2.val) {\n if(head == null) {\n head = current = l1;\n } else {\n current.next = l1;\n current = current.next;\n }\n l1 = l1.next;\n } else {\n if(head == null) {\n head = current = l2;\n } else {\n current.next = l2;\n current = current.next;\n }\n l2 = l2.next;\n }\n }\n\n if(l1 == null) {\n current.next = l2;\n }\n\n if(l2 == null) {\n current.next = l1;\n }\n\n return head;\n }" ]
[ "0.708947", "0.69195706", "0.686243", "0.68360525", "0.67407864", "0.67407864", "0.6728305", "0.6704688", "0.66913426", "0.66530144", "0.65821105", "0.65540934", "0.6552279", "0.64643717", "0.6440934", "0.64169306", "0.6356397", "0.6309257", "0.62929285", "0.62823826", "0.627375", "0.62670153", "0.6258423", "0.6221928", "0.621557", "0.61991614", "0.6196272", "0.61877483", "0.6160531", "0.6122618", "0.61120874", "0.60882413", "0.6066401", "0.60503185", "0.6046613", "0.6041291", "0.6038001", "0.60362273", "0.602125", "0.6016203", "0.6015899", "0.60137993", "0.60126376", "0.5996838", "0.5990222", "0.59885186", "0.5987487", "0.5984617", "0.5975212", "0.59654737", "0.59332347", "0.5921047", "0.5917117", "0.59146845", "0.5899043", "0.58945364", "0.58776605", "0.58711493", "0.5857337", "0.58489585", "0.5837638", "0.5832604", "0.5830431", "0.58214694", "0.58205557", "0.58054477", "0.57965034", "0.57944876", "0.57925516", "0.57902515", "0.57857406", "0.578494", "0.5781249", "0.5779989", "0.5768172", "0.57584226", "0.5751372", "0.57449675", "0.5727376", "0.57268226", "0.572422", "0.57231104", "0.57129776", "0.57091147", "0.5703677", "0.57013345", "0.56992996", "0.5696241", "0.5695706", "0.56898546", "0.5684066", "0.5669753", "0.5644924", "0.56434846", "0.5641178", "0.5639421", "0.56372523", "0.56371087", "0.56332624", "0.5629395" ]
0.7436136
0
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); System.out.println("Activity--->onCreate"); FragmentManager manager = getFragmentManager(); FragmentTransaction transaction = manager.beginTransaction(); // 动态增加Fragment RightFragment rightFragment = new RightFragment(); LeftFragment leftFragment = new LeftFragment(); transaction.add(R.id.left_layout, leftFragment, "leftfragment"); transaction.add(R.id.right_layout, rightFragment, "rightfragment"); transaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.79173684", "0.7726369", "0.7692746", "0.7692746", "0.7692746", "0.7692746", "0.7692746", "0.7692746", "0.7636681", "0.7636681", "0.763111", "0.76181364", "0.76181364", "0.7543469", "0.7539785", "0.7539785", "0.7538629", "0.7527225", "0.75151294", "0.7508903", "0.7500434", "0.74814206", "0.7475744", "0.74689764", "0.74689764", "0.74559575", "0.7436564", "0.7424464", "0.742249", "0.7392683", "0.73705024", "0.7357085", "0.7357085", "0.7351069", "0.7347485", "0.7347485", "0.7332081", "0.73105365", "0.7266633", "0.7260292", "0.72524387", "0.7242319", "0.7213685", "0.71869946", "0.718342", "0.7174187", "0.7168587", "0.7168585", "0.71478796", "0.71407205", "0.7132094", "0.7117294", "0.70993483", "0.70988715", "0.7093608", "0.7093608", "0.7085483", "0.7075991", "0.7074628", "0.7070572", "0.70493495", "0.7041739", "0.70395535", "0.70126516", "0.7005279", "0.7004974", "0.7003319", "0.7001544", "0.69939244", "0.6991386", "0.69891936", "0.69847554", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69815916", "0.69791096", "0.6976634", "0.6966521", "0.6966268", "0.696408", "0.6963494", "0.6961766", "0.69614685", "0.69607615", "0.6948253", "0.6940631", "0.6935836", "0.69347626", "0.6928626", "0.69263786", "0.692478" ]
0.0
-1
sort all circles by their weight
private void sortByWeight() { for(int i=1; i<circles.size(); i++) { PVCircle temp = circles.get(i); int thisWeight = circles.get(i).getWeight(); int j; for(j=i-1; j>=0; j--) { int compWeight = circles.get(j).getWeight(); if(thisWeight < compWeight) break; else circles.set(j+1, circles.get(j)); } circles.set(j+1, temp); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Comparator<Trio<Pair<String, Integer>, Pair<String,Integer>, Integer>> sortByWeight()\n\t{\n\t\tComparator<Trio<Pair<String, Integer>, Pair<String, Integer>, Integer>> comp = new Comparator<Trio<Pair<String, Integer>, Pair<String, Integer>, Integer>>() {\n\t\t\n\t\t\tpublic int compare(Trio<Pair<String, Integer>, Pair<String, Integer>, Integer> weight1,\n\t\t\t\t\tTrio<Pair<String, Integer>, Pair<String, Integer>, Integer> weight2) \n\t\t\t{\n\t\t\t\t\n\t\t\t\treturn weight1.getThird() - weight2.getThird();\n\t\t\t}\n\t\t};\n\t\t\n\t\treturn comp;\n\t}", "public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}", "private void sort() {\n ObservableList<Node> workingCollection = FXCollections.observableArrayList(\n this.getChildren()\n );\n\n Collections.sort(workingCollection, new Comparator<Node>() {\n @Override\n public int compare(Node o1, Node o2) {\n CardView c1 = (CardView) o1;\n CardView c2 = (CardView) o2;\n return c1.getCard().compareTo(c2.getCard());\n }\n });\n\n this.getChildren().setAll(workingCollection);\n }", "public List<Equipment> sortByEquipmentWeight(){\n List<Equipment> sortedEquipment = equipment;\n Collections.sort(sortedEquipment);\n return sortedEquipment;\n }", "public static void main(String[] args) {\n Circle[] circles = new Circle[3];\n circles[0] = new Circle(3.6);\n circles[1] = new Circle();\n circles[2] = new Circle(3.5, \"indigo\", false);\n System.out.println(\"Pre-sorted: \");\n for (Circle circle:circles){\n System.out.println(circle);\n }\n\n Comparator circleComparator = new CircleComparator();\n Arrays.sort(circles,circleComparator);\n\n System.out.println(\"After-sorted: \");\n for (Circle circle:circles){\n System.out.println(circle);\n }\n /*ComparableCircle[] circles= new ComparableCircle[3];\n circles[0]= new ComparableCircle(3.6);\n circles[1]=new ComparableCircle();\n circles[2]=new ComparableCircle(\"blue\",true,3.4);\n System.out.println(\"Pre-sorted:\");\n for(ComparableCircle circle:circles) {\n System.out.println(circle);\n }\n System.out.println(circles[0].compareTo(circles[1]));\n System.out.println(circles[1].compareTo(circles[2]));\n System.out.println(circles[0].compareTo(circles[2]));\n\n Arrays.sort(circles);\n\n System.out.println(\"After-sorted: \");\n for(ComparableCircle circle:circles){\n System.out.println(circle);\n }*/\n }", "void order() {\n for (int i = 0; i < numVertices; i++) {\n if (simp[i][numParams] < simp[best][numParams]) {\n best = i;\n }\n if (simp[i][numParams] > simp[worst][numParams]) {\n worst = i;\n }\n }\n nextWorst = best;\n for (int i = 0; i < numVertices; i++) {\n if (i != worst) {\n if (simp[i][numParams] > simp[nextWorst][numParams]) {\n nextWorst = i;\n }\n }\n }\n }", "public void sort () {\n\t\t\n\t\t// Clear iterator\n\t\titer = null;\n\t\t\n\t\tCollections.sort(this.pathObjects, new Comparator<PathObject>() {\n\t\t @Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t // -1 - less than, 1 - greater than, 0 - equal, all inversed for descending\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }\n\t\t});\n\t\t\n\t\titer = this.pathObjects.iterator();\n\t}", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "public void sortGivenArray_popularity() { \n int i, j, k; \n for(i = movieList.size()/2; i > 0; i /= 2) {\n for(j = i; j < movieList.size(); j++) {\n Movie key = movieList.get(j);\n for(k = j; k >= i; k -= i) {\n if(key.rents > movieList.get(k-i).rents) {\n movieList.set(k, movieList.get(k-i));\n } else {\n break; \n }\n }\n movieList.set(k, key);\n }\n } \n }", "public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }", "public static void sortEdges(LinkedList<Edge> edges){\n Collections.sort(edges, Comparator.comparingInt(Edge::getV_weight));\r\n }", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "private void leastWeightFirst(Instance instance) {\n ArrayList<Pair> order = new ArrayList<Pair>();\n\n for (int i = 0; i < instance.getSize(); i++) {\n order.add(i, new Pair(i, instance.getValue(i), instance.getWeight(i)));\n }\n\n // Sort items according to w_i <= w_i+1\n order.sort(new Comparator<Pair>() {\n @Override\n public int compare(Pair o1, Pair o2) {\n return o1.w - o2.w;\n }\n });\n\n setSolution(order);\n }", "@Override\r\n\tpublic int compareTo(Object o) {\n\t\tNode other=(Node)o;\r\n\t\t\r\n\t\t\r\n\t\treturn this.getWeight()-other.getWeight();//正序,\r\n\t}", "private void mostValuePerWeightFirst(Instance instance) {\n ArrayList<Pair> order = new ArrayList<Pair>();\n\n for (int i = 0; i < instance.getSize(); i++) {\n order.add(i, new Pair(i, instance.getValue(i), instance.getWeight(i)));\n }\n\n // Sort items according to c_i/w_i >= c_i+1/w_i+1\n order.sort(new Comparator<Pair>() {\n @Override\n public int compare(Pair o1, Pair o2) {\n return o1.compareTo(o2) * -1;\n }\n });\n\n setSolution(order);\n }", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "public List<GameStateChild> orderChildrenWithHeuristics(List<GameStateChild> children)\n {\n \tList<Double> childUtils = new ArrayList<Double>();\n \tList<Double> tempUtils = new ArrayList<Double>();\n \tList<GameStateChild> tempChildren = new ArrayList<GameStateChild>();\n \t\n \tdouble tempUtil;\n \tint tempIndex = 0;\n \tint priority = 1;\n \t\n \tfor(int i = 0; i < children.size(); i++) {\n \t\tGameStateChild child = children.get(i);\n \t\tSet<MapLocation> myUnitLocations = new HashSet<MapLocation>();\n \t\tchildUtils.add(i, child.state.getUtility());\n \t}\n \t\n \ttempUtils = childUtils;\n \tCollections.sort(childUtils);\n \t\n \tfor(int j = 0; j < children.size(); j++) {\n \t\t\n \t\t//Utility value to be found in unsorted array\n \t\ttempUtil = childUtils.get(j);\n \t\t\n \t\tfor(int k = 0; k < children.size(); k++) {\n \t\t\t\n \t\t\t//If the utility value is the same as this value in the unsorted array, store the index\n \t\t\tif(tempUtil == tempUtils.get(k))\n \t\t\t\ttempIndex = k;\n \t\t}\n \t\t\n \t\t//Add the child to the correct position in a temporary list\n \t\ttempChildren.add(j, children.get(tempIndex));\n \t} \t\n return tempChildren;\n }", "private void sortRating()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getRating().compareTo(b.getRating());\n if(result < 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n else if(result == 0)\n {\n result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }\n }", "public void sort()\n {\n\tstrack.sort((Node n1, Node n2) ->\n\t{\n\t if (n1.getCost() < n2.getCost()) return -1;\n\t if (n1.getCost() > n2.getCost()) return 1;\n\t return 0;\n\t});\n }", "public void sort_crystals() {\n\t\tArrays.sort(identifiedArray, new SortByRating()); \n\t}", "public void sortByBreed() {\n\t\tAnimalCompare animalCompare = new AnimalCompare();\n\t\tCollections.sort(animals, animalCompare);\n\t}", "private void sort() {\n Collections.sort(mEntries, new Comparator<BarEntry>() {\n @Override\n public int compare(BarEntry o1, BarEntry o2) {\n return o1.getX() > o2.getX() ? 1 : o1.getX() < o2.getX() ? -1 : 0;\n }\n });\n }", "private void sortResults(){\r\n this.sortedPlayers = new ArrayList<>();\r\n int size = players.size();\r\n while (size > 0) {\r\n Player lowestPointsPlayer = this.players.get(0);\r\n for(int i = 0; i<this.players.size(); i++){\r\n if(lowestPointsPlayer.getPoints() <= this.players.get(i).getPoints()){\r\n lowestPointsPlayer = this.players.get(i);\r\n }\r\n }\r\n this.sortedPlayers.add(lowestPointsPlayer);\r\n this.players.remove(lowestPointsPlayer);\r\n size--;\r\n }\r\n\r\n\r\n }", "public static void sortitems(ArrayList<item> svd)\r\n{\n\r\n\tCollections.sort(svd, new Comparator<item>(){\r\n\t\tpublic int compare(item o1, item o2){\r\n\t\t\t\tif(o1.density == o2.density)\r\n\t\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t\t\t\t\treturn o1.density > o2.density ? -1 : 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n}", "@Override\n\tpublic int compare(Person p1, Person p2) {\n\t\tif(p1.getWeight() >p2.getWeight()){\n\t\n\t\treturn 1;\n\t\t}\n\t\telse if(p1.getWeight()==p2.getWeight()){\n\t\t\tif(p1.getHeight() >p2.getHeight()){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "public static void bubbleSort() {\r\n\t\tfor(int i = nodeArrList.size() -1; i > 0; i--) {\r\n\t\t\tfor(int j = 0; j < i; j++) {\r\n\t\t\t\tif(nodeArrList.get(j).frequency > nodeArrList.get(j +1).frequency) {\r\n\t\t\t\t\tHuffmanNode temp = nodeArrList.get(j);\r\n\t\t\t\t\tnodeArrList.set(j, nodeArrList.get(j + 1));\r\n\t\t\t\t\tnodeArrList.set(j + 1, temp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void sortBySize() {\n\t\tCollections.sort(animals);\n\t}", "@Override\n\t\t\tpublic int compare(Edge o1, Edge o2) {\n\t\t\t\treturn o1.weight - o2.weight;\n\t\t\t}", "@Override\r\n\tpublic int compare(WaterBottle o1, WaterBottle o2) {\n\t\treturn o1.weight-o2.weight;\r\n\t}", "public static ArrayList<JsonNode> sortData(ArrayList<JsonNode> wordList) {\n Collections.sort( wordList, new Comparator<JsonNode>() {\n @Override\n public int compare(JsonNode a, JsonNode b) {\n int valA = Integer.parseInt(a.get(\"weight\").asText());\n int valB = Integer.parseInt(b.get(\"weight\").asText());\n return valB - valA; //Sort in order of largest to smallest\n }\n });\n\n return wordList;\n }", "public void sortChart() {\n\t\tPassengerTrain temp;\n\t\tGoodsTrain temp1;\n\n\t\tfor (int index = 0; index < TrainDetails.passengerList.size(); index++) {\n\t\t\tfor (int i = 0; i < TrainDetails.passengerList.size(); i++) {\n\t\t\t\tdouble totalTime1 = ((TrainDetails.passengerList).get(index).duration);\n\t\t\t\tdouble totalTime2 = (TrainDetails.passengerList.get(i).duration);\n\t\t\t\tif (totalTime1 < totalTime2) {\n\t\t\t\t\ttemp = TrainDetails.passengerList.get(index);\n\t\t\t\t\tTrainDetails.passengerList.set(index,\n\t\t\t\t\t\t\tTrainDetails.passengerList.get(i));\n\t\t\t\t\tTrainDetails.passengerList.set(i, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int index = 0; index < TrainDetails.goodsList.size(); index++) {\n\t\t\tfor (int i = 0; i < TrainDetails.goodsList.size(); i++) {\n\t\t\t\tdouble totalTime1 = ((TrainDetails.goodsList).get(index).duration);\n\t\t\t\tdouble totalTime2 = (TrainDetails.goodsList.get(i).duration);\n\t\t\t\tif (totalTime1 < totalTime2) {\n\t\t\t\t\ttemp1 = TrainDetails.goodsList.get(index);\n\t\t\t\t\tTrainDetails.goodsList.set(index,\n\t\t\t\t\t\t\tTrainDetails.goodsList.get(i));\n\t\t\t\t\tTrainDetails.goodsList.set(i, temp1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private void sortRequiredVertices() {\n\t\tIterator<Integer> it = instance.getGraph().getVerticesIterator();\n\t\twhile (it.hasNext())\n\t\t\tsortRequiredVertices(it.next());\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate static List<Dog> listAllDogsOrderingByWeight(EntityManager em) {\n\t\tQuery query = em.createQuery(\"select d from Dog d order by d.weight desc\", Dog.class);\n\n\t\treturn query.getResultList();\n\t}", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic int compareTo(Cow o) {\n\t\treturn Integer.compare(this.weight, o.weight);\n\t}", "@Override\n\t\t\tpublic int compare(Edge o1, Edge o2) {\n\t\t\t\tif (o1.weight < o2.weight)\n\t\t\t\t\treturn -1;\n\t\t\t\telse if (o1.weight > o2.weight)\n\t\t\t\t\treturn 1;\n\t\t\t\telse\n\t\t\t\t\treturn 0;\n\t\t\t}", "public void sort() {\n Collections.sort(jumpers, new SortJumperByPoints()); \n }", "private ArrayList<String> sort(HashMap<String, Double> input){\n\n //initiate new array list from existing keys\n ArrayList<String> sortedCats = new ArrayList<>(input.keySet());\n\n //size of array list\n int n = sortedCats.size();\n\n //placeholder to replace category\n String temp;\n\n //bubble sort algorithm\n for(int i = 0; i < n; i++){\n for(int j = 1; j < (n-i); j++){\n if(input.get(sortedCats.get(j-1)) < input.get(sortedCats.get(j))){\n //swap elements\n temp = sortedCats.get(j-1);\n sortedCats.remove(j-1);\n sortedCats.add(j, temp);\n }\n }\n }\n return sortedCats;\n }", "public int compareTo(Vertex v) {\n return this.weight - v.weight;\n }", "public void sort(){\n ArrayList<Card> sortedCards = new ArrayList<Card>();\n ArrayList<Card> reds = new ArrayList<Card>();\n ArrayList<Card> yellows = new ArrayList<Card>();\n ArrayList<Card> greens = new ArrayList<Card>();\n ArrayList<Card> blues = new ArrayList<Card>();\n ArrayList<Card> specials = new ArrayList<Card>();\n for(int i = 0; i < cards.size(); i++){\n if(cards.get(i).getColor() == RED){\n reds.add(cards.get(i));\n }else if(cards.get(i).getColor() == YELLOW){\n yellows.add(cards.get(i));\n }else if(cards.get(i).getColor() == GREEN){\n greens.add(cards.get(i));\n }else if(cards.get(i).getColor() == BLUE){\n blues.add(cards.get(i));\n }else if(cards.get(i).getColor() == ALL){\n specials.add(cards.get(i));\n }\n }\n cards = new ArrayList<Card>();\n for(Card c: reds){\n sortedCards.add(c);\n }\n for(Card c: yellows){\n sortedCards.add(c);\n }\n for(Card c: greens){\n sortedCards.add(c);\n }\n for(Card c: blues){\n sortedCards.add(c);\n }\n for(Card c: specials){\n sortedCards.add(c);\n }\n for(Card c: sortedCards){\n cards.add(c);\n }\n }", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "public int compareTo(Object e){\n if(weight == ((Edge)e).weight){\n return 0;\n }\n else if(weight > ((Edge)e).weight){\n return 1;\n }\n else{\n return -1;\n }\n }", "@Override\r\n\t//按权重大小排序\r\n\tpublic int compareTo(Domain o) {\n\t\treturn (o.weight-this.weight);\r\n\t}", "public void findCommunities() {\n\n\t\t// We copy the community of scale to scale+1\n\t\tfor (Object o : G) {\n\t\t\tNode i = (Node) o;\n\t\t\ti.addCommunity(scale + 1, i.getCommunity(scale));\n\t\t}\n\t\tscale++;\n\t\tG.setScaleMax(scale);\n\n\t\tString old_community;\n\t\tString current_community;\n\t\tString best_community = \"\";\n\t\tdouble dQ_max = 0;\n\t\tdouble dQ = 0;\n\t\t// double old_Q;\n\t\t// do {\n\t\t// old_Q = Q;\n\t\tfor (Object oi : G) {\n\t\t\tNode i = (Node) oi;\n\t\t\t// Node iH = (Node) nodesH.toArray()[k];\n\t\t\tdQ_max = 0;\n\t\t\tfor (Object oj : G) {\n\t\t\t\tNode j = (Node) oj;\n\t\t\t\tif (i != j && i.getCommunity(scale) != j.getCommunity(scale)) {\n\t\t\t\t\t// We put i into the community C of j\n\t\t\t\t\told_community = i.getCommunity(scale);\n\t\t\t\t\tcurrent_community = j.getCommunity(scale);\n\t\t\t\t\ti.editCommunity(scale, current_community);\n\t\t\t\t\t// We compute the modularity gain.\n\t\t\t\t\tdQ = computeModularityGain(i, current_community);\n\t\t\t\t\t// We keep the community with the highest gain.\n\t\t\t\t\tif (dQ > dQ_max) {\n\t\t\t\t\t\tdQ_max = dQ;\n\t\t\t\t\t\tbest_community = current_community;\n\t\t\t\t\t}\n\t\t\t\t\t// We put i back into its old community.\n\t\t\t\t\ti.editCommunity(scale, old_community);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// We put i into the best community.\n\t\t\tif (dQ_max > 0) {\n\t\t\t\ti.editCommunity(scale, best_community);\n\t\t\t\t// iH.editCommunity(scale, best_community);\n\t\t\t}\n\t\t}\n\t\tcomputeModularity();\n\t\t// } while (old_Q != Q);\n\t}", "private void sortByKeys(LazyMap<ProcessorDistributionKey, Collection<Geometry>> keyToGeoms,\n Collection<? extends Geometry> sortGeoms, Collection<Geometry> unprocessed)\n {\n final ProcessorDistributionKey hull = new ProcessorDistributionKey();\n for (final Geometry geom : sortGeoms)\n {\n sortByKeys(keyToGeoms, geom, unprocessed, hull);\n }\n }", "protected void sort() {\n\n\t\tCollections.sort(this.myRRList);\n\t}", "private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }", "private static Artist[] sortAllPaintersBasedOnTheirCharge(Artist[] painterObject, int arrayCount) {\n\t\tif (arrayCount > 0) {\n\n\t\t\tSystem.out.println(\"sorting based on charges\");\n\t\t\tSystem.out.println(\"................................................\");\n\t\t\tfor (int i = 0; i < arrayCount; i++) {\n\t\t\t\tfor (int j = 0; j < arrayCount - i - 1; j++) {\n\t\t\t\t\tif (painterObject[j].getSqFeetCharge() > painterObject[j + 1].getSqFeetCharge()) {\n\t\t\t\t\t\tArtist temp = painterObject[j];\n\t\t\t\t\t\tpainterObject[j] = painterObject[j + 1];\n\t\t\t\t\t\tpainterObject[j + 1] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//display the data after sorting\n\t\t\tdisplay(painterObject, arrayCount);\n\n\t\t} else {\n\t\t\tSystem.out.println(\"There is no data in the database\");\n\t\t}\n\t\treturn painterObject;\n\t}", "private void sort(Metric metr, DoubleData dObj, DoubleData[] dObjects, int left, int right)\n {\n int p = left + RANDOM_GENERATOR.nextInt(right-left+1);\n DoubleData tmpObj = dObjects[right];\n dObjects[right] = dObjects[p];\n dObjects[p] = tmpObj;\n int l = left, r = right - 1;\n double dist = metr.dist(dObjects[right], dObj);\n while (l < r)\n if (dist >= metr.dist(dObjects[l], dObj)) l++;\n else if (dist < metr.dist(dObjects[r], dObj)) r--;\n else\n {\n tmpObj = dObjects[l];\n dObjects[l] = dObjects[r];\n dObjects[r] = tmpObj;\n l++;\n if (l < r) r--;\n }\n if (dist < metr.dist(dObjects[l], dObj))\n {\n tmpObj = dObjects[l];\n dObjects[l] = dObjects[right];\n dObjects[right] = tmpObj;\n }\n if (left < l) sort(metr, dObj, dObjects, left, l);\n if (l + 1 < right) sort(metr, dObj, dObjects, l + 1, right);\n }", "public static void sortShapes(Vector<Shape> v)\r\n\t{\r\n\t\tShape temp;\r\n\t\tint i,j;\r\n\t\tfor(i=0 ; i<v.size() ; i++)\r\n\t\t{\r\n\t\t\tfor(j=0 ; j<v.size() ; j++)\r\n\t\t\t{\r\n\t\t\t\tif((v.get(i)).area() < (v.get(j)).area())\r\n\t\t\t\t{\r\n\t\t\t\t\ttemp = v.get(i);\r\n\t\t\t\t\tv.set(i,v.get(j));\r\n\t\t\t\t\tv.set(j,temp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private static void vertTopologicalSort(double[][] energies)\n {\n //energies[row][column]\n int h = energies.length, w = energies[0].length;\n for (int row = 1; row < h; row++) //row\n {\n for (int col = 0; col < w; col++)\n {\n double upCenter = energies[row-1][col];\n double min = (col == 0) ?\n upCenter : Math.min(upCenter, energies[row-1][col-1]);\n min = (col == (w -1)) ? min : Math.min(min, energies[row-1][col+1]);\n \n energies[row][col] += min;\n }\n }\n \n }", "public int compareTo(Molecule other)\n\t{\n\t\treturn this.getWeight() < other.getWeight() ? -1 : (this.getWeight() > other.getWeight() ? 1 : 0);\n\t}", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "public int compare(Person a, Person b){\n int aWeight = (int)a.getWeight();\n int bWeight = (int)b.getWeight();\n return aWeight - bWeight;\n }", "public void sortLibrary() {\n libraries.sort(Comparator.comparingLong(Library::getSignupCost));\n\n //J-\n// libraries.sort((o1, o2) -> Long.compare(\n// o2.getCurrentScore() - (2 * o2.getDailyShipCapacity() * o2.getSignupCost()),\n// o1.getCurrentScore() - (2 * o1.getDailyShipCapacity() * o1.getSignupCost())\n// ));\n\n// libraries.sort((o1, o2) -> Long.compare(\n// (o2.getBooksCount() + o2.getSignupCost()) * o2.getDailyShipCapacity(),\n// (o1.getBooksCount() + o1.getSignupCost()) * o1.getDailyShipCapacity()));\n //J+\n }", "public JwComparator<AcUpuTagSummaryVo> getWeightComparatorNullsLower()\n {\n return WeightComparatorNullsLower;\n }", "public static void sortitems(ArrayList<item> svd)\n\t{\n\t\tCollections.sort(svd, new Comparator<item>(){\n\t\t public int compare(item o1, item o2){\n\t\t if(o1.density == o2.density)\n\t\t return 0;\n\t\t return o1.density > o2.density ? -1 : 1;\n\t\t }\n\t\t});\n\t\t\n\t\t\n\t}", "public void sortByFuelConsumption(){\n for (int d = carPark.getCars().size() / 2; d >= 1; d /= 2)\n for (int i = d; i < carPark.getCars().size(); i++)\n for (int j = i; j >= d && carPark.getCars().get(j-d).getFuelConsumption() > carPark.getCars().get(j).getFuelConsumption(); j -= d) {\n Car temp = carPark.getCars().get(j);\n carPark.getCars().remove(j);\n carPark.getCars().add(j - 1, temp);\n }\n }", "public static void sortByFitlvl() {\n Collections.sort(Population);\n if (debug) {\n debugLog(\"\\nSorted: \");\n printPopulation();\n }\n }", "private List<Article> sortTopics(Article queryTopic, List<Article>relatedTopics) throws Exception {\n for (Article art:relatedTopics) \n art.setWeight(_comparer.getRelatedness(art, queryTopic)) ;\n\n //Now that the weight attribute is set, sorting will be in descending order of weight.\n //If weight was not set, it would be in ascending order of id. \n Collections.sort(relatedTopics) ;\n return relatedTopics ;\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "@Override\n public int compareTo(HuffmanCodeNode o) {\n return this.weight - o.getWeight();\n }", "public void sort10(){\r\n\t\tArrayList<wifi> temp = new ArrayList<>();\r\n\t\tfor(int i=0; i<wifis.size() && i<10; i++)\r\n\t\t\ttemp.add(wifis.get(i));\r\n\t\twifis = temp;\r\n\t}", "public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }", "@RequestMapping(value = \"/weight/{weight}\", method = RequestMethod.GET)\n public List<Element> weight(@PathVariable final int weight) {\n\n List<Element> elements = this.chemistryService.findElementsByAtomicWeight(weight);\n\n Collections.sort(elements);\n\n return elements;\n }", "public void sortSpeeds() {\n\n//\t\tSystem.out.println(\"BEGIN: SORT SPEEDS\");\n\t\tthis.printMoves();\n\n\t\tArrayList<Move> temp = new ArrayList<Move>();\n\t\tint i = 1;\n\t\tint x = 0;\n\t\tboolean y = true;\n\n\t\ttemp.add(niceMoves.get(0));\n\t\tint size = niceMoves.size();\n\n\t\twhile (i < niceMoves.size()) {\n\n//\t\t\tSystem.out.println(\"Reiterating.\");\n\t\t\ty = true;\n\n\t\t\twhile (y) {\n\n\t\t\t\t//System.out.println(\"I: \" + i + \" X: \" + x);\n\n\t\t\t\ttry {\n\n\t\t\t\t\tif (niceMoves.get(i).getSpeed() > temp.get(x).getCalcedSpeed()) {\n\n//\t\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\t\ty = false;\n\t\t\t\t\t}\n\t\t\t\t\t//X has cycled through temp, meaning nicemoves.i should be added to the end\n\t\t\t\t\t//The only way to check for this is to let it overflow lol\n\t\t\t\t} catch (Exception E) {\n//\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\ty = false;\n\n\t\t\t\t}\n\n\t\t\t\tx += 1;\n\t\t\t}\n\n\t\t\ti += 1;\n\t\t\tx = 0;\n\t\t}\n\n\t\tniceMoves = temp;\n\n//\t\tSystem.out.println();\n//\t\tSystem.out.println(\"Sorting Complete! New Order: \");\n//\t\tthis.printMoves();\n\t\t//end of sort speeds\n\t}", "public static void sort(ArrayList<Number> list) {\r\n\t\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\r\n\t\t\t\t\t\t\t// Ako je vrijadnost elementa na idneksu i manja od vrijednosti\r\n\t\t\t\t\t\t\t// elementa na idneksu j, zamijeni im pozicije.\r\n\t\t\t\t\t\t\tif (list.get(i).doubleValue() < list.get(j).doubleValue()) {\r\n\t\t\t\t\t\t\t\t// Cuvamo elemenat sa drugog indeksa u temp varijabli.\r\n\t\t\t\t\t\t\t\tNumber temp = list.get(j);\r\n\t\t\t\t\t\t\t\t// Kopiramo elemenat sa prvog indeksa preko drugog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(j, list.get(i));\r\n\t\t\t\t\t\t\t\t// Kopiramo temp (drugi elemenat) preko prvog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(i, temp);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t}", "@Test\r\n public void testGetShapesSortedByOriginDistance() {\r\n List<Shape> expectedOutput = new ArrayList<Shape>();\r\n expectedOutput.add(circle);\r\n expectedOutput.add(square);\r\n expectedOutput.add(rectangle);\r\n expectedOutput.add(triangle);\r\n expectedOutput.add(regularPolygon);\r\n List<Shape> actualOutput = screen.sortShape(SortType.ORIGIN_DISTANCE);\r\n assertEquals(expectedOutput, actualOutput);\r\n }", "void sort();", "void sort();", "private void sortLeaves() {\r\n\r\n\t\tboolean swapOccured;\r\n\r\n\t\tdo {\r\n\t\t\tswapOccured = false;\r\n\r\n\t\t\tfor(int index=0; index < this.treeNodes.length - 1; index++) {\r\n\t\t\t\tint currentLeaf = index;\r\n\t\t\t\tint nextLeaf = currentLeaf + 1;\r\n\t\t\t\tif(this.treeNodes[currentLeaf].getFrequency() > this.treeNodes[nextLeaf].getFrequency()) {\r\n\t\t\t\t\tswapLeaves(currentLeaf, nextLeaf);\r\n\t\t\t\t\tswapOccured=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(swapOccured);\r\n\t}", "public List<Room> sortBySize() {\n List<Room> result = new ArrayList<>();\n for (Room o : rooms)\n result.add(o);\n for (int i = 0; i < result.size(); i++) {\n for (int j = 0; j < result.size() - 1; j++) {\n if (result.get(j).getSize() > result.get(j + 1).getSize()) {\n\n Room temp = result.get(j);\n result.set(j, result.get(j + 1));\n result.set(j + 1, temp);\n }\n\n }\n }\n return result;\n }", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "public void sortIntermediateNodes() {\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tdeclareBeforeUse(intermediateNode);\n\t\t}\n\t}", "public void sort() {\n\t\t\tCollections.sort(population, new SolutionComparator());\n\t\t}", "public void sort(final Collection<PNode> theNodes) {\n // TODO complete this function as a supporter for the component spliter problem!\n // Check for empty or null array\n if (theNodes == null || theNodes.size() == 0) {\n return;\n }\n this.nodes = (PNode[]) theNodes.toArray();\n nodeLength = theNodes.size();\n int id = 0;\n PNode smallestNode = null;\n boolean stopLoop = false;\n while (true) {\n if (nodeLength == id) {\n break;\n }\n while (!stopLoop) {\n stopLoop = false;\n for (PNode node : nodes) {\n if (smallestNode == null) {\n smallestNode = node;\n }\n if (node.id < smallestNode.id) {\n smallestNode = node;\n stopLoop = true;\n }\n }\n }\n smallestNode.id += 1;\n }\n\n }", "public void sortCompetitors(){\n\t\t}", "public void sortMatches();", "public void sortScoresDescendently(){\n this.langsScores.sort((LangScoreBankUnit o1, LangScoreBankUnit o2) -> {\n return Double.compare(o2.getScore(),o1.getScore());\n });\n }", "private void sortByX() {\n\t\tCollections.sort(pointList, getXComparator());\n\t}", "private void sortArticlesByRating() {\n final DatabaseReference database;\n database = FirebaseDatabase.getInstance().getReference();\n\n database.child(\"Ratings\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Map<Double,ArrayList<Article>> articlesTreeMap;\n articlesTreeMap = new TreeMap<>(Collections.reverseOrder());\n for(Article a : articles) {\n DataSnapshot ratingArticleSnapShot = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if (a.getLink() != null && a.getLink() != \"\" && snapshot.child(\"Link\").getValue().equals(a.getLink())) {\n ratingArticleSnapShot = snapshot;\n break;\n }\n }\n Double rating = 0.0;\n if (ratingArticleSnapShot != null) {\n int totalVoteCount = 0, weightedSum = 0;\n for(int i=1 ;i<=5 ;i++) {\n int numberOfVotes = Integer.parseInt(ratingArticleSnapShot.child(\"Votes\").child(String.valueOf(i)).getValue().toString());\n weightedSum += (i * numberOfVotes);\n totalVoteCount += numberOfVotes;\n }\n rating = ((double) weightedSum) / ((double) totalVoteCount);\n }\n if(!articlesTreeMap.containsKey(rating)) {\n articlesTreeMap.put(rating, new ArrayList<Article>());\n }\n articlesTreeMap.get(rating).add(a);\n }\n\n articles.clear();\n for(Map.Entry<Double,ArrayList<Article>> entry : articlesTreeMap.entrySet()) {\n ArrayList<Article> list = entry.getValue();\n articles.addAll(list);\n }\n mSectionsPagerAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(DatabaseError d) {\n Log.d(\"Login DbError Msg ->\", d.getMessage());\n Log.d(\"Login DbError Detail ->\", d.getDetails());\n }\n });\n }", "public static void main(String[] args) {\n\t\tShirt r = new Shirt(\"Red\", 10);\r\n\t\tShirt b = new Shirt(\"Blue\", 465);\r\n\t\tShirt g = new Shirt(\"Green\", 3213456);\r\n\t\t// Creates some custom comparator object.\r\n\t\tSizeComp s = new SizeComp();\r\n\t\tColorComp c = new ColorComp();\r\n\t\t// Creates some tree sets using custom comparator. \r\n\t\tTreeSet<Shirt> mySizeSet = new TreeSet<>(s);\r\n\t\tmySizeSet.add(r);\r\n\t\tmySizeSet.add(g);\r\n\t\tmySizeSet.add(b);\r\n\t\tout.println(\"Sort by Size\");\r\n\t\tout.println(mySizeSet);\r\n\t\t\r\n\t\tTreeSet<Shirt> myCompSet = new TreeSet<>(c);\r\n\t\tmyCompSet.add(r);\r\n\t\tmyCompSet.add(g);\r\n\t\tmyCompSet.add(b);\r\n\t\tout.println(\"Sort by Color\");\r\n\t\tout.println(myCompSet);\r\n\t}", "void topologicalSort() {\n\n\t\tfor (SimpleVertex vertice : allvertices) {\n\n\t\t\tif (vertice.isVisited == false) {\n\t\t\t\tlistset.add(vertice.Vertexname);\n\t\t\t\ttopologicalSortUtil(vertice);\n\n\t\t\t}\n\t\t}\n\n\t}", "private List<Instance> sortInstancesByAttribute(List<Instance> instances, int n) {\r\n\r\n\t\tCollections.sort(instances, new Comparator<Instance>() {\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Instance instance1, Instance instance2) {\r\n\t\t\t\treturn (int)((Double) instance1.getAttributes().get(n).getValue()).compareTo((Double) instance2.getAttributes().get(n).getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn instances;\r\n\t}", "public void sortTree(TreeNode root){\r\n\t\tArrayList<TreeNode> newChildrenlist = new ArrayList<TreeNode>();\r\n\t\tIterator<TreeNode> it = root.children();\r\n\t\tTreeNode child;\r\n\t\tint i, j, l, freq;\r\n\t\twhile(it.hasNext()){\r\n\t\t\tchild = it.next();\r\n\t\t\tfreq = child.getFrequency();\r\n\t\t\tif(newChildrenlist.size() == 0){\r\n\t\t\t\tnewChildrenlist.add(child);\r\n\t\t\t}\t\t\t\r\n\t\t\telse if(newChildrenlist.get(0).getFrequency() <= freq){\r\n\t\t\t\tnewChildrenlist.add(0, child);\r\n\t\t\t}\r\n\t\t\telse if(newChildrenlist.get(newChildrenlist.size()-1).getFrequency()\r\n\t\t\t\t\t>= freq){\r\n\t\t\t\tnewChildrenlist.add(child);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\ti = 0;\r\n\t\t\t\tj = newChildrenlist.size() - 1;\r\n\t\t\t\twhile(i < j){\r\n\t\t\t\t\tl = (i+j)/2;\r\n\t\t\t\t\tif(freq == newChildrenlist.get(l).getFrequency()){\r\n\t\t\t\t\t\tnewChildrenlist.add(l, child);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(freq < newChildrenlist.get(l).getFrequency()){\r\n\t\t\t\t\t\ti = Math.max(l, i+1);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tj = Math.min(l, j-1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(newChildrenlist.get(i).getFrequency() > freq){\r\n\t\t\t\t\tnewChildrenlist.add(i+1, child);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewChildrenlist.add(i, child);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\troot.setChildren(newChildrenlist);\r\n\t\tit = root.children();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tchild = it.next();\r\n\t\t\tsortTree(child);\r\n\t\t}\r\n\t}", "public void sort(){\n Collections.sort(list, new SortBySpecies());\n }", "private List<OrderDistance> sortOrdersByPriorities(List<OrderDistance> orderDistances) {\n\n /*Keeps orders and their priorities.\n * TreeMap keeps data in order using keys\n */\n\n Map<Integer, List<OrderDistance>> listMap = orderDistances.stream()\n .collect(groupingBy(order -> getPriority(order.getOrder()), TreeMap::new, mapping(Function.identity(), toList())));\n\n /*\n * There are three list which consists of vip,food and other\n * Here we are flatting them into single list\n */\n return listMap.values().stream().flatMap(Collection::stream).collect(toList());\n }", "private Vector<Node> sortCodes()\n\t{\n\t\tVector<Node> nodes = new Vector<Node>();\n\t\tfor(int i = 0; i < prioQ.size(); i++)\n\t\t{\n\t\t\tNode n = new Node(prioQ.get(i).getData(),\n\t\t\t\t\tprioQ.get(i).getCount());\n\t\t\tnodes.add(n);\n\t\t}\n\t\n\t\tCollections.sort(nodes, new Comparator() {\n\t public int compare(Object o1, Object o2) {\n\t Integer x1 = ((Node) o1).getCount();\n\t Integer x2 = ((Node) o2).getCount();\n\t int sComp = x1.compareTo(x2);\n\n\t if (sComp != 0) {\n\t return sComp;\n\t } else {\n\t Integer a1 = ((Node) o1).getData();\n\t Integer a2 = ((Node) o2).getData();\n\t return a1.compareTo(a2);\n\t }\n\t }\n\t });\n\t\t\n\t\treturn nodes;\n\t}", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "void sortV();", "private List<Atom> sortAtoms(List<Atom> atoms) {\n\t\tfinal Set<SortingBodyComponent> components = new LinkedHashSet<>();\n\t\tfinal Set<ExternalAtom> builtinAtoms = new LinkedHashSet<>();\n\t\tfinal Set<IntervalAtom> intervalAtoms = new LinkedHashSet<>();\n\n\t\tfor (Atom atom : atoms) {\n\t\t\t// FIXME: The following case assumes that builtin predicates do not create bindings?!\n\t\t\tif (atom.getPredicate() instanceof BuiltinBiPredicate) {\n\t\t\t\t// Sort out builtin atoms (we consider them as not creating new bindings)\n\t\t\t\tbuiltinAtoms.add((ExternalAtom) atom);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (atom instanceof IntervalAtom) {\n\t\t\t\tintervalAtoms.add((IntervalAtom) atom);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal Set<SortingBodyComponent> hits = new LinkedHashSet<>();\n\n\t\t\t// For each variable\n\t\t\tfor (VariableTerm variableTerm : atom.getBindingVariables()) {\n\t\t\t\t// Find all components it also occurs and record in hitting components\n\t\t\t\tfor (SortingBodyComponent component : components) {\n\t\t\t\t\tif (component.occurringVariables.contains(variableTerm)) {\n\t\t\t\t\t\thits.add(component);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If no components were hit, create new component, else merge components\n\t\t\tif (hits.isEmpty()) {\n\t\t\t\tcomponents.add(new SortingBodyComponent(atom));\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If only one component hit, add atom to it\n\t\t\tif (hits.size() == 1) {\n\t\t\t\thits.iterator().next().add(atom);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Merge all components that are hit by the current atom\n\t\t\tSortingBodyComponent firstComponent = hits.iterator().next();\n\t\t\tfirstComponent.add(atom);\n\t\t\tfor (SortingBodyComponent hitComponent : hits) {\n\t\t\t\tif (hitComponent != firstComponent) {\n\t\t\t\t\tfirstComponent.merge(hitComponent);\n\t\t\t\t\t// Remove merged component from the set of available components\n\t\t\t\t\tcomponents.remove(hitComponent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Components now contains all components that are internally connected but not connected to another component\n\t\tList<Atom> sortedPositiveBodyAtoms = new ArrayList<>(components.size());\n\t\tfor (SortingBodyComponent component : components) {\n\t\t\tsortedPositiveBodyAtoms.addAll(component.atomSequence);\n\t\t}\n\n\t\tsortedPositiveBodyAtoms.addAll(intervalAtoms); // Put interval atoms after positive literals generating their bindings and before builtin atom.\n\t\tsortedPositiveBodyAtoms.addAll(builtinAtoms);\t// Put builtin atoms after positive literals and before negative ones.\n\t\treturn sortedPositiveBodyAtoms;\n\t}", "void orderNodes(Comparator<N> comparator);", "public void rankColorByDegree() {\r\n\t\tthis.rankColorByDegree( new Color[] { new Color( 0xff55d0 ), new Color( 0xB30000 ) } );\r\n\t}", "private void buildTree(Species[] species) {\n List<PhyloTreeNode> treeList = new ArrayList<PhyloTreeNode>();\n MultiKeyMap<Double> speciesMap = new MultiKeyMap<Double>();\n for(Species s : species) {\n treeList.add(new PhyloTreeNode(null, s));\n }\n for(int i = 0; i < species.length - 1; i++) {\n for(int j = i + 1; j < species.length; j++) {\n speciesMap.put(species[i].getName(), species[j].getName(), Species.distance(species[i], species[j]));\n }\n }\n while(treeList.size() > 1) {\n double minValue = java.lang.Double.POSITIVE_INFINITY;\n String currentString = \"\";\n for (Map.Entry<String, Double> entry : speciesMap.entrySet()) {\n double value = entry.getValue();\n if(value < minValue ) {\n minValue = value;\n }\n }\n for (Map.Entry<String, Double> entry : speciesMap.entrySet()) {\n String key = entry.getKey();\n double value = entry.getValue();\n String[] wordArray = compareKeys(key);\n String newString = (wordArray[0] + \"|\" + wordArray[1]);\n if(value == minValue && (newString.compareTo(currentString) < 1 || currentString == \"\" )) {\n currentString = newString;\n }\n }\n PhyloTreeNode less = null;\n PhyloTreeNode great = null;\n String[] twoWords = compareKeys(currentString);\n for(int i = 0; i < treeList.size(); i++) {\n if(treeList.get(i).getLabel().equals(twoWords[0]))\n less = treeList.get(i);\n if(treeList.get(i).getLabel().equals(twoWords[1]))\n great = treeList.get(i);\n }\n String lesser = less.getLabel();\n String greater = great.getLabel();\n for(PhyloTreeNode s : treeList) {\n if(!s.getLabel().equals(lesser) && !s.getLabel().equals(greater)) {\n double numLessLeaf = less.getNumLeafs();\n double numGreatLeaf = great.getNumLeafs();\n double answer = ( ((numLessLeaf /(numLessLeaf + numGreatLeaf)) * speciesMap.get(lesser, s.getLabel())) +\n ((numGreatLeaf /(numLessLeaf + numGreatLeaf)) * speciesMap.get(greater, s.getLabel())));\n speciesMap.remove(lesser, s.getLabel());\n speciesMap.remove(greater, s.getLabel());\n speciesMap.put(lesser + \"+\" + greater, s.getLabel(), answer);\n }\n }\n PhyloTreeNode combined = new PhyloTreeNode(lesser + \"+\" + greater, null, less, great, speciesMap.get(lesser, greater) / 2.0);\n combined.getLeftChild().setParent(combined);\n combined.getRightChild().setParent(combined);\n treeList.add(combined);\n treeList.remove(less);\n treeList.remove(great);\n speciesMap.remove(lesser, greater);\n }\n if(treeList.size() != 0)\n overallRoot = treeList.get(0);\n return;\n }", "private static void sortFriends() {\n friends.postValue(friends.getValue());\n }", "public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}", "@Override\n public int compare(Edge edge1, Edge edge2) {\n return Integer.compare(edge1.weight, edge2.weight);\n }", "public List<Entry<String, Double>> sort()\n\t{\n\t\tList<Entry<String, Double>> list = new ArrayList<Entry<String, Double>>();\n\t\tfor(Entry<String, Double> entry : map.entrySet())\n\t\t{\n\t\t\tlist.add(entry);\n\t\t}\n\n\t\tComparator<Entry<String, Double>> compare = new Comparator<Entry<String, Double>>() {\n\t @Override\n\t public int compare(Entry<String, Double> first, Entry<String, Double> second)\n\t {\n\t \tif (first.getValue() > second.getValue())\n\t \t{\n\t return -1;\n\t }\n\t if (first.getValue() < second.getValue())\n\t {\n\t return 1;\n\t }\n\t return 0;\n\t }\n\t };\n\n\t Collections.sort(list, compare);\n return list;\n\t}", "private static void SortHash(HashMap<String,ArrayList<input>> hashMap,Distribution list)\n\t{\n\t\tCollections.sort(list.First, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Second, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Third, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Fourth, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Fifth, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.reverse(list.First);\n\t\tCollections.reverse(list.Second);\n\t\tCollections.reverse(list.Third);\n\t\tCollections.reverse(list.Fourth);\n\t\tCollections.reverse(list.Fifth);\n\t\tputInHashMap(hashMap,list);\n\t}" ]
[ "0.65919864", "0.62428784", "0.6034572", "0.5750097", "0.5729791", "0.57036227", "0.5639599", "0.56053305", "0.5585376", "0.55825657", "0.55497354", "0.5548062", "0.5545196", "0.5496914", "0.5462404", "0.5438244", "0.5417812", "0.54119104", "0.5401717", "0.5401698", "0.53912574", "0.53723246", "0.53638685", "0.53590053", "0.5358733", "0.5338923", "0.5337758", "0.53303784", "0.5328536", "0.53145784", "0.5305252", "0.52987677", "0.5287359", "0.5271035", "0.5268687", "0.5249452", "0.52490944", "0.5244143", "0.5232805", "0.5231254", "0.52223504", "0.5195003", "0.5178548", "0.5176006", "0.51596797", "0.5147139", "0.51355463", "0.51342154", "0.51241493", "0.5119895", "0.51188695", "0.51083064", "0.51017916", "0.50999725", "0.5098987", "0.50941736", "0.5084561", "0.5084235", "0.50725585", "0.50672483", "0.5060484", "0.50533277", "0.5046037", "0.50323087", "0.5029238", "0.5028171", "0.5026044", "0.5019679", "0.5015044", "0.50144446", "0.50144446", "0.50032246", "0.4997307", "0.49962288", "0.49911743", "0.49889663", "0.49828714", "0.49753743", "0.49701005", "0.49636704", "0.49625346", "0.49592486", "0.49555758", "0.4947612", "0.49472144", "0.4941268", "0.49345335", "0.49173534", "0.4911864", "0.49092108", "0.49036682", "0.48936316", "0.4892695", "0.48905644", "0.48896053", "0.48823723", "0.4872339", "0.4870183", "0.4870111", "0.4870046" ]
0.874986
0
use iterator to be able to remove
private void positionCircles_() { Iterator<PVCircle> it = circles.iterator(); int indx = 0; Random rng = new Random(); while (it.hasNext()) { PVCircle currCircle = it.next(); //currCircle.setRadius(MAX_RADIUS * (double) currCircle.getWeight() / totalWeight); boolean collision = true; int loopCount = 0; while(collision && loopCount < 100) { currCircle.setPosition(res_x * rng.nextDouble(), res_y * rng.nextDouble()); collision = checkCollision(currCircle, indx, indx); loopCount++; } if(loopCount == 100) { //Log.d("position", "Circle too big to fit"); it.remove(); } else indx++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = UnsupportedOperationException.class)\n public void remove() {\n iterator.next();\n iterator.remove();\n }", "public E remove () throws NoSuchElementException;", "@Override\n public void remove() {\n if(elementToRemove != null){\n if(elementToRemove == lastInternalIteratorGivenElement){\n iterator.remove();\n }\n else{\n list.remove(elementToRemove);\n }\n }\n }", "public static void main(String[] args) {\n\n List<Student> students = new ArrayList<>();\n\n students.add(new Student(1, \"Nazar\", 24));\n students.add(new Student(2, \"Mykola\", 17));\n students.add(new Student(5, \"Valentyn\", 18));\n students.add(new Student(4, \"Oleg\", 28));\n students.add(new Student(3, \"Maria\", 20));\n students.add(new Student(1, \"Andriy\", 44));\n students.add(new Student(6, \"Roman\", 85));\n\n // get iterator\n\n Iterator<Student> iterator = students.iterator();\n\n while (iterator.hasNext()) {\n Student next = iterator.next();\n System.out.println(next);\n }\n System.out.println();\n\n // complex condition -> remove\n Iterator<Student> iterator2 = students.iterator();\n\n while (iterator2.hasNext()) {\n Student next = iterator2.next();\n if (next.getAge() > 30) {\n iterator2.remove();\n }\n }\n System.out.println();\n\n// Iterator<Student> iterator3 = students.iterator();\n//\n// while(iterator3.hasNext()){\n// Student next = iterator3.next();\n// System.out.println(next);\n// }\n\n\n // foreach - show remove without iterator\n for (Student student : students) {\n if (student.getAge() > 30) {\n System.out.println(student);\n students.remove(student);\n }\n }\n\n System.out.println();\n for (Student student : students) {\n System.out.println(student);\n }\n\n\n // fori - show how we can miss some objects\n\n for (int i = 0; i < students.size(); i++) {\n if (students.get(i).getAge() > 25) {\n students.remove(i);\n }\n }\n\n for (Student student : students) {\n System.out.println(student);\n }\n\n }", "public void remove() { throw new UnsupportedOperationException(\"Cannot remove from a ReadWrappingIterator\"); }", "private Boolean remove(StringIterator iter) \n {\n \treturn (remove(root, iter, 0));\n }", "public void remove() {\n\t\t if (lastReturned == null)\n\t\t throw new IllegalStateException(\n\t\t \"Iterator call to next() \" +\n\t\t \"required before calling remove()\");\n\t\t\tif (modCount != expectedModCount)\n\t\t\t\t throw new ConcurrentModificationException();\n\n\t\t\t// remove lastReturned by calling remove() in Hash.\n\t\t\t// this call will increment modCount\n\t\t\tHashAVL.this.remove(lastReturned);\n\t\t\texpectedModCount = modCount;\n\t\t\tlastReturned = null;\n\t\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.remove();\n\n instance.remove();\n\n }", "public void testRemoveIter() {\r\n Exception e = null;\r\n try {\r\n iter.remove();\r\n }\r\n catch (Exception ill) {\r\n e = ill;\r\n }\r\n assertNotNull(e);\r\n assertTrue(e instanceof IllegalStateException);\r\n list.add(\"A\");\r\n list.add(\"B\");\r\n assertTrue(iter.hasNext());\r\n iter.next();\r\n iter.remove();\r\n\r\n e = null;\r\n try {\r\n iter.remove();\r\n }\r\n catch (Exception ill) {\r\n e = ill;\r\n }\r\n assertNotNull(e);\r\n assertTrue(e instanceof IllegalStateException);\r\n \r\n }", "void removeNodeIterator(NodeIterator nodeIterator) {\n if (nodeIterator == null)\n return;\n if (iterators == null)\n return;\n removeStaleIteratorReferences();\n Iterator i = iterators.iterator();\n while (i.hasNext()) {\n Object iterator = ((Reference) i.next()).get();\n if (iterator == nodeIterator) {\n i.remove();\n return;\n } else if (iterator == null) {\n i.remove();\n }\n }\n}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Set() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.set(2);\n\n instance.remove();\n\n }", "public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }", "public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }", "Object remove();", "@Override\n\t\tpublic void remove() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t\t// Iterator.super.remove();\n\t\t}", "@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n//\t\t\t\tif (i == begin || removed)\n//\t\t\t\t\tthrow new IllegalStateException();\n//\t\t\t\telements.set(i-1, null);\n//\t\t\t\tremoved = true;\n\t\t\t}", "public void remove () {}", "@Test\n public void testRemove_After_Next() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.remove();\n\n assertFalse(baseList.contains(2));\n }", "public void testIteratorRemove() {\n SynchronousQueue q = new SynchronousQueue();\n\tIterator it = q.iterator();\n try {\n it.remove();\n shouldThrow();\n }\n catch (IllegalStateException success) {}\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public Object remove();", "@Override\n\tpublic void remove() { }", "public void remove() {\r\n //\r\n }", "void remove();", "void remove();", "void remove();", "void remove();", "void remove();", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "E remove(int i ) throws IndexOutOfBoundsException;", "@Test\n\tpublic void testRemove() {\n\t\tboolean expResult = true;\n\t\tboolean result = false;\n\n\t\tIntArrayIterator instance = createIterator();\n\t\ttry {\n\t\t\tinstance.remove();\n\t\t}\n\t\tcatch (UnsupportedOperationException e) {\n\t\t\tresult = true;\n\t\t}\n\t\tassertEquals(expResult, result);\n\t}", "public void remove()\n {\n list.remove(cursor);\n cursor--;\n }", "@Override\n public void remove() {\n Entry<T> prev = ((Entry<T>) cursor).prev;\n super.remove();\n if(cursor!=tail){\n ((Entry<T>) cursor.next).prev = prev;\n }\n }", "@Override\n public void remove() {\n }", "@Override\n public void remove() {\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "public void remove() {\n\n }", "E remove(int i) throws IndexOutOfBoundsException;", "public void remove() {\n\t\t\tif (mIterModCount != modCount) {\n\t\t\t\tSystem.out.println( mIterModCount + \" : \" + modCount);\n\t\t\t\tthrow new ConcurrentModificationException();\n\t\t\t}\n\t\t\tif (mLastNodeReturned == null)\n\t\t\t\tthrow new IllegalStateException();\n\t\t\tLinkedList.this.remove(mLastNodeReturned);\n\t\t\tif (mLastIteration == NEXT)\n\t\t\t\tmCurrentIndex--;\n\t\t\tmSize--;\n\t\t\tmIterModCount++;\n\t\t\tmodCount++;\n\t\t\tmLastNodeReturned = null;\n\t\t}", "@Test\n public void testRemove_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.remove();\n\n assertFalse(baseList.contains(2));\n }", "public void remove() {\n\t}", "public void remove() {\n\t}", "@Test(expected = IllegalStateException.class)\n public void testRemove_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.add(2);\n\n instance.remove();\n\n }", "@Override\n public T next() {\n setCurrent();\n T returnValue = current;\n current = null;\n elementToRemove = returnValue;\n return returnValue;\n }", "public void remove()\n {\n if (nextEntry == null)\n {\n if (cursor == 0)\n throw new IllegalStateException(\"Empty dictionary.\");\n else\n throw new IllegalStateException(\"next() has not been called \"\n + \"or remove() was already called after the last\"\n + \" call to next()\");\n }\n else\n {\n K toRemove = arrayDictionary.dictionary[cursor-1].getKey();\n arrayDictionary.remove(toRemove);\n cursor--;\n nextEntry = null;\n } // end if \n }", "public void remove(){\n }", "void remove(int idx);", "@Override\n public Iterator<E> iterator(){\n return null;\n }", "@Test(expected = IllegalStateException.class)\n public void testSet_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.remove();\n\n instance.set(2);\n\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException(\"Trie2.CharSequenceIterator does not support remove().\");\n }", "public void remove(){throw new RuntimeException(\"Removing() is not implemented\");\r\n\t\t}", "public void testRemove() {\n try {\n test1.remove();\n }\n catch (Exception e) {\n assertTrue(e instanceof NoSuchElementException);\n }\n for (int i = 0; i < 10; i++) {\n test1.insert(new Buffer(i, rec));\n }\n Buffer test = test1.remove();\n assertEquals(9, test.getRecord(3).getKey());\n for (int i = 0; i < 9; i++) {\n test1.remove();\n }\n assertTrue(test1.isEmpty());\n }", "@Override\r\n\tpublic Iterator<Item> iterator() {\n\t\treturn null;\r\n\t}", "public void remove() {\r\n return;\r\n }", "@Override\n\tpublic Iterator iterator() {\n\t\treturn null;\n\t}", "public void testRemove() {\r\n System.out.println(\"remove\");\r\n \r\n PartialCombinationIterator instance = null;\r\n Iterator<int[]> iterator = null;\r\n try {\r\n iterator = new PartialCombinationIterator(TestConstants.verySimpleReactionScheme, new int[] {1}, 1, 1);\r\n } catch (ReactionSchemeException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown.\");\r\n } catch (SmiLibIOException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown.\");\r\n } catch (SmiLibException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown.\");\r\n }\r\n \r\n try {\r\n iterator.remove();\r\n fail(\"No UnsupportedOperationException was thrown when executing remove().\");\r\n } catch (UnsupportedOperationException e) {\r\n }\r\n }", "abstract void remove(int index);", "@Override\r\n\tpublic Iterator<E> iterator() {\n\t\treturn null;\r\n\t}", "@Override\n public void remove() throws IllegalStateException{\n it.remove();\n }", "public void removeAt(int iterator) {\n int block = iterator / (len << 1);\n if (block >= numberOfBlocks || iterator >= endOfBlock[block]) throw new ArrayIndexOutOfBoundsException(\"Try to remove by incorrect iterator\");\n if (iterator == (len * (block) << 1)) dataInBegin[block] = data[iterator + 1];\n for (int l = iterator; l < endOfBlock[block] - 1; l++) {\n data[l] = data[l + 1];\n }\n endOfBlock[block]--;\n size--;\n if (endOfBlock[block] <= (len * block << 1)) {\n rebuildSqrt();\n }\n }", "final Iterator<T> iterateAndClear() {\n\t\t// Iteration is atomically destructive.\n\t\tObject iteratedValue = value.getAndSet(null);\n\t\treturn new IteratorImpl<>(iteratedValue);\n\t}", "private void removeTailElement(){\n JavaBaseTask removed = items.remove(tail.getKey());\n System.out.println(\"element with index : \" + removed.getKey() + \"has been deleted doe to cache eviction\");\n tail = tail.previous;\n var headAu = head;\n while (headAu.next != null){\n headAu = headAu.next;\n }\n headAu = headAu.previous;\n headAu.next = null;\n }", "public final void remove () {\r\n }", "public Object remove (int i)\r\n {\r\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn null;\n\t}", "Object removeFirst();", "public void removeIt() { \n\t\t\tcollection.remove(currIndex);\n\t\t\tcurrIndex--;\n\t\t}", "public @Override E remove(int i) {\n \treturn removeNode(getNode(i));\n }", "@Override\n public void remove(int no) throws Exception {\n \n }", "public void remove(StringListIterator position)\n {\n\tif (head == position.node) {\n\t popFront();\n\t return;\n\t}\n\tif (tail == position.node) {\n\t popBack();\n\t return;\n\t}\n\tposition.node.prev.next = position.node.next;\n\tposition.node.next.prev = position.node.prev;\n }", "private static void iterator() {\n\t\t\r\n\t}", "public E remove() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "@Override\n\tpublic Iterator<ItemT> iterator() {\n\t\treturn null;\n\t}", "public E remove();", "public E remove();", "public void remove()\n {\n throw new UnsupportedOperationException(\"remove() method is not \" +\n \"supported for ValueIterator().\");\n }", "@Test\n public void testAdd_After_Remove() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n ;\n\n instance.remove();\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }", "private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}", "@Override\n public void remove() throws IllegalStateException {\n if (lastItemReturned == null) {\n throw new IllegalStateException();\n } else {\n iter.remove();\n lastItemReturned = null;\n }\n }" ]
[ "0.7338678", "0.72183406", "0.72008795", "0.7001011", "0.6991619", "0.6976209", "0.69351286", "0.6907146", "0.68887866", "0.67278403", "0.67109674", "0.6699161", "0.6699161", "0.6694597", "0.6692142", "0.66775626", "0.6614404", "0.6614156", "0.6595075", "0.6567825", "0.6567825", "0.654679", "0.654679", "0.654679", "0.654679", "0.654679", "0.6546671", "0.65416825", "0.6491876", "0.6478995", "0.6451193", "0.6451193", "0.6451193", "0.6451193", "0.6451193", "0.6443589", "0.6443589", "0.6443589", "0.6443589", "0.6443589", "0.6443589", "0.6443589", "0.6443589", "0.6435989", "0.6435989", "0.6432342", "0.6432342", "0.6432342", "0.6423622", "0.64210665", "0.64120835", "0.6408497", "0.63915455", "0.6386355", "0.6372518", "0.63525623", "0.63398325", "0.63356656", "0.63298064", "0.63265914", "0.6315303", "0.6315303", "0.62963814", "0.6272265", "0.6263", "0.6259485", "0.6251397", "0.62475157", "0.6235904", "0.6234719", "0.62214035", "0.62033236", "0.61942637", "0.6165404", "0.6163141", "0.6162899", "0.61564916", "0.61449426", "0.61368674", "0.61359614", "0.6122581", "0.61183614", "0.6108427", "0.6105276", "0.60917044", "0.60917044", "0.60901964", "0.6086881", "0.608624", "0.6085641", "0.6085448", "0.6084527", "0.60838705", "0.606977", "0.6069136", "0.6069136", "0.60548234", "0.6044922", "0.60351473", "0.6030885", "0.6030852" ]
0.0
-1
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.
public static void main(String[] args) { int num = 400 ; _12_Integer_to_Roman integer_to_roman = new _12_Integer_to_Roman(); String work = integer_to_roman.work(num); System.out.println("work is: " + work) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String intToRoman(int num) {\n String result = \"\";\n\n while (num > 0) {\n if (num >= 1000) {\n result += \"M\";\n num -= 1000;\n } else if (num >= 900) {\n result += \"CM\";\n num -= 900;\n } else if (num >= 500) {\n result += \"D\";\n num -= 500;\n } else if (num >= 400) {\n result += \"CD\";\n num -= 400;\n } else if (num >= 100) {\n result += \"C\";\n num -= 100;\n } else if (num >= 90) {\n result += \"XC\";\n num -= 90;\n } else if (num >= 50) {\n result += \"L\";\n num -= 50;\n } else if (num >= 40) {\n result += \"XL\";\n num -= 40;\n } else if (num >= 10) {\n result += \"X\";\n num -= 10;\n } else if (num >= 9) {\n result += \"IX\";\n num -= 9;\n } else if (num >= 5) {\n result += \"V\";\n num -= 5;\n } else if (num >= 4) {\n result += \"IV\";\n num -= 4;\n } else if (num >= 1) {\n result += \"I\";\n num -= 1;\n }\n }\n return result;\n }", "public String intToRoman(int num)\n {\n String[] digit={\"\", \"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\", \"VII\", \"VIII\", \"IX\"};\n String[] ten={\"\", \"X\", \"XX\", \"XXX\", \"XL\", \"L\", \"LX\", \"LXX\", \"LXXX\", \"XC\"};\n String[] hundred={\"\", \"C\", \"CC\", \"CCC\", \"CD\", \"D\", \"DC\", \"DCC\", \"DCCC\", \"CM\"};\n String[] thousand={\"\", \"M\", \"MM\", \"MMM\"};\n if(num>3999)\n num=3999;\n if(num<0)\n num=0;\n StringBuilder sb=new StringBuilder();\n sb.append(thousand[num/1000]);\n sb.append(hundred[num/100%10]);\n sb.append(ten[num/10%10]);\n sb.append(digit[num%10]);\n return sb.toString();\n }", "public String intToRoman(int num) {\n\t\tString[] dict = { \"M\", \"CM\", \"D\", \"CD\", \"C\", \"XC\", \"L\", \"XL\", \"X\", \"IX\", \"V\", \"IV\", \"I\" };\n\t\tint[] vals = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };\n\t\tStringBuilder res = new StringBuilder();\n\t\tfor (int i = 0; i < vals.length; i++) {\n\t\t\tif (num >= vals[i]) {\n\t\t\t\tint count = num / vals[i];\n\t\t\t\tnum = num % vals[i];\n\t\t\t\tfor (int j = 0; j < count; j++) {\n\t\t\t\t\tres.append(dict[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res.toString();\n\t}", "public static String toRoman(int inputNum) {\n\n String roman_str = \"\";\n //string declared to store the roman conversion\n while (inputNum >= 1000) {\n \troman_str += \"M\";\n inputNum -= 1000; //value for M is 1000\n }\n while (inputNum >= 900) {\n \troman_str += \"CM\";\n inputNum -= 900;\t\t//value for CM is 900\n }\n while (inputNum >= 500) {\n \troman_str += \"D\";\n inputNum -= 500;\t\t//value for D is 500\n }\n while (inputNum >= 400) {\n \troman_str += \"CD\";\n inputNum -= 400;\t\t//value for CD is 400\n }\n while (inputNum >= 100) {\n \troman_str += \"C\";\n inputNum -= 100;\t\t//value for C is 100\n }\n while (inputNum >= 90) {\n \troman_str += \"XC\";\n inputNum -= 90;\t\t\t//value for XC is 90\n }\n while (inputNum >= 50) {\n \troman_str += \"L\";\n inputNum -= 50;\t\t\t//value for L is 50\n }\n while (inputNum >= 40) {\n \troman_str += \"XL\";\n inputNum -= 40;\t\t\t//value for XL is 40\n }\n while (inputNum >= 10) {\n \troman_str += \"X\";\n inputNum -= 10;\t\t\t//value for X is 10\n }\n while (inputNum >= 9) {\n \troman_str += \"IX\";\n inputNum -= 9;\t\t\t//value for IX is 9\n }\n while (inputNum >= 5) {\n \troman_str += \"V\";\n inputNum -= 5;\t\t\t//value for V is 5\n }\n while (inputNum >= 4) {\n \troman_str += \"IV\";\n inputNum -= 4;\t\t\t//value for IV is 4\n }\n while (inputNum >= 1) {\n \troman_str += \"I\";\n inputNum -= 1;\t\t\t//value for I is 1\n } \n return roman_str;\n //returning the string of minimal roman converted for the input decimal number\n}", "public static String decimal2Roman(int number) {\n\t\t//<write your code here>\n\t}", "public String intToRoman(int num) {\n StringBuilder ans = new StringBuilder(\"\");\n char a[][] ={ {'I','V','X'}, {'X','L','C'}, {'C','D','M'}, {'M','M','M'}};\n int threshold = 1000;\n for(int i=3;i>=0;i--){\n if(num>=threshold){\n int k = num/threshold;\n num -= k*threshold;\n if(k==0){\n \n }\n else if(k==9){\n ans.append(a[i][0]);\n ans.append(a[i][2]);\n }else if(k<=3){\n for(int j=0;j<k;j++){\n ans.append(a[i][0]);\n }\n }else if(k==4){\n ans.append(a[i][0]);\n ans.append(a[i][1]);\n }else if(k<=8){\n ans.append(a[i][1]);\n for(int j=0;j<k-5;j++){\n ans.append(a[i][0]);\n }\n }\n }\n threshold /=10;\n }\n return ans.toString();\n }", "public static String convertToRoman(int num) {\n\n if (num > 3999 || num < 1) return null;\n StringBuilder builder = new StringBuilder();\n Map<Integer, String> map = new HashMap<>(7);\n map.put(1, \"I\");\n map.put(5, \"V\");\n map.put(10, \"X\");\n map.put(50, \"L\");\n map.put(100, \"C\");\n map.put(500, \"D\");\n map.put(1000, \"M\");\n\n int digit = 1;\n while (num / digit != 0) {\n int n = num % (digit * 10);\n n /= digit;\n if (n > 0 && n < 4)\n builder.append(map.get(digit).repeat(n));\n if (n == 4)\n builder.append(map.get(digit * 5)).append(map.get(digit));\n if (n > 4 && n < 9)\n builder.append(map.get(digit).repeat(n % 5)).append(map.get(digit * 5));\n if (n == 9)\n builder.append(map.get(digit * 10)).append(map.get(digit));\n\n digit *= 10;\n }\n return builder.reverse().toString();\n }", "public static String toRomanNumeral(int number)\n\t{\n\t\tString total = \"\";\n\t\tint times = 0;\n// take roman strings and integers \n\t\tString[] romans = new String[] { \"I\", \"IV\", \"V\", \"IX\", \"X\", \"XL\", \"L\",\n\n\t\t\"XC\", \"C\", \"CD\", \"D\", \"CM\", \"M\" };\n\n\t\tint[] ints = new int[] { 1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500,\n\n\t\t900, 1000 };\n// convert from decimal to roman numerals\n\t\tfor (int i = ints.length - 1; i >= 0; i--) {\n\n\t\ttimes = number / ints[i];\n\n\t\tnumber %= ints[i];\n\n\t\twhile (times > 0) {\n\n\t\ttotal += romans[i];\n\n\t\ttimes--;\n\n\t\t}\n\n\t\t}\n\t\t\n\t\t// return total \n\t\treturn total;\n\t}", "public final static String NumberToRoman(int number) {\n\t\tint l = romanMap.floorKey(number);\n\t\tif (number == l) {\n\t\t\treturn romanMap.get(number);\n\t\t}\n\t\treturn romanMap.get(l) + NumberToRoman(number - l);\n\t}", "@Override\n\tpublic String toRomanNumeral(int number) throws IllegalArgumentException {\n\t\t// Basic sanitization where it throws an error if it's a negative value or over the `Integer.MAX_VALUE`\n\t\tif\n\t\t(\n\t\t\tnumber < 0 ||\n\t\t\tnumber > Integer.MAX_VALUE\n\t\t) throw new IllegalArgumentException(\"Not a valid decimal value\");\n\n\t\t// Considering we append the String object to return, it's best to use a `StringBuilder` class as it uses buffer to allocate String objects\n\t\tStringBuilder toReturn = new StringBuilder();\n\n\t\tfor(String romanNumeralKey : romanNumeralMap.keySet()) {\n\t\t\t// This defines the value to divide the original number with\n\t\t\tint divisor = romanNumeralMap.get(romanNumeralKey);\n\n\t\t\t// This will define how many times the roman numeral character is written\n\t\t\tint quotient = number/divisor;\n\n\t\t\tif(quotient > 0) {\n\t\t\t\t// Repeat the current `romanNumeralKey` variable by the quotient\n\t\t\t\t// Java 11 String object has a `repeat()` function that repeats the string `n` times. I however only have Java 8 installed.\n\t\t\t\tString finalString = new String(new char[quotient]).replace(\"\\0\", romanNumeralKey);\n\n\t\t\t\ttoReturn.append(finalString);\n\t\t\t}\n\n\t\t\t// Subtract the number to eliminate the qualifying roman numeral from the result string\n\t\t\tnumber -= divisor * quotient;\n\t\t}\n\n\t\treturn toReturn.toString();\n\t}", "public static int romanToInt(String s) {\n int a = 0, n = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n switch (s.charAt(i)) {\n case 'I':\n n = 1;\n break;\n case 'V':\n n = 5;\n break;\n case 'X':\n n = 10;\n break;\n case 'L':\n n = 50;\n break;\n case 'C':\n n = 100;\n break;\n case 'D':\n n = 500;\n break;\n case 'M':\n n = 1000;\n break;\n }\n if (4 * n < a)\n a -= n;\n else\n a += n;\n }\n return a;\n }", "public static String intToNumeral(int number)\n\t{\n\t\tString numeral = \"\";\n\t\twhile(number > 0)\n\t\t{\n\t\t\tif(number >= 1000)\n\t\t\t{\n\t\t\t\tnumber -= 1000;\n\t\t\t\tnumeral = numeral + \"M\";\n\t\t\t}\n\t\t\telse if(number >= 900)\n\t\t\t{\n\t\t\t\tnumber -= 900;\n\t\t\t\tnumeral = numeral + \"CM\";\n\t\t\t}\n\t\t\telse if(number >= 500)\n\t\t\t{\n\t\t\t\tnumber -= 500;\n\t\t\t\tnumeral = numeral + \"D\";\n\t\t\t}\n\t\t\telse if(number >= 400)\n\t\t\t{\n\t\t\t\tnumber -= 400;\n\t\t\t\tnumeral = numeral + \"DC\";\n\t\t\t}\n\t\t\telse if(number >= 100)\n\t\t\t{\n\t\t\t\tnumber -= 100;\n\t\t\t\tnumeral = numeral + \"C\";\n\t\t\t}\n\t\t\telse if(number >= 90)\n\t\t\t{\n\t\t\t\tnumber -= 90;\n\t\t\t\tnumeral = numeral + \"XC\";\n\t\t\t}\n\t\t\telse if(number >= 50)\n\t\t\t{\n\t\t\t\tnumber -= 50;\n\t\t\t\tnumeral = numeral + \"L\";\n\t\t\t}\n\t\t\telse if(number >= 40)\n\t\t\t{\n\t\t\t\tnumber -= 40;\n\t\t\t\tnumeral = numeral + \"XL\";\n\t\t\t}\n\t\t\telse if(number >= 10)\n\t\t\t{\n\t\t\t\tnumber -= 10;\n\t\t\t\tnumeral = numeral + \"X\";\n\t\t\t}\n\t\t\telse if(number >= 9)\n\t\t\t{\n\t\t\t\tnumber -= 9;\n\t\t\t\tnumeral = numeral + \"IX\";\n\t\t\t}\n\t\t\telse if(number >= 5)\n\t\t\t{\n\t\t\t\tnumber -= 5;\n\t\t\t\tnumeral = numeral + \"V\";\n\t\t\t}\n\t\t\telse if(number >= 4)\n\t\t\t{\n\t\t\t\tnumber -= 4;\n\t\t\t\tnumeral = numeral + \"IV\";\n\t\t\t}\n\t\t\telse if(number >= 1)\n\t\t\t{\n\t\t\t\tnumber -= 1;\n\t\t\t\tnumeral = numeral + \"I\";\n\t\t\t}\n\t\t\tif(number < 0) return \"ERROR\";\n\t\t}\n\t\treturn numeral;\n\t}", "@Test\n\tvoid testRomanToInteger() {\n\t\tassertEquals(3, new RomanToInteger().romanToInt(\"III\"));\n\t\tassertEquals(4, new RomanToInteger().romanToInt(\"IV\"));\n\t\tassertEquals(9, new RomanToInteger().romanToInt(\"IX\"));\n\t\tassertEquals(58, new RomanToInteger().romanToInt(\"LVIII\"));\n\t\tassertEquals(1994, new RomanToInteger().romanToInt(\"MCMXCIV\"));\n\t}", "public static String toRoman(int num, int mult){\n if(num==4){\n if (mult==1){\n return \"IV\";\n }else if(mult == 10){\n return \"XL\";\n }else {\n return \"CD\";\n }\n }else if(num==9){\n if (mult==1){\n return \"IX\";\n }else if(mult == 10){\n return \"XC\";\n }else {\n return \"CM\";\n }\n }else {\n return castNoException(num,mult);\n }\n }", "public static int romanToInt(String roman) throws NumberFormatException {\r\n int value = 0;\r\n if (roman != null) {\r\n for (int p = 0; p < roman.length(); p++) {\r\n char c = roman.charAt(p);\r\n if (c == 'X') {\r\n value += 10;\r\n } else if (c == 'V') {\r\n value += 5;\r\n } else if (c == 'I') {\r\n if (p + 1 < roman.length()) {\r\n char p1 = roman.charAt(p + 1);\r\n if (p1 == 'V') {\r\n value += 4;\r\n p++;\r\n } else if (p1 == 'X') {\r\n value += 9;\r\n p++;\r\n } else {\r\n value += 1;\r\n }\r\n } else {\r\n value += 1;\r\n }\r\n } else\r\n throw new NumberFormatException(\"Not a roman character: \" + p);\r\n }\r\n }\r\n return value;\r\n }", "public int romanToInt(String s) {\n int res = 0;\n for (int i=0;i<s.length();i++){\n switch (s.charAt(i)){\n case 'M':\n res+=1000;\n break;\n case 'D':\n res+=500;\n break;\n case 'C':\n if (i< s.length()-1 && (s.charAt(i+1) == 'M' || s.charAt(i+1) == 'D'))\n res-=100;\n else\n res+=100;\n break;\n case 'L':\n res+=50;\n break;\n case 'X':\n if (i< s.length()-1 && (s.charAt(i+1) == 'L' || s.charAt(i+1) == 'C'))\n res-=10;\n else\n res+=10;\n break;\n case 'V':\n res+=5;\n break;\n case 'I':\n if (i< s.length()-1 && (s.charAt(i+1) == 'X' || s.charAt(i+1) == 'V'))\n res-=1;\n else\n res+=1;\n break;\n }\n }\n return res;\n }", "public static int romanToInt1(String s) {\n int result = 0;\n\n if (s.contains(\"IV\")) {\n result += 4;\n s = s.replace(\"IV\", \"\");\n }\n if (s.contains(\"IX\")) {\n result += 9;\n s = s.replace(\"IX\", \"\");\n }\n if (s.contains(\"XL\")) {\n result += 40;\n s = s.replace(\"XL\", \"\");\n }\n if (s.contains(\"XC\")) {\n result += 90;\n s = s.replace(\"XC\", \"\");\n }\n if (s.contains(\"CD\")) {\n result += 400;\n s = s.replace(\"CD\", \"\");\n }\n if (s.contains(\"CM\")) {\n result += 900;\n s = s.replace(\"CM\", \"\");\n }\n\n if (s != \"\") {\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n map.put('I', 1);\n map.put('V', 5);\n map.put('X', 10);\n map.put('L', 50);\n map.put('C', 100);\n map.put('D', 500);\n map.put('M', 1000);\n map.put(' ', 0);\n\n int length = s.length();\n if (length % 2 != 0) {\n s += \" \";\n }\n\n for (int i = 0; i < length; i += 2) {\n result += map.get(s.charAt(i)) + map.get(s.charAt(i + 1));\n }\n }\n\n return result;\n }", "public static int romanToInt2(String s) {\n int result = 0;\n\n if (s.indexOf(\"IV\") != -1) {\n result += 4;\n s = s.replace(\"IV\", \"\");\n }\n if (s.indexOf(\"IX\") != -1) {\n result += 9;\n s = s.replace(\"IX\", \"\");\n }\n if (s.indexOf(\"XL\") != -1) {\n result += 40;\n s = s.replace(\"XL\", \"\");\n }\n if (s.indexOf(\"XC\") != -1) {\n result += 90;\n s = s.replace(\"XC\", \"\");\n }\n if (s.indexOf(\"CD\") != -1) {\n result += 400;\n s = s.replace(\"CD\", \"\");\n }\n if (s.indexOf(\"CM\") != -1) {\n result += 900;\n s = s.replace(\"CM\", \"\");\n }\n\n if (s != \"\") {\n for (int i = 0; i < s.length(); i++) {\n switch (s.charAt(i)) {\n case 'I': {\n result += 1;\n break;\n }\n case 'V': {\n result += 5;\n break;\n }\n case 'X': {\n result += 10;\n break;\n }\n case 'L': {\n result += 50;\n break;\n }\n case 'C': {\n result += 100;\n break;\n }\n case 'D': {\n result += 500;\n break;\n }\n case 'M': {\n result += 1000;\n break;\n }\n }\n }\n }\n\n return result;\n }", "public int romanToInt(String s)\n {\n int result=0;\n HashMap<Character, Integer> map=new HashMap<Character, Integer>();\n map.put('I', 1);\n map.put('V', 5);\n map.put('X', 10);\n map.put('L', 50);\n map.put('C', 100);\n map.put('D', 500);\n map.put('M', 1000);\n for(int i=0; i<s.length();i++)\n {\n int temp=map.get(s.charAt(i));\n //if next position is larger than this position, then we need to minus the number\n if((i+1)<s.length() && map.get(s.charAt(i+1))>temp)\n temp=-temp;\n result+=temp;\n }\n return result;\n }", "public String convert(int input) {\n\t\tif (input < 1 || input > 3000)\n\t\t\treturn \"invalid numeral\" ;\n\t\tString n = \"\";\n\t\t\n\t\twhile (input >= 1000) {\n\t\t\tn += \"M\";\n\t\t\tinput -= 1000;\n\t\t}\n\t\t\n\t\twhile (input >= 900) {\n\t\t\tn += \"CM\";\n\t\t\tinput -= 900;\n\t\t}\n\t\t\n\t\twhile (input >= 500) {\n\t\t\tn += \"D\";\n\t\t\tinput -= 500;\n\t\t}\n\t\t\n\t\twhile (input >= 400) {\n\t\t\tn += \"CD\";\n\t\t\tinput -= 400;\n\t\t}\n\t\t\n\t\twhile (input >= 100) {\n\t\t\tn += \"C\";\n\t\t\tinput -= 100;\n\t\t}\n\t\t\n\t\twhile (input >= 90) {\n\t\t\tn += \"XC\";\n\t\t\tinput -= 90;\n\t\t}\n\t\t\n\t\twhile (input >= 50) {\n\t\t\tn += \"L\";\n\t\t\tinput -= 50;\n\t\t}\n\t\t\n\t\twhile (input >= 40) {\n\t\t\tn += \"XL\";\n\t\t\tinput -= 40;\n\t\t}\n\t\t\n\t\twhile (input >= 10) {\n\t\t\tn += \"X\";\n\t\t\tinput -= 10;\n\t\t}\n\t\t\n\t\twhile (input >= 9) {\n\t\t\tn += \"IX\";\n\t\t\tinput -= 9;\n\t\t}\n\t\t\n\t\twhile (input >= 5) {\n\t\t\tn += \"V\";\n\t\t\tinput -= 5;\n\t\t}\n\t\t\n\t\twhile (input >= 4) {\n\t\t\tn += \"IV\";\n\t\t\tinput -= 4;\n\t\t}\n\t\t\n\t\twhile (input >= 1) {\n\t\t\tn += \"I\";\n\t\t\tinput -= 1;\n\t\t}\n\t\t\n\t\treturn n; \n\t}", "public static int romanToInt3(String s) {\n int result = 0;\n for (int i = 0; i < s.length(); i++) {\n switch (s.charAt(i)) {\n case 'I':\n if ((i != s.length() - 1) && (s.charAt(i + 1) == 'V' || s.charAt(i + 1) == 'X'))\n result = result - 1;\n else\n result = result + 1;\n\n break;\n case 'V':\n result = result + 5;\n break;\n case 'X':\n if ((i != s.length() - 1) && (s.charAt(i + 1) == 'L' || s.charAt(i + 1) == 'C'))\n result = result - 10;\n else\n result = result + 10;\n break;\n case 'L':\n result = result + 50;\n break;\n case 'C':\n if ((i != s.length() - 1) && (s.charAt(i + 1) == 'D' || s.charAt(i + 1) == 'M'))\n result = result - 100;\n else\n result = result + 100;\n break;\n case 'D':\n result = result + 500;\n break;\n case 'M':\n result = result + 1000;\n break;\n\n }\n }\n return result;\n }", "@Test\n public void input_1000_() throws ValueOutOfBoundsException, MalformedNumberException {\n final RomanArabicConverter rac = new RomanArabicConverter(\"1000\");\n assertEquals(1000, rac.toArabic());\n assertEquals(\"M\", rac.toRoman());\n }", "@Override\n\tpublic int fromRomanNumeral(String romanNumeral) throws IllegalArgumentException {\n\t\t// Basic sanitization where it throws an error when a decimal number is detected in the roman numeral string\n\t\tif(\n\t\t\tromanNumeral == null ||\n\t\t\tromanNumeral.matches(\".*\\\\d.*\")\n\t\t) throw new IllegalArgumentException(\"Not a valid Roman Numeral\");\n\n\t\tint toReturn = 0;\n\n\t\tfor(String romanNumeralKey : romanNumeralMap.keySet()) {\n\t\t\t// Determine how many consecutive roman numerals are there starting from the maximmum value\n\t\t\tint consecutiveCount = 0;\n\t\t\tfor(int index = 0; index < romanNumeral.length(); index += romanNumeralKey.length()) {\n\t\t\t\t// Firstly, prevent an `IndexOutOfBoundsException` that will happen if the `romanNumeralKey` is longer than the parameterized `romanNumeral` String\n\t\t\t\tif\n\t\t\t\t(\n\t\t\t\t\tromanNumeral.length() < romanNumeralKey.length() ||\n\t\t\t\t\tromanNumeral.length() < romanNumeralKey.length() + index\n\t\t\t\t) break;\n\n\t\t\t\tif(romanNumeralKey.equals(romanNumeral.substring(index, index + romanNumeralKey.length()))) consecutiveCount++;\n\t\t\t\telse break;\n\t\t\t}\n\n\t\t\t// If there is one or more consecutive count of the numeric value from the parameterized roman numeral string, calculate the `toReturn` variable accordingly\n\t\t\tif(consecutiveCount > 0) {\n\t\t\t\t// Add the corresponding decimal value to the `toReturn` by using the `romanNumeralKey` variable in the `romanNumeralMap`\n\t\t\t\ttoReturn += romanNumeralMap.get(romanNumeralKey) * consecutiveCount;\n\n\t\t\t\t// Determine how many characters to pop from the parameterized `romanNumeral` string to make way for the other roman numeral keys\n\t\t\t\t// Java 11 String object has a `repeat()` function that repeats the string `n` times. I however only have Java 8 installed.\n\t\t\t\tint charsToRemove = new String(new char[consecutiveCount]).replace(\"\\0\", romanNumeralKey).length();\n\n\t\t\t\t// Truncate the roman numeral from the original string value to make way for the other roman numeral keys\n\t\t\t\tromanNumeral = romanNumeral.substring(charsToRemove);\n\t\t\t}\n\n\t\t\t// Exit out of the loop once all of the roman numerals have been eliminated\n\t\t\tif(romanNumeral.length() <= 0) break;\n\t\t}\n\n\t\treturn toReturn;\n\t}", "public int romanToInt(String s) {\r\n\t\t// Start typing your Java solution below\r\n\t\t// DO NOT write main() function\r\n\t\tchar[] cs = s.toCharArray();\r\n\t\tint num = 0;\r\n\t\tint tmp = 0;\r\n\t\tint tmpStep = -1;\r\n\t\tfor (char c : cs) {\r\n\t\t\tint ttmp = r2a.get(c);\r\n\t\t\tif (-1 == tmpStep) {\r\n\t\t\t\ttmpStep = ttmp;\r\n\t\t\t\ttmp = ttmp;\r\n\t\t\t} else if (ttmp == tmpStep) {\r\n\t\t\t\ttmp += ttmp;\r\n\t\t\t} else if (ttmp > tmpStep) {\r\n\t\t\t\ttmp = ttmp - tmp;\r\n\t\t\t\tnum += tmp;\r\n\t\t\t\ttmp = 0;\r\n\t\t\t\ttmpStep = -1;\r\n\t\t\t} else if (ttmp < tmpStep) {\r\n\t\t\t\tnum += tmp;\r\n\t\t\t\ttmpStep = ttmp;\r\n\t\t\t\ttmp = ttmp;\r\n\t\t\t}\r\n\t\t}\r\n\t\tnum += tmp;\r\n\t\treturn num;\r\n\t}", "public int romanToInt(String s) {\n\t\tString[] dict = { \"M\", \"CM\", \"D\", \"CD\", \"C\", \"XC\", \"L\", \"XL\", \"X\", \"IX\", \"V\", \"IV\", \"I\" };\n\t\tint[] vals = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };\n\n\t\tint num = 0;\n\n\t\tfor (int i = 0; i < dict.length && !s.equals(\"\"); i++) {\n\t\t\twhile (s.indexOf(dict[i]) == 0) {\n\t\t\t\tint inx = s.indexOf(dict[i]);\n\t\t\t\ts = s.substring(inx + dict[i].length());\n\t\t\t\tnum = num + vals[i];\n\t\t\t}\n\t\t}\n\n\t\treturn num;\n\t}", "@Test\n public void input_100_() throws ValueOutOfBoundsException, MalformedNumberException {\n final RomanArabicConverter rac = new RomanArabicConverter(\"100\");\n assertEquals(100, rac.toArabic());\n assertEquals(\"C\", rac.toRoman());\n }", "public int convertRomanToNumber() {\n\n // Iterate each letter of the RomanNumeral input.\n for (int i = 0; i < romanNumeral.length(); i++) {\n \n int currentLetterValue = 0;\n int nextLetterValue = 0;\n \n char c = romanNumeral.charAt(i);\n String currentLetter = Character.toString(c);\n\n // If it is not the last letter..\n if (i + 1 < romanNumeral.length()) {\n \n // Get the next letter.\n char d = romanNumeral.charAt(i + 1);\n String nextLetter = Character.toString(d);\n\n // Get the values of the currentLetter and nextLetter.\n for (int j = 0; j < romanNumerals.length; j++) {\n\n if (currentLetter.equalsIgnoreCase(romanNumerals[j])) {\n currentLetterValue = values[j];\n }\n\n if (nextLetter.equalsIgnoreCase(romanNumerals[j])) {\n nextLetterValue = values[j];\n }\n }\n \n if (currentLetterValue < nextLetterValue) {\n\n number += nextLetterValue - currentLetterValue;\n i++;\n\n } else {\n\n number += currentLetterValue;\n }\n\n // If it is the last letter..\n } else {\n\n for (int j = 0; j < romanNumerals.length; j++) {\n\n if (currentLetter.equalsIgnoreCase(romanNumerals[j])) {\n\n number += values[j];\n i++;\n }\n }\n }\n\n }\n return number;\n }", "public static int roman2Decimal(String romanNumber) {\n\t\t//<write your code here>\n\t}", "public static void main(String[] args) {\n\n System.out.println();\n\n Scanner in = new Scanner(System.in);\n System.out.print(\"Enter a number within the range of 1 through 10: \");\n byte number = in.nextByte();\n\n switch (number){\n case 1:\n System.out.print(\"The Roman numeral version of this number is: I\\n\");\n break;\n case 2:\n System.out.print(\"The Roman numeral version of this number is: II\\n\");\n break;\n case 3:\n System.out.print(\"The Roman numeral version of this number is: III\\n\");\n break;\n case 4:\n System.out.print(\"The Roman numeral version of this number is: IV\\n\");\n break;\n case 5:\n System.out.print(\"The Roman numeral version of this number is: V\\n\");\n break;\n case 6:\n System.out.print(\"The Roman numeral version of this number is: VI\\n\");\n break;\n case 7:\n System.out.print(\"The Roman numeral version of this number is: VII\\n\");\n break;\n case 8:\n System.out.print(\"The Roman numeral version of this number is: VIII\\n\");\n break;\n case 9:\n System.out.print(\"The Roman numeral version of this number is: IX\\n\");\n break;\n case 10:\n System.out.print(\"The Roman numeral version of this number is: X\\n\");\n break;\n default:\n System.out.print(\"Entered wrong number\");\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(intToRoman(10));\n\t}", "@Test\n\tpublic void input_II_() throws ValueOutOfBoundsException, MalformedNumberException {\n\t assertEquals(2, new RomanArabicConverter(\"II\").toArabic());\n\t assertEquals(\"II\", new RomanArabicConverter(\"II\").toRoman());\n\t}", "public void convertToMaori(int number){\n\t\tint temp = number;\n\t\tint digit = temp % 10;\n\t\tint placeHolder = 0;\n\n\t\tif (digit > 0){\n\t\t\t_maoriNumber = MaoriNumbers.getValue(digit).toString();\n\t\t\tif (temp > 10) {\n\t\t\t\t_maoriNumber = \"maa\" + \"\\n\" + _maoriNumber; //note /n because the recording records seperate words on seperate lines\n\t\t\t}\n\t\t} else if (digit == 0){\n\t\t\twhile (digit == 0) {\n\t\t\t\ttemp = temp/10;\n\t\t\t\tdigit = temp % 10;\n\t\t\t\tplaceHolder++;\n\t\t\t}\n\t\t\t_maoriNumber = MaoriNumbers.getValue((int)Math.pow(10, placeHolder)).toString();\n\t\t\tif (digit > 1){\n\t\t\t\t_maoriNumber = MaoriNumbers.getValue(digit).toString() + \"\\n\" + _maoriNumber;\n\t\t\t}\n\t\t}\n\n\t\twhile (temp > 9) {\n\t\t\tplaceHolder++;\n\t\t\ttemp = temp/10;\n\t\t\tdigit = temp % 10;\n\t\t\t_maoriNumber = MaoriNumbers.getValue((int)Math.pow(10, placeHolder)).toString() + \"\\n\" + _maoriNumber;\n\t\t\tif (digit > 1){\n\t\t\t\t_maoriNumber = MaoriNumbers.getValue(digit).toString() + \"\\n\" + _maoriNumber;\n\t\t\t}\n\t\t}\n\t}", "protected String long2roman(long val, boolean prefixesAreOK)\n {\n\n if (val <= 0)\n {\n return getZeroString();\n }\n\n String roman = \"\";\n int place = 0;\n\n if (val <= 3999L)\n {\n do\n {\n while (val >= m_romanConvertTable[place].m_postValue)\n {\n roman += m_romanConvertTable[place].m_postLetter;\n val -= m_romanConvertTable[place].m_postValue;\n }\n\n if (prefixesAreOK)\n {\n if (val >= m_romanConvertTable[place].m_preValue)\n {\n roman += m_romanConvertTable[place].m_preLetter;\n val -= m_romanConvertTable[place].m_preValue;\n }\n }\n\n place++;\n }\n while (val > 0);\n }\n else\n {\n roman = XSLTErrorResources.ERROR_STRING;\n }\n\n return roman;\n }", "public String convertToString(int i) {\n\t\tswitch (i) {\n\t\t\tcase 0: return \"\";\n\t\t\tcase 1: return \"1\";\n\t\t\tcase 2: return \"2\";\n\t\t\tcase 3: return \"3\";\n\t\t\tcase 4: return \"4\";\n\t\t\tcase 5: return \"5\";\n\t\t\tcase 6: return \"6\";\n\t\t\tcase 7: return \"7\";\n\t\t\tcase 8: return \"8\";\n\t\t\tcase 9: return \"9\";\n\t\t\tcase 10: return \"A\";\n\t\t\tcase 11: return \"B\";\n\t\t\tcase 12: return \"C\";\n\t\t\tcase 13: return \"D\";\n\t\t\tcase 14: return \"E\";\n\t\t\tcase 15: return \"F\";\n\t\t\tcase 16: return \"G\";\n\t\t\tcase 17: return \"H\";\n\t\t\tcase 18: return \"I\";\n\t\t\tcase 19: return \"J\";\n\t\t\tcase 20: return \"K\";\n\t\t\tcase 21: return \"L\";\n\t\t\tcase 22: return \"M\";\n\t\t\tcase 23: return \"N\";\n\t\t\tcase 24: return \"O\";\n\t\t\tcase 25: return \"P\";\n\t\t\tcase 26: return \"Q\";\n\t\t\tcase 27: return \"R\";\n\t\t\tcase 28: return \"S\";\n\t\t\tcase 29: return \"T\";\n\t\t\tcase 30: return \"U\";\n\t\t\tcase 31: return \"V\";\n\t\t\tcase 32: return \"W\";\n\t\t\tcase 33: return \"X\";\n\t\t\tcase 34: return \"Y\";\n\t\t\tcase 35: return \"Z\";\n\t\t\tdefault: System.out.println(\"The number is too high.\");\n\t\t return \"0\";\n\t\t}\n }", "public void convertDigitsToRomanNumeralsInSubstring(int startPosition, int endPosition) throws MyIndexOutOfBoundsException, IllegalArgumentException {\r\n\r\n if (startPosition < 1 || endPosition > string.length()) {\r\n throw new MyIndexOutOfBoundsException(\"Start or End position invalid.\");\r\n }\r\n if (startPosition > endPosition) {\r\n throw new IllegalArgumentException(\"Start position cannot be greater than End position.\");\r\n }\r\n\r\n String selectedPortion = string.substring(startPosition - 1, endPosition);\r\n selectedPortion = selectedPortion.replace(\"1\", \"I\");\r\n selectedPortion = selectedPortion.replace(\"2\", \"II\");\r\n selectedPortion = selectedPortion.replace(\"3\", \"III\");\r\n selectedPortion = selectedPortion.replace(\"4\", \"IV\");\r\n selectedPortion = selectedPortion.replace(\"5\", \"V\");\r\n selectedPortion = selectedPortion.replace(\"6\", \"VI\");\r\n selectedPortion = selectedPortion.replace(\"7\", \"VII\");\r\n selectedPortion = selectedPortion.replace(\"8\", \"VIII\");\r\n selectedPortion = selectedPortion.replace(\"9\", \"IX\");\r\n\r\n string = string.replace(string.substring(startPosition - 1, endPosition), selectedPortion);\r\n\r\n\r\n\r\n }", "public int romanToInt(String s) {\n int res = 0;\n char[] arr = s.toCharArray();\n int i = 0;\n for (; i < arr.length - 1; ) {\n int tempPre = getValue(arr[i]);\n int tempCur = getValue(arr[i + 1]);\n if (tempPre < tempCur) {\n res = res + tempCur - tempPre;\n i = i + 2;\n } else {\n res = res + tempPre;\n i++;\n }\n }\n if (i == arr.length - 1) {\n res = res + getValue(arr[i]);\n }\n return res;\n }", "@Test\n public void input_M_() throws ValueOutOfBoundsException, MalformedNumberException {\n final RomanArabicConverter rac = new RomanArabicConverter(\"M\");\n assertEquals(1000, rac.toArabic());\n assertEquals(\"M\", rac.toRoman());\n }", "private void convertDigit(int i)\n {\n if(tempString.charAt(i) == '0' && i == 0)//Checks to see if the digit is equal to '0' and the first character.\n {\n tempString.replace(i, i+1, \"Zero\"); //Converts to capitalized version.\n }\n else if(tempString.charAt(i) == '0' && i != 0) //If it's equal to '0' and not the first, then not capital.\n tempString.replace(i, i+1, \"zero\"); //Converts to non-capitalized version.\n //The rest are very similar to the one above for numbers 1-9.\n if(tempString.charAt(i) == '1' && i == 0)\n {\n tempString.replace(i, i+1, \"One\");\n }\n else if(tempString.charAt(i) == '1' && i != 0)\n tempString.replace(i, i+1, \"one\");\n \n if(tempString.charAt(i) == '2' && i == 0)\n {\n tempString.replace(i, i+1, \"Two\");\n }\n else if(tempString.charAt(i) == '2' && i != 0)\n tempString.replace(i, i+1, \"two\");\n \n if(tempString.charAt(i) == '3' && i == 0)\n {\n tempString.replace(i, i+1, \"Three\");\n }\n else if(tempString.charAt(i) == '3' && i != 0)\n tempString.replace(i, i+1, \"three\");\n \n if(tempString.charAt(i) == '4' && i == 0)\n {\n tempString.replace(i, i+1, \"Four\");\n }\n else if(tempString.charAt(i) == '4' && i != 0)\n tempString.replace(i, i+1, \"four\");\n \n if(tempString.charAt(i) == '5' && i == 0)\n {\n tempString.replace(i, i+1, \"Five\");\n }\n else if(tempString.charAt(i) == '5' && i != 0)\n tempString.replace(i, i+1, \"five\");\n \n if(tempString.charAt(i) == '6' && i == 0)\n {\n tempString.replace(i, i+1, \"Six\");\n }\n else if(tempString.charAt(i) == '6' && i != 0)\n tempString.replace(i, i+1, \"six\");\n \n if(tempString.charAt(i) == '7' && i == 0)\n {\n tempString.replace(i, i+1, \"Seven\");\n }\n else if(tempString.charAt(i) == '7' && i != 0)\n tempString.replace(i, i+1, \"seven\");\n \n if(tempString.charAt(i) == '8' && i == 0)\n {\n tempString.replace(i, i+1, \"Eight\");\n }\n else if(tempString.charAt(i) == '8' && i != 0)\n tempString.replace(i, i+1, \"eight\");\n \n if(tempString.charAt(i) == '9' && i == 0)\n {\n tempString.replace(i, i+1, \"Nine\");\n }\n else if(tempString.charAt(i) == '9' && i != 0)\n tempString.replace(i, i+1, \"nine\");\n }", "public static String getLevelName (int level)\n {\n level += 1;\n String roman = \"\";\n for (int ii = 0; ii < ROMAN_TIERS.length; ii++) {\n while (level >= ROMAN_TIERS[ii]) {\n roman += ROMAN_NUMERALS[ii];\n level -= ROMAN_TIERS[ii];\n }\n }\n return roman;\n }", "private static int ProcessRomanNumeral(String roman) {\n\t\tint sum = 0;\n\t\tString[] tokens = roman.split(\"\");\n\t\tfor (int i = 1; i < tokens.length - 1; i++) {\n\t\t\tint currVal = GetDecimalFromRomanSymbol(tokens[i]);\n\t\t\tif (isNextBigger(tokens[i], tokens[i + 1])) {\n\t\t\t\tcurrVal *= -1;\n\t\t\t}\n\t\t\tsum += currVal;\n\t\t}\n\t\tint currVal = GetDecimalFromRomanSymbol(tokens[tokens.length - 1]);\n\t\tsum += currVal;\n\t\treturn sum;\n\t}", "String convert(int number) {\n final Supplier<IntStream> factors = () -> IntStream.of(3, 5, 7)\n .filter(factor -> number % factor == 0);\n\n if (factors.get().count() == 0) {\n return Integer.toString(number);\n }\n\n return factors.get().mapToObj(factor -> {\n switch (factor) {\n case 3:\n return \"Pling\";\n case 5:\n return \"Plang\";\n case 7:\n return \"Plong\";\n default:\n return \"\";\n }\n }).collect(Collectors.joining());\n }", "public Roman(String roman_value) {\n\t\t\n\t\tsuper(roman_value);\n\t\tthis.roman_value = roman_value;\n\t}", "private static String intToWord(int n) {\n if(n < 0 || n > 9)\n throw new IllegalArgumentException(\"Number should be between 0-9\");\n\n switch(n) {\n case 0: return \"\";\n case 1: return \"one\";\n case 2: return \"two\";\n case 3: return \"three\";\n case 4: return \"four\";\n case 5: return \"five\";\n case 6: return \"six\";\n case 7: return \"seven\";\n case 8: return \"eight\";\n case 9: return \"nine\";\n default: return null;\n }\n }", "@Test\n public void input_XX_() throws ValueOutOfBoundsException, MalformedNumberException {\n final RomanArabicConverter rac = new RomanArabicConverter(\"XX\");\n assertEquals(20, rac.toArabic());\n assertEquals(\"XX\", rac.toRoman());\n }", "private static String convertToRomaji(String katakana)\r\n\t\t\tthrows EasyJaSubException {\r\n\t\ttry {\r\n\t\t\treturn Kurikosu.convertKatakanaToRomaji(katakana);\r\n\t\t} catch (EasyJaSubException ex) {\r\n\t\t\ttry {\r\n\t\t\t\treturn LuceneUtil.katakanaToRomaji(katakana);\r\n\t\t\t} catch (Throwable luceneEx) {\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String covertToAscii(int num){\n\t\t\n\t\tString result=\"\";\n\t\t//int i=result.length -1;\n\t\tint rem;\n\t\tif(num==0){\n\t\t\treturn \"0\";\n\t\t}\n\t\tboolean negative=(num<0);\n\t\tif(negative){\n\t\t\tnum=0-num;\n\t\t}\n\t\t//works for integers with base 10\n\t\twhile(num>0){\n\t\t\trem=num%10;\n\t\t\tnum=num/10;\n\t\t\tresult=(char)(rem+'0')+result;\n\t\t}\n\t\tif(negative){\n\t\t\tresult=\"-\"+result;\n\t\t}\n\t\treturn result;\n\t}", "@Test\n\tpublic void input_10_() throws ValueOutOfBoundsException, MalformedNumberException {\n\t assertEquals(10, new RomanArabicConverter(\"10\").toArabic());\n assertEquals(\"X\", new RomanArabicConverter(\"10\").toRoman());\n\t}", "private String feelZero(Integer i){\n if( i < 10 ){\n return \"0\"+i;\n }else{\n return Integer.toString(i);\n }\n }", "public static String m51361a(int i) {\n return i == 1000 ? \"E100000\" : i == 3000 ? \"E100002\" : i == 2000 ? \"E100001\" : i == 6000 ? \"E100003\" : \"\";\n }", "private int toLeds(int i) {\n\n if (i == 0)\n return zero;\n else if (i == 1)\n return one;\n else if (i == 2)\n return two;\n else if (i == 3)\n return three;\n else if (i == 4)\n return four;\n else if (i == 5)\n return five;\n else if (i == 6)\n return six;\n else if (i == 7)\n return seven;\n else if (i == 8)\n return eight;\n else\n return nine;\n }", "public static String FormatNumber(int i) {\n\t\ttry {\n\t\t\tif (i >= 0 && i < 10)\n\t\t\t\treturn \"0\" + i;\n\t\t\telse\n\t\t\t\treturn \"\" + i;\n\t\t} catch (Exception e) {\n\t\t\treturn \"\";\n\t\t}\n\t}", "int main()\n{\n\n string line;\n\n while (getline(cin, line))\n {\n if (line == \"\")\n {\n cout << 0 << endl;\n continue;\n }\n\n int num = roman2num(line);\n string n_line = num2roman(num);\n\n if (line != n_line || num >= 4000)\n {\n cout << \"This is not a valid number\" << endl;\n }\n else\n {\n cout << num << endl;\n }\n }\n\n return 0;\n}", "public int convertToInt(String i) {\n\t\tswitch (i) {\n\t\t\tcase \".\": return 0;\n\t\t\tcase \"1\": return 1;\n\t\t\tcase \"2\": return 2;\n\t\t\tcase \"3\": return 3;\n\t\t\tcase \"4\": return 4;\n\t\t\tcase \"5\": return 5;\n\t\t\tcase \"6\": return 6;\n\t\t\tcase \"7\": return 7;\n\t\t\tcase \"8\": return 8;\n\t\t\tcase \"9\": return 9;\n\t\t\tcase \"A\": return 10;\n\t\t\tcase \"B\": return 11;\n\t\t\tcase \"C\": return 12;\n\t\t\tcase \"D\": return 13;\n\t\t\tcase \"E\": return 14;\n\t\t\tcase \"F\": return 15;\n\t\t\tcase \"G\": return 16;\n\t\t\tcase \"H\": return 17;\n\t\t\tcase \"I\": return 18;\n\t\t\tcase \"J\": return 19;\n\t\t\tcase \"K\": return 20;\n\t\t\tcase \"L\": return 21;\n\t\t\tcase \"M\": return 22;\n\t\t\tcase \"N\": return 23;\n\t\t\tcase \"O\": return 24;\n\t\t\tcase \"P\": return 25;\n\t\t\tcase \"Q\": return 26;\n\t\t\tcase \"R\": return 27;\n\t\t\tcase \"S\": return 28;\n\t\t\tcase \"T\": return 29;\n\t\t\tcase \"U\": return 30;\n\t\t\tcase \"V\": return 31;\n\t\t\tcase \"W\": return 32;\n\t\t\tcase \"X\": return 33;\n\t\t\tcase \"Y\": return 34;\n\t\t\tcase \"Z\": return 35;\n\t\t\tdefault: System.out.println(\"The number is too high.\");\n\t\t\t return 9000;\n\t\t}\n }", "static boolean isRomanNumeral(String s) {\n return s.matches(\"^(?=.)M*(C[MD]|D?C{0,3})\"\n + \"(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$\");\n }", "public String convert(int num) throws InvalidInputException {\r\n \t\t//Validate input number\r\n\t\tvalidateInput(num);\r\n\t\t\r\n\t\t//check if number is less than or equals to 999\r\n\t\tif(num <= THREE_DIGIT_MAX_VALUE) {\r\n\t\t\treturn convert999(num);\r\n\t\t}\r\n\t\t\r\n\t\t//store the result\r\n\t\tStringBuilder str=new StringBuilder(\"\");\r\n\t\t\r\n\t\tint t=0;\r\n\t\t\r\n\t\t// Iterate while num is not zero\r\n\t\twhile(num > ZERO) {\r\n\t\t\t\r\n\t\t\t// check if number is divisible by 1 thousand\r\n\t\t\tif(num % ONE_THOUSAND != ZERO) {\r\n\t\t\t\tStringBuilder temp = new StringBuilder(\"\");\r\n\t\t\t\ttemp.append(convert999(num % ONE_THOUSAND));\r\n\t\t\t\t\r\n\t\t\t\t//execute below block if number is >=1000\r\n\t\t\t\tif(t>0) {\r\n\t\t\t\t\ttemp.append(SPACE+bigNames[t]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(str.length()==0) {\r\n\t\t\t\t\tstr=temp;\r\n\t\t\t\t}else {\r\n\t\t\t\t\ttemp.append(SPACE+str);\r\n\t\t\t\t\tstr=temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\tnum/= ONE_THOUSAND;\r\n\t\tt++;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn str.toString();\r\n\t}", "private String intString(int n){\r\n String s=\"\";\r\n if(n>9){\r\n s+=(char)(Math.min(n/10,9)+'0');\r\n }\r\n s+=(char)(n%10+'0');\r\n return s; \r\n }", "public static String dtrmn(int number) {\n\t\t\n\t\tString letter = \"\";\n\t\t\n\t\tint cl = number / 100;\n\t\tif (cl != 9 && cl != 4) {\n\t\t\t\n\t\t\tif (cl < 4) {\n\t\t\t\t\n\t\t\t\tfor(int i = 1; i <= cl; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if (cl < 9 && cl > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"D\";\n\t\t\t\tfor (int i = 1; i <= cl - 5; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if(cl == 10) { \n\t\t\t\t\n\t\t\t\tletter = letter + \"M\";\n\t\t\t}\n\t\t} else if (cl == 4) {\n\t\t\t\n\t\t\tletter = letter + \"CD\";\n\t\t\t\n\t\t} else if (cl == 9) {\n\t\t\t\n\t\t\tletter = letter + \"CM\";\n\t\t}\n\t\t\n\t\tint cl1 = (number % 100)/10;\n\t\tif (cl1 != 9 && cl1 != 4) {\n\t\t\t\n\t\t\tif (cl1 < 4) {\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t} else if (cl1 < 9 && cl1 > 4) {\n\t\t\t\tletter = letter + \"L\";\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1 -5; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else if (cl1 == 4) {\n\t\t\tletter = letter + \"XL\";\n\t\t} else if (cl1 == 9) {\n\t\t\tletter = letter + \"XC\";\n\t\t}\n\t\t\n\t\tint cl2 = (number % 100)%10;\n\t\t\n\t\tif (cl2 != 9 && cl2 != 4) {\n\t\t\t\n\t\t\tif (cl2 < 4) {\n\t\t\t\tfor (int i = 1; i <= cl2; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t} else if (cl2 < 9 && cl2 > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"V\";\n\t\t\t\tfor (int i = 1; i <= cl2-5; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else if (cl2 == 4) {\n\t\t\tletter = letter +\"IV\";\n\t\t} else if (cl2 == 9) {\n\t\t\tletter = letter + \"IX\";\n\t\t}\n\t\treturn letter;\n\t}", "@Test\n public void input_C_() throws ValueOutOfBoundsException, MalformedNumberException {\n final RomanArabicConverter rac = new RomanArabicConverter(\"C\");\n assertEquals(100, rac.toArabic());\n assertEquals(\"C\", rac.toRoman());\n }", "@Test (expected=MalformedNumberException.class)\n\tpublic void inputIIII() throws MalformedNumberException\n\t{\n\t\tnew RomanArabicConverter(\"IIII\");\n\t}", "public int numberInverter(int num) {\n\n\t\tint inv = 10 - num;\n\t\treturn inv;\n\t}", "public static String octalEquivalent(int num) {\n\t\tString octal = Integer.toOctalString(num);\n\t\treturn octal;\n\t}", "private static int invertirNumero(int num) {\n\t\tint cifra, inverso = 0;\n\t\twhile (num > 0) {\n\t\t\tcifra = num % 10;\n\t\t\tinverso = cifra + inverso * 10;\n\t\t\tnum /= 10;\n\t\t}\n\t\treturn inverso;\n\t}", "public int translateNum(int num) {\n String s = String.valueOf(num);\n int a=1,b=1;\n for(int i=s.length()-2; i>-1; i--){\n String tmp = s.substring(i, i+2);\n int c= tmp.compareTo(\"10\") >= 0 && tmp.compareTo(\"25\") <= 0 ? a+b:a;\n b=a;\n a=c;\n }\n return a;\n }", "public static void main(String args[]){\nSystem.out.println(Integer.toOctalString(8)); \nSystem.out.println(Integer.toOctalString(19)); \nSystem.out.println(Integer.toOctalString(81)); \n}", "public String converter(int n){\r\n str = \"\";\r\n condition = true;\r\n while(condition){\r\n if(n >= 1 && n < 100){\r\n str = str + oneToHundred(n);\r\n condition = false; \r\n }else if (n >= 100 && n < 1000){\r\n str = str + oneToHundred(n / 100);\r\n str = str + \"Hundred \";\r\n n = n % 100;\r\n condition = true; \r\n }\r\n \r\n }\r\n return str;\r\n \r\n }", "@Test\n\tpublic void input_1_() throws ValueOutOfBoundsException, MalformedNumberException\n\t{\n\t\tassertEquals(1, new RomanArabicConverter(\" 1 \").toArabic());\n\t\tassertEquals(\"I\", new RomanArabicConverter(\" 1 \").toRoman());\n\t}", "static String m20335a(int i) {\n return String.format(null, \"%s.ols%d.%d\", \"v2\", 100, Integer.valueOf(i));\n }", "public static Interval intervalFromRoman(String str, boolean isMinor) {\n\t\tstr = str.replaceAll(\"[0-9]\", \"\").replaceAll(\" \", \"\");\n\t\tswitch(str) {\n\t\t// Unison\n\t\tcase \"I\":\n\t\tcase \"i\":\n\t\t\treturn Interval.UNISON;\n\t\t// 2nds\n\t\tcase \"bII\":\n\t\tcase \"bii\":\n\t\t\treturn Interval.m2;\n\t\tcase \"II\":\n\t\tcase \"ii\":\n\t\t\treturn Interval.M2;\n\t\tcase \"#II\":\n\t\tcase \"#ii\":\n\t\t\treturn Interval.A2;\n\t\t// 3rds\n\t\tcase \"bIII\":\n\t\tcase \"biii\":\n\t\t\tif(!isMinor)\n\t\t\t\treturn Interval.m3;\n\t\tcase \"III\":\n\t\tcase \"iii\":\n\t\t\tif(isMinor) return Interval.m3;\n\t\t\treturn Interval.M3;\n\t\tcase \"#III\":\n\t\tcase \"#iii\":\n\t\t\tif(isMinor) return Interval.M3;\n\t\t\treturn Interval.A3;\n\t\t// 4ths\n\t\tcase \"bIV\":\n\t\tcase \"biv\":\n\t\t\treturn Interval.d4;\n\t\tcase \"IV\":\n\t\tcase \"iv\":\n\t\t\treturn Interval.P4;\n\t\tcase \"#IV\":\n\t\tcase \"#iv\":\n\t\t\treturn Interval.A4;\n\t\t// 5ths\n\t\tcase \"bV\":\n\t\tcase \"bv\":\n\t\t\treturn Interval.d5;\n\t\tcase \"V\":\n\t\tcase \"v\":\n\t\t\treturn Interval.P5;\n\t\tcase \"#V\":\n\t\tcase \"#v\":\n\t\t\treturn Interval.A5;\n\t\t// 6ths\n\t\tcase \"bVI\":\n\t\tcase \"bvi\":\n\t\t\tif(!isMinor)\n\t\t\t\treturn Interval.m6;\n\t\tcase \"VI\":\n\t\tcase \"vi\":\n\t\t\tif(isMinor) return Interval.m6;\n\t\t\treturn Interval.M6;\n\t\tcase \"#VI\":\n\t\tcase \"#vi\":\n\t\t\tif(isMinor) return Interval.M6;\n\t\t\treturn Interval.A6;\n\t\t// 7ths\n\t\tcase \"bVII\":\n\t\tcase \"bvii\":\n\t\t\treturn Interval.m7;\n\t\tcase \"VII\":\n\t\tcase \"vii\":\n\t\t\treturn Interval.M7;\n\t\tcase \"#VII\":\n\t\tcase \"#vii\":\n\t\t\treturn Interval.A7;\n\t\t}\n\t\tthrow new IllegalArgumentException(\"Could not parse roman numeral \\\"\" + str + \"\\\" into an interval\");\n\t}", "public static String getConvertUptoHundreds(int number) {\r\n\t String current;\r\n\t \r\n\t if (number % 100 < 20){\r\n\t current = NumberPrinterConstant.NUMBERS[number % 100];\r\n\t number /= 100;\r\n\t }\r\n\t else {\r\n\t current = NumberPrinterConstant.NUMBERS[number % 10];\r\n\t number /= 10;\r\n\t \r\n\t current = NumberPrinterConstant.TENS[number % 10] + current;\r\n\t number /= 10;\r\n\t }\r\n\t if (number == 0) return current;\r\n\t return NumberPrinterConstant.NUMBERS[number] + NumberPrinterConstant.HUNDRED + current;\r\n\t }", "public String NumberToString(int number){return \"\"+number;}", "public static void reverse(int number)\n\t{\n\t\tString reversed = \"\";\n\t\twhile(number != 0)\n\t\t{\n\t\t\treversed = reversed + String.valueOf(number % 10);\n\t\t\tnumber /= 10;\n\t\t}\n\t\tSystem.out.print(reversed);\n\t}", "public static boolean isRomanNumberValid(String romanNumber) {\n\t // <write your code here>\n\t}", "static String converToTitle2(int n) {\n StringBuilder result = new StringBuilder();\n\n while(n>0){\n n--;\n result.append((char)('A' + n % 26));\n n /= 26;\n }\n\n return result.reverse().toString();\n }", "private String convert999(int num) {\r\n \t//return a number which is in 100th position\r\n \tStringBuilder str1= new StringBuilder(lowNames[num / ONE_HUNDRED]);\r\n \tstr1.append(SPACE);\r\n \tstr1.append(bigNames[0]);\r\n \tstr1.append(AND);\r\n \t\r\n \tStringBuilder str2=new StringBuilder(convert99(num % ONE_HUNDRED));\r\n \t\r\n\t\tif(num <= TWO_DIGIT_MAX_VALUE) {//check if number is lessthan or equal 99\r\n\t\t\treturn str2.toString();\r\n\t\t}else if(num % ONE_HUNDRED == ZERO) { //check if number is divisible by 100 and remainder is zero\r\n\t\t\treturn str1.toString();\r\n\t\t}\r\n\t\t\r\n\t\treturn str1.append(str2).toString();\r\n\t\t\r\n\t}", "public String getNormalizedN(int i) {\n\tint nb = getNb(i);\n\tif (nb == 1) return \"1\";\n\tint maxN = getMaxNb();\n\tif (maxN <= 5) return Integer.toString(nb);\n\tmaxN--;\n\tnb--;\n\tif (maxN < 21) {\n\t\tif (4*nb <= maxN) return \"1\";\n\t\tif (3*nb <= maxN) return \"2\";\n\t\tif (2*nb <= maxN) return \"3\";\n\t\tif (3*nb <= 2*maxN) return \"4\";\n\t\treturn \"5\";\n\t} else if (maxN < 100) {\n\t\tif (10*nb <= maxN) return \"1\";\n\t\tif (5*nb <= maxN) return \"2\";\n\t\tif (4*nb <= maxN) return \"3\";\n\t\tif (3*nb <= maxN) return \"4\";\n\t\tif (2*nb <= 1*maxN) return \"5\";\n\t\tif (3*nb <= 2*maxN) return \"6\";\n\t\treturn \"7\";\n\t} else {\n\t\tif (20*nb <= maxN) return \"1\";\n\t\tif (10*nb <= maxN) return \"2\";\n\t\tif (5*nb <= maxN) return \"3\";\n\t\tif (4*nb <= maxN) return \"4\";\n\t\tif (3*nb <= 1*maxN) return \"5\";\n\t\tif (2*nb <= 1*maxN) return \"6\";\n\t\treturn \"7\";\n\t}\n}", "public String decimalToOcta(int numero) {\n\t\tSystem.out.print(\"Convirtiendo decimal (\" + numero + \") a octal >> \");\n\t\treturn Integer.toOctalString(numero);\n\t}", "public static String intToString(int n) { \n\t if (n == 0) return \"0\";\n\t StringBuilder sb = new StringBuilder();\n\t while (n > 0) { \n\t int curr = n % 10;\n\t n = n/10;\n\t sb.append(curr);\n\t }\n\t String s = sb.substring(0);\n\t sb = new StringBuilder();\n\t for (int i = s.length() -1; i >= 0; i--) { \n\t sb.append(s.charAt(i));\n\t }\n\t return sb.substring(0);\n\t}", "public String convert(int num) {\n if (num == 0)\n return ZERO_STRINGS;\n\n long tmpNum = num;\n StringBuilder buffer = new StringBuilder();\n if (tmpNum < 0) { // Negative number\n tmpNum *= -1;\n buffer.append(\"minus \");\n }\n\n for (int i : NUMERIC_INDEXES) {\n long pow = (int)Math.pow(10, i);\n if (tmpNum >= pow) {\n long numberAtIndex = tmpNum/pow; // The number at position 3\n tmpNum -= numberAtIndex*pow;\n buffer.append(convert((int)numberAtIndex)).append(\" \");\n buffer.append(NUMERIC_STRINGS.get(pow)).append(\" \");\n }\n }\n if (tmpNum >= 20) { // second number in the integer\n long numberAtIndex = ((tmpNum % 100)/10)*10; // The number at position 2\n tmpNum -= numberAtIndex;\n buffer.append(NUMERIC_STRINGS.get(numberAtIndex)).append(\" \");\n }\n if (NUMERIC_STRINGS.containsKey(tmpNum))\n buffer.append(NUMERIC_STRINGS.get(tmpNum));\n return buffer.toString().trim();\n }", "public static String inputToString(int input) {\n\t\tswitch (input) {\n\t\tcase 1:\n\t\t\treturn \"animated\";\n\t\tcase 2:\n\t\t\treturn \"drama\";\n\t\tcase 3:\n\t\t\treturn \"horror\";\n\t\tcase 4:\n\t\t\treturn \"scifi\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}", "private static String resolveCase(long n) {\n\t\tif (n==0L){\n\t\t\treturn \"INSOMNIA\";\n\t\t}\n\t\tArrayList<Integer> digitsList = new ArrayList<Integer>(Arrays.asList(digits));\n\t\tint i = 1;\n\t\twhile (!digitsList.isEmpty() && i<1000){\n\t\t\tlong nRemainder = n*i ;\n\t\t\twhile (nRemainder != 0L ){\n\t\t\t\tint index = digitsList.indexOf((int)(nRemainder % 10));\n\t\t\t\tif (index != -1){\n\t\t\t\t\tdigitsList.remove(index);\n\t\t\t\t}\n\t\t\t\tnRemainder = nRemainder / 10;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif(digitsList.isEmpty()){\n\t\t\treturn Long.toString(n*(i-1));\n\t\t}\n\t\treturn \"INSOMNIA\";\n\t}", "private static String NUmberToEnglishString(long number) {\n\t\tString s;\r\n\t\tif(number<0)\r\n\t\t{\r\n\t\t\ts=\"error\";\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tif(number<20)\r\n\t\t{\r\n\t\t\tswitch ((int)number)\r\n\t\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t\ts=\"zero\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 1:\r\n\t\t\t\ts=\"one\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 2:\r\n\t\t\t\ts=\"two\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 3:\r\n\t\t\t\ts=\"three\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 4:\r\n\t\t\t\ts=\"four\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 5:\r\n\t\t\t\ts=\"five\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 6:\r\n\t\t\t\ts=\"six\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 7:\r\n\t\t\t\ts=\"seven\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 8:\r\n\t\t\t\ts=\"eight\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 9:\r\n\t\t\t\ts=\"nine\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 10:\r\n\t\t\t\ts=\"ten\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 11:\r\n\t\t\t\ts=\"eleven\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 12:\r\n\t\t\t\ts=\"twelve\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 13:\r\n\t\t\t\ts=\"thirteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 14:\r\n\t\t\t\ts=\"fourteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 15:\r\n\t\t\t\ts=\"fifteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 16:\r\n\t\t\t\ts=\"sixteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 17:\r\n\t\t\t\ts=\"seventeen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 18:\r\n\t\t\t\ts=\"eighteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 19:\r\n\t\t\t\ts=\"nineteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tdefault:\r\n\t\t\t\ts=\"error\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(number<100) //21-99\r\n\t\t{\r\n\t\t\tif (number % 10 == 0) //20,30,40,...90的输出\r\n\t\t\t{\r\n\t\t\t\tswitch ((int)number)\r\n\t\t\t\t{\r\n\t\t\t\tcase 20:\r\n\t\t\t\t\ts=\"twenty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 30:\r\n\t\t\t\t\ts=\"thirty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 40:\r\n\t\t\t\t\ts=\"forty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 50:\r\n\t\t\t\t\ts=\"fifty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 60:\r\n\t\t\t\t\ts=\"sixty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 70:\r\n\t\t\t\t\ts=\"seventy\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 80:\r\n\t\t\t\t\ts=\"eighty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 90:\r\n\t\t\t\t\ts=\"ninety\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\ts=\"error\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/10*10)+' '+NUmberToEnglishString(number%10);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif(number<1000) //100-999\r\n\t\t{\r\n\t\t\tif(number%100==0)\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/100)+\" hundred\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/100)+\" hundred and \"+NUmberToEnglishString(number%100);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(number<1000000) //1000-999999 百万以下\r\n\t\t{\r\n\t\t\tif(number%1000==0)\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000)+\" thousand\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000)+\" thousand \"+NUmberToEnglishString(number%1000);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(number<1000000000) //十亿以下\r\n\t\t{\r\n\t\t\tif(number%1000000==0)\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000000)+\" million\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000000)+\" million \"+NUmberToEnglishString(number%1000000);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (number>999999999)\r\n\t\t{\r\n\t\t\ts=\"error\";\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static void printInt1(int number) {\n\t\tchar digit = (char) (number % 10 + '0');\r\n\t\tnumber = number / 10;\r\n\t\tif (number != 0)\r\n\t\t\tprintInt1(number);\r\n\t\tSystem.out.print(\" \" + digit);\r\n\t}", "public static String convertToTitle(int n) {\n// int chu = n;\n String res = \"\";\n while(n != 0){\n \tif(n % 26 != 0){\n \tres = (char)(n % 26 + (int)'A' -1) +res;\n \tn = n /26;\n \t}else{\n \t\tres = 'Z' + res;\n \t\tn = n / 26 - 1;\n \t\tif(n == 0) break;\n \t}\n }\n return res;\n }", "private static String numberToProse(int n) {\n if(n == 0)\n return \"zero\";\n\n if(n < 10)\n return intToWord(n);\n\n StringBuilder sb = new StringBuilder();\n\n // check the tens place\n if(n % 100 < 10)\n sb.insert(0, intToWord(n % 10));\n else if(n % 100 < 20)\n sb.insert(0, teenWord(n % 100));\n else\n sb.insert(0, tensPlaceWord((n % 100) / 10) + \" \" + intToWord(n % 10));\n\n n /= 100;\n\n // add the hundred place\n if(n > 0 && sb.length() != 0)\n sb.insert(0, intToWord(n % 10) + \" hundred and \");\n else if (n > 0)\n sb.insert(0, intToWord(n % 10) + \" hundred \");\n\n if(sb.toString().equals(\" hundred \"))\n sb = new StringBuilder(\"\");\n\n n /= 10;\n\n // the thousand spot\n if(n > 0)\n sb.insert(0, intToWord(n) + \" thousand \");\n\n return sb.toString();\n }", "private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }", "public void convertNumbers(Scanner input){\n\t\tint number;\n\t\tString format = \"\";\n\t\tSystem.out.println(\"Please Enter Number (1-3999)\");\n\t\t//Number input\n\t\tnumber = input.nextInt();\n\t\tif(number < 1){\n\t \t throw new NumberFormatException(\"Please Enter Positive Numbers Only.\"); \n\t\t}else if(number > 3999){\n\t\t\tSystem.out.println(\"Please Enter Less Than or Equal 3999\");\n\t\t\tnumber = input.nextInt();\n\t\t}\n\t\tSystem.out.println(\"Please Enter Format (WORDS or ROMAN)\");\n\t\t//Format input\n\t\tformat = input.next();\n\t\t//Checking Format to convert numbers\n\t\tif(format.equalsIgnoreCase(\"WORDS\")){\n\t\t\tNumberToWords convertWord = new NumberToWords();\n\t\t\tString word = convertWord.numbersToWordsConverter(number);\n\t\t\tSystem.out.println(number+\"'s English Word is \"+'\"'+ word+'\"');\n\t\t}else if(format.equalsIgnoreCase(\"ROMAN\")){\n\t\t\tNumberToRoman convertRoman = new NumberToRoman();\n\t\t\tString roman =convertRoman.convertNumberToRomanLetters(number);\n\t\t\tSystem.out.println(number+\"'s Roman Letter is \"+'\"'+ roman+'\"');\n\t\t}else{\n\t\t\tSystem.out.print(\"Please Enter Valid Format \\n\");\n\t\t}\n\t\n\t}", "public static void numberToWords(int number) {\n if(number < 0) {\r\n System.out.println(\"Invalid Value\");\r\n }\r\n int workingNumber = 0;\r\n int reverseNumber = reverse(number);\r\n if(number == 0) {\r\n System.out.println(\"Zero\");\r\n }\r\n while(reverseNumber > 0) {\r\n int switchNumber = reverseNumber % 10;\r\n switch(switchNumber) {\r\n case 0:\r\n System.out.println(\"Zero\");\r\n break;\r\n case 1:\r\n System.out.println(\"One\");\r\n break;\r\n case 2:\r\n System.out.println(\"Two\");\r\n break;\r\n case 3:\r\n System.out.println(\"Three\");\r\n break;\r\n case 4:\r\n System.out.println(\"Four\");\r\n break;\r\n case 5:\r\n System.out.println(\"Five\");\r\n break;\r\n case 6:\r\n System.out.println(\"Six\");\r\n break;\r\n case 7:\r\n System.out.println(\"Seven\");\r\n break;\r\n case 8:\r\n System.out.println(\"Eight\");\r\n break;\r\n case 9:\r\n System.out.println(\"Nine\");\r\n break;\r\n\r\n default:\r\n System.out.println(\"OTHER\");\r\n\r\n }\r\n reverseNumber /= 10;\r\n }\r\n\r\n for(int i = getDigitCount(reverse(number)); i < getDigitCount(number); i++) {\r\n System.out.println(\"Zero\");\r\n }\r\n }", "public String convertToTitle(int n) {\n StringBuilder res = new StringBuilder();\n while (n > 0){\n n--;\n res.insert(0,(char) (n % 26 + 'A'));\n n /= 26;\n }\n return res.toString();\n }", "abstract String convertEnglishNumber(String number);", "public static int reverse(int number) {\n\t\tString numb = Integer.toString(number);\n\t\tString rev = \"\";\n\t\t//create a for loop in order to reverse the String\n\t\tfor (int i = (numb.length()-1); i >= 0; i--) {\n\t\t\trev += numb.charAt(i);\n\t\t}//closing for loop\n\n\t\treturn Integer.parseInt(rev);\n\t}", "public String intToMonth(int a)\r\n {\r\n if(a==1)return \"Januray\";\r\n else if(a==2)return \"February\";\r\n else if(a==3)return \"March\";\r\n else if(a==4)return \"April\";\r\n else if(a==5)return \"May\";\r\n else if(a==6)return \"June\";\r\n else if(a==7)return \"July\";\r\n else if(a==8)return \"August\";\r\n else if(a==9)return \"September\";\r\n else if(a==10)return \"October\";\r\n else if(a==11)return \"November\";\r\n else if(a==12)return \"December\";\r\n else return \"\";\r\n }", "public String convert(int input) {\n\n\t\tStringBuilder result = new StringBuilder();\n\n\t\tfor(FBQValues enumValue: FBQValues.values()) {\n\t\t\tresult.append(enumValue.replaceDivisible(input));\n\t\t}\n\n\t\treplaceCharacters(input, result);\n\n\t\tif(result.length() == 0) {\n\t\t\tresult.append(Integer.toString(input));\n\t\t}\n\n\t\treturn result.toString();\n\t}", "public boolean isRomanNumeral(String s) {\n\t\tif (s.length()>4)\r\n\t\t\treturn false;\r\n\t\t// check characters\r\n\t\ts = s.toLowerCase();\r\n\t\tchar last = '.';\r\n\t\tfor (int i=0; i<s.length(); i++) {\r\n\t\t\tCharacter c = new Character(s.charAt(i));\r\n\t\t\t// check if Roman numeral letter\r\n\t\t\tif (!isRomanCharacter(s.charAt(i)))\r\n\t\t\t\treturn false;\r\n\t\t\t// check not allowed repetition\r\n\t\t\tif (last=='v' && c==last)\r\n\t\t\t\treturn false;\r\n\t\t\tif (last=='l' && c==last)\r\n\t\t\t\treturn false;\r\n\t\t\tif (last=='d' && c==last)\r\n\t\t\t\treturn false;\r\n\t\t\t// not allowed sequences\r\n\t\t\tif (last=='i' && (c=='l' || c=='c' || c=='d' || c=='m'))\r\n\t\t\t\treturn false;\r\n\t\t\tif (last=='v' && (c=='x' || c=='l' || c=='c' || c=='d' || c=='m'))\r\n\t\t\t\treturn false;\r\n\t\t\tif (last=='x' && (c=='d' || c=='m'))\r\n\t\t\t\treturn false;\r\n\t\t\tif (last=='l' && (c=='c' || c=='d' || c=='m'))\r\n\t\t\t\treturn false;\r\n\t\t\tif (last=='d' && (c=='m'))\r\n\t\t\t\treturn false;\r\n\t\t\tlast = c;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static String toUI(int value) {\n return toUI(value, SCALE);\n }", "private String parseToTwoInteger(int input) {\n\t\treturn input < 10 ? \"0\" + input : \"\" + input;\n\t}", "public String covertIng(int num) {\n\t\tchar[] digits = new char[10];\r\n\t\t\r\n\t\tboolean sign = num >= 0 ? true : false;\r\n\t\tint idx = 0;\r\n\t\t\r\n\t\twhile(idx <digits.length){\r\n\t\t\tdigits[idx] = toChar(num % 10);\r\n\t\t\tnum = num /10;\r\n\t\t\tif(num== 0)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tidx++;\r\n\t\t}\r\n\t\t\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tif(!sign)\r\n\t\t\tsb.append('-');\r\n\t\t\r\n\t\twhile(idx>=0){\r\n\t\t\tsb.append(digits[idx--]);\r\n\t\t}\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t\t\r\n\t}", "@Test(expected=ValueOutOfBoundsException.class) \n\tpublic void tooHigh() throws ValueOutOfBoundsException, MalformedNumberException {\n\t new RomanArabicConverter(\"4000\").toRoman();\n\t}", "public String printNumberInWord(int number) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString numberWord = null;\n\t\tswitch(number) {\n\t\t\tcase 0:\n\t\t\t\tnumberWord = \"ZERO\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tnumberWord = \"ONE\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tnumberWord = \"TWO\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tnumberWord = \"THREE\";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tnumberWord = \"FOUR\";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tnumberWord = \"FIVE\";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tnumberWord = \"SIX\";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tnumberWord = \"SEVEN\";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tnumberWord = \"EIGHT\";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tnumberWord = \"NINE\";\n\t\t\tdefault:\n\t\t\t\tnumberWord = \"OTHER\";\n\t\t\t\t\n\t\t}\n\t\treturn numberWord;\n\t}", "public void mo32111rr(int i) {\n }", "public static int reverse(int number) {\n int reverseNumber = 0;\r\n\r\n while(number != 0) {\r\n int iterator = number % 10;\r\n reverseNumber *= 10;\r\n reverseNumber += iterator;\r\n number /= 10;\r\n\r\n }return reverseNumber;\r\n\r\n }" ]
[ "0.8133021", "0.8049887", "0.7880601", "0.76976067", "0.76947063", "0.75864035", "0.7583506", "0.75676244", "0.7500319", "0.74313176", "0.6836959", "0.6833274", "0.67061263", "0.6580368", "0.65510964", "0.6515096", "0.6414738", "0.641007", "0.6360509", "0.6359587", "0.6353262", "0.63356954", "0.63299817", "0.62040055", "0.61317617", "0.6102584", "0.6099079", "0.6060631", "0.604087", "0.60128677", "0.6009528", "0.5961565", "0.5938396", "0.5873581", "0.58479387", "0.58059365", "0.57653093", "0.5724932", "0.5632105", "0.5613315", "0.5547055", "0.5531835", "0.5529214", "0.5527143", "0.5511971", "0.5508773", "0.5481625", "0.5465275", "0.5461105", "0.5452458", "0.5430352", "0.53982586", "0.53941333", "0.53567183", "0.53522474", "0.5285995", "0.52643704", "0.5240637", "0.5196647", "0.518666", "0.5184609", "0.5174014", "0.51640797", "0.5152408", "0.5136418", "0.51143694", "0.50927246", "0.5079602", "0.50782424", "0.5073416", "0.5063762", "0.50517476", "0.50517327", "0.5020268", "0.5016841", "0.50114894", "0.49824995", "0.4966495", "0.49548998", "0.4948766", "0.49451187", "0.49421728", "0.49340245", "0.4931307", "0.49178937", "0.49086758", "0.49056715", "0.4891561", "0.4890534", "0.48579958", "0.48377424", "0.482434", "0.4818526", "0.4807694", "0.4798436", "0.47920924", "0.47824135", "0.4776865", "0.4764621", "0.47644994" ]
0.56924856
38
Create a new instance of the receiver.
public MarkersViewPropertyTester() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Receiver() {\n\t\tsuper();\n\t}", "@Override\n\tpublic Receive createReceive() {\n\t\treturn receiveBuilder()\n\t\t\t\t.match(RequestTrackDevice.class, this::onTrackDevice)\n\t\t\t\t.match(Terminated.class, this::onTerminate)\n\t\t\t\t.match(RequestDeviceList.class, this::onDeviceList)\n\t\t\t\t.match(RequestAllTemperatures.class, this::onAllTemperatures)\n\t\t\t\t.build();\n\t}", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n\n .match(WhoToGreet.class, wtg -> {\n // -> uses the internal state of wtg and modify this internal state (this.greeting)\n this.greeting = \"Who to greet? -> \" + wtg.who;\n\n }).match(Greet.class, x -> {\n // -> send a message to another actor (thread)\n printerActor.tell(new Printer.Greeting(greeting), getSelf());\n\n }).build();\n }", "Instance createInstance();", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n .match(StartMessage.class, this::handle)\n .match(BatchMessage.class, this::handle)\n .match(Terminated.class, this::handle)\n .match(RegistrationMessage.class, this::handle)\n .match(Availability.class, this::handle)\n .match(Result.class, this::handle)\n .matchAny(object -> this.log().info(\"Received unknown message: \\\"{}\\\"\", object.toString()))\n .build();\n }", "@Override\n public Receive<Command> createReceive() {\n return newReceiveBuilder()\n .onMessageEquals(Start.INSTANCE, this::onStart) //Call onStart when Start.INSTANCE is received\n .onMessage(SendPrimesFound.class, this::onSendPrimesFound) //Call onSendPrimesFound when SendPrimesFound class is received\n .onMessage(SetNumbersToSearchAndNumberOfWorkers.class, this::onSetNumbersToSearchAndNumberOfWorkers) //Call onSetNumbersToSearchAndNumberOfWorkers when SetNumbersToSearchAndNumberOfWorkers is received\n .build();\n\n }", "public Receiver(String name) {\n super(name);\n }", "public CreateRemoteClassic<Msg, Ref> create();", "@CheckReturnValue\n @NonNull\n public static <T> UnicastSubject<T> create() {\n return new UnicastSubject<>(bufferSize(), null, true);\n }", "MessageSerializer<T> create();", "public void create(){}", "Reproducible newInstance();", "public ReplicateObjectMessageFactory() {\n super(null);\n }", "public Receiver()\r\n/* 15: */ throws Connections.NetWireException\r\n/* 16: */ {\r\n/* 17:14 */ Connections.getPorts(this).addSignalProcessor(\"process\");\r\n/* 18: */ \r\n/* 19:16 */ Connections.publish(this, ID);\r\n/* 20: */ }", "UDPInstance() {\n this(null, null, null, null);\n }", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "protected abstract CreateRemoteClassic<Msg, Ref> make_create();", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }", "private Instantiation(){}", "@Override\n\tpublic Receive createReceive() {\n\t\treturn receiveBuilder()\n\t\t\t\t.match(LargeMessage.class, this::handle)\n\t\t\t\t.match(byte[].class, this::handle)\n\t\t\t\t.match(BytesMessage.class, this::handle)\n\t\t\t\t.matchAny(object -> this.log().info(\"Received unknown message: \\\"{}\\\"\", object.toString()))\n\t\t\t\t.build();\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n .match(PrinterActorProtocol.OnCommand.class, greeting -> {\n System.out.println(\"**--become(createNormalReceive())\");\n getContext().become(createNormalReceive());\n })\n .match(PrinterActorProtocol.StartSelfTestCommand.class, greeting -> {\n System.out.println(\"**--become(createSelfTestModeReceive()\");\n getContext().become(createSelfTestModeReceive());\n })\n\n\n .matchAny( obj -> System.out.println(\"PritnerActor Unknown message \" + obj.getClass()) )\n .build();\n }", "public Notification() {\n\n\t}", "Communicator createCommunicator();", "public Notification()\n\t{\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public T newInstance();", "@Override\n\tpublic AbstractReine createReine() {\n\t\treturn new ReineSN();\n\t}", "public CMObject newInstance();", "public ReceiverEntity crearReceiver(ReceiverEntity receiverCrear){\r\n persistence.create(receiverCrear);\r\n return receiverCrear;\r\n }", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public Message() {}", "public Message() {}", "public AmqpMessage() {}", "public Message(){}", "public Payload() {}", "public FlowMonMessage(){}", "public Notification() {\n\n }", "public interface AbstractSenderFactory {\n Sender create();\n}", "public Notification() {\r\n }", "public Notification() {\r\n }", "public void create() {\n\t\t\n\t}", "@Override\n\tpublic IWidgetInstance createInstance(ISocketInstance socket) {\n\t\treturn this;\n\t}", "public Communicator() {\n\t}", "public static AmqpTransportConfig create() {\n\t\tfinal AmqpTransportConfig res = new AmqpTransportConfig();\n\t\tres.setBuilder(BUILDER);\n\t\treturn res;\n\t}", "private BeeMessage(Builder builder) {\n super(builder);\n }", "public Receiver getReceiver() {\n return new Receiver(this);\n }", "Subscriber create(Subscriber subscriber);", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Communicator() {\n }", "public Communicator() {\n }", "public void initReceiver() {\n }", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private Message(){\n // default constructor\n }", "public abstract void create();", "private RpcMessage(Builder builder) {\n super(builder);\n }", "public Payload() {\n\t}", "public NotificationReceiverService() {\n }", "public Message () {\n\t\tthis.setCreationtime(Calendar.getInstance().getTimeInMillis());\n\t\tsetTimestamp();\n\t}", "private Message(Builder builder) {\n super(builder);\n }", "protected abstract void construct();", "public Instance() {\n }", "private CloneFactory() {\n }", "protected abstract RemoteFactory.Agent<Msg, Ref> make_Agent();", "public Message() {\n }", "public Message() {\n }", "public Notification()\n\t{\n\t\t// Start of user code constructor for Notification)\n\t\tsuper();\n\t\t// End of user code\n\t}", "public Message() {\n\t\tsuper();\n\t}", "protected AbstractMessage(byte[] content, UserModel receiver) {\n this.content = content;\n this.sender = receiver;\n this.timestamp = System.currentTimeMillis();\n }", "public Message() {\n }", "private SourceRconPacketFactory() {\n }", "public CallMessage() {\n\t}", "protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }", "public MailSender() {\r\n }", "T create();", "T create();", "private ProtocolMessage(Builder builder) {\n super(builder);\n }", "private NotificationClient() { }", "protected RemoteFactory.Agent.Component<Msg, Ref> newAgent() {\n RemoteFactory.Agent<Msg, Ref> _implem = _createImplementationOfAgent();\n return _implem._newComponent(new RemoteFactory.Agent.Requires<Msg, Ref>() {},true);\n }", "private Teller() {\n }", "public MultiChannelMessageImpl() {\n }", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "public Notifications() {\n \n \t}", "public ApplicationCreator() {\n }", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "private S_NewMail(Builder builder) {\n super(builder);\n }", "@Override\n public Stanza createFromParcel(Parcel source) {\n return new Stanza(source);\n }", "public Factory() {\n this(getInternalClient());\n }", "public MassMsgFrame() {\n\t}", "ClientMessageSender() {\n\n\t}", "@Override\n\tpublic P createPusher(Address address, Puller<byte[]> puller) {\n\t\tPusher<byte[]> client = puller.newClient();\n\t\treturn ReflectivePusher.create(protocol, implementer, client, (method, arguments) -> {\n\t\t\ttry {\n\t\t\t\treturn Util.invocationToRequest(address, method.getName(), method.getParameterTypes(), arguments);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "public MailMessage() {\n }", "public Telefone() {\n\t}", "private Message(MessageType handle) {\n this(handle, null, null);\n }", "public WebSocketRPC() {\n\t}", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }" ]
[ "0.70906395", "0.6641334", "0.6507868", "0.64128685", "0.63960934", "0.63486207", "0.63132036", "0.6251601", "0.6216539", "0.614417", "0.61439496", "0.6141644", "0.61141706", "0.6106975", "0.60777473", "0.6074593", "0.6015089", "0.5991142", "0.59512436", "0.59474814", "0.59407926", "0.5893823", "0.58764166", "0.5871987", "0.5836688", "0.58357054", "0.58305436", "0.58265615", "0.58195084", "0.58167213", "0.5814366", "0.5804201", "0.5803945", "0.5784543", "0.5777325", "0.5777325", "0.57655334", "0.5745177", "0.5732932", "0.5730728", "0.5730408", "0.5727064", "0.5724562", "0.5724562", "0.5717087", "0.57123536", "0.5703399", "0.5692396", "0.5685897", "0.5683843", "0.56536335", "0.5641463", "0.56376374", "0.562482", "0.562482", "0.562299", "0.56038535", "0.5600327", "0.5589694", "0.5588527", "0.55739164", "0.5570608", "0.55672055", "0.55670124", "0.55564904", "0.55539", "0.5552479", "0.5532829", "0.5530023", "0.55175567", "0.55175567", "0.5513466", "0.55122733", "0.55119634", "0.5511769", "0.5509695", "0.5509262", "0.5503126", "0.55015993", "0.55005974", "0.55005974", "0.5500133", "0.54926765", "0.54918736", "0.54866076", "0.5478804", "0.5470798", "0.5465793", "0.5457445", "0.54562664", "0.54552007", "0.5454811", "0.5453297", "0.5443669", "0.5443567", "0.5443444", "0.5440831", "0.5434131", "0.54322636", "0.5431524", "0.5425931" ]
0.0
-1
Test if the content generator in the args match the receiver.
private boolean testContentGenerator(ExtendedMarkersView view, Object[] args) { String currentGenerator = view.getBuilder().getGenerator().getId(); for (int i = 0; i < args.length; i++) { if (args[i].equals(currentGenerator)) return true; // The value 'any' works for any content generator if (args[i].equals(ANY_CONTENT_GENERATOR)) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.836 -0500\", hash_original_method = \"9921BFF09FACC23B6D23BD0D026EB023\", hash_generated_method = \"4C8E8780FA3C7A09AF94E1277F10CB12\")\n \npublic boolean match(Object other) {\n if (other instanceof ContentLength)\n return true;\n else\n return false;\n }", "public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {\r\n boolean result = false;\r\n\t\t\r\n\t\t// Ensure Papyrus is the active editor\r\n\t\tIEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();\r\n\t\tif((editor == null) || (!(editor instanceof IMultiDiagramEditor))) {\r\n\t\t\t//Activator.log.info(\"returning false\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tObject currentValue = null;\r\n\t\tif(IS_PLASMA_MODEL.equals(property)) {\r\n\t\t\tcurrentValue = testRobotmlModelNature(receiver);\r\n\t\t\tresult = (currentValue == expectedValue);\r\n\t\t}\r\n\t\t//Activator.log.info(\"returning result: \" + result);\r\n\t\treturn result;\r\n\t}", "public boolean isGenerator();", "public boolean isMatchedWith(Object[] args) {\n if (args != null\n && mClassesOfProperties != null\n && args.length == mClassesOfProperties.length) {\n Object[] temp = new Object[args.length];\n for (int i = 0; i < args.length; ++i) {\n temp[i] = MatchRule.instance()\n .isMatch(args[i], mClassesOfProperties[i]);\n if (temp[i] == null) {\n return false;\n }\n }\n for (int i = 0; i < args.length; ++i) {\n args[i] = temp[i];\n }\n return true;\n } else {\n return false;\n }\n }", "private boolean doDescriptorArgsMatch(String expected, String check) {\n String expectedArgs = expected.substring(1, expected.indexOf(\")\"));\n String checkArgs = check.substring(1, check.indexOf(\")\"));\n return expectedArgs.equals(checkArgs);\n }", "boolean isContentGenerated();", "private boolean inGeneratorContext() {\n return functionContextStack.peekLast().isGenerator;\n }", "boolean matches(MediaQueryList otherMedia);", "private boolean argumentsEquals(Command other) {\n return Arrays.equals(this.arguments, other.arguments);\n }", "Object isMatch(Object arg, String wantedType);", "public boolean isTriggeredBy( IACREMessage message ) {\n if ( this.sender.isConstant() && !this.sender.getFunctor().equals( message.getSender().getName() ) ) {\n logger.info( \"Sender mismatch\" );\n return false;\n }\n\n // false if recipient has been set and doesn't match\n if ( this.receiver.isConstant() && !this.receiver.getFunctor().equals( message.getReceiver().getName() ) ) {\n logger.info( \"Recipient mismatch\" );\n return false;\n }\n\n // performatives don't match: this can't be a variable so it's a\n // straightforward String comparison\n if ( !this.getPerformative().equalsIgnoreCase( message.getPerformative() ) ) {\n logger.info( \"Performative mismatch: \" + this.getPerformative() + \" != \" + message.getPerformative() );\n return false;\n }\n\n // message content doesn't match description\n ITermParser contentParser = Utilities.getTermParser( message.getLanguage() );\n if ( contentParser != null ) {\n try {\n Term messageContent = contentParser.parse( message.getContent() );\n\n if ( !this.content.matches( messageContent ) ) {\n logger.info( \"Content mismatch: \" + this.content.toDebuggingString() + \" != \" + message.getContent() );\n return false;\n }\n else {\n logger.info( \"Content match: \" + this.content.toDebuggingString() + \" matched \" + message.getContent() );\n }\n }\n catch ( MalformedTermException e ) {\n logger.warning( \"Content could not be parsed: \" + e );\n return false;\n }\n }\n else {\n logger.severe( \"Logic parser for \" + message.getLanguage() + \" could not be loaded\" );\n }\n\n logger.info( \"Message matched\" );\n return true;\n }", "public boolean equals(Object obj) {\n\n if (!this.getClass().equals(obj.getClass())) {\n System.out.println(\"different classes\");\n return false;\n }\n\n Proto cmd = (Proto)obj;\n for (String key : cmd.getArguments().keySet()) {\n if (this.getArguments().containsKey(key)) {\n if(!this.getArguments().containsValue(cmd.getArgument(key))) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n }", "private boolean bothModified(String contentInCur,\n String contentinGiven, String contentInSp) {\n if (contentInSp == null && contentinGiven != null\n && contentInCur != null) {\n return true;\n } else if (contentInSp != null && !contentInSp.equals(contentInCur)\n && !contentInSp.equals(contentinGiven)) {\n return true;\n }\n return false;\n }", "public boolean isSubstitute();", "private static boolean compare(char[] argText, int startIndex) {\n\t\tint textIndex = 0;\n\t\tfor (int i = 0; i < patternLength; i++) {\n\t\t\ttextIndex = startIndex + i;\n\t\t\tlogger.info(\"i: \" + i + \"textIndex:\" + textIndex);\n\t\t\tif (pattern[i] != argText[textIndex])\n\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isForGenere();", "private boolean isTarget() {\n\t\t// Get a stack trace by constructing an exception here\n\t\tException exc = new Exception();\n\n\t\tfor (PyObject obj : targets.getList()) {\n\t\t\t// Only process proper tuple entries\n\t\t\tif (obj instanceof PyTuple && ((PyTuple) obj).__len__() >= 2) {\n\n\t\t\t\t// Compile the target specification\n\t\t\t\tPyTuple target = (PyTuple) obj;\n\t\t\t\tPattern clazz = getPattern(target.__finditem__(0));\n\t\t\t\tPattern method = getPattern(target.__finditem__(1));\n\n\t\t\t\t// Now scan the stack using this pair of patterns\n\t\t\t\tfor (StackTraceElement ste : exc.getStackTrace()) {\n\t\t\t\t\tif (clazz == null || clazz.matcher(ste.getClassName()).matches()) {\n\t\t\t\t\t\t// Either we don't care about the class it matches, and ...\n\t\t\t\t\t\tif ((method == null || method.matcher(ste.getMethodName()).matches())) {\n\t\t\t\t\t\t\t// Either we don't care about the method name or it matches\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Nothing matched\n\t\treturn false;\n\t}", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "boolean hasContent();", "static public boolean sequenceEquals(List source, List arg) {\n\t\tif ( source.size() != arg.size() ) {\n\t\t\treturn false;\n\t\t}\n\t\tIterator it1 = source.iterator();\n\t\tIterator it2 = arg.iterator();\n\t\twhile ( it1.hasNext() ) {\n\t\t\tObject elem1 = it1.next();\n\t\t\tObject elem2 = it2.next();\n\t\t\tif ( elem1 instanceof Integer ) {\n\t\t\t\tif ( ((Integer)elem1).intValue() != ((Integer)elem2).intValue() ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( elem1 instanceof Float ) {\n\t\t\t\t\tif ( ((Float)elem1).floatValue() != ((Float)elem2).floatValue() ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( elem1 instanceof Boolean ) {\n\t\t\t\t\t\tif ( ((Boolean)elem1).booleanValue() != ((Boolean)elem2).booleanValue() ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( !elem1.equals(elem2) ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(isMatch(\"daa\", \"d*ada*\"));\n\t\tSystem.out.println(isMatch(\"daa\", \"d*aa\"));\n\t}", "public boolean isMasonComponentCalledWithContent() {\r\n\t\treturn specialTag==SpecialTag.MASON_COMPONENT_CALLED_WITH_CONTENT;\r\n\t}", "public boolean matches(String arg) {\n switch (this.type) {\n case STRING:\n return true;\n case INTEGER:\n return arg.matches(\"\\\\d+\");\n default:\n /* The following default block can never be executed (because all Types are covered), but it must be\n * added, because otherwise I would get a VSCode error (saying that this method must return a boolean).\n */\n throw new IllegalArgumentException(\"The developer made a mistake. Please contact him to solve this\"\n + \" problem.\");\n }\n }", "private boolean matches(Opcode opcode) {\n List<Integer> opcodeResult = opcode.perform(instruction.getA(), instruction.getB(), instruction.getC(), registersBefore);\n return registersAfter.equals(opcodeResult);\n }", "protected boolean areContentsTheSame(T old, T news) {\n if (old == null)\n return news == null;\n return old.sameContents(news);\n }", "public abstract boolean teReproduces();", "private boolean canSendTo(String receiver) {\n\t\treturn subscriber.containsKey(receiver);\n\t}", "static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }", "boolean hasContents();", "boolean hasContents();", "@Override\n public boolean canBePostProcessed(ImmutableList<? extends ImmutableTerm> arguments) {\n return false;\n }", "@Override\n public boolean equals(Object other) {\n if (other instanceof Command) {\n return (this.getCommandName().equals(((Command) other).getCommandName())\n && this.argumentsEquals((Command) other) && this\n .commandDocumentation().equals(\n ((Command) other).commandDocumentation()));\n }\n return false;\n }", "public abstract boolean matches(ExternalIdBundle id);", "abstract public boolean argsNotFull();", "public boolean testVerify(Synth synth2, String key, Object obj1, Object obj2)\n {\n return false;\n }", "boolean hasProduces();", "public boolean contains(T content) {\n return false;\n }", "@Override\n public boolean verify(Verificator verificator) {\n return verificator.verifyResources(this);\n }", "public boolean isMatchedWith(Guid writerGuid) {\r\n\t\treturn writerProxies.get(writerGuid) != null;\r\n\t}", "public boolean contains(String name) {\n return generators.containsKey(name);\n }", "public boolean isManifestMatch(InputStream manifestContent) {\n\t\treturn true;\n\t}", "public boolean accept(Match arg0) {\n\t\treturn false;\n\t}", "boolean hasContentId();", "boolean hasExtra();", "boolean isMatch();", "@Override\r\n\tpublic boolean canExecute(ICustomContext context) {\n\t\tboolean ret = false;\r\n\t\tPictogramElement[] pes = context.getPictogramElements();\r\n\t\tif (pes != null && pes.length == 1) {\r\n\t\t\tObject bo = getBusinessObjectForPictogramElement(pes[0]);\r\n\t\t\tif (bo instanceof Interface) {\r\n\t\t\t\tret = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public boolean canHandle(MetadataSource source);", "public boolean match(MindObject other){\n return other.isSubtypeOf(this) || isSubtypeOf(other);\n }", "public static boolean carriesNearItContent(Intent intent) {\n return intent.hasExtra(NearItIntentConstants.CONTENT);\n }", "@Override\n public boolean matches(AllocationCandidate candidate) {\n return true;\n }", "boolean canProcess(final WriteableCommandLine commandLine, final ListIterator arguments);", "@Override\n public boolean areContentsTheSame(Item one,\n Item two) {\n return one.equals(two);\n }", "public boolean equals(Object other)\n {\n \t// if the *pointers* are the same, then by golly it must be the same object!\n \tif (this == other)\n \t\treturn true;\n \t\n \t// if the parameter is null or the two objects are not instances of the same class,\n \t// they can't be equal\n \telse if (other == null || this.getClass() != other.getClass())\n \t\treturn false;\n \t\n //Since this class is what the bag will use if it wants\n //to hold strings, we'll use the equals() method in the\n //String class to check for equality\n \telse if ((this.content).equals(((StringContent)other).content))\n return true;\n \t\n else return false;\n }", "public boolean shouldRenderContents(VolantisProtocol protocol, MCSAttributes attributes) {\n\n // In normal situation the contents of popup is of course needed \n if(isWidgetSupported(protocol)) {\n return true;\n }\n \n // In case of fallback, we don't render the contents if the popup\n // was initialy hidden. In case of uninitialized attributes or styles\n // (may happen if this renderer is called from some other widget renderer)\n // we also assume the popup content's should not be rendered in fallback\n if (null == attributes) {\n return false;\n }\n \n Styles styles = attributes.getStyles();\n if (null == styles) {\n return false;\n } \n return isInitiallyVisible(styles);\n }", "default boolean visitContent() {\n\t\treturn true;\n\t}", "private boolean isDifferent(String contentInGiven, String contentInCurr) {\n if (contentInGiven == null && contentInCurr == null) {\n return false;\n } else if (contentInCurr != null && contentInGiven != null\n && contentInCurr.equals(contentInGiven)) {\n return false;\n }\n return true;\n }", "boolean hasProduceResType();", "public boolean accept(T object, String pattern);", "boolean canHandle(Object source, TypeToken<?> targetTypeToken);", "@Override\n protected boolean matchesSafely(T actualValue) {\n return this.matchFn.test(actualValue);\n }", "public boolean takesArgument() {\n if (argumentPresence != null) {\n return true;\n }\n return false;\n }", "public boolean equals(Object o) {\n\t\tif (o instanceof ExtractionPattern) {\n\t\t\tExtractionPattern ep = (ExtractionPattern) o;\n\t\t\treturn this.signature.equals(ep.signature);\n\t\t}\n\t\treturn false;\n\t}", "private static boolean processArgs(String[] args){\n\n // Check to see if there are two files names that can be read\n if(args.length != 2){\n\n System.out.println(\"Please enter two file names:\" +\n \" Books, Transactions or Books1, Transaction1\");\n System.out.println(\"Or compatible files\");\n\n return false;\n\n // Check to see if the two files can be opened\n } else {\n for (int x = 0; x < 2; x++){\n // Make a file object to represent txt file to be read\n File inputFile = new File(args[x]);\n if (!inputFile.canRead()) {\n System.out.println(\"The file \" + args[x]\n + \" cannot be opened for input.\");\n return false;\n }\n }\n // At this point we know the files are readable\n return true;\n }\n }", "@ExposedMethod(type = MethodType.BINARY)\n\tfinal PyObject shadowstr___eq__(PyObject other) {\n\t\tPyObject result = testEqual(new PyString(getString()), other);\n\t\tif (result != Py.False) {\n\t\t\t// True, or null if str does not know how to compare with other (so we don't\n\t\t\t// either).\n\t\t\treturn result;\n\n\t\t} else if (targets.isEmpty()) {\n\t\t\t// We aren't going to be using our shadow string\n\t\t\treturn Py.False;\n\n\t\t} else {\n\t\t\t// Since we have targets, compare the shadow string with the other object.\n\t\t\tresult = testEqual(shadow, other);\n\t\t\tif (result == Py.True) {\n\t\t\t\t// It matches, so the result is true iff we are in a target context\n\t\t\t\treturn Py.newBoolean(isTarget());\n\t\t\t} else {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}", "boolean match(final HttpServletRequest request) {\n\t\t\tString lMetodo = request.getMethod().toUpperCase();\n\t\t\tString lUrl = request.getRequestURL().toString();\n\t\t\treturn lMetodo.equals(this.metodo.toString()) && lUrl.contains(this.url);\n\t\t}", "public boolean canHandle(DynamicMetadataSource source);", "boolean verify(ChunkDescriptor chunk);", "@Override\r\n\tprotected boolean prerequisites() {\n\t\treturn _player1.getClient().getPlayer().getWrappedObject().getPosition()\r\n\t\t\t\t.equals(_player2.getClient().getPlayer().getWrappedObject().getPosition());\r\n\t}", "public boolean wantsView(T aView, View aView2) { return aView.getContent()==null; }", "public boolean wantsView(T aView, View aView2) { return aView.getContent()==null; }", "private boolean actionChecker(Norm norm1, Norm norm2) {\n\t\tif (norm1.getBehavior() == null || norm2.getBehavior() == null) {\n\t\t\treturn false;\n\t\t}\n\t\tString actionName1 = norm1.getBehavior().getName();\n\t\tString actionName2 = norm2.getBehavior().getName();\n\t\t\n\t\tif (actionName1.equals(actionName2)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t//its missing new cases for new behaviors\n\t}", "boolean hasMagic();", "boolean hasFeedItemTarget();", "WireMessage hasMessage(String sender, String regexp) throws RemoteException;", "boolean hasSender();", "boolean hasSender();", "boolean hasSender();", "boolean hasSender();", "boolean hasSender();", "boolean hasSender();", "private static boolean isSecureRandomReceiver(\n @NonNull JavaContext context,\n @NonNull UCallExpression call) {\n UElement operand = call.getReceiver();\n return operand != null && isSecureRandomType(operand);\n }", "boolean isIntroduced();", "@Override\n public boolean matches(RecipeWrapper inv, Level levelIn) {\n return true;\n }", "@Override\n public boolean needsTransitiveClosureForEvaluation() {\n for(Object matcher : this.matchers){\n if(GenericMatcherMultiSourceCaller.needsTransitiveClosureForEvaluation(matcher))\n return true;\n }\n return false;\n }", "private boolean matchesDesiredResult(Object result)\n {\n return ((result == null) && (m_desiredResult == null)) || m_desiredResult.equals(result);\n }", "public boolean checkQuestionDuplication(String content) {\n \t\tif (questions.size() != 0) {\n \t\t\tfor (int i = 0; i < questions.size(); i++) {\n \t\t\t\tif (content.equals(questions.get(i).getContent())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "@Test\n public void testHasDups() {\n var arg = new String[] {\"a\",\"b\",\"c\"};\n Sequence instance = new Sequence();\n boolean expResult = false;\n boolean result = instance.hasDups(arg);\n assertEquals(expResult, result);\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof AbRemarkCommand)) {\n return false;\n }\n\n // state check\n AbRemarkCommand e = (AbRemarkCommand) other;\n return index.equals(e.index)\n && remark.equals(e.remark);\n }", "private static boolean containsArg (String[] args, String arg){\n for (int i = 0; i < args.length; i++){\n if (args[i].charAt(0) == '-' && args[i].contains(arg))\n \treturn true;\n }\n return false;\n }", "@Override\n\t\tpublic boolean matches(EObject eObject) {\n\t\t\treturn false;\n\t\t}", "private boolean isContentNode(NodePattern node, Set<NodePattern> contentNodes) {\n\t\tfor (EdgePattern outgoing : node.getOutgoings()) {\r\n\t\t\tif (contentNodes.contains(outgoing.getTarget())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Child elements of content elements are always also content elements:\r\n\t\tfor (EdgePattern incoming : node.getIncomings()) {\r\n\t\t\tif (incoming.getType().isContainment() && contentNodes.contains(incoming.getSource())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\treturn false;\r\n\t}", "protected boolean matchesPattern(String signatureString)\n/* */ {\n/* 143 */ for (int i = 0; i < this.patterns.length; i++) {\n/* 144 */ boolean matched = matches(signatureString, i);\n/* 145 */ if (matched) {\n/* 146 */ for (int j = 0; j < this.excludedPatterns.length; j++) {\n/* 147 */ boolean excluded = matchesExclusion(signatureString, j);\n/* 148 */ if (excluded) {\n/* 149 */ return false;\n/* */ }\n/* */ }\n/* 152 */ return true;\n/* */ }\n/* */ }\n/* 155 */ return false;\n/* */ }", "boolean contributesContent() {\n return includedInLastStep() && end >= start;\n }", "boolean isContentDisplayed();", "public boolean func_82789_a(ItemStack stack1, ItemStack stack2) { return stack2.func_77969_a(new ItemStack(ItemsTC.ingots, 1, 0)) ? true : super\n/* 84 */ .func_82789_a(stack1, stack2); }" ]
[ "0.563117", "0.53630483", "0.52937984", "0.5293505", "0.5292146", "0.524078", "0.5184179", "0.51624066", "0.515814", "0.51461214", "0.5083348", "0.5051698", "0.502834", "0.5017975", "0.5005527", "0.4985109", "0.49445033", "0.4938953", "0.4938953", "0.4938953", "0.4938953", "0.4938953", "0.4938953", "0.4938953", "0.49041545", "0.48897636", "0.48643303", "0.48516542", "0.48237792", "0.482344", "0.4807954", "0.4806295", "0.47961366", "0.47818437", "0.47818437", "0.47741666", "0.475654", "0.47515416", "0.47328523", "0.47296652", "0.47223753", "0.47007385", "0.46939492", "0.46803728", "0.46694204", "0.46599594", "0.46587944", "0.46501428", "0.45964062", "0.45915496", "0.45860264", "0.45849591", "0.45849374", "0.45814964", "0.4581095", "0.45801538", "0.45561287", "0.45533037", "0.45512313", "0.45461208", "0.45411584", "0.4536246", "0.4533373", "0.4525086", "0.45223835", "0.4521254", "0.45152184", "0.4507717", "0.45036972", "0.45001268", "0.44991115", "0.4497081", "0.44959787", "0.44824243", "0.44824243", "0.44821534", "0.44820848", "0.44785574", "0.44596237", "0.4452241", "0.4452241", "0.4452241", "0.4452241", "0.4452241", "0.4452241", "0.44466594", "0.44394127", "0.44343573", "0.4432219", "0.4428507", "0.4427776", "0.4426641", "0.44265208", "0.44221035", "0.44137114", "0.44136578", "0.44075868", "0.44027358", "0.44000298", "0.43949485" ]
0.7620071
0
///////// BEGIN EDITABLE //////////////
private static Node toOutline(List<Heading> headings) { // Implement this function. Sample code below builds an // outline of only the first heading. Node root = new Node(new Heading(0, "")); // Map of Nodes with their Node levels as keys. Map<Integer, Node> mapOfNodeLevels = new HashMap<Integer, Node>(); mapOfNodeLevels.put(0, root); for (Heading heading : headings) { Node node = new Node(heading); mapOfNodeLevels.get(heading.weight - 1).children.add(node); mapOfNodeLevels.put(heading.weight, node); } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public void editOperation() {\n\t\t\r\n\t}", "private void performDirectEdit() {\n\t}", "@Override\n public void handleEditStart ()\n {\n\n }", "public abstract void edit();", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void editExchange() {\n\t\t\n\t}", "@Override\n\tpublic void modify() {\n\t\t\n\t}", "@Override\n\tpublic void alterar() {\n\t\t\n\t}", "@Override\n\tprotected void initForEdit(AWRequestContext requestContext) {\n\n\t}", "public void verarbeite() {\n\t\t\r\n\t}", "@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "@Override\n public void checkEditing() {\n }", "protected abstract void editItem();", "void onEditClicked();", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "public interface EdentInlineEditableObject {\n public static final String INSERT_VALUE = \"Povinná hodnota\";\n \n public void setStringValue(String name, String value);\n \n}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "public abstract void acceptEditing();", "@Override\n protected void validateEdit(Fornecedor post) {\n\n }", "@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public hesapekrani() {\n initComponents();\n getedits();\n \n \n }", "String getEditore();", "private void makeModifiable() {\n final TableEditor editor = new TableEditor(providers);\n editor.horizontalAlignment = SWT.LEFT;\n editor.grabHorizontal = true;\n editor.minimumWidth = 50;\n\n // editing the fourth column\n final int editable = 4;\n\n providers.addSelectionListener(new SelectionListener() {\n \n @Override\n public void widgetSelected(SelectionEvent exc) {\n\n TableItem item = (TableItem) exc.item;\n\n //Column should only be editable if arguments are allowed for the provider.\n if (item.getText(3).toString().equals(\"false\") || item == null) {\n return;\n }\n\n Control oldEditor = editor.getEditor();\n\n if (oldEditor != null) {\n oldEditor.dispose();\n }\n\n \n Text newEditor = new Text(providers, SWT.NONE);\n newEditor.setText(item.getText(editable));\n newEditor.addModifyListener(new ModifyListener() {\n\n \n @Override\n public void modifyText(ModifyEvent exc) {\n Text text = (Text) editor.getEditor();\n editor.getItem().setText(editable, text.getText());\n }\n });\n \n newEditor.selectAll();\n newEditor.setFocus();\n editor.setEditor(newEditor, item, editable); \n }\n\n @Override\n public void widgetDefaultSelected(SelectionEvent exc) {\n // TODO Auto-generated method stub\n }\n });\n \n for (int i = 0; i < TITLES.length; i++) {\n providers.getColumn(i).pack();\n }\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "int nEditOperations();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public default boolean isEditable(){ return false; }", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\n\tpublic void editingStopped(ChangeEvent arg0) {\n\n\t}", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "void actionEdit(int position);", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public boolean isEditable() {\n \t\treturn true;\n \t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void update() {\n \n }", "static void setNotEdit(){isEditing=false;}", "boolean isEdit();", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "public abstract void checkEditing();", "@Override\n\tpublic void recreo() {\n\n\t}", "@Override\n\tpublic int edita(Solicitud bean) throws Exception {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n \tpublic Editable computeDifferences(Editable newEditable) {\n \t\treturn null;\r\n \t}", "private void editMode() {\n\t\t// Set the boolean to true to indicate in edit mode\n\t\teditableEditTexts();\n\t\thideEditDelete();\n\t\thideEmail();\n\t\tshowSaveAndAdd();\n\t\tshowThatEditable();\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "public void editEdge(){\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "public String loadMainEdit(){\r\n\t\treturn \"edit\";\r\n }", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "public interface Changed extends Editable.Changed\n {\n }", "protected abstract void showEditedEntity(Entity e);", "@Override\n\tpublic void update() { }", "Editor mo117962b();", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void editTheirProfile() {\n\t\t\n\t}", "private void createDisplayEditOverlay() {\n\t}", "@Override\n public boolean update(Revue objet) {\n return false;\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}" ]
[ "0.7485545", "0.7318794", "0.6937222", "0.6821978", "0.6512094", "0.64470786", "0.6221736", "0.6188952", "0.616287", "0.6094105", "0.6057471", "0.60192096", "0.6000323", "0.5999157", "0.59614325", "0.5906353", "0.589241", "0.5885445", "0.5882659", "0.5872946", "0.5872946", "0.58357495", "0.5817637", "0.5812893", "0.5804863", "0.57735956", "0.5756053", "0.5754722", "0.5753868", "0.5750095", "0.5750095", "0.5742428", "0.573565", "0.5733041", "0.5715054", "0.56932086", "0.56884885", "0.5685824", "0.5672717", "0.5672717", "0.5672717", "0.56588954", "0.565788", "0.565788", "0.565788", "0.565788", "0.565788", "0.565788", "0.5648188", "0.56454897", "0.563892", "0.56367695", "0.56367695", "0.56367695", "0.56367695", "0.56367695", "0.5636138", "0.56350386", "0.563151", "0.5630257", "0.56301963", "0.5622867", "0.56157076", "0.56157076", "0.56157076", "0.56157076", "0.56157076", "0.56157076", "0.56157076", "0.56157076", "0.56157076", "0.56157076", "0.5614943", "0.5614614", "0.5614493", "0.56143695", "0.56143695", "0.560439", "0.56017375", "0.5594312", "0.55879605", "0.5587193", "0.5587193", "0.5583348", "0.5583094", "0.5583094", "0.5575989", "0.5573314", "0.5556663", "0.55511326", "0.5546814", "0.55406564", "0.55398405", "0.55398405", "0.5538785", "0.5535108", "0.5527021", "0.5520824", "0.55200005", "0.5518868", "0.5518868" ]
0.0
-1
///////// END EDITABLE ////////////// Parses a line of input. This implementation is correct for all predefined test cases.
private static Heading parse(String record) { String[] parts = record.split(" ", 2); int weight = Integer.parseInt(parts[0].substring(1)); Heading heading = new Heading(weight, parts[1].trim()); return heading; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract T parseLine(String inputLine);", "protected abstract void parse(String line);", "public void parseInput(Scanner sc, String inputLine) {\n String[] input = inputLine.split(\",\");\n assert(input[0].equals(\"R\"));\n this.warehouseID = Integer.parseInt(input[1]);\n this.districtID = Integer.parseInt(input[2]);\n this.customerID = Integer.parseInt(input[3]);\n }", "protected abstract DataTypes[] processLine(MutableCharArrayString line);", "private void parseLine(String line) throws ParsingException {\n if (line.startsWith(COMMENT_PREFIX)) //Ignore comments\n return;\n String parts[] = line.split(SEPARATOR_PARAMETER);\n if (parts.length == 2) { //PARAMETER=VALUE\n if (isValidParameter(parts[0])) //If the parameter is present in the config list then add it\n parameters.put(parts[0], parts[1]);\n } else if (parts.length == 1 && parts[0].startsWith(OPTION_PREFIX)) { //-OPTION\n String option = parts[0].substring(OPTION_PREFIX.length());\n if (isValidOption(option))\n parameters.put(option, null); //Null in value differs options from parameters\n } else\n throw new ParsingException(buildErrorMessage(EXCEPTION_BAD_FORMAT));\n }", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "public static Reindeer PARSE(String line) {\n String[] bits = line.split(\" \");\n return new Reindeer(bits[0], Integer.parseInt(bits[3]), Integer.parseInt(bits[6]), Integer.parseInt(bits[13]));\n }", "@Test\n public void testParseLine_Docker_Ubuntu() {\n\n String line = \"speed 38400 baud; rows 0; columns 0; line = 0;\";\n assertEquals(new Integer(0), terminal.parseLine(line));\n }", "private void parseAxiom(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 2) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid unitLength argument\");\n\t\t}\n\t\tthis.setAxiom(tokens[1]);\n\t}", "protected abstract Operation parseLine(File baseDir, String line, int lineNum) throws IOException;", "public void parseLine(String line, ParseState parseState) {\n String[] lineElements = line.split(\"\\\\s\");\n if (lineElements.length == 2 && \"attributes\".equals(lineElements[0]) && \"{\".equals(lineElements[1])) {\n SubgraphAttributeDefLineParser contAttrDefLineParser = new SubgraphAttributeDefLineParser(container);\n PopulateDB.parseBlock(parseState, contAttrDefLineParser);\n } else if (lineElements.length == 3 && \"subgraph\".equals(lineElements[0]) && \"{\".equals(lineElements[2])) {\n int subgID = Integer.parseInt(lineElements[1]);\n SubgraphLineParser subgraphLineParser = new SubgraphLineParser(container, subgID);\n PopulateDB.parseBlock(parseState, subgraphLineParser);\n } else {\n throw new IllegalArgumentException(\"Bad attributes or subgraph definition\");\n }\n }", "public ParsedLine parseLine(String line, int lineNum, SymbolTable table) {\n\t\tline = line.trim();\n\t\tint comment = line.indexOf(\"//\");\n\t\tif (comment > -1) line = line.substring(0, comment);\n\t\t\n\t\tif (line.length()==0) {\n\t\t\treturn handleComment(line);\n\t\t\t\n\t\t} else if (line.charAt(0) == '(' && line.charAt(line.length()-1)==')') {\n\t\t\treturn handleLabel(line, lineNum, table);\n\t\t\t\n\t\t} else if (line.charAt(0)=='@') {\n\t\t\treturn handleAInstruction(line, table);\n\t\t\t\n\t\t} else {\n\t\t\t// Note: Last statement needs more robust error checking\n\t\t\treturn handleCInstruction(line);\n\t\t}\n\t}", "protected void processLine(String line){}", "public ExpenseEntity parse(String line);", "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n if ( fields.length < 2 ) {\n throw new IOException( \"Illegal format, expected at least 2 columns, got \" + fields.length );\n }\n return fields;\n\n }", "private static List<Integer> parse_line(String line, int d) throws Exception {\n\t List<Integer> ans = new ArrayList<Integer>();\n\t StringTokenizer st = new StringTokenizer(line, \" \");\n\t if (st.countTokens() != d) {\n\t throw new Exception(\"Bad line: [\" + line + \"]\");\n\t }\n\t while (st.hasMoreElements()) {\n\t String s = st.nextToken();\n\t try {\n\t ans.add(Integer.parseInt(s));\n\t } catch (Exception ex) {\n\t throw new Exception(\"Bad Integer in \" + \"[\" + line + \"]. \" + ex.getMessage());\n\t }\n\t }\n\t return ans;\n\t }", "public String[] parse() {\n String line = input.nextLine();\n line = line.trim();\n if (StringUtils.isNotEmpty(line)) {\n return StringUtils.split(line, \" \");\n }\n return null;\n }", "boolean handle(String line);", "public abstract boolean read(String line);", "private void handleImportLines(String inputLineString ){\n String [] splitInputLine = inputLineString.split(\",\");\n String command = splitInputLine[0];\n String name = \"\";\n String date = \"\";\n String department = \"\";\n\n double pay = 0;\n int role = 0;\n\n if(splitInputLine.length == ADDPARTFULLCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n\n }else if(splitInputLine.length == ADDMANAGECOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n role = Integer.parseInt(splitInputLine[5]);\n }else if(splitInputLine.length == OTHEREXPECTEDCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n }\n\n if(command.equals(\"P\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Parttime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"F\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Fulltime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"M\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Management(newEmployeeProfile, pay, role);\n company.add(newEmployee);\n }\n }", "protected int[] parserLine(String source, int Line) {\n\t\tint[] Offset = new int[2];\n\t\tString[] Source = source.split(\"\\n\");\n\t\tint actualLine = 1;\n\t\tint counterChar = 0;\n\t\tfor(String src:Source){\n\t\t\tif(actualLine == Line){ // desired line\n\t\t\t\tOffset[0] = counterChar; //first char\n\t\t\t\tOffset[1] = counterChar+src.length()+1; //last char\n\t\t\t\treturn Offset;\n\t\t\t}\n\t\t\tcounterChar+=src.length()+1;\n\t\t\tactualLine++;\n\t\t}\n\t\treturn null;\n\t}", "private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void parseCommand(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString commandString;\n\t\tif(tokens.length == 4) {\n\t\t\tcommandString = tokens[2] + \" \" + tokens[3];\n\t\t}\n\t\telse if(tokens.length == 3) {\n\t\t\tcommandString = tokens[2];\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\"Invalid command argument\");\n\t\t}\n\t\tthis.registerCommand(tokens[1].charAt(0), commandString);\n\t}", "public static String parseLine(String line) {\n if (line.startsWith(\"//\") || \"\".equals(line.trim())\n || (line.startsWith(\"#\") && !line.startsWith(\"#(\"))) {\n return null;\n } else {\n String arr[] = line.split(\"[:]\");\n if (arr.length == 2) {\n return arr[1];\n } else if (arr.length == 1) {\n return arr[0];\n } else {\n assert false : \"Received line: \" + line;\n return null;\n }\n }\n }", "public static void parseLine(String input){\r\n\t\tfor(int i = 0;i<input.length();i++){\r\n\t\t\t\r\n\t\t\tString currentChar = parseChar(input,i);\r\n\t\t\ti+=currentChar.length()-1; //skip past all integer characters if there are any\r\n\t\t\t\r\n\t\t\tif(checkOperand(currentChar)){\r\n\t\t\t\texpressionTree.treeStack.push(new Node(currentChar));\r\n\t\t\t}else if(checkOperator(currentChar)){\r\n\t\t\t\tNode node = new Node(currentChar);\r\n\t\t\t\t\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.rightNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.rightNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.leftNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.leftNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\texpressionTree.treeStack.push(node);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "List<Object> parse(String inputLine) {\n List<Object> lo = new ArrayList<>();\n int lineLength = inputLine.length();\n for (int i = 0; i < lineLength; i++) {\n char c = inputLine.charAt(i);\n //creator of constant:\n if (isPartOfNumber(c)) {\n String constantValue = \"\";\n for (; i < lineLength; i++) {\n c = inputLine.charAt(i);\n if (!isPartOfNumber(c)) {\n break;\n }\n constantValue += c;\n }\n //assign constant\n lo.add(new Constant(Double.parseDouble(constantValue)));\n if (i == lineLength) {\n break;\n }\n }\n switch (c) {\n case '(':\n lo.add(Brackets.OPENING);\n break;\n case ')':\n lo.add(Brackets.CLOSING);\n break;\n case '²':\n lo.add(Operators.SQUARE);\n break;\n case '√':\n lo.add(Operators.SQUARE_ROOT);\n break;\n case '÷':\n lo.add(Operators.DIVIDE);\n break;\n case '×':\n lo.add(Operators.MULTIPLY);\n break;\n case '%':\n lo.add(Operators.PERCENTAGE);\n break;\n case '+':\n lo.add(Operators.ADD);\n break;\n case '−':\n lo.add(Operators.SUBTRACT);\n break;\n default:\n throw new IllegalArgumentException(\"Unknown symbol used as input string\");\n }\n }\n return lo;\n }", "public Task parseLine(String line) {\n assert(line != null && !line.equals(\"\"));\n\n String[] x = line.split(\"\\\\|\");\n String taskType = x[0].strip();\n boolean isDone = !x[1].strip().equals(\"0\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d MMM yyyy HH:mm\");\n\n if (taskType.equals(\"T\")) {\n return new ToDo(x[2].strip(), isDone);\n } else if (taskType.equals(\"D\")) {\n String by = x[x.length - 1].strip();\n LocalDateTime byy = LocalDateTime.parse(by, formatter);\n return new Deadline(x[2].strip(), isDone, byy);\n } else { // Event\n String at = x[x.length - 1].strip();\n LocalDateTime att = LocalDateTime.parse(at, formatter);\n return new Event(x[2].strip(), isDone, att);\n }\n }", "public String parseLine(String line) {\r\n String[] temp = line.split(\":\");\r\n\r\n if (temp[0].equalsIgnoreCase(\"user\")) {\r\n cmd = temp[0];\r\n userName = temp[1];\r\n } else if (temp[0].equalsIgnoreCase(\"play\")) {\r\n if (!playing) {\r\n cmd = temp[0];\r\n game = temp[1];\r\n } else {\r\n cmd = temp[0];\r\n userGuess = temp[1];\r\n }\r\n\r\n } else if(temp[0].equalsIgnoreCase(\"quit\")) {\r\n System.out.println(temp[0]);\r\n cmd = temp[0];\r\n } else if (temp[0].equalsIgnoreCase(\"reset\")) {\r\n cmd = temp[0];\r\n } else {\r\n cmd = \"invalid command\";\r\n }\r\n return cmd;\r\n }", "public void parse(String line)\n\t{\n\t\tif(line.length() == 0)\n\t\t\treturn;\n\t\tif(line.startsWith(\";\"))\n\t\t\treturn;\n\t\tline = line.toUpperCase();\n\t\t\n\t\tif(Utils.isCommand(line)){\n\t\t\texecuteCommand(line);\n\t\t\treturn;\n\t\t}\n\t\t//line syntax = <TYPE> <NAME> = {EXPR}\n\t\tStringBuilder build = new StringBuilder();\n\t\tString name = \"\";\n\t\tString type = \"\";\n\t\tint i = 0;\n\t\t//check if the line starts with a letter, we expect a Type declaration, made of letters :P\n\t\tif(!Utils.isLetter(line.charAt(i)))\n\t\t\terror(\"LETTER EXPECTED, NOT \" + line.charAt(i));\t\n\t\t\n\t\tchar c = line.charAt(i); //current character to analyze.\n\t\t\n\t\twhile(i < line.length() && Utils.isLetter(c))\n\t\t{\n\t\t\t//build.append(c);\n\t\t\tc = line.charAt(i); \t\n\t\t\ti++;\t\t\n\t\t}\n\t\t//space char expected before the type declaration.\n\t\tif(!Utils.isSpace(c) && i < line.length())\n\t\t\terror(\"INVALID CHARACTER \\\" \" + c + \"\\\" \");\n\t\t\n\t\t//here we obtain the type.\n\t\t//String t = build.toString();\n\t\tString t = line.substring(0, i-1);\n\t\tif(Utils.isValidType(t))\n\t\t{\n\t\t\ttype = t;\n\t\t}\n\t\telse\n\t\t\terror(t + \" IS NOT A VALID TYPE.\");\n\t\t\n\t\t//re-init stringbuilder.\n\t\tbuild = new StringBuilder();\t\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//if name is not present, but the index reached the \" = \" sign, throw an Exception.\n\t\tif(line.charAt(i) == '=')\n\t\t\terror(\"NAME NOT FOUND, WHAT THE HECK ARE YOU TIPYING???\");\n\t\t\n\t\t//Names MUST start with a letter.\n\t\tif(!Utils.isLetter(line.charAt(i)))\n\t\t\terror(\"LETTER EXPECTED, NOT \" + line.charAt(i));\n\t\t\n\t\t//update the c char.\n\t\tc = line.charAt(i);\n\t\t\n\t\t//now we must obtain the name token.\n\t\twhile(i < line.length() && Utils.isLetter(c))\n\t\t{\n\t\t\tbuild.append(c);\n\t\t\ti++;\n\t\t\tc = line.charAt(i); \t\t\t\n\t\t}\n\t\t//here we have reached the edge of the name, this MUST be followed by a space char.\n\t\tif(i < line.length() && Utils.isSpace(c))\n\t\t{\n\t\t\tString n = build.toString();\n\t\t\tif(t.length() > 8)\n\t\t\t\terror(\"NAME LENGTH CAN'T BE GREATER THAN 8 CHARS\");\n\t\t\tif(t.length() == 8)\n\t\t\t\tSystem.out.println(\"name token hit the length limit, please use short names.\");\n\t\t\tname = n;\n\t\t}\n\t\telse\n\t\t\terror(\"ERROR IN CHARACTER \\\" \" + c + \" \\\", SPACE EXPECTED.\");\n\t\t\n\t\t//re-init stringbuilder.\n\t\tbuild = new StringBuilder();\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//here we expect a \" = \" character.\n\t\tif(line.charAt(i) != '=')\n\t\t\terror(\"MISSING \\\" = \\\" SIMBOL\");\n\t\t\n\t\t//advance to next char, idk why, but without this, the compiler crashes.\n\t\ti++;\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//get expr text.\n\t\tString e = line.substring(i);\n\t\t//solve any reference to other vars, only for basic types.\n\t\tif(Utils.containRefs(e) && Utils.isBasicType(type))\n\t\t\te = solveRefs(e);\n\t\te = e.trim();\n\t\tif(type.equals(\"INTEGER\"))\n\t\t\tints.add(new Int(name, solveMath(e)));\n\t\tif(type.equals(\"STRING\"))\n\t\t\tstrs.add(new Str(name,e));\n\t\tif(type.equals(\"BOOLEAN\"))\n\t\t\tbools.add(new Bool(name,Boolean.parseBoolean(e)));\n\t\tif(Utils.isFuncType(type))\n\t\t{}\n\t\tif(Utils.isCallType(type))\n\t\t{\n\t\t\tExecutable ex = null;\n\t\t\tif(type.equals(\"CALLX\"))\t\n\t\t\t\tex = solveCallx(name, e);\n\t\t\tif(type.equals(\"RETURN\"))\n\t\t\t\tex = solveReturn(name, e);\n\t\t\texecution.executionList.add(ex);\n\t\t}\n\t\tlnumber += 10;\n\t\tlines.add(line);\n\t}", "protected void parseLine(String dataLine) {\n String[] line = dataLine.split(\",\");\n if (validater(line)) {\n try {\n Route route =\n new Route(\n line[airline],\n Integer.parseInt(line[airlineID]),\n line[sourceAirport],\n Integer.parseInt(line[sourceAirportID]),\n line[destinationAirport],\n Integer.parseInt(line[destinationAirportID]),\n line[codeshare],\n Integer.parseInt(line[stops]),\n line[equipment].split(\" \"));\n addRoute(route);\n } catch (Exception e) {\n errorCounter(11);\n }\n }\n }", "private void parseProduction(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 3) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid production arguments\");\n\t\t}\n\t\tregisterProduction(tokens[1].charAt(0), tokens[2]);\n\t}", "private void parseUnitLength(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 2) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid unitLength argument\");\n\t\t}\n\t\tthis.setUnitLength(Double.parseDouble(tokens[1]));\n\t}", "@Override\n\tpublic boolean parse(String line) {\n\t\tScanner reader = new Scanner(line);\n\t\tif (reader.hasNext()) {\n\t\t\tString firstCommand = reader.next();\n\t\t\tif (firstCommand.equalsIgnoreCase(\"EXAMINE\")\n\t\t\t\t\t|| firstCommand.equalsIgnoreCase(\"X\")) {\n\t\t\t\t_examineInventory = true;\n\t\t\t\tif (reader.hasNext()) {\n\t\t\t\t\t_examineInventory = false;\n\t\t\t\t\t_itemName = reader.next();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\treturn false;\n\t\t} else\n\t\t\treturn false;\n\t\treturn true;\n\t}", "Object parse(String line) throws IOException, FSException {\n int oldLine=code.curLine;\n try {\n code.curLine=-1;\n code.forError=line;\n char[] chars=line.toCharArray();\n LineLoader.checkLine(chars);\n tok=new LexAnn(chars);\n tok.nextToken();\n // a script must always start with a word...\n try {\n parseStmt();\n } catch (RetException e) {\n return retVal;\n }\n } finally {\n code.curLine=oldLine;\n }\n return null;\n }", "public static LogDataParser praseLogRequestLine(String line)\n\t\t\tthrows NumberFormatException, PatternSyntaxException, PatternNotMatchedException {\n\t\tPATTERN = Pattern.compile(LOG_LINE_ENTRY_PATTERN);\n\t\tMatcher matcher = PATTERN.matcher(line);\n\t\tif (!matcher.find()) {\n\t\t\tthrow new PatternNotMatchedException(\"Cannot parse \" + line);\n\t\t}\n\t\treturn new LogDataParser(matcher.group(1), matcher.group(9));\n\t}", "private Line(String inLine) {\n // Save the input line.\n this.lineText = inLine;\n // Get the number of fields in the line.\n int nFields = labels.length;\n // Normally, this will work.\n this.fields = TabbedLineReader.this.splitLine(inLine);\n // If the number of fields is wrong, we have to adjust.\n if (this.fields.length != nFields) {\n // Copy the old array and create a new one of the proper length.\n String[] buffer = this.fields;\n this.fields = new String[nFields];\n // Transfer the strings one by one, padding if necessary.\n for (int i = 0; i < nFields; i++) {\n if (i < buffer.length) {\n this.fields[i] = buffer[i];\n } else {\n this.fields[i] = \"\";\n }\n }\n }\n }", "private ProductRecord parseLine(String line) {\n\t\tString[] splittedLine = splitAndTrim(line);\n\t\t\n\t\tString name = splittedLine[0];\n\t\tString id = splittedLine[1];\n\t\tint price = Integer.parseInt(splittedLine[2]);\n\t\tint currentStock = Integer.parseInt(splittedLine[3]);\n\t\tint minStock = Integer.parseInt(splittedLine[4]);\n\t\t\n\t\t// Parse memo if exist.\n\t\tString memo = null;\n\t\tif (splittedLine.length >= 6) memo = splittedLine[5];\n\t\t\n\t\t// Get category from product id.\n\t\tString category;\n\t\tint categoryInt = Integer.parseInt(id.split(\"-\")[0]);\n\t\tswitch (categoryInt) {\n\t\tcase 1:\n\t\t\tcategory = \"Food\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcategory = \"Office\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcategory = \"Misc.\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tcategory = \"Health\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tcategory = \"Clothing\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcategory = \"Etc\";\n\t\t}\n\t\t\n\t\treturn new ProductRecord(name, id, category, price, currentStock, minStock, memo);\n\t}", "private boolean parseLine()\r\n\t{\r\n\t\tString delim = \"\\t\";\r\n\t\tm_tokenizer = new StringTokenizer(m_line, delim, true);\r\n\t\tString token;\r\n\t\t\r\n\t\tint tokCount = m_tokenizer.countTokens();\r\n\t\tif ((fieldIndexArray.length <= tokCount) &&\t(tokCount <= fieldIndexArray.length*2))\r\n\t\t{\r\n\t\t\tint lastDelim = -2; /** case when line has consecutive (>=2) tabs!*/\r\n\t\t\tint columnIndex = 0;\r\n\t\t\t/** Tokenise the chip data file's line to separate the data to be put in various columns*/\r\n\t\t\tfor (int i=0; i< tokCount; i++) \r\n\t\t\t{\r\n\t\t\t\ttoken = m_tokenizer.nextToken();\r\n\t\t\t\tif (token.equalsIgnoreCase(delim)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (lastDelim + 1 == i) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** 2 consecutive tags - empty string value*/\r\n\t\t\t\t\t\tif(columnIndex<fieldIndexArray.length)\r\n\t\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(\"\");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlastDelim = i;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t/** Each time when new token rrpresenting column data is encountered then columnIndex is \r\n\t\t\t\t\t * incremented and tokens are stored till the token number is less than total number\r\n\t\t\t\t\t * of tokens on one line according to fieldIndexArray */\r\n\t\t\t\t\tif(columnIndex < fieldIndexArray.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** If total description length exceeds the precision of that field in the table then \r\n\t\t\t\t\t\t * it will be truncated to load it in the description field*/\r\n\t\t\t\t\t\tif(columnIndex == (fieldIndexArray.length-1))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (token.length() > max)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tStringBuffer tokenbuffer = new StringBuffer(token);\r\n\t\t\t\t\t\t\t\ttokenbuffer.setLength(max);\r\n\t\t\t\t\t\t\t\tif(tokenbuffer.charAt(max-1) != '\"')\r\n\t\t\t\t\t\t\t\t\ttokenbuffer.append('\"');\r\n\t\t\t\t\t\t\t\ttoken=tokenbuffer.toString();\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/** Here fieldIndexArray will give the actual location of particular token\r\n\t\t\t\t\t\t * in the chipinformation table. This mapping is already done in fieldIndexArray */\r\n\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(token);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\tLogger.log(\"Invalid record: \"+ tokCount + \" fields. \",\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\tLogger.log(\"Expected tokens = \"+ fieldIndexArray.length,\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static void main(String args[]) {\n String str = \"Composer 2.1 ascii\\ncamera {\\n position 3.84789 3.48111 14.0946\\n viewDirection -123 -0.0143311 27\\n}\";\n\tIStrStream stream = new IStrStream(str);\n\tString input;\n\tint i;\n\tfloat f;\n\t\n\tinput = stream.getString();\n\tif (!(input.equals(\"Composer\"))) {\n\t System.err.println(\"unexpected string 1 \" + input);\n\t System.exit(1);\n\t}\n\tf = stream.getFloat();\n\tif (Math.abs(f - 2.1) > 0.1) {\n\t System.err.println(\"unexpected float 2 \" + f);\n\t System.exit(1);\n\t}\n\tinput = stream.getString();\n\tif (!(input.equals(\"ascii\"))) {\n\t System.err.println(\"unexpected string 3 \" + input);\n\t System.exit(1);\n\t}\n\twhile (!stream.eof()) {\n\t input = stream.getString();\n\t if (input.equals(\"camera\")) {\n\t\tinput = stream.getString();\t// skip over {\n\t\tinput = stream.getString();\n\t\tif (!(input.equals(\"position\"))) {\n\t\t System.err.println(\"unexpected string 4 \" + input);\n\t\t System.exit(1);\n\t\t}\n\t\tf = stream.getFloat();\n\t\tf = stream.getFloat();\n\t\tf = stream.getFloat();\n\t\tinput = stream.getString();\n\t\tif (!(input.equals(\"viewDirection\"))) {\n\t\t System.err.println(\"unexpected string 5 \" + input);\n\t\t System.exit(1);\n\t\t}\n\t\ti = stream.getInt();\n\t\tif (i != -123) {\n\t\t System.err.println(\"unexpected integer 6 \" + i);\n\t\t System.exit(1);\n\t\t}\n\t\tf = stream.getFloat();\n\t\ti = stream.getInt();\n\t\tif (i != 27) {\n\t\t System.err.println(\"unexpected integer 7 \" + i);\n\t\t System.exit(1);\n\t\t}\n\t\tinput = stream.getString();\t// skip over }\n\t } else {\n\t\tSystem.err.println(\"unexpected subcommand string 8 \" + input);\n\t\tSystem.exit(1);\n\t }\n\t}\n\tSystem.out.println(\"passed\");\n }", "public abstract Object parseRecord(String input);", "private static String[] lineSplit(String input) {\r\n String[] tokens = input.split(delimiter);\r\n return tokens;\r\n }", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "public interface LineParser {\n boolean hasProtocolVersion(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor);\n\n Header parseHeader(CharArrayBuffer charArrayBuffer) throws ParseException;\n\n ProtocolVersion parseProtocolVersion(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor) throws ParseException;\n\n RequestLine parseRequestLine(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor) throws ParseException;\n\n StatusLine parseStatusLine(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor) throws ParseException;\n}", "private void processFirstLine(String line) {\r\n\t\tString[] numsAsStr = line.split(\" \");\r\n\t\tnumRows = Integer.parseInt(numsAsStr[0]);\r\n\t\tnumCols = Integer.parseInt(numsAsStr[1]);\r\n\t\t/**\r\n\t\t * Taken out for time testing\r\n\t\t */\r\n//\t\tSystem.out.println(\"Rows: \" + numRows + \" Cols: \" + numCols);\r\n\t}", "public void parseLine(String line, int lineNumber) {\n // Do stuff with line here\n System.out.println(line);\n }", "protected String firstToken(String unparsedLine) {\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\011\\042\");\r\n\t\tString returnValue = null;\r\n\t\ttry {\r\n\t\t\treturnValue = t.nextToken();\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.out.println(\"ERROR in IrregularXsectsInpAsciiInput\");\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "List<ThingPackage> parseLines(List<String> line);", "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 int[][] parseMatrixInput(String input) throws MatrixException {\n String[] rows = input.trim().split(\"\\n\");\n String[] columns = rows[0].trim().split(\" \");\n\n // Various checks against dimension\n if(rows.length < 1 || columns.length < 1) {\n throw new MatrixException(\"Matrix Exception: Matrix does not have rows or perhaps columns.\");\n }\n\n if(rows.length != columns.length) {\n throw new MatrixException(\"Matrix Exception: Square matrix not provided\");\n }\n\n if(!MatrixHelpers.isAPowerOfTwo(rows.length)) {\n throw new MatrixException(\"Matrix Exception: Matrix dimension is not a power of two.\");\n }\n\n // Should be ideal dimension\n int [][] matrix = new int[rows.length][columns.length];\n\n try {\n for(int i = 0; i < rows.length; i++) {\n // Tokenize horizontally\n String[] rowTokens = rows[i].trim().split(\" \");\n\n // Check for a dodgy line\n if(rowTokens.length != columns.length) {\n throw new MatrixException(\"Matrix Exception: Matrix row length does not conform to original dimension.\");\n }\n\n for(int j = 0; j < rowTokens.length; j++) {\n matrix[i][j] = Integer.parseInt(rowTokens[j]);\n }\n }\n } catch(ArrayIndexOutOfBoundsException | NumberFormatException ex) {\n throw new MatrixException(\"Matrix Exception: Could not parse number.\", ex);\n }\n\n return matrix;\n }", "protected void processLine(String aLine){\n\t\t \t\t String temp=aLine.substring(0, 7);\n\t\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t\t \t\t int ID=Integer.parseInt(temp);\n\t \t\t String name=aLine.substring(7, 12);\n\t \t\t //int forget=;//epoch\n\t \t\t temp=aLine.substring(31, 42);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t double a=Double.parseDouble(temp);//TODO determine what the scale of simulation should be\n\t \t\t temp=aLine.substring(42, 53);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t double e=Double.parseDouble(temp);\n\t \t\t \n\t \t\t asteriod newBody=new asteriod(a,e);//TODO find asteriodal angular shit\n\t \t\t \n\t \t\t double temp2;\n\t \t\t //54 to 63 for inclination\n\t \t\t temp=aLine.substring(54,63);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.Inclination=Math.toRadians(temp2);\n\t \t\t //64 for argument of periapsis\n\t \t\t temp=aLine.substring(63, 74);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.ArgPeriapsis=Math.toRadians(temp2);\n\t \t\t //Longitude of ascending node\n\t \t\t temp=aLine.substring(73, 84);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.LongAscenNode=Math.toRadians(temp2);\n\t \t\t //Mean Anommally/PHI\n\t \t\t temp=aLine.substring(83,96);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t temp2=Math.toRadians(temp2);\n\t \t\t newBody.meanAnomaly0=temp2;\n\t \t\t \n\t \t\t temp=aLine.substring(95,100);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.H=temp2;\n\t \t\t \n\t \t\t newBody.ID=ID;\n\t \t\t newBody.name=name;\n\t \t\t newBody.setType();\n\t \t\t runnerMain.bodies.add(newBody);\n\t \t\t System.out.println(\"e:\"+newBody.eccentricity+\" ID:\"+ID+\" name: \"+name+\" LongAsnNd: \"+newBody.LongAscenNode+\" Peri: \"+newBody.ArgPeriapsis+\" MeanAn0: \"+newBody.meanAnomaly0);\n\t\t }", "private void AnalyzeByLine(String str, int lineNum){\n int prev = 0;\n int cur = 0;\n char[] specialCh={' ', '*', '/', '+', '-', '=', '!', '<', '>', '.', ',', '[', ']', '(', ')', '{', '}', ';'};\n boolean isSpecial = false;\n String tmp = \"\";\n\n while (cur < str.length()){\n\n // check the current char is a special char or not\n for (char x : specialCh) {\n if (x == str.charAt(cur)) {\n isSpecial = true;\n break;\n }\n else{\n isSpecial = false;\n }\n }\n\n if(isSpecial) {\n // every time encounter a special char, handle the token before it\n tmp = str.substring(prev, cur);\n switch (tmp){\n case \"\":\n break;\n case \"then\":\n arrL.add(new Token(tmp, 41, lineNum));\n break;\n case \"do\":\n arrL.add(new Token(tmp, 42, lineNum));\n break;\n case \"od\":\n arrL.add(new Token(tmp, 81, lineNum));\n break;\n case \"fi\":\n arrL.add(new Token(tmp, 82, lineNum));\n break;\n case \"else\":\n arrL.add(new Token(tmp, 90, lineNum));\n break;\n case \"let\":\n arrL.add(new Token(tmp, 100, lineNum));\n break;\n case \"call\":\n arrL.add(new Token(tmp, 101, lineNum));\n break;\n case \"if\":\n arrL.add(new Token(tmp, 102, lineNum));\n break;\n case \"while\":\n arrL.add(new Token(tmp, 103, lineNum));\n break;\n case \"return\":\n arrL.add(new Token(tmp, 104, lineNum));\n break;\n case \"var\":\n arrL.add(new Token(tmp, 110, lineNum));\n break;\n case \"array\":\n arrL.add(new Token(tmp, 111, lineNum));\n break;\n case \"function\":\n arrL.add(new Token(tmp, 112, lineNum));\n break;\n case \"procedure\":\n arrL.add(new Token(tmp, 113, lineNum));\n break;\n case \"main\":\n arrL.add(new Token(tmp, 200, lineNum));\n break;\n case \"InputNum\":\n case \"OutputNum\":\n case \"OutputNewLine\":\n arrL.add(new Token(tmp, 61, lineNum));\n break;\n default:\n AnalyzeIdentNum(tmp, lineNum);\n }\n\n // consider binary operator first\n if(str.charAt(cur) == '<' || str.charAt(cur) == '>' || str.charAt(cur) == '!'){\n switch(str.charAt(cur)){\n case '<':\n if(str.charAt(cur+1) == '='){\n arrL.add(new Token(\"<=\", 24, lineNum));\n cur++;\n }\n else if(str.charAt(cur+1) == '-'){\n arrL.add(new Token(\"<-\", 40, lineNum));\n cur++;\n }\n else{\n arrL.add(new Token(\"<\", 22, lineNum));\n }\n break;\n case '>':\n if(str.charAt(cur+1) == '='){\n arrL.add(new Token(\">=\", 23, lineNum));\n cur++;\n }\n else{\n arrL.add(new Token(\">\", 25, lineNum));\n }\n break;\n case '!':\n arrL.add(new Token(\"!=\", 21, lineNum));\n cur++;\n break;\n }\n }\n else{\n // consider unary operator\n switch(str.charAt(cur)){\n case '*':\n arrL.add(new Token(\"*\", 1, lineNum));\n break;\n case '/':\n arrL.add(new Token(\"/\", 2, lineNum));\n break;\n case '+':\n arrL.add(new Token(\"+\", 11, lineNum));\n break;\n case '-':\n arrL.add(new Token(\"-\", 12, lineNum));\n break;\n case '.':\n arrL.add(new Token(\".\", 30, lineNum));\n break;\n case ',':\n arrL.add(new Token(\",\", 31, lineNum));\n break;\n case '[':\n arrL.add(new Token(\"[\", 32, lineNum));\n break;\n case ']':\n arrL.add(new Token(\"]\", 34, lineNum));\n break;\n case ')':\n arrL.add(new Token(\")\", 35, lineNum));\n break;\n case '(':\n arrL.add(new Token(\"(\", 50, lineNum));\n break;\n case ';':\n arrL.add(new Token(\";\", 70, lineNum));\n break;\n case '}':\n arrL.add(new Token(\"}\", 80, lineNum));\n break;\n case '{':\n arrL.add(new Token(\"{\", 150, lineNum));\n break;\n }\n }\n prev = cur + 1;\n }\n cur++;\n }\n }", "public GetParse(String line){\r\n\r\n Inline = line;\r\n this.parseWord(line);\r\n }", "public void parseLine(String line, ParseState parseState) {\n String[] lineElements = line.split(\"\\\\s\");\n if (lineElements.length != 3 || !(\"{\".equals(lineElements[2]))) {\n throw new IllegalArgumentException(\"Bad attribute definition\");\n }\n String attrName = lineElements[0];\n String attrType = lineElements[1];\n Attributes attrs = container.getSubgraphAttrs();\n attrs.defineAttribute(attrName, attrType);\n\n // parse the block with attribute value\n NST attrDataNST = attrs.getAttrDataNST(attrName);\n AttributeValueLineParser attributeValueLineParser = new AttributeValueLineParser(attrDataNST);\n PopulateDB.parseBlock(parseState, attributeValueLineParser);\n }", "private static Process createProcessFromInput(String inputLine){\n int resA, resB, resC, neededA, neededB, neededC;\n\n inputLine = inputLine.replaceAll(\"\\\\[|\\\\]\", \"\"); //remove brackets\n String[] resourceInfo = inputLine.split(\" \");\n\n resA = Integer.parseInt(resourceInfo[0]);\n resB = Integer.parseInt(resourceInfo[1]);\n resC = Integer.parseInt(resourceInfo[2]);\n neededA = Integer.parseInt(resourceInfo[3]);\n neededB = Integer.parseInt(resourceInfo[4]);\n neededC = Integer.parseInt(resourceInfo[5]);\n\n int[] processInfo = {resA, resB,resC, neededA,neededB,neededC};\n return new Process(processInfo);\n }", "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}", "@Override\n public boolean processLine(String line) throws IOException {\n if (line == null || line.length() == 0) return true;\n String[] values = line.split(\"\\t\");\n // If there is an entry which is improperly sized, there is a problem so bail\n if (values.length != segment.getOutputParameters().size()) return false;\n ParameterMap.Builder builder = new ParameterMap.Builder();\n for (int i=0; i<parameters.size();i++)\n {\n builder.with(parameters.get(i), values[i]);\n }\n entries.add(builder.build());\n return true;\n }", "private void parseOrigin(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 3) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid origin arguments\");\n\t\t}\n\t\tdouble x = Double.parseDouble(tokens[1]);\n\t\tdouble y = Double.parseDouble(tokens[2]);\n\t\tthis.setOrigin(x, y);\n\t}", "@Override\n public long resultPart1() throws Exception {\n Scanner sc = inputScanner();\n \n int valid = 0;\n\n while(sc.hasNextLine()) {\n StringBuilder line = new StringBuilder(sc.nextLine());\n \n int min = Integer.parseInt(line.substring(0, line.indexOf(\"-\")));\n int max = Integer.parseInt(line.substring(line.indexOf(\"-\") + 1, line.indexOf(\" \")));\n line.delete(0, line.indexOf(\" \") + 1);\n\n char c = line.charAt(0);\n line.delete(0, line.indexOf(\" \") + 1);\n \n int count = 0;\n for(int i=0; i<line.length(); i++) {\n if(line.charAt(i) == c) count++;\n }\n\n if(count >= min && count <= max) valid++;\n }\n\n return valid;\n }", "private static String[] checkInput(String input) throws Exception{\n String[] in = input.trim().split(\" \");\n\n if(in.length == 0){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(CommandEnum.getCommandEnumFrom(in[0]) == null){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(isSpecificCommandENum(in[0],BYE)){\n return in;\n }\n if(isSpecificCommandENum(in[0],TERMINATE)){\n return in;\n }\n\n if(in.length < MIN_PARAM){\n throw new CommandException(ExceptionEnum.LESS_INPUT_EXCEPTION);\n }\n\n if(in.length > MAX_PARAM){\n throw new CommandException(ExceptionEnum.EXTRA_INPUT_EXCEPTION);\n }\n\n //check input value\n for(int i = 1; i < in.length; i++){\n try{\n Integer.parseInt(in[i]);\n }catch(NumberFormatException e){\n throw new CommandException(ExceptionEnum.INVALID_INPUT_EXCEPTION);\n }\n }\n\n return in;\n }", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "private boolean parseLine(String line, boolean shouldAddTime) {\n\n\t\tif (shouldAddTime) {\n\t\t\tmTime++;\n\t\t}\n\n\t\tline = line.replaceAll(\"\\\\s\", \"\");\n\n\t\tif (line.contains(\";\")) {\n\t\t\tString[] opArray = line.split(\";\");\n\n\t\t\tfor (String op : opArray) {\n\t\t\t\tparseLine(op, false);\n\t\t\t}\n\t\t\t\n\t\t} else if (line.startsWith(\"begin(\")) {\n\t\t\tManager.begin(findTID(line), mTime, false);\n\t\t\t\n\t\t} else if (line.startsWith(\"beginRO(\")) {\n\t\t\tManager.begin(findTID(line), mTime, true);\n\t\t\t\n\t\t} else if (line.contains(\"R(\")) {\n\t\t\tcallRead(line);\n\t\t\t\n\t\t} else if (line.contains(\"W(\")) {\n\t\t\tcallWrite(line);\n\t\t\t\n\t\t} else if (line.startsWith(\"end(\")) {\n\t\t\tManager.end(Manager.getTransactionList().get(findTID(line)), true);\n\t\t\t\n\t\t} else if (line.contains(\"fail(\")) {\n\t\t\tManager.fail(findSiteID(line));\n\t\t\t\n\t\t} else if (line.contains(\"recover(\")) {\n\t\t\tManager.recover(findSiteID(line));\n\t\t\t\n\t\t} else if (line.startsWith(\"dump()\")) {\n\t\t\tManager.dump();\n\t\t\t\n\t\t} else if (line.startsWith(\"dump(x\")) {\n\t\t\tManager.dumpVariable(findXID(line));\n\t\t\t\n\t\t} else if (line.startsWith(\"dump(\")) {\n\t\t\tSite[] sites = Manager.getSites();\n\t\t\tsites[findSiteID(line) - 1].printSite();\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public void parse(Scanner S) {\n if (!S.expectedToken(Core.INPUT)) {\n Utility.expectedhelper(Core.INPUT, S.currentToken());\n System.exit(-1);\n }\n if (S.currentToken() == Core.ID) {\n id = S.getID();\n S.nextToken();\n } else {\n Utility.expectedhelper(Core.ID, S.currentToken());\n System.exit(-1);\n }\n if (!S.expectedToken(Core.SEMICOLON)) {\n Utility.expectedhelper(Core.SEMICOLON, S.currentToken());\n System.exit(-1);\n }\n }", "private void processLine(String line) throws NoSystemException {\n line = line.trim();\n if (line == null || line.length() == 0 || line.startsWith(\"//\")\n || line.startsWith(\"--\"))\n return;\n\n if (fStepMode) {\n Log.println(\"[step mode: `return' continues, \"\n + \"`escape' followed by `return' exits step mode.]\");\n try {\n int c = System.in.read();\n if (c == 0x1b)\n fStepMode = false;\n } catch (IOException ex) { }\n }\n\n if (line.startsWith(\"help\") || line.endsWith(\"--help\"))\n cmdHelp(line);\n else if (line.equals(\"q\") || line.equals(\"quit\") || line.equals(\"exit\"))\n cmdExit();\n else if (line.startsWith(\"??\"))\n cmdQuery(line.substring(2).trim(), true);\n else if (line.startsWith(\"?\"))\n cmdQuery(line.substring(1).trim(), false);\n else if (line.startsWith(\":\"))\n cmdDeriveStaticType(line.substring(1).trim());\n else if (line.startsWith(\"!!\"))\n \tcmdExec(line.substring(2).trim(), true);\n else if (line.startsWith(\"!\"))\n \tcmdExec(line.substring(1).trim(), false);\n else if (line.equals(\"\\\\\"))\n cmdMultiLine();\n else if (line.equals(\"check\") || line.startsWith(\"check \"))\n cmdCheck(line);\n else if (line.equals(\"genvcg\"))\n cmdGenVCG(null);\n else if (line.startsWith(\"genvcg \"))\n cmdGenVCG(line.substring(7));\n else if (line.equals(\"genmm\"))\n cmdGenMM(null);\n else if (line.startsWith(\"genmm \"))\n cmdGenMM(line.substring(6));\n else if (line.equals(\"genmonitor\"))\n cmdGenMonitor();\n else if (line.startsWith(\"info \"))\n cmdInfo(line.substring(5));\n else if (line.equals(\"net\"))\n cmdNet();\n else if (line.startsWith(\"open \"))\n cmdOpen(line.substring(5));\n else if (line.startsWith(\"reopen\"))\n \tcmdReOpen(line.substring(6));\n else if (line.startsWith(\"read \"))\n cmdRead(line.substring(5), true);\n else if (line.startsWith(\"readq \"))\n cmdRead(line.substring(6), false);\n else if (line.equals(\"reset\"))\n cmdReset();\n else if (line.equals(\"step on\"))\n cmdStepOn();\n else if (line.equals(\"undo\"))\n cmdUndo();\n else if (line.equals(\"redo\"))\n cmdRedo();\n else if (line.equals(\"write\"))\n cmdWrite(null);\n else if (line.startsWith(\"write \"))\n cmdWrite(line.substring(6));\n else if (line.startsWith(\"load -q \"))\n cmdGenLoadInvariants(line.substring(8), system(), false);\n else if (line.startsWith(\"gen loaded\"))\n cmdGenPrintLoadedInvariants(system());\n else if (line.startsWith(\"gen load\"))\n cmdGenLoadInvariants(line.substring(8), system(), true);\n else if (line.startsWith(\"gen unload\") || line.equals(\"unload\"))\n cmdGenUnloadInvariants(line.substring(10), system());\n else if (line.startsWith(\"gen start\") || line.equals(\"gen start\"))\n cmdGenStartProcedure(line.substring(9), system());\n else if (line.startsWith(\"gen flags\") || line.equals(\"gen flags\"))\n cmdGenInvariantFlags(line.substring(9), system());\n else if (line.startsWith(\"gen result\") || line.equals(\"gen result\"))\n cmdGenResult(line.substring(10), system());\n else if (line.startsWith(\"reload extensions\"))\n \tcmdReloadExtensions();\n else if (line.startsWith(\"coverage\"))\n \tcmdCoverage();\n\t\telse if (line.startsWith(\"plugins\") || line.equals(\"plugins\"))\n\t\t\tcmdShowPlugins();\n\t\telse if (Options.doPLUGIN) {\n\t\t\tSet<Entry<Map<String, String>, PluginShellCmdProxy>> cmdEntrySet = this.pluginCommands.entrySet();\n\t\t\tboolean cmdFound = false;\n\t\t\t\n\t\t\tfor (Entry<Map<String, String>, PluginShellCmdProxy> currentCmdMapEntry : cmdEntrySet) {\n\t\t\t\tMap<String, String> currentCmdDescMap = currentCmdMapEntry.getKey();\n\n\t\t\t\tif (line.startsWith(currentCmdDescMap.get(\"cmd\"))\n\t\t\t\t\t\t|| line.equals(currentCmdDescMap.get(\"cmd\"))) {\n\t\t\t\t\tIPluginShellCmd currentCmd = currentCmdMapEntry.getValue();\n\t\t\t\t\tcurrentCmd.executeCmd(currentCmdDescMap.get(\"cmd\"), \n\t\t\t\t\t\t\tline.substring(currentCmdDescMap.get(\"cmd\").length()));\n\t\t\t\t\tcmdFound = true;\n\t\t\t\t\tbreak;\n }\n\t\t\t}\n\n\t\t\tif (!cmdFound)\n\t\t\t\tLog.error(\"Unknown command `\" + line + \"'. Try `help'.\");\n\t\t} else\n\t\t\tLog.error(\"Unknown command `\" + line + \"'. Try `help'.\");\n\t}", "public abstract boolean passes(String line);", "public String[] parseLine() throws IOException, FHIRException {\n\t\tList<String> res = new ArrayList<String>();\n\t\tStringBuilder b = new StringBuilder();\n\t\tboolean inQuote = false;\n\n\t\twhile (more() && !finished(inQuote, res.size())) {\n\t\t\tchar c = peek();\n\t\t\tnext();\n\t\t\tif (c == '\"' && doingQuotes) {\n\t\t\t\tif (ready() && peek() == '\"') {\n\t b.append(c);\n next();\n\t\t\t\t} else {\n\t\t\t inQuote = !inQuote;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!inQuote && c == delimiter ) {\n\t\t\t\tres.add(b.toString().trim());\n\t\t\t\tb = new StringBuilder();\n\t\t\t}\n\t\t\telse \n\t\t\t\tb.append(c);\n\t\t}\n\t\tres.add(b.toString().trim());\n\t\twhile (ready() && (peek() == '\\r' || peek() == '\\n')) {\n\t\t\tnext();\n\t\t}\n\t\t\n\t\tString[] r = new String[] {};\n\t\tr = res.toArray(r);\n\t\treturn r;\n\t}", "private void parseAngle(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 2) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid angle argument\");\n\t\t}\n\t\tthis.setAngle(Double.parseDouble(tokens[1]));\n\t}", "private String handleLine(String line) {\n if (line == null)\n throw new WrongCommentFormatException(\"\\nNULL line was found\");\n\n // bracketsState shows if the line already begins as a comment (for multiple line comments)\n int bracketsState = isLongComment ? 1 : 0;\n\n // if not a long comment and no long comment open separator found, check if there is any single line comment\n if (!isLongComment && !line.contains(Character.toString(AssemblyConstants.LONG_COMMENT_OPEN))) {\n // if there is a single line comment as well, it must be removed. Remove whitespaces afterwards\n if (!line.contains(Character.toString(AssemblyConstants.LONG_COMMENT_CLOSE)))\n return removeWhitespace(line.contains(Character.toString(AssemblyConstants.SINGLE_LINE_COMMENT))\n ? line.substring(0, line.indexOf(AssemblyConstants.SINGLE_LINE_COMMENT))\n : line);\n else\n return handleMixedLine(line, bracketsState);\n }\n\n // if a long comment and no long comment close separator found, return null (the whole line is a comment)\n if (isLongComment && !line.contains(Character.toString(AssemblyConstants.LONG_COMMENT_CLOSE)))\n return null;\n\n // handle special mixed lines with multiple comments possible\n return handleMixedLine(line, bracketsState);\n }", "private void tokenize() {\n\t\t//Checks char-by-char\n\t\tcharLoop:\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\t//Check if there's a new line\n\t\t\tif (input.charAt(i) == '\\n') {\n\t\t\t\ttokens.add(LINE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Iterate through the tokens and find if any matches\n\t\t\tfor (Token st : Token.values()) {\n\t\t\t\t//Do not test for these because they have separate cases below\n\t\t\t\tif (st.equals(NUMBER) || st.equals(VARIABLE_NAME) || st.equals(STRING) || st.equals(LINE)) continue;\n\t\t\t\t//Skip whitespace & newlines\n\t\t\t\tif (Character.isWhitespace(input.charAt(i))) continue;\n\t\t\t\t\n\t\t\t\t//Checks for multi-character identifiers\n\t\t\t\ttry {\n\t\t\t\t\tif (input.substring(i, i + st.getValue().length()).equals(st.getValue())) {\n\t\t\t\t\t\ttokens.add(st);\n\t\t\t\t\t\ti += st.getValue().length()-1;\n\t\t\t\t\t\tcontinue charLoop;\n\t\t\t\t\t}\n\t\t\t\t} catch(StringIndexOutOfBoundsException e) {}\n\t\t\t\t//Ignore this exception because the identifiers might be larger than the input string.\n\t\t\t\t\n\t\t\t\t//Checks for mono-character identifiers\n\t\t\t\tif (st.isOneChar() && input.charAt(i) == st.getValue().toCharArray()[0]) {\n\t\t\t\t\ttokens.add(st);\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a string\n\t\t\tif (input.charAt(i) == '\"') {\n\t\t\t\ti++;\n\t\t\t\tif (i >= input.length()) break;\n\t\t\t\tStringBuilder string = new StringBuilder();\n\t\t\t\twhile (input.charAt(i) != '\"') {\n\t\t\t\t\tstring.append(input.charAt(i));\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tstring.insert(0, \"\\\"\");\n\t\t\t\tstring.append(\"\\\"\");\n\t\t\t\ttokens.add(STRING);\n\t\t\t\tmetadata.put(tokens.size()-1, string.toString());\n\t\t\t\tcontinue charLoop;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a number\n\t\t\tif (Character.isDigit(input.charAt(i))) {\n\t\t\t\tStringBuilder digits = new StringBuilder();\n\t\t\t\twhile (Character.isDigit(input.charAt(i)) || input.charAt(i) == '.') {\n\t\t\t\t\tdigits.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (digits.length() != 0) {\n\t\t\t\t\ttokens.add(NUMBER);\n\t\t\t\t\tmetadata.put(tokens.size()-1, digits.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a variable reference/creation\n\t\t\tif (Character.isAlphabetic(input.charAt(i)) && !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\tStringBuilder varName = new StringBuilder();\n\t\t\t\twhile ( ( Character.isAlphabetic(input.charAt(i)) || Character.isDigit(input.charAt(i)) )\n\t\t\t\t\t\t&& !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\t\tvarName.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (varName.length() != 0) {\n\t\t\t\t\ttokens.add(VARIABLE_NAME);\n\t\t\t\t\tmetadata.put(tokens.size()-1, varName.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (line.isEmpty()) {\n continue;\n }\n // System.out.println(line);\n String cmd = line.split(\" \")[0];\n String lineWithoutCmd = line.replaceFirst(cmd, \"\").trim();\n // System.out.println(lineWithoutCmd);\n\n // The fields following each command\n String[] fields;\n\n switch (cmd) {\n case (\"add\"):\n fields = lineWithoutCmd.split(\"<SEP>\");\n fields[0] = fields[0].trim();\n fields[1] = fields[1].trim();\n fields[2] = fields[2].trim();\n add(fields);\n break;\n case (\"delete\"):\n\n fields = split(lineWithoutCmd);\n delete(fields[0], fields[1]);\n break;\n case (\"print\"):\n if (lineWithoutCmd.equals(\"ratings\")) {\n printRatings();\n break;\n }\n fields = split(lineWithoutCmd);\n\n print(fields[0], fields[1]);\n\n break;\n case (\"list\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n list(fields[0], fields[1]);\n break;\n case (\"similar\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n similar(fields[0], fields[1]);\n break;\n default:\n break;\n }\n\n }\n\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void parseLine(String line, ParseState parseState) {\n String[] lineElements = line.split(\"\\\\s\");\n if (lineElements.length != 4 || !(\"{\".equals(lineElements[3]))) {\n throw new IllegalArgumentException(\"Bad attribute definition\");\n }\n boolean isObjectAttr = (\"O\".equals(lineElements[0]));\n String attrName = lineElements[1];\n String attrType = lineElements[2];\n Attributes attrs = (isObjectAttr ? DB.getObjectAttrs() : DB.getLinkAttrs());\n attrs.defineAttribute(attrName, attrType);\n\n // parse the block with attribute value\n NST attrDataNST = attrs.getAttrDataNST(attrName);\n AttributeValueLineParser attributeValueLineParser = new AttributeValueLineParser(attrDataNST);\n PopulateDB.parseBlock(parseState, attributeValueLineParser);\n }", "public void parseHeader(String line) throws BugTrap {\n\t\t\n\t\tLineTokenizer tokenizer = new LineTokenizer(line);\n\t\t\n\t\tif (tokenizer.isAccessModifier())\n\t\t\taccess = tokenizer.parseAccessModifier();\n\n\t\tif (!tokenizer.isKeyword(StartKeyword)) throw new BugTrap(this, StartKeyword + \": Keyword missing\");\n\t\ttokenizer.parseKeyword(StartKeyword);\n\n\t\tif (!tokenizer.isName()) throw new BugTrap(this, \"name missing\");\n\t\tname = tokenizer.parseName();\n\n\t\tif (!tokenizer.isParameters()) throw new BugTrap(this, \"missing or bad parameter list\");\n\t\tparametersList = tokenizer.parseParameters();\n\n\t\tif (Debug) IOUtils.println(getClass().getSimpleName() + \" \" + name + \" parsed header: \" + line);\n\t}", "private static void parseInput(BufferedReader reader) {\n\t\tString line = \"\";\n\t\tField f;\n\t\ttry {\n\t\t\tline = reader.readLine();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\twhile (line != null) {\n\t\t\tf = Field.parse(line);\n\t\t\tif (dimension < f.getCoords().getX()) {\n\t\t\t\tdimension = f.getCoords().getX();\n\t\t\t}\n\t\t\tmap.put(f.getCoords(), f);\n\t\t\ttry {\n\t\t\t\tline = reader.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\n\t}", "long parse(Consumer<Line> lineConsumer, Consumer<JSaParException> errorConsumer) throws IOException;", "public static String readLine()\n\t{\n\t\tif (bJunit == true)\n\t\t{\n\t\t\tsLastLine = sJunitInput;\n\t\t\twriteLine(\"JUnit INPUT: \" + sJunitInput);\n\t\t\treturn sLastLine;\n\t\t}\n\t\n\t\ttry {\n\t\t\tsLastLine = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading from STDIN\");\n\t\t}\n\t\t\n\t\treturn sLastLine;\n\t\t\n\t}", "private void checkEmptyLine(String line) {\n if (line.substring(5).replace('\\t', ' ')\n .replace('\\n', ' ').trim().length() != 0) {\n throw new IllegalArgumentException(\"Invalid characters after tag.\");\n }\n }", "public void readLine(String line){\n\t\tfields = line.split(\"\\\\s*,\\\\s*\");\n\t\tDate key = parseDate(fields[0]);\n\t\tif(key != null){\n\t\t\tDouble val = parseAverage(fields[6]);\t\t\n\t\t\tdja.put(key, val);\n\t\t}\n\t}", "public void parseLine(String line, ParseState parseState) {\n String[] lineElements = line.split(\"\\\\s\");\n if (lineElements.length != 2 || !(\"{\".equals(lineElements[1]))) {\n throw new IllegalArgumentException(\"Bad container definition\");\n }\n String containerName = lineElements[0];\n Container newContainer = DB.getRootContainer().createChild(containerName);\n\n // parse the block - contains either attribute or subgraph blocks\n ContainerContentsLineParser contentsLineParser = new ContainerContentsLineParser(newContainer);\n PopulateDB.parseBlock(parseState, contentsLineParser);\n }", "private static boolean validLine(String[] splitLine) {\n\t\tif (splitLine.length < 1) {\n\t\t\tSystem.out.println(\"Not enough arguments on the transaction line, continuing to next line\");\n\t\t\treturn false;\n\t\t}\n\t\tString op = splitLine[0];\n\t\tif (!validOperation(op)) {\n\t\t\tSystem.out.println(op + \" is not a valid operation\");\n\t\t\treturn false;\n\t\t}\n\t\tif (op.equalsIgnoreCase(\"insert\")) {\n\t\t\tif (!validInsert(splitLine)) {\n\t\t\t\tSystem.out.println(\"Invalid insert operation, continuing to next line\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (op.equalsIgnoreCase(\"delete\") || op.equals(\"search\")) {\n\t\t\tif (!validSearchOrDelete(splitLine)) {\n\t\t\t\tSystem.out.println(\"Invalid \" + op + \" operation, continuing to next line\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (op.equalsIgnoreCase(\"update\")) {\n\t\t\tif (!validUpdate(splitLine)) {\n\t\t\t\tSystem.out.println(\"Invalid update operation, continuing to next line\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (op.equalsIgnoreCase(\"print\")) {\n\t\t\tif (!validPrint(splitLine)) {\n\t\t\t\tSystem.out.println(\"Invalid print operation, continuing to next line\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true; // passed all the tests\n\t}", "public void processInput(File theFile){\n\t\t//the list of input strings\n\t\tArrayList<String> theInputString=new ArrayList<String>();\n\t\t//the list of test results, could be {null,\"f\",\"a\"}\n\t\tArrayList<String> theTestResults=new ArrayList<String>();\n\n\t\ttry {\n\t\t\t// read input file containing machine description\n\t\t\tFileInputStream inStream = new FileInputStream(theFile);\n\t\t\tBufferedReader theReader = new BufferedReader(new InputStreamReader(inStream));\n\t\t\twhile (theReader.ready()) {\n\t\t\t\tString curLine=theReader.readLine();//read the line, trimming whitespace at beginning and end\n\t\t\t\tif(curLine.startsWith(\"#\")); //skip comments\n\t\t\t\telse if(curLine.isEmpty()){\n\t\t\t\t\ttheTestResults.add(\"\");\n\t\t\t\t\ttheInputString.add(\"\");\n\t\t\t\t\t//System.out.println(\"Adding input: [null string]\");\n\t\t\t\t//process the test result specifier\n\t\t\t\t}else{\n\t\t\t\t\tif(curLine.endsWith(\"#f\")){\n\t\t\t\t\t\ttheTestResults.add(\"f\");\n\t\t\t\t\t\tcurLine=curLine.split(\"\\\\#\")[0];\n\t\t\t\t\t}else if(curLine.endsWith(\"#a\")){\n\t\t\t\t\t\ttheTestResults.add(\"a\");\n\t\t\t\t\t\tcurLine=curLine.split(\"\\\\#\")[0];\n\t\t\t\t\t}else\n\t\t\t\t\t\ttheTestResults.add(\"\");\n\n\t\t\t\t\t//add the input string to the list of input strings\n\t\t\t\t\t//System.out.println(\"Adding input: \"+curLine);\n\t\t\t\t\ttheInputString.add(curLine);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// close the file readers\n\t\t\tinStream.close();\n\t\t\ttheReader.close();\n\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Input file not found.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Cannot open input file.\");\n\t\t}\n\n\t\t//process the input strings\n\t\tint curIdx=0;\n\t\tfor(String s:theInputString){\n\t\t\tif(canHandleString(s)){\n\t\t\t\tSystem.out.println(\"[accept]\");\n\t\t\t\tboolean b = checkVaildity(s,true,theTestResults.get(curIdx));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"[reject]\");\n\t\t\t}\n\t\t\tcurIdx++;\n\t\t}\n\t\t\n\t}", "private void processLine(String line1) {\n StringTokenizer tVal = new StringTokenizer(line1);\n int yearOf = Integer.parseInt((tVal.nextToken()));\n List chosenYear = yearOf == 2014 ? employeeSalary_2014:\n employeeSalary_2015;\n String employeeTypeE = tVal.nextToken();\n String employeeName = tVal.nextToken();\n Integer employeeMonthlySalary =\n Integer.parseInt(tVal.nextToken());\n Employee newEmployee = null;\n if (employeeTypeE.equals(\"Salesman\")) {\n Integer salesmanCommission=\n Integer.parseInt(tVal.nextToken());\n\n newEmployee = new Salesman(employeeName, employeeMonthlySalary, salesmanCommission);\n\n }\n else if (employeeTypeE.equals(\"Executive\")) {\n Integer stockPrice= Integer.parseInt(tVal.nextToken());\n newEmployee = new Executive(employeeName, employeeMonthlySalary, stockPrice);\n }\n else {\n newEmployee = new Employee(employeeName, employeeMonthlySalary);\n }\n chosenYear.add(newEmployee);\n }", "public boolean parse(String input) {\n\t\tif (input.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString[] sp = input.split(\" \");\n\t\tthis.command = sp[0];\n\t\tif (sp.length > 1) {\n\t\t\tthis.arguments = Arrays.copyOfRange(sp, 1, sp.length);\n\t\t}\n\t\treturn true;\n\t}", "public void parseInput(String userInput) {\n this.userIn = userInput;\n\n this.identifier = userIn.split(\" \")[0];\n\n switch (identifier) {\n case \"done\":\n completeTask();\n return;\n\n case \"list\":\n listAllTasks();\n return;\n\n case \"todo\":\n addToDo();\n return;\n\n case \"event\":\n addEvent();\n return;\n\n case \"deadline\":\n addDeadline();\n return;\n\n case \"delete\":\n deleteTask();\n return;\n\n case \"find\":\n findTask();\n return;\n\n default:\n ui.showListOfCommands();\n }\n }", "public int parse(String inputString) {\n manager.init();\n\n Map<String, List<String>> commandMap = new HashMap<>();\n List<String> blocks = Arrays.asList(inputString.split(\" \"));\n commandMap.put(blocks.get(0), blocks.size() > 1 ? blocks.subList(1, blocks.size()) : Collections.EMPTY_LIST);\n\n // item properties\n if (commandMap.containsKey(\"ip\")) {\n List<String> params = commandMap.get(\"ip\");\n if (params.size() > 0) {\n // set item properties\n manager.setItemParams(params);\n manager.prettyPrint(\"Successfully set Item Properties to: \" + params);\n } else {\n // get item properties\n manager.printItemParams();\n }\n }\n\n // channel properties\n if (commandMap.containsKey(\"cp\")) {\n List<String> params = commandMap.get(\"fp\");\n if (params.size() > 0) {\n // set channel properties\n manager.setChannelParams(params);\n manager.prettyPrint(\"Successfully set Channel Properties to: \" + params);\n } else {\n // get channel properties\n manager.printChannelParams();\n }\n }\n\n // rss\n if (commandMap.containsKey(\"rss\")) {\n List<String> params = commandMap.get(\"rss\");\n if (params.size() > 0) {\n switch (params.get(0)) {\n case \"add\": {\n if (params.size() != 3) {\n throw new IllegalArgumentException(\"Not enough params for -rss add\");\n }\n String rssLink = params.get(1);\n String file = params.get(2);\n manager.createFileIfNotExists(file);\n manager.associateRssToFile(rssLink, file);\n manager.prettyPrint(\n \"Successfully added new RSS Feed: \" + rssLink,\n \"Associated file is: \" + file\n );\n break;\n }\n case \"del\": {\n if (params.size() != 2) {\n throw new IllegalArgumentException(\"Not enough params for -rss del\");\n }\n String rssLink = params.get(1);\n manager.diassociateRss(rssLink);\n manager.prettyPrint(\"Successfully removed new RSS Feed: \" + rssLink);\n break;\n }\n case \"on\": {\n if (params.size() != 2) {\n throw new IllegalArgumentException(\"Not enough params for -rss on\");\n }\n String rssLink = params.get(1);\n manager.turnRSSOn(rssLink);\n manager.prettyPrint(\"Successfully turned RSS Feed \" + rssLink + \" on\");\n break;\n }\n case \"off\": {\n if (params.size() != 2) {\n throw new IllegalArgumentException(\"Not enough params for -rss off\");\n }\n String rssLink = params.get(1);\n manager.turnRSSOff(rssLink);\n manager.prettyPrint(\"Successfully turned RSS Feed \" + rssLink + \" off\");\n break;\n }\n }\n } else {\n manager.printRss();\n }\n } else if (commandMap.containsKey(\"time\")) {\n List<String> params = commandMap.get(\"time\");\n if (params.size() > 0) {\n if (params.size() != 1) {\n throw new IllegalArgumentException(\"Not enough params for -time\");\n }\n String newTimeToPoll = params.get(0);\n manager.setTimeToPoll(Long.valueOf(newTimeToPoll));\n manager.prettyPrint(\"Successfully set polling time to \" + newTimeToPoll);\n\n } else {\n manager.printTimeToPoll();\n }\n } else if (commandMap.containsKey(\"h\")) {\n manager.printHelp();\n } else if (commandMap.containsKey(\"exit\")) {\n return 1;\n }\n return 0;\n }", "void executeLine(String line){\n\t\tString[] input = digest(line);\n\t\tif(input.length == 0) return;\n\n\t\tswitch (input[0]) {\n\t\t\tcase LOCATION:\n\t\t\t\tcatalog.addVan(input[1], input[2], input[3].equals(AUTOMATIC));\t\t\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase REQUEST:\n\t\t\tcase CHANGE:\n\n\t\t\t\tCalendar start, end;\n\t\t\t\ttry{\n\t\t\t\t\tstart = stringsToCalendar(input[2], input[3], input[4]);\n\t\t\t\t\tend = stringsToCalendar(input[5], input[6], input[7]);\n\t\t\t\t}\n\t\t\t\tcatch(ParseException e){\n\t\t\t\t\tSystem.err.println(String.format(\"Cannot parse date string, skipping...\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tInterval interval = new Interval(start, end);\n\t\t\t\t\n\t\t\t\tint auto, manual;\n\t\t\t\tint tmpa = Integer.parseInt(input[8]);\n\t\t\t\tint tmpb = input.length == 12 ? Integer.parseInt(input[10]) : 0;\n\t\t\t\tif(input[9].equals(AUTOMATIC)){\n\t\t\t\t\tauto = tmpa;\n\t\t\t\t\tmanual = tmpb;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tauto = tmpb;\n\t\t\t\t\tmanual = tmpa;\n\t\t\t\t}\n\n\t\t\t\tif(input[0].equals(REQUEST)){\n\t\t\t\t\tSystem.out.print(\"Booking \" + catalog.makeOrder(input[1], interval, auto, manual) + \"\\n\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(\"Change \" + catalog.changeOrder(input[1], interval, auto, manual) + \"\\n\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CANCEL:\n\t\t\t\tSystem.out.print(\"Cancel \" + catalog.cancelOrder(input[1]) + \"\\n\");\n\t\t\t\tbreak;\n\n\t\t\tcase PRINT:\n\t\t\t\tSystem.out.print(catalog.print(input[1]));\n\t\t\t\tbreak;\n\t\t}\n\t}", "void handleBadRecordFormat(String line);", "@Override\n public long resultPart2() throws Exception {\n Scanner sc = inputScanner();\n\n int valid = 0;\n\n while(sc.hasNextLine()) {\n StringBuilder line = new StringBuilder(sc.nextLine());\n \n int a = Integer.parseInt(line.substring(0, line.indexOf(\"-\")));\n int b = Integer.parseInt(line.substring(line.indexOf(\"-\") + 1, line.indexOf(\" \")));\n line.delete(0, line.indexOf(\" \") + 1);\n\n char c = line.charAt(0);\n line.delete(0, line.indexOf(\" \")); // No +1 means first character is automatically '1'\n \n if(line.length() <= a) continue;\n if(line.charAt(a) == c) {\n if(line.length() <= b || line.charAt(b) != c) valid++;\n }\n else if(line.length() > b && line.charAt(b) == c) valid++;\n }\n\n return valid;\n }", "static String parse(String input, User user)\n {\n if(input.length()==0 || input==null || input.matches(\"^[ \\t]*$\"))\n return LinSim.EMPTY_STRING;\n\n // set the base command\n StringTokenizer token=new StringTokenizer(input, \" \\t\");\n String baseCommand=token.nextToken();\n\n // Let's use some introspection magic...\n try\n {\n Class<?> cmdClass=Class.forName(\"org.linsim.Command\");\n // Note that ALL commands in the Command class must be public in order to be seen by getMethod() below\n Method method=cmdClass.getMethod(baseCommand, String.class);\n Object output=method.invoke(null, input, user);\n if(!LinSim.graphicalMode)\n java.lang.System.out.print(output.toString());\n // ToDo: use setText() for GUI later\n }\n catch(Throwable e)\n {\n return baseCommand + \": command not found.\\n\";\n }\n // after the command finishes execution, return to the input loop\n return LinSim.EMPTY_STRING;\n }", "private void process (String line) {\n\t\t// TODO: remove log.\n\t\tSystem.out.println(\"Processing: \" + line);\n\t\t\n\t\t// Remove white spaces.\n line = line.replaceAll(\" \", \"\");\n \n\t\tif (line.contains(\"=\")) {\n\t\t\tprocessAssignment(line);\n\t\t} else {\n\t\t\tprocessCalculation(line);\n\t\t}\n\t}", "private int parseCharArray(char[] input,\n int offset,\n int end,\n int[] currentLineNr)\n throws XMLParseException {\n this.lineNr = currentLineNr[0];\n this.tagName = null;\n this.contents = null;\n this.attributes = new Properties();\n this.children = new Vector();\n\n try {\n offset = this.skipWhitespace(input, offset, end, currentLineNr);\n } catch (XMLParseException e) {\n return offset;\n }\n\n offset = this.skipPreamble(input, offset, end, currentLineNr);\n offset = this.scanTagName(input, offset, end, currentLineNr);\n this.lineNr = currentLineNr[0];\n offset = this.scanAttributes(input, offset, end, currentLineNr);\n int[] contentOffset = new int[1];\n int[] contentSize = new int[1];\n int contentLineNr = currentLineNr[0];\n offset = this.scanContent(input, offset, end,\n contentOffset, contentSize, currentLineNr);\n\n if (contentSize[0] > 0) {\n this.scanChildren(input, contentOffset[0], contentSize[0],\n contentLineNr);\n\n if (this.children.size() > 0) {\n this.contents = null;\n }\n else {\n this.processContents(input, contentOffset[0],\n contentSize[0], contentLineNr);\n for (int i = 0; i < contentSize[0]; i++) {\n if (input[contentOffset[0] + i] > ' ') {\n return offset;\n }\n }\n\n this.contents = null;\n }\n }\n\n return offset;\n }", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "private static boolean validate(String line){\n\t\tString[] lineArray = line.split(\" \");\n\t\t\n\t\tif(lineArray.length != 3) return false; //skip lines in incorrect format\n\t\t\n\t\t//http://stackoverflow.com/questions/25873636/regex-pattern-for-exactly-hhmmss-time-string\n\t\tif(!lineArray[0].matches(\"(?:[01]\\\\d|2[0123]):(?:[012345]\\\\d):(?:[012345]\\\\d)\")) return false;\n\n\t\tif(!lineArray[2].equals(\"Start\") && !lineArray[2].equals(\"End\")) return false;\n\t\t\n\t\treturn true;\n\t}", "@Override\n protected void validatePipeInput(TabbedLineReader inputStream) throws IOException {\n int col1idx = inputStream.findField(this.col1Name);\n int col2idx = inputStream.findField(this.col2Name);\n // Create the pair list.\n this.pairs = new GenomePairList();\n // Now read the genome ID pairs.\n log.info(\"Reading genome pairs.\");\n for (var line : inputStream) {\n String g1 = line.get(col1idx);\n String g2 = line.get(col2idx);\n this.pairs.addPair(g1, g2);\n }\n log.info(\"{} genome pairs to process.\", this.pairs.size());\n }", "@Test\r\n\tpublic void test3() throws IOException, LexerException, ParserException {\r\n\t\tStringReader ex = new StringReader(\"(lam^s f.\\n\\t(lam^s x.x) (f 1))\\n(lam^c y.\\n\\t(lam^s z.z) y)\");\r\n\r\n\t\tParser parser = new Parser();\r\n\t\tTerm result = parser.Parsing(ex);\r\n\t}", "@Override\n public void parse(String sentence) {\n String[] tmp = sentence.split(DELIM);\n if (tmp.length > 4) {\n // fits example 1\n updateTimeStamp(parseTimeToDate(tmp[5]));\n if (!\"A\".equals(tmp[6])) {\n return;\n }\n mFixLatitude = parseCoordinate(tmp[1], tmp[2]);\n mFixLongitude = parseCoordinate(tmp[3], tmp[4]);\n } else if (tmp.length > 3) {\n // fits example 2\n mFixLatitude = parseCoordinate(tmp[1], tmp[2]);\n mFixLongitude = parseCoordinate(tmp[3], tmp[4]);\n }\n }", "@Override\n protected boolean validater(String[] line) {\n if (line.length != 9) {\n errorCounter(0);\n return false;\n }\n\n changeNulls(line);\n\n if (!isAirlineValid(line[airline])) {\n errorCounter(1);\n return false;\n }\n\n if (!isAirlineIDValid(line[airlineID])) {\n errorCounter(2);\n return false;\n }\n\n if (!isAirportValid(line[sourceAirport])) {\n errorCounter(3);\n return false;\n }\n\n if (!isAirportIDValid(line[sourceAirportID])) {\n errorCounter(4);\n return false;\n }\n\n if (!isAirportValid(line[destinationAirport])) {\n errorCounter(5);\n return false;\n }\n\n if (!isAirportIDValid(line[destinationAirportID])) {\n errorCounter(6);\n return false;\n }\n\n if (!isCodeshareValid(line[codeshare])) {\n errorCounter(7);\n return false;\n }\n\n if (!isStopsValid(line[stops])) {\n errorCounter(8);\n return false;\n }\n\n if (!isEquipmentValid(line[equipment])) {\n errorCounter(9);\n return false;\n }\n\n return true;\n }", "@Test\n public void testGetLine()\n {\n System.out.println(\"getLine\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n final Token next = token.getNext();\n assertEquals(Syntax.OPEN, next.getSyntax());\n assertEquals(2, next.getLine());\n assertEquals(1, next.getPosition());\n assertEquals(\"{\", next.getValue());\n }", "@Test\n public void testCrazyCalculator() {\n CrazyCalculator calculator = new CrazyCalculator();\n List<String> lines = new ArrayList<>();\n lines.add(\"1\");\n lines.add(\"\");\n lines.add(\"+@1L\");\n lines.add(\"-+3R\");\n lines.add(\"*-2R\");\n lines.add(\"//2R\");\n lines.add(\"1@1\");\n lines.add(\"5@5+4\");\n lines.add(\"2@3-12/6/5+3\");\n lines.add(\"-1+3\");\n lines.add(\"-1--3\");\n calculator.setLines(lines);\n calculator.processLines();\n List<String> results = calculator.getResults();\n assertEquals(\"should be 5\", 5, results.size());\n assertEquals(\"should be 2\", 2, Integer.parseInt(results.get(0)));\n assertEquals(\"should be 6\", 6, Integer.parseInt(results.get(1)));\n assertEquals(\"should be 14\", 14, Integer.parseInt(results.get(2)));\n assertEquals(\"should be -4\", -4, Integer.parseInt(results.get(3)));\n assertEquals(\"should be 3\", 3, Integer.parseInt(results.get(4)));\n }", "public static void parseNewOrder(String line) throws IOException, Exception{\n\t\tString order_id, timestamp;\n\t\tString side;\n\t\tint target_size, size;\n\t\tdouble price;\n\n\t\tremove_order_matcher = remove_order_pattern.matcher(line);\n\t\tadd_order_matcher = add_order_pattern.matcher(line);\n\n if(add_order_matcher.matches()){//add order to log book\n\t\t\t//separate fields\n\t\t\ttimestamp = add_order_matcher.group(1);\n\t\t\torder_id = add_order_matcher.group(2);\n\t\t\tside = add_order_matcher.group(3);\n\t\t\tprice = Double.parseDouble(add_order_matcher.group(4));\n\t\t\tsize = Integer.parseInt(add_order_matcher.group(5));\n\n\t\t\taddOrder(timestamp,order_id,side,price,size);\n\n } else if(remove_order_matcher.matches()){\n\t\t\t//separate fields\n\t\t\ttimestamp = remove_order_matcher.group(1);\n\t\t\torder_id = remove_order_matcher.group(2);\n\t\t\tsize = Integer.parseInt(remove_order_matcher.group(3));\n\n\t\t\tremoveOrder(timestamp,order_id,size);\n\n\t\t} else {\n\t\t\tthrow new IOException();\n\t\t}\n\t}", "private static int getSatFromLine(String line) {\n\t\treturn Integer.parseInt(line.split(\" \")[0]);\n\t}", "private String[] parseLine(final String nextLine, final boolean readLine)\n throws IOException {\n String line = nextLine;\n if (line.length() == 0) {\n return new String[0];\n } else {\n\n final List<String> fields = new ArrayList<String>();\n StringBuilder sb = new StringBuilder();\n boolean inQuotes = false;\n boolean hadQuotes = false;\n do {\n if (inQuotes && readLine) {\n sb.append(\"\\n\");\n line = getNextLine();\n if (line == null) {\n break;\n }\n }\n for (int i = 0; i < line.length(); i++) {\n final char c = line.charAt(i);\n if (c == CsvConstants.QUOTE_CHARACTER) {\n hadQuotes = true;\n if (inQuotes && line.length() > i + 1\n && line.charAt(i + 1) == CsvConstants.QUOTE_CHARACTER) {\n sb.append(line.charAt(i + 1));\n i++;\n } else {\n inQuotes = !inQuotes;\n if (i > 2 && line.charAt(i - 1) != this.fieldSeparator\n && line.length() > i + 1\n && line.charAt(i + 1) != this.fieldSeparator) {\n sb.append(c);\n }\n }\n } else if (c == this.fieldSeparator && !inQuotes) {\n hadQuotes = false;\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n sb = new StringBuilder();\n } else {\n sb.append(c);\n }\n }\n } while (inQuotes);\n if (sb.length() > 0 || fields.size() > 0) {\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n }\n return fields.toArray(new String[0]);\n }\n }", "private XMLParseException expectedInput(String charSet,\n int lineNr) {\n String msg = \"Expected: \" + charSet;\n return new XMLParseException(this.getTagName(), lineNr, msg);\n }" ]
[ "0.8049759", "0.76047367", "0.70629877", "0.6660948", "0.65371674", "0.650462", "0.6483584", "0.6480625", "0.6473734", "0.64709646", "0.6382725", "0.6350957", "0.6345438", "0.6331768", "0.6325815", "0.6320784", "0.6317666", "0.62078536", "0.616864", "0.6162717", "0.614841", "0.6146389", "0.6143188", "0.6138748", "0.61192393", "0.6087928", "0.6083886", "0.6075812", "0.6067722", "0.6061703", "0.6037686", "0.6022617", "0.6013058", "0.601279", "0.6011626", "0.5993464", "0.59909827", "0.59749967", "0.59459925", "0.5931462", "0.59207314", "0.5909491", "0.5905527", "0.5891107", "0.5874446", "0.58523375", "0.5850554", "0.5831231", "0.5826845", "0.58134377", "0.5809779", "0.5795543", "0.579501", "0.5791144", "0.5788778", "0.5779643", "0.5777469", "0.5772045", "0.57658076", "0.5760179", "0.57417977", "0.5734308", "0.573294", "0.5731158", "0.57298625", "0.5727176", "0.57197404", "0.5712948", "0.5692621", "0.5684101", "0.5666655", "0.56627285", "0.56609917", "0.56538683", "0.5647058", "0.5627301", "0.5615124", "0.561288", "0.5612205", "0.560277", "0.560053", "0.5597665", "0.559571", "0.5591339", "0.55878496", "0.5581706", "0.55727524", "0.5563447", "0.5563376", "0.5548792", "0.5534332", "0.5523747", "0.5517715", "0.5516224", "0.5508053", "0.55076104", "0.5506373", "0.5495435", "0.54893565", "0.5482067", "0.5479051" ]
0.0
-1
Converts a node to HTML. This implementation is correct for all predefined test cases.
private static String toHtml(Node node) { StringBuilder buf = new StringBuilder(); if (!node.heading.text.isEmpty()) { buf.append(node.heading.text); buf.append("\n"); } Iterator<Node> iter = node.children.iterator(); if (iter.hasNext()) { buf.append("<ul>"); while (iter.hasNext()) { Node child = iter.next(); buf.append("<li>"); buf.append(toHtml(child)); buf.append("</li>"); if (iter.hasNext()) { buf.append("\n"); } } buf.append("</ul>"); } return buf.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String domToString(Node node) throws UMROException {\r\n\r\n // Use a Transformer for output\r\n TransformerFactory tFactory = TransformerFactory.newInstance();\r\n Transformer transformer = null;\r\n try {\r\n transformer = tFactory.newTransformer();\r\n } catch (TransformerConfigurationException ex) {\r\n throw new UMROException(\"Util.domToString: Unable to create transformer. Exception: \" + ex);\r\n }\r\n\r\n DOMSource source = new DOMSource(node);\r\n ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();\r\n StreamResult streamResult = new StreamResult(byteOutStream);\r\n try {\r\n transformer.transform(source, streamResult);\r\n } catch (TransformerException ex) {\r\n throw new UMROException(\"Util.domToString Unable to transform DOM to text. TransformerException: \" + ex);\r\n }\r\n String xmlText = byteOutStream.toString();\r\n return xmlText;\r\n }", "public static String nodeToString(Node node)\n {\n StringWriter sw = new StringWriter();\n try\n {\n Transformer t = TransformerFactory.newInstance().newTransformer();\n t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n t.setOutputProperty(OutputKeys.INDENT, \"no\");\n /* CB - Since everything is already stored as strings in memory why shoud an encoding be required here? */\n t.setOutputProperty(OutputKeys.ENCODING, RuntimeConstants.ENCODING_DEFAULT);\n t.transform(new DOMSource(node), new StreamResult(sw));\n }\n catch (TransformerException te)\n {\n LOGGER.error(\"could not convert XML node to string\", te);\n }\n return sw.toString();\n }", "private static String printNode(Node node) {\n\t\tif (node instanceof TextNode) {\n\t\t\tTextNode textNode = (TextNode) node;\n\t\t\treturn addEscapes(\n\t\t\t\t\ttextNode.getText(),\n\t\t\t\t\tEscapableArrays.textEscapable(),\n\t\t\t\t\tParserDelimiters.ESCAPE_DELIMITER.getValue()\n\t\t\t);\n\t\t}\n\t\t\n\t\tif (node instanceof ForLoopNode) {\n\t\t\treturn printForLoopNode((ForLoopNode) node);\n\t\t}\n\t\t\n\t\tif (node instanceof EchoNode) {\n\t\t\treturn printEchoNode((EchoNode) node);\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}", "HTML createHTML();", "public static String xmlToString(Node node) {\r\n try {\r\n Source source = new DOMSource(node);\r\n StringWriter stringWriter = new StringWriter();\r\n Result result = new StreamResult(stringWriter);\r\n TransformerFactory factory = TransformerFactory.newInstance();\r\n Transformer transformer = factory.newTransformer();\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n transformer.setOutputProperty(\r\n \"{http://xml.apache.org/xslt}indent-amount\", \"2\");\r\n transformer.transform(source, result);\r\n return stringWriter.getBuffer().toString();\r\n } catch (TransformerConfigurationException e) {\r\n log.error(\"xmlToString error: \", e);\r\n } catch (TransformerException e) {\r\n log.error(\"xmlToString error: \", e);\r\n }\r\n return null;\r\n }", "public static String toXml(Node node) {\n StreamResult xmlOutput = new StreamResult(new StringWriter());\n try {\n Transformer transformer = TransformerFactory.newInstance().newTransformer();\n transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n transformer.transform(new DOMSource(node), xmlOutput);\n } catch(Exception e) {\n\n }\n return xmlOutput.getWriter().toString();\n }", "@Override\n public Object string(Object node) {\n return ((Node<E>) node).element.toString();\n }", "public static String getHTML() {\n if (create()) {\n return tag.getInnerHTML();\n }\n return \"\";\n }", "private static <N> void printHtml(TreeNode<N> node, String linePrefix, boolean isTail, StringBuffer buffer, ToString<N> toString){\r\n\t\t\r\n\t\tbuffer.append(linePrefix + (isTail ? \"|__\" : \"|__\") + ((toString != null) ? toString.toString(node.getData()) : node.getData().toString()) + \"<br>\");\r\n\t\t\r\n\t\tif(node.hasChildren()){\r\n\t\t\t\r\n\t\t\tList<TreeNode<N>> children = node.getChildren();\r\n\t\t\r\n\t\t\tfor(int i = 0; i < children.size() - 1; i++) {\r\n\t\t\t\tprintHtml(children.get(i), linePrefix + (isTail ? \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" : \"|&nbsp;&nbsp;&nbsp;&nbsp;\"), false, buffer, toString);\r\n\t\t\t}\r\n\t\t\tif(node.getChildren().size() >= 1){\r\n\t\t\t\tprintHtml(children.get(children.size() - 1), linePrefix + (isTail ? \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" : \"|&nbsp;&nbsp;&nbsp;&nbsp;\"), true, buffer, toString);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static String asString(final Node node) {\r\n if (node == null) {\r\n return \"null\";\r\n }\r\n\r\n return asString(new DOMSource(node), DEFAULT_BUFFER_SIZE);\r\n }", "@Override\n protected abstract Document parseAsDom(final T input) throws ConversionException;", "public static String prettyPrint(final Node node) {\n try(final NonBlockingByteArrayOutputStream aBAOS = new NonBlockingByteArrayOutputStream ()) {\n final Source xmlSource = new DOMSource(node);\n\n final StreamResult res = new StreamResult(aBAOS);\n serializer.transform(xmlSource, res);\n serializer.reset();\n return aBAOS.getAsString (StandardCharsets.UTF_8);\n } catch (final Exception e) {\n return node.getTextContent();\n }\n }", "public abstract String toUrl(Object inNode);", "@Override\n public Object string(Object node) {\n Node<E> myNode = (Node<E>)node;\n String parentString = \"null\";\n if (myNode.parent != null) {\n parentString = myNode.parent.element.toString();\n }\n return myNode.element + \"_p(\" + parentString + \")\"; }", "String renderHTML();", "public String nodeToString(Node givenNode) throws SCNotifyRequestProcessingException {\n\t\tStringWriter sw = new StringWriter();\n\t\tString str;\n\t\ttry {\n\t\t\tTransformer t = TransformerFactory.newInstance().newTransformer();\n\t\t\tt.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n\t\t\tt.setOutputProperty(OutputKeys.ENCODING, \"UTF-16\");\n\t\t\tt.transform(new DOMSource(givenNode), new StreamResult(sw));\n\t\t\tstr = sw.toString();\n\t\t} catch (TransformerException te) {\n\t\t\tthrow new SCNotifyRequestProcessingException();\n\t\t}\n\t\treturn str;\n\t}", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "@Override\n\tpublic String generateHTML() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString level = \"\\t\";\n\t\tstringBuilder.append(level.repeat(levelCount)+\"<div>\\n\");\n\t\tlevelCount++;\n\t\tfor (HTMLGenerator htmlGenerator : tags) {\n\t\t\tstringBuilder.append(level.repeat(levelCount)+htmlGenerator.generateHTML());\n\t\t}\n\t\tstringBuilder.append(\"</div>\\n\");\n\t\treturn stringBuilder.toString();\n\t}", "protected String toString(Node<T> node) {\n\t\tif (node == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn node.value.toString() + \" \" \n\t\t\t\t+ toString(node.left) + \" \"\n\t\t\t\t+ toString(node.right);\n\t}", "static String serializeNode(Node node, boolean childrenOnly)\n {\n\t short nodeType = node.getNodeType();\n\n\t switch (nodeType)\n\t {\n\t\t case Node.ATTRIBUTE_NODE:\n\t\t case Node.CDATA_SECTION_NODE:\n\t\t case Node.TEXT_NODE:\n\t\t\tif (childrenOnly)\n\t\t\t{\n\t\t\t return null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t return node.getNodeValue();\n\t\t\t}\n\n\t\t case Node.COMMENT_NODE:\n\t\t case Node.DOCUMENT_TYPE_NODE:\n\t\t case Node.ENTITY_NODE:\n\t\t case Node.NOTATION_NODE:\n\t\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t\t\t// These nodes are not part of the \"data\" of a document. Therefore\n\t\t\t// return null;\n\t\t\treturn null;\n\n\t\t case Node.ELEMENT_NODE:\n\t\t\tbreak;\n\n\t\t case Node.DOCUMENT_FRAGMENT_NODE:\n\t\t\tchildrenOnly = true;\n\t\t\tbreak;\n\n\t\t case Node.DOCUMENT_NODE:\n\t\t\tnode = ((Document)node).getDocumentElement();\n\t\t\tchildrenOnly = false;\n\t\t\tbreak;\n\t }\n\n\t // Build a string from element, text, and CDATA child nodes. Elements\n\t // are represented by tags; note that there is a problem here, as it is\n\t // impossible to tell a real element from a tag constructed with lt/gt\n\t // entities or CDATA.\n\n\t StringBuffer value = new StringBuffer();\n\t Node current, next;\n\n\t if (childrenOnly)\n\t {\n\t\t current = node.getFirstChild();\n\t }\n\t else\n\t {\n\t\t current = node;\n\t }\n\n\t while (current != null)\n\t {\n\t\t // Append the value of the node (if any) to the complete value. We\n\t\t // ignore comments and PIs. We \"expand\" entity references by simply\n\t\t // traversing their children.\n\n\t\t nodeType = current.getNodeType();\n\t\t if (nodeType == Node.ELEMENT_NODE)\n\t\t {\n\t\t\tvalue.append(LT);\n\t\t\tvalue.append(current.getNodeName());\n\t\t\tvalue.append(serializeAttrs(current.getAttributes()));\n\t\t\tvalue.append(GT);\n\t\t }\n\t\t else if ((nodeType == Node.TEXT_NODE) ||\n\t\t\t\t (nodeType == Node.CDATA_SECTION_NODE))\n\t\t {\n\t\t\tvalue.append(current.getNodeValue());\n\t\t }\n\n\t\t // Get the first child of the node.\n\n\t\t next = current.getFirstChild();\n\t\t if (next != null)\n\t\t {\n\t\t\tcurrent = next;\n\t\t\tcontinue;\n\t\t }\n\n\t\t // If the node has no children, then get the sibling of the node.\n\n\t\t while (current != null)\n\t\t {\n\t\t\t// Close the current node.\n\t\t\tif (current.getNodeType() == Node.ELEMENT_NODE)\n\t\t\t{\n\t\t\t value.append(LT);\n\t\t\t value.append(SLASH);\n\t\t\t value.append(current.getNodeName());\n\t\t\t value.append(GT);\n\t\t\t}\n\n\t\t\t// Get the next sibling. If there is a next sibling, then go to\n\t\t\t// the outer while loop to process it and get its children. If\n\t\t\t// there is no next sibling, then go back up a level. If we get\n\t\t\t// back to the original node, stop processing.\n\n\t\t\tnext = current.getNextSibling();\n\t\t\tif (next != null)\n\t\t\t{\n\t\t\t current = next;\n\t\t\t break;\n\t\t\t}\n\n\t\t\tcurrent = current.getParentNode();\n\t\t\tif (current == node)\n\t\t\t{\n\t\t\t if (!childrenOnly &&\n\t\t\t\t (current.getNodeType() == Node.ELEMENT_NODE))\n\t\t\t {\n\t\t\t\t value.append(LT);\n\t\t\t\t value.append(SLASH);\n\t\t\t\t value.append(current.getNodeName());\n\t\t\t\t value.append(GT);\n\t\t\t }\n\t\t\t current = null;\n\t\t\t}\n\t\t }\n\t }\n\t return value.toString();\n }", "public String getAsText()\n {\n StringWriter sw = new StringWriter();\n DOMWriter dw = new DOMWriter(sw);\n dw.print((Node)getValue());\n return sw.toString();\n }", "public static String innerXml(final Node node) {\n final DOMImplementationLS lsImpl = (DOMImplementationLS) node.getOwnerDocument()\n .getImplementation().getFeature(\"LS\", \"3.0\");\n final LSSerializer lsSerializer = lsImpl.createLSSerializer();\n final DOMConfiguration c = lsSerializer.getDomConfig();\n c.setParameter(\"format-pretty-print\", false);\n c.setParameter(\"xml-declaration\", false);\n\n final StringBuilder sb = new StringBuilder();\n for (Element childElement : getChildElements(node)) {\n sb.append(lsSerializer.writeToString(childElement));\n }\n return sb.toString();\n }", "public native final String html()/*-{\n\t\treturn this.html();\n\t}-*/;", "Node getTemplateTextNode();", "public String printNodeData(Node<T> node){\n return String.valueOf(node.data);\n }", "public static String asString(final Node node, final int bufferSize) {\r\n if (node == null) {\r\n return \"null\";\r\n }\r\n\r\n return asString(new DOMSource(node), bufferSize);\r\n }", "public static String convertAnyNodeToString(AnyNode node) throws SAXException {\r\n AnyNode2SAX2 converter = new AnyNode2SAX2(node);\r\n StringWriter writer = new StringWriter();\r\n SerializationContext context = new SerializationContext(writer);\r\n AxisContentHandler handler = new AxisContentHandler(context);\r\n converter.setContentHandler(handler);\r\n converter.start();\r\n return writer.getBuffer().toString();\r\n }", "public String toHTML () {\n // TODO barely more than a stub\n // TODO should use CSS rather than header tags\n StringBuffer ret = new StringBuffer ( );\n ret.append (\"<div class=\\\"comment\\\"\" +\n \"style=\\\"margin-left: \" +\n Integer.toString (nestLevel * 24) +\n \"pt\\\">\\n\");\n ret.append (\"<span class=\\\"cmtcredit\\\">Posted by \" + poster + \n \" at \" + date + \"</span><br>\");\n if (subject != null) {\n ret.append (\"<span class=\\\"cmtsubj\\\">\" + subject + \"</span><br>\\n\");\n }\n ret.append (\"<div class=\\\"cmtbody\\\">\" + body + \"</div>\\n\");\n String ipaddr = properties.get (\"poster_ip\");\n if (ipaddr != null) {\n ret.append (\"<br>&nbsp;<br>IP address: \" + ipaddr + \"<br>\\n\");\n }\n if (!replies.isEmpty ()) {\n ret.append (\"<p class=\\\"fill2\\\"></p>\\n\");\n }\n for (Comment rep : replies) {\n ret.append (rep.toHTML());\n }\n ret.append (\"<p class=\\\"fill2\\\"></p>\\n\");\n ret.append (\"</div>\"); // Close div class comment\n return ret.toString();\n }", "public String toString() {\r\n return DOM2Writer.nodeToString((Node) element);\r\n }", "protected void print(Node node, int level, PrintWriter out)\n{\n int endtagLevel = level;\n // is there anything to do?\n if (node == null)\n {\n return;\n }\n\n for (int i=0; i<level; i++)\n {\n out.print(\" \");\n }\n int type = node.getNodeType();\n switch (type)\n {\n case Node.DOCUMENT_NODE:\n {\n out.println(docHeader);\n this.print(((Document)node).getDoctype(), 0, out);\n this.print(((Document)node).getDocumentElement(), 0, out);\n break;\n }\n\n // print document type\n case Node.DOCUMENT_TYPE_NODE:\n {\n out.println(docType);\n break;\n }\n // print element with attributes\n case Node.ELEMENT_NODE:\n {\n out.print('<');\n out.print(node.getNodeName());\n Attr attrs[] = sortAttributes(node.getAttributes());\n for (int i = 0; i < attrs.length; i++)\n {\n Attr attr = attrs[i];\n out.print(' ');\n out.print(attr.getNodeName());\n out.print(\"=\\\"\");\n out.print(attr.getNodeValue());\n out.print('\"');\n }\n\n NodeList children = node.getChildNodes();\n int len = (children != null) ? children.getLength() : 0;\n if (len == 1 \n && \n (children.item(0).getNodeType() == Node.CDATA_SECTION_NODE\n ||\n children.item(0).getNodeType() == Node.TEXT_NODE))\n {\n out.print('>');\n this.print(children.item(0), 0, out);\n endtagLevel = 0;\n }\n else\n {\n out.println('>');\n for (int i = 0; i < len; i++)\n {\n this.print(children.item(i), (level+1), out);\n }\n }\n break;\n }\n\n // handle entity nodes\n case Node.ENTITY_NODE:\n {\n out.print(\"ENTITY \");\n out.print(node.getNodeName());\n Entity ent = (Entity)node;\n String sId = ent.getSystemId();\n if (sId != null)\n {\n out.print(\" SYSTEM \\\"\" + sId + \"\\\"\");\n }\n break;\n }\n\n // handle entity reference nodes\n case Node.ENTITY_REFERENCE_NODE:\n {\n if (canonical)\n {\n NodeList children = node.getChildNodes();\n if (children != null)\n {\n int len = children.getLength();\n for (int i = 0; i < len; i++)\n {\n this.print(children.item(i), level, out);\n }\n }\n } \n else\n {\n out.print('&');\n out.print(node.getNodeName());\n out.print(';');\n }\n break;\n }\n\n // print cdata sections\n case Node.CDATA_SECTION_NODE:\n {\n // have to normalize it.\n out.print(normalize(node.getNodeValue()));\n break;\n }\n\n // print text\n case Node.TEXT_NODE:\n {\n out.print(node.getNodeValue());\n break;\n }\n\n // print processing instruction\n case Node.PROCESSING_INSTRUCTION_NODE:\n {\n out.print(\"<?\");\n out.print(node.getNodeName());\n String data = node.getNodeValue();\n if (data != null && data.length() > 0)\n {\n out.print(' ');\n out.print(data);\n }\n out.print(\"?>\");\n break;\n }\n default:\n {\n out.print(\"Unknown type \" + type);\n }\n }\n\n if (type == Node.ELEMENT_NODE)\n {\n for (int i=0; i<endtagLevel; i++)\n {\n out.print(\" \");\n }\n out.print(\"</\");\n out.print(node.getNodeName());\n out.println('>');\n }\n\n}", "@Nullable\n public static String toString(final Node node) {\n\n return toString( node, true );\n }", "public String convertMarkupToHTML(String text) {\n return text;\n }", "@Override\r\n\t\tpublic String getNodeValue() throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "private static String node2Str(JsonNode node) {\n try {\n return jsonWriter.writeValueAsString(node);\n } catch (JsonProcessingException e) {\n throw new IllegalStateException(\"Error writing JsonNode as a String: \" + node.asText(), e);\n }\n }", "public static String saveDomToString(Document doc, String encoding, boolean bIndent,String output)\n throws Exception {\n if (doc == null) {\n throw (new Exception(\"No_dom_to_save\"));\n }\n // find out how we should form output\n // make sure we have some encoding\n if (encoding == null) {\n encoding = doc.getXmlEncoding();\n }\n if (encoding == null) {\n encoding = default_encoding;\n }\n\n try {\n DOMSource xmlDomSource = new DOMSource(doc);\n\n // make an identity transformation\n TransformerFactory transFac = TransformerFactory.newInstance();\n Transformer trans = transFac.newTransformer();\n // set transformatoion properties\n // this is an identity transformation\n // and no properties are set exept defaults\n\n //NOTE: we have a problem with HTML5 which wants a simple header: \n // <!DOCTYPE HTML>\n // we assume that the template is set accordingly\n // This will not give us PublicID and SystemID as null\n // we will have to detect this situastion before we return\n // the text, see below, after transformation\n\n // problem:\n // this will kill other transformed input that make html root\n // use explicit: html5 output option ? (yes)\n\n DocumentType dt = doc.getDoctype();\n String pid = null;\n String sid = null;\n String name = null;\n if (dt != null) {\n pid = dt.getPublicId();\n sid = dt.getSystemId();\n name = dt.getName();\n }\n\n boolean is_HTML5 = false;\n output=output.toLowerCase();\n switch(output){\n case Options.TEXT:\n trans.setOutputProperty(OutputKeys.MEDIA_TYPE, \"text/plain; charset=\" + encoding);\n break;\n \n case Options.XML:\n trans.setOutputProperty(OutputKeys.METHOD, Options.XML);\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n if (pid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, pid);\n }\n if (sid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, sid);\n }\n break;\n \n case Options.XHTML:\n trans.setOutputProperty(OutputKeys.METHOD, Options.XML);\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n if (pid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, pid);\n }\n if (sid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, sid);\n }\n break;\n \n case Options.HTML5:\n case Options.HTML:\n trans.setOutputProperty(OutputKeys.METHOD, Options.XML);\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n is_HTML5 = true;\n break;\n \n default:\n throw new Exception(\"bad output type: \" + output);\n }\n \n\n trans.setOutputProperty(OutputKeys.STANDALONE, \"yes\");\n trans.setOutputProperty(OutputKeys.ENCODING, encoding);\n\n if (bIndent) {\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n trans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"0\");\n } else {\n // use no to avoid prince-problems with toc targets ?????\n trans.setOutputProperty(OutputKeys.INDENT, \"no\");\n }\n\n java.io.StringWriter out = new java.io.StringWriter();\n java.io.BufferedWriter bos = new java.io.BufferedWriter(out);\n StreamResult outStream = new StreamResult(bos);\n trans.transform(xmlDomSource, outStream);\n bos.flush();\n\n // this is where we can clean up a doctype\n // prepared for html 5\n\n String result = out.toString().trim();\n if (is_HTML5 && ( (result.startsWith(\"<html\")) \n || (result.startsWith(\"<HTML\")))) {\n result = \"<!DOCTYPE HTML>\\n\" + result;\n }\n\n return result;\n } catch (java.io.UnsupportedEncodingException ex) {\n System.out.println(\"domer:saveDomToString. \" + ex.getMessage());\n throw new Exception(ex.getMessage());\n } catch (TransformerConfigurationException tce) {\n System.out.println(\"domer:saveDomToString. \" + tce.getMessage());\n throw new Exception(tce.getMessage());\n } catch (TransformerException te) {\n System.out.println(\"domer:saveDomToString. \" + te.getMessage());\n throw new Exception(te.getMessage());\n } catch (FactoryConfigurationError f) {\n System.out.println(\"domer:saveDomToString. \" + f.getMessage());\n throw new Exception(f.getMessage());\n } catch (IllegalArgumentException iae) {\n System.out.println(\"domer:saveDomToString. \" + iae.getMessage());\n throw new Exception(iae.getMessage());\n } catch (Exception e) {\n System.out.println(\"domer:saveDomToString. \" + e.getMessage());\n throw new Exception(e.getMessage());\n }\n }", "public static String asString(final Transformer transformer, final Node node) {\r\n if (node == null) {\r\n return \"null\";\r\n }\r\n\r\n return asString(transformer, new DOMSource(node), DEFAULT_BUFFER_SIZE);\r\n }", "void visitTextNode(TextNode node);", "public static void write(Node n, OutputStream out) throws TransformerException {\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(n);\n\n // Output to console for testing\n StreamResult result = new StreamResult(out);\n transformer.transform(source, result);\n }", "private String printXML(Node target){\n\t\treturn \"\";\n\t}", "public static String toHTML(String s) {\n\t\ts=replace(s,\"<\",\"&lt;\");\n\t\ts=replace(s,\">\",\"&gt;\");\n\t\ts=replace(s,\"\\n\",\"<br>\\n\");\n\t\treturn s;\n\t}", "@DISPID(-2147417084)\n @PropPut\n void outerHTML(\n java.lang.String rhs);", "private static String getText(Node node) {\n\t\tStringBuilder text = new StringBuilder();\n\t\t\n\t\ttext.append(node.getText());\n\t\tNode childNode;\n\t\tint size;\n\t\t\n\t\ttry {\n\t\t\tsize = node.numberOfChildren();\n\t\t} catch (NullPointerException e) {\n\t\t\tsize = 0;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < size; i++ ) {\n\t\t\tchildNode = node.getChild(i);\n\n\t\t\tif (childNode instanceof ForLoopNode) {\n\t\t\t\ttext.append(getText(childNode));\n\t\t\t} else {\n\t\t\t\ttext.append(childNode.getText());\n\t\t\t}\n\t\t}\n\t\t\n\t\ttext.append(\"{$ END $}\");\n\t\t\n\t\treturn text.toString();\n\t}", "Node getNode();", "@Override\n public void toXML(Node node)\n {\n super.toXML(node);\n\n Document document = node.getOwnerDocument();\n\n Element e = document.createElement(\"lethal-range\");\n e.setTextContent(String.valueOf(this.getLethalRange()));\n node.appendChild(e);\n\n e = document.createElement(\"pk\");\n e.setTextContent(String.valueOf(this.getPk()));\n node.appendChild(e);\n\n e = document.createElement(\"max-gs\");\n e.setTextContent(String.valueOf(this.getMaxGs()));\n node.appendChild(e);\n }", "private String toTreeString(PhyloTreeNode node) {\n if(node == null) {\n return \"\";\n }\n if(node.isLeaf()) {\n if(node.getParent() != null)\n builderTree.append(node.getLabel() + \":\" + String.format(\"%.5f\", node.getParent().getDistanceToChild()));\n else{\n builderTree.append(node.getLabel() + \":0.0\");\n }\n }\n else{\n builderTree.append(\"(\");\n toTreeString(node.getRightChild());\n builderTree.append(\",\");\n toTreeString(node.getLeftChild());\n builderTree.append(\")\");\n if(node.getParent() != null) {\n builderTree.append(\":\" + String.format(\"%.5f\", node.getParent().getDistanceToChild()));\n }\n }\n return builderTree.toString();\n }", "public static String getArticleHtml(Document document) {\n Elements article = document.select(\".widget.widget-richtext.6 .text\").first().children();\n return article.toString();\n }", "@Test\n public void testToRulenode() {\n System.out.println(\"AbsolutePathNode - testToRulenode\");\n final AbsolutePathNode instance = new AbsolutePathNode();\n final String expResult = \"apath\";\n final String result = instance.toRulenode();\n System.out.printf(\"Expected: %s\\n\", expResult);\n System.out.printf(\" Result: %s\\n\", result);\n assertEquals(expResult, result);\n }", "public String nodeAndElementsAsText() {\n\t\treturn \"\";\n\t}", "@Override\r\n\t\tpublic String getTextContent() throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@AutoEscape\n\tpublic String getNode_2();", "public Parent toNode() {\n if (this.webView == null)\n return this.webView = createWebView();\n else\n return this.webView;\n }", "@DISPID(-2147417086)\n @PropGet\n java.lang.String innerHTML();", "private String getStringValue(Node node) {\n switch (node.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n case Node.TEXT_NODE:\n return node.getNodeValue();\n default: {\n try {\n Transformer transformer = TRANSFORMER_FACTORY.newTransformer();\n StringWriter buffer = new StringWriter();\n transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n transformer.transform(new DOMSource(node), new StreamResult(buffer));\n return buffer.toString();\n } catch (Exception e) {\n }\n return null;\n }\n }\n }", "public static String getNodeValue(Element node)\n {\n StringBuilder sb = new StringBuilder();\n NodeList children = node.getChildNodes();\n int numNodes = children.getLength();\n for (int i = 0; i < numNodes; i++)\n {\n Node next = children.item(i);\n if (next instanceof Text)\n {\n sb.append(next.getNodeValue());\n }\n }\n return sb.toString();\n }", "@Override\n\tpublic String toScreenText() {\n\t\treturn \"if(#node#)\\n{#node#}\";\n\t}", "public String getText(Node node) {\n\t StringBuffer result = new StringBuffer();\n\t if (! node.hasChildNodes()) return \"\";\n\n\t NodeList list = node.getChildNodes();\n\t for (int i=0; i < list.getLength(); i++) {\n\t Node subnode = list.item(i);\n\t if (subnode.getNodeType() == Node.TEXT_NODE) {\n\t result.append(subnode.getNodeValue());\n\t }\n\t else if (subnode.getNodeType() == Node.CDATA_SECTION_NODE) {\n\t result.append(subnode.getNodeValue());\n\t }\n\t else if (subnode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {\n\t // Recurse into the subtree for text\n\t // (and ignore comments)\n\t result.append(getText(subnode));\n\t }\n\t }\n\n\t return result.toString();\n\t}", "public String getTextValue (Node node);", "private void renderNode(Node n) {\n root.getChildren().add(n);\n }", "public static void display(Node node) {\n if (node == null) {\n return;\n }\n\n String str = \"\";\n\n str += node.left == null ? \".\" : node.left.data;\n str += \" <= \" + node.data + \" => \";\n str += node.right == null ? \".\" : node.right.data;\n\n System.out.println(str);\n\n display(node.left);\n display(node.right);\n }", "@Test\n public void testToAstnode() {\n System.out.println(\"RelativePathNode - testToAstnode\");\n final AbsolutePathNode instance = new AbsolutePathNode();\n final String expResult = \"AbsolutePathNode()\";\n final String result = instance.toAstnode();\n System.out.printf(\"Expected: %s\\n\", expResult);\n System.out.printf(\" Result: %s\\n\", result);\n assertEquals(expResult, result);\n }", "public String getNodeValue(Node node) throws Exception;", "@Test\n\tpublic void testHTML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick-parse\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "@DISPID(-2147417084)\n @PropGet\n java.lang.String outerHTML();", "public String toString(org.w3c.dom.Node n){\n int nodeHandle=getDTMHandleFromNode(n);\n DTM dtm=getDTM(nodeHandle);\n XMLString strVal=dtm.getStringValue(nodeHandle);\n return strVal.toString();\n }", "public void printNode(Node n);", "private HTMLElement generateHTMLElement() {\n \t\t// this is the outermost element, so it has no indent\n \t\tint indentLevel = 0;\n \t\tHTMLElement html = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_HTML, indentLevel, true);\n \t\tHTMLElement head = generateHeadElement(indentLevel + 1);\n \t\tHTMLElement body = generateBodyElement(indentLevel + 1);\n \t\thtml.addContent(head);\n \t\thtml.addContent(body);\n \t\treturn html;\n \t}", "@AutoEscape\n\tpublic String getNode_1();", "public abstract <T extends INode<T>> String nodeToString(int nodeId, T node, boolean isInitial, boolean isTerminal);", "@org.junit.Test\n public void encodeHTML()\n {\n assertEquals(\"apos\", \"I can&#39;t do &#34;this&#34;\",\n Encodings.encodeHTMLAttribute(\"I can't do \\\"this\\\"\"));\n assertEquals(\"no replace\", \"just a test\",\n Encodings.encodeHTMLAttribute(\"just a test\"));\n assertEquals(\"empty\", \"\", Encodings.encodeHTMLAttribute(\"\"));\n }", "public abstract Node getNode();", "private void commonLoadTestForHtml(){\n\t\tWebElement tree = getElement(\"id=tree\");\n\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t//Make sure News attributes are correct\n\t\tWebElement news = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#news']['title']\\\"}\");\n\t\tAssert.assertNotNull(news);\n\t\tnews.click();\n\n\t\tString content = getText(RESULTS_CONTAINER);\n\t\tlog(\"content\"+content);\n waitForText(RESULTS_CONTAINER, \"id=news\");\n\n\n\t\t// Finds the blogs node and make sure its not null\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\t\tWebElement blogs = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\n\t\tlog(\"Node: \" + blogs);\n\n\t\tAssert.assertNotNull(blogs);\n\n\t\tblogs.click(); // This should expand the node blogs\n\n\t\t//Find the children of blogs node: Today\n\t\tWebElement today = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#today']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: Previous\n\t\tWebElement previous = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['title']\\\"}\");\n\n\t\tWebElement previousDiscIcon = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\n\t\tAssert.assertNotNull(previousDiscIcon);\n\n\t\t//Click on Previous Node\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\t\tpreviousDiscIcon.click();\n\n\t\t//Find the children of previous node: Yesterday\n\t\tWebElement yesterday = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#yesterday']['title']\\\"}\");\n\n\t\t//Find the children of previous node: 2DaysBack\n\t\tWebElement twodaysback = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#daysback2']['title']\\\"}\");\n\n\n\n\n\t}", "private void renderNode(Graphics g, Node n)\n {\n\tif (n.ancestor) {\n\t //setRenderColor(g,ancestorcolor);\n\t setRenderColor(g,n.path_color);\n\t}\n\trenderFilledCircle(g,n.x,n.y,n.diameter);\n\n\tsetRenderColor(g,Color.black);\n\trenderCircle(g,n.x,n.y,n.diameter);\n\tif (n.clickable)\n\t renderCircle(g,n.x,n.y,n.diameter+4);\n }", "@Test\n\tvoid transformTagWithHtmlEscape() throws JspException {\n\t\tPageContext pc = createPageContext();\n\t\tTestBean tb = new TestBean();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tServletRequestDataBinder binder = new ServletRequestDataBinder(tb, \"tb\");\n\t\tCustomDateEditor l = new CustomDateEditor(df, true);\n\t\tbinder.registerCustomEditor(Date.class, l);\n\t\tpc.getRequest().setAttribute(BindingResult.MODEL_KEY_PREFIX + \"tb\", binder.getBindingResult());\n\n\t\t// try another time, this time using Strings\n\t\tBindTag bind = new BindTag();\n\t\tbind.setPageContext(pc);\n\t\tbind.setPath(\"tb.name\");\n\t\tbind.doStartTag();\n\n\t\tTransformTag transform = new TransformTag();\n\t\ttransform.setPageContext(pc);\n\t\ttransform.setValue(\"na<me\");\n\t\ttransform.setParent(bind);\n\t\ttransform.setVar(\"theString\");\n\t\ttransform.setHtmlEscape(true);\n\t\ttransform.doStartTag();\n\n\t\tassertThat(pc.getAttribute(\"theString\")).isNotNull();\n\t\tassertThat(pc.getAttribute(\"theString\")).isEqualTo(\"na&lt;me\");\n\t}", "public String printInline(HuffmanTreeNode node){\n\t\tif (node != null){\n\t\t\tStringBuffer sb = new StringBuffer();\n\n\t\t\tif (node.getLeft() != null)\n sb.append(this.printInline(node.getLeft()));\n\t\t\tsb.append(node.toString());\n\n\t\t\tif (node.getRight() != null)\n sb.append(this.printInline(node.getRight()));\n\t\t\treturn sb.toString();\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t}", "public String getHtmlRepresentation() {\n\t\treturn getHtmlRepresentation(constraintSets);\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n traverseNode(sb, \"\", \"\", root, false);\n return sb.toString();\n }", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllTextWriter_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), TEXTWRITER, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "public Element transform(Node source) throws TransformerException {\n DOMResult outputDR = new DOMResult();\n myTransformer.transform(new DOMSource(source), outputDR);\n return ((Document) outputDR.getNode()).getDocumentElement();\n }", "public static <T> String xmlToHTML(String xslFile, T obj, Class<T> type) {\r\n\t\ttry {\r\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = tf.newTransformer(new StreamSource(\r\n\t\t\t\t\tWebPath + xslFile));\r\n\r\n\t\t\t// Source\r\n\t\t\tJAXBContext jc = JAXBContext.newInstance(type);\r\n\t\t\tJAXBSource source;\r\n\r\n\t\t\tsource = new JAXBSource(jc, obj);\r\n\r\n\t\t\t// Result\r\n\t\t\tStringWriter writer = new StringWriter();\r\n\r\n\t\t\t// Transform\r\n\t\t\ttransformer.transform(source, new StreamResult(writer));\r\n\r\n\t\t\treturn writer.toString();\r\n\t\t} catch (TransformerException e) {\r\n\t\t\treturn \"\";\r\n\t\t} catch (JAXBException e) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability = new Readability(getDoc(url)); // URL\n readability.init();\n String cleanHtml = readability.outerHtml();\n System.out.println(cleanHtml);\n }", "public String toHTML( String comment ){\n\t\tTextPresentation presentation = new TextPresentation();\n\t\tcomment = updatePresentation( comment, presentation );\n\t\treturn toHTML( comment, presentation );\n\t}", "@AutoEscape\n\tpublic String getNode_3();", "public String toString(){\n String html = \"<html>\\n<head>\\n</head>\\n<body>\";\n for (int i=0; i< dom.size(); i++){\n html+= dom.get(i);\n }\n /* TODO\nLoop through the elemments of the dom and append them to html */\n return html+\"</body>\\n</html>\";\n }", "public void print(Node node) \n{\n PrintWriter w = new PrintWriter(new OutputStreamWriter(System.out), true);\n print(node, w);\n}", "private static String convertForHTML(final String src) {\n String s = src;\n for (Map.Entry<String, String> entry: HTML_CONVERSIONS.entrySet()) s = s.replace(entry.getKey(), entry.getValue());\n return s;\n }", "@Test\n \tpublic void testRAssign() throws IOException{\n \t\tString testString = \"DemoClinicalOnlyModel <- setRefClass(Class = \\\"CINModel\\\",...\";\n \t\tString actualResult = processor.markdown2Html(testString, false);\n \t\t//there should be no space between the less than and the dash:\n \t\tassertTrue(actualResult.contains(\"&lt;-\"));\n \t}", "private void echo(Node n) {\n\t outputIndentation();\n\t int type = n.getNodeType();\n\n\t switch (type) {\n\t case Node.ATTRIBUTE_NODE:\n\t out.print(\"ATTR:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.CDATA_SECTION_NODE:\n\t out.print(\"CDATA:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.COMMENT_NODE:\n\t out.print(\"COMM:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_FRAGMENT_NODE:\n\t out.print(\"DOC_FRAG:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_NODE:\n\t out.print(\"DOC:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_TYPE_NODE:\n\t out.print(\"DOC_TYPE:\");\n\t printlnCommon(n);\n\t NamedNodeMap nodeMap = ((DocumentType)n).getEntities();\n\t indent += 2;\n\t for (int i = 0; i < nodeMap.getLength(); i++) {\n\t Entity entity = (Entity)nodeMap.item(i);\n\t echo(entity);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ELEMENT_NODE:\n\t out.print(\"ELEM:\");\n\t printlnCommon(n);\n\n\t NamedNodeMap atts = n.getAttributes();\n\t indent += 2;\n\t for (int i = 0; i < atts.getLength(); i++) {\n\t Node att = atts.item(i);\n\t echo(att);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ENTITY_NODE:\n\t out.print(\"ENT:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.ENTITY_REFERENCE_NODE:\n\t out.print(\"ENT_REF:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.NOTATION_NODE:\n\t out.print(\"NOTATION:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t out.print(\"PROC_INST:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.TEXT_NODE:\n\t out.print(\"TEXT:\");\n\t printlnCommon(n);\n\t break;\n\n\t default:\n\t out.print(\"UNSUPPORTED NODE: \" + type);\n\t printlnCommon(n);\n\t break;\n\t }\n\n\t indent++;\n\t for (Node child = n.getFirstChild(); child != null;\n\t child = child.getNextSibling()) {\n\t echo(child);\n\t }\n\t indent--;\n\t}", "@Override\n public void addNode(HtmlDocument.Node n, int nodeNum, int endNum) {\n mTextConverter.addNode(n, nodeNum, endNum);\n if (n instanceof HtmlDocument.Tag) {\n handleStart((HtmlDocument.Tag) n);\n } else if (n instanceof HtmlDocument.EndTag) {\n handleEnd((HtmlDocument.EndTag) n);\n }\n appendPlainTextFromConverter();\n }", "private static String formatNode(PrefixMapping prefixMapping, Node node) {\n\t\tif (node.isVariable())\n\t\t\treturn \"?\" + node.getName();\n\t\telse if (node.isBlank())\n\t\t\treturn node.getBlankNodeLabel();\n\t\telse if (node.isURI()) {\n\t\t\t// If the node is a URI without a PREFIX (e.g. ?s rdf:type\n\t\t\t// <http://myOntologyClass>) return the <URI>\n\t\t\tString prefix = prefixMapping.getNsURIPrefix(node.getNameSpace());\n\n\t\t\tif (prefix == null)\n\t\t\t\treturn \"<\" + node.getURI() + \">\";\n\n\t\t\treturn prefix + \":\" + node.getLocalName();\n\t\t} else if (node.isLiteral())\n\t\t\treturn '\"' + node.getLiteralLexicalForm() + '\"';\n\n\t\treturn null;\n\t}", "public static final String StringToSafeHtml(final Object o) {\n\t\t\n\t\tfinal String string = Convert.Any.toString(o, null);\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn string.replace(\"\\r\", \"\").replace(\">\\n<\", \"><\").replace(\"<br>\", \"\\n\").replace(\"<p>\", \"\\n\\n\").replace(\"</p>\", \"\").replace(\"&#13;\", \"\\n\").replace(\" \\n\", \"\\n\")\n\t\t\t\t.replace(\"\\n\\n\\n\", \"\\n\\n\").replace(\" \", \" &nbsp;\").replace(\"\\t\", \" &nbsp; &nbsp;\").replace(\"<\", \"&lt;\").replace(\"\\n\\n\", \"<p>\").replace(\"\\n\", \"<br>\");\n\t}", "public String html() {\n\t\treturn HtmlFunction.html(this);\n\t}", "@Override\n public String toString() {\n return ((leftChild != null) ? leftChild : \"\")\n + text + \"\\n\"\n + ((rightChild != null) ? rightChild : \"\");\n }", "public Node getNode();", "public String getHtml() {\n return html;\n }", "public String getValue(Node node) {\n return (node == null) ? null : node.getTextContent();\n }", "public String toString()\n {\n return getHtml();\n }", "protected String getTextContent(Node elm) {\n\t\tif (elm == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tNodeList list = elm.getChildNodes();\n\t\tfor (int i = 0; i < list.getLength(); i++) {\n\t\t\tNode n = list.item(i);\n\t\t\tif (sb.length() > 0) {\n\t\t\t\tsb.append(' ');\n\t\t\t}\n\t\t\tif (n.getNodeType() == Node.CDATA_SECTION_NODE) {\n\t\t\t\tsb.append(n.getTextContent());\n\t\t\t} else {\n\t\t\t\tsb.append(n.getTextContent().trim());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String markupAsHTML (Markup m)\n {\n\n if (m == null)\n {\n\n return this.paragraph;\n\n }\n\n Markup pm = new Markup (m,\n this.getAllTextStartOffset (),\n this.getAllTextEndOffset ());\n\n pm.shiftBy (-1 * this.getAllTextStartOffset ());\n\n return pm.markupAsHTML (this.paragraph);\n\n }", "@Test\n\tpublic void testHTMLAsXML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick.parser.xml-switch\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "public String printToXml()\n {\n XMLOutputter outputter = new XMLOutputter();\n outputter.setFormat(org.jdom.output.Format.getPrettyFormat());\n return outputter.outputString(this.toXml());\n }" ]
[ "0.6243456", "0.6081211", "0.6079882", "0.5775963", "0.5743272", "0.5714488", "0.570504", "0.5701612", "0.5668277", "0.55633235", "0.54712194", "0.54458493", "0.54077834", "0.54005015", "0.53686184", "0.5342548", "0.5339575", "0.53195125", "0.5303204", "0.526039", "0.5259865", "0.5231489", "0.5221408", "0.5214267", "0.5150115", "0.51436454", "0.51337284", "0.5115141", "0.50999206", "0.50929666", "0.5059173", "0.50588524", "0.50553167", "0.50432116", "0.50240254", "0.5005709", "0.49828434", "0.49736825", "0.49721125", "0.49712202", "0.49659505", "0.49457413", "0.49360624", "0.49303907", "0.49193895", "0.4915739", "0.48956537", "0.48948193", "0.4885439", "0.48707995", "0.48688728", "0.48605135", "0.48542464", "0.48368764", "0.48322737", "0.4825266", "0.48190886", "0.4808915", "0.48073977", "0.47899082", "0.478584", "0.4779195", "0.47759035", "0.47755206", "0.47744277", "0.47688589", "0.47624728", "0.47606385", "0.47575006", "0.47513008", "0.47493333", "0.47482497", "0.47442913", "0.47365668", "0.47323996", "0.47315028", "0.47303006", "0.4723803", "0.47205764", "0.4715393", "0.47011566", "0.46959102", "0.4695186", "0.4695119", "0.46902463", "0.46796367", "0.46790025", "0.46723393", "0.46680927", "0.46662965", "0.46624038", "0.46613228", "0.46578476", "0.46566322", "0.4651847", "0.46515852", "0.4651217", "0.4647849", "0.46355778", "0.46338075" ]
0.69929045
0
Get Surveiller Details Of all the Component.
public static List<HealthCheckVO> getSurveillerDetailsOfComponent(boolean isDummyHealth) { HashMap<Long,HealthCheckVO> healthCheckVOMap = new HashMap<Long,HealthCheckVO>(); Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria healthCheckCriteria = session.createCriteria(HealthCheckEntity.class); healthCheckCriteria.add(Restrictions.eq("delInd", 0)); if(isDummyHealth){ healthCheckCriteria.add(Restrictions.eq("healthCheckType.healthCheckTypeId", HealthCheckType.DUMMY.getHealthCheckTypeId())); }else{ healthCheckCriteria.add(Restrictions.ne("healthCheckType.healthCheckTypeId", HealthCheckType.DUMMY.getHealthCheckTypeId())); } @SuppressWarnings("unchecked") List<HealthCheckEntity> checkEntities = healthCheckCriteria.list(); for(HealthCheckEntity entity : checkEntities) { HealthCheckVO hcVO = new HealthCheckVO(); hcVO.setHealthCheckId(entity.getHealthCheckId()); hcVO.setHealthCheckComponentId((long) entity.getComponent().getComponentId()); hcVO.setHealthCheckRegionId(entity.getRegion().getRegionId()); hcVO.setHealthCheckTypeClassName(entity.getHealthCheckType().getHealthCheckTypeClass()); hcVO.setHealthCheckTypeName(entity.getHealthCheckType().getHealthCheckTypeName()); hcVO.setHealthCheckRetryCurrentCount(entity.getFailedCount()); hcVO.setHealthCheckRetryMaxCount(entity.getMaxRetryCount()); if(entity.getCurrentStatus() != null){ hcVO.setCurrentStatus(entity.getCurrentStatus().getStatusId()); } hcVO.setEnvironmentId(entity.getEnvironment().getEnvironmentId()); hcVO.setEnvironmentName(entity.getEnvironment().getEnvironmentName()); hcVO.setRegionName(entity.getRegion().getRegionName()); ComponentEntity component = entity.getComponent(); int compTypeId = component.getComponentType().getComponentTypeId(); hcVO.setComponentType(ComponentType.INFRA.getComponentTypeId() == compTypeId ? ComponentType.INFRA: ComponentType.APP); ComponentVO cVo = new ComponentVO(); cVo.setComponentId(component.getComponentId()); cVo.setComponentName(component.getComponentName()); if(component.getParentComponent() != null) { cVo.setParentComponentId(component.getParentComponent().getComponentId()); cVo.setParentComponentName(component.getParentComponent().getComponentName()); } hcVO.setComponent(cVo); if(entity.getHealthCheckParams() !=null && entity.getHealthCheckParams().size() > 0) { Map<String,String> paramDetails = new HashMap<String,String>(); for(HealthCheckParamEntity hcp: entity.getHealthCheckParams()){ paramDetails.put(hcp.getHealthCheckParamKey(), hcp.getHealthCheckParamVal()); } hcVO.setParamDetails(paramDetails); } healthCheckVOMap.put(hcVO.getHealthCheckId(), hcVO); } txn.commit(); return new ArrayList<HealthCheckVO>(healthCheckVOMap.values()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Object[] get_ComponentInfo()\n {\n return new Object[]\n {\n \"ReporterMBean contains settings and statistics for the Coherence JMX Reporter.\",\n \"com.bea.owner=Context,com.bea.VisibleToPartitions=ALWAYS\",\n };\n }", "public List getPortletComponents() {\n return components;\n }", "public List<GComponent> getComponents()\n {\n return this.components;\n }", "public https.LnpSdStructure[] getService_details() {\n return service_details;\n }", "public Collection<InstrumentationComponent> getInstrumentationComponents() {\n return Collections.unmodifiableCollection(instruComps);\n }", "@Override\n public String toString() {\n StringBuilder buff = new StringBuilder();\n\n buff.append(\" refex:\");\n buff.append(informAboutUuid(this.refexUuid));\n buff.append(\" component:\");\n buff.append(informAboutUuid(this.componentUuid));\n buff.append(\" \");\n buff.append(super.toString());\n\n return buff.toString();\n }", "@Override\n\tpublic void printDescription() {\n\t\tfor(IComponent obj:components) {\n\t\t\tobj.printDescription();\n\t\t}\n\t\t\n\t}", "public String toString(){\n\t\t\treturn competitors.toString();\n\t\t}", "public List<ServiceResultInterface> getComponents() {\n\t\treturn components;\n\t}", "@Override\n public OgcPropertyList<AbstractProcess> getComponentList()\n {\n return components;\n }", "public CPGCommandResult getAllCPGDetails() throws Exception {\n _log.info(\"3PARDriver:getAllCPGDetails enter\");\n ClientResponse clientResp = null;\n\n try {\n clientResp = get(URI_CPGS);\n if (clientResp == null) {\n _log.error(\"3PARDriver:There is no response from 3PAR\");\n throw new HP3PARException(\"There is no response from 3PAR\");\n } else if (clientResp.getStatus() != 200) {\n String errResp = getResponseDetails(clientResp);\n throw new HP3PARException(errResp);\n } else {\n String responseString = clientResp.getEntity(String.class);\n _log.info(\"3PARDriver:getAllCPGDetails 3PAR response is {}\", responseString);\n CPGCommandResult cpgResult = new Gson().fromJson(sanitize(responseString),\n CPGCommandResult.class);\n return cpgResult;\n }\n } catch (Exception e) {\n throw e;\n } finally {\n if (clientResp != null) {\n clientResp.close();\n }\n _log.info(\"3PARDriver:getSystemDetails leave\");\n } //end try/catch/finally\n }", "public Enumeration components() {\n\t\treturn null;\n\t}", "public List<LComponent> getComponents()\n\t{\n\t\treturn this.components;\n\t}", "ComponentBodyType getComponentInfo();", "public String getDetails() {\n return toString();\n }", "protected ComponentStruct[] getFrontEndComponents() throws SessionQueryException\n {\n ComponentStruct[] frontEnds = null;\n\n try\n {\n frontEnds = getSessionManagementAdminService().getComponentsForType(Components.CRITICAL_COMPONENT);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT, frontEnds);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT,\n \"Found \" + frontEnds.length + \" Front End Components\");\n }\n }\n catch(Exception e)\n {\n throw new SessionQueryException(\"Could not retrieve Front End Components.\", e);\n }\n\n return frontEnds;\n }", "public String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"<div>\");\r\n\t\tsb.append(\"Names: \").append(this.getNames().toString()).append(\",<br/>\");\r\n\t\tsb.append(\"Addresses: \").append(this.getAddresses().toString()).append(\",<br/>\");\r\n\t\tsb.append(\"Contacts: \").append(this.getContacts().toString()).append (\",<br/>\");\r\n\t\tsb.append(\"Identifiers: \").append(this.getIdentifiers().toString()).append(\",<br/>\");\r\n\t\tsb.append(\"</div>\");\r\n\t\treturn sb.toString();\r\n\t}", "public Collection getESBComponentNames()\n {\n \treturn( getFrameworkXMLParser().getAttributesForEachOccurance( \"component\", \"name\" ) );\n }", "void vehicleDetails();", "@Override\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\t\tlogme.debug(String.format(\"Generating details for component %s\", ourComponent));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Get class membership\n\n\t\t\t\t\t\t\t\t\t// Get object properties\n\n\t\t\t\t\t\t\t\t\t// Get data properties\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Get problems\n\n\t\t\t\t\t\t\t\t\tprocessMessageQueue();\n\t\t\t\t\t\t\t\t}", "public List getComponentIdentifierList() {\n return componentIdentifiers;\n }", "ProductCatelogueResponse getProductCatelogues();", "public ArrayList<String> getComponents() {\n\t\treturn this.components;\n\t}", "public ArrayList<ComProduct> get_all_comproduct() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<ComProduct> ComProduct_list;\n\n\t\t\tComProduct_list = ComProduct_Default_Activity_dao.get_all_comproduct();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn ComProduct_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "public Map getESBComponentData( String componentName )\n {\n \tMap params = getFrameworkXMLParser().getAttributesForEachOccuranceBy( \"component\",\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\",\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcomponentName ); \t\n \treturn( params );\n }", "public List<ComponentType> getComponentsType() {\r\n\t\treturn ctDao.findAll();\r\n\t}", "public List<CriticalComponent> getCriticalComponents();", "public String toString()\r\n {\r\n String str = this.getClass().getName() + \"[\";\r\n String separator = \"\";\r\n\r\n Field[] fields = this.getClass().getDeclaredFields();\r\n\r\n for ( Field field : fields )\r\n {\r\n try\r\n {\r\n if ( field.getType().getName().equals( \"Brokerage\" ) )\r\n str += separator + field.getType().getName() + \" \"\r\n + field.getName();\r\n else\r\n str += separator + field.getType().getName() + \" \"\r\n + field.getName() + \":\" + field.get( this );\r\n }\r\n catch ( IllegalAccessException ex )\r\n {\r\n System.out.println( ex );\r\n }\r\n\r\n separator = \", \";\r\n }\r\n\r\n return str + \"]\";\r\n }", "public String[] getDetails() {\n\t\treturn details;\n\t}", "private void getItems() {\n getComputers();\n getPrinters();\n }", "private void dumpComponent(ServiceComponentExt comp)\n {\n log(\"*\");\n log(\"* ServiceComponent Information\");\n assertNotNull(\"SC Name cannot be null\", comp.getName());\n log(\"* SC Name: \" + comp.getName());\n int pid = comp.getPID();\n // TODO (Josh) Verify this range of pids\n assertTrue(\"SC Pid does not fall within valid range\", pid > 0 && pid < 65535);\n log(\"* SC Pid: \" + pid);\n log(\"* SC Assoc. Language: \" + comp.getAssociatedLanguage());\n assertNotNull(\"SC ServiceInformationType cannot be null\", comp.getServiceInformationType());\n log(\"* SC ServiceInformationType: \" + comp.getServiceInformationType());\n assertNotNull(\"SC StreamType cannot be null\", comp.getStreamType());\n log(\"* SC StreamType: \" + comp.getStreamType());\n short est = comp.getElementaryStreamType();\n // TODO (Josh) Enable once Elementary StreamType is broadcast properly\n // assertTrue(\"Elementary StreamType does not fall within valid range: 1-14 or 128-132 (inclusive)\",\n // (est > 0 && est < 15) && (est > 127 && est < 133));\n log(\"* SC Elementary StreamType: \" + est);\n assertNotNull(\"SC UpdateTime cannot be null\", comp.getUpdateTime());\n long now = new Date().getTime();\n long oneYearAgo = now - (1000 * 60 * 60 * 24 * 365);\n long oneYearAhead = now + (1000 * 60 * 60 * 24 * 365);\n assertTrue(\"ServiceDetails' Update time should not be more than a year off\", (oneYearAgo < comp.getUpdateTime()\n .getTime())\n && (oneYearAhead > comp.getUpdateTime().getTime()));\n log(\"* SC UpdateTime: \" + comp.getUpdateTime());\n try\n {\n log(\"* SC Component Tag: \" + comp.getComponentTag());\n }\n catch (SIException ex)\n {\n log(\"* SC Component Tag: UNDEFINED\");\n }\n try\n {\n log(\"* SC Carousel ID: \" + comp.getCarouselID());\n }\n catch (SIException ex)\n {\n log(\"* SC Carousel ID: UNDEFINED\");\n }\n assertNotNull(\"SC Locator cannot be null\", comp.getLocator());\n log(\"* SC Locator: \" + comp.getLocator());\n assertNotNull(\"SC Handle cannot be null\", comp.getServiceComponentHandle());\n log(\"* SC Handle: \" + comp.getServiceComponentHandle());\n assertNotNull(\"Returned ServiceDetails cannot be null\", comp.getServiceDetails());\n }", "private Vector getContactItems() {\n return protocol.getContactItems();\n }", "public String toString() {\n StringBuffer sb = new StringBuffer();\r\n sb.append(\"VENDOR: \" + vendor + \"\\n\");\r\n sb.append(\"RENDERER: \" + renderer + \"\\n\");\r\n sb.append(\"VERSION: \" + version + \"\\n\");\r\n sb.append(\"EXTENSIONS: \" + extensions + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"ALIASED_POINT_SIZE_RANGE: [\" + aliased_point_size_range[0]\r\n + \", \" + aliased_point_size_range[1] + \"]\\n\");\r\n sb.append(\"SMOOTH_POINT_SIZE_RANGE: [\" + smooth_point_size_range[0]\r\n + \", \" + smooth_point_size_range[1] + \"]\\n\");\r\n sb.append(\"SMOOTH_POINT_SIZE_GRANULARITY: \"\r\n + smooth_point_size_granularity[0] + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"MAX_ELEMENTS_VERTICES: \" + elements_vertices[0] + \"\\n\");\r\n sb.append(\"MAX_ELEMENTS_INDICES: \" + elements_indices[0] + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"SUPPORTED_STENCIL_BITS: \" + stencilbuffer_bits[0] + \"\\n\");\r\n sb.append(\"\\n\");\r\n sb.append(\"NUMBER_OF_SAMPLE_BUFFERS: \" + sample_buffers[0] + \"\\n\");\r\n sb.append(\"NUMBER_OF_SAMPLES: \" + samples[0] + \"\\n\");\r\n return sb.toString();\r\n }", "protected abstract Object[] getComponents();", "@Override\n\tpublic String toString() {\n\t\treturn \"id:\"+this.id+\",cid:\"+this.cid+\",pid:\"+this.pid+\",contacts:\"+this.contacts+\",tel\"+this.tel\n\t\t\t\t+\",code:\"+this.code+\",name:\"+this.name+\",category:\"+this.category+\",brand:\"+this.brand\n\t\t\t\t+\",license:\"+this.license+\",logo:\"+this.logo+\",image:\"+this.image+\",working:\"+this.working\n\t\t\t\t+\",workend:\"+this.workend+\",longtitude\"+this.longitude+\",latitude:\"+this.latitude+\",address:\"\n\t\t\t\t+this.address+\",info:\"+this.info+\",visit:\"+this.visit;\n\t}", "@Override\n\tpublic String toString() {\n StringBuffer buf = new StringBuffer();\n\n// for (int i = 0; i < units.size(); i++) {\n// buf.append(\"\\nUnit \" + i + \": \" + units.get(i));\n// }\n\n buf.append(\"Connected components: \" );\n List<List<Node>> components = GraphUtils.connectedComponents(graph);\n\n for (int i = 0; i < components.size(); i++) {\n buf.append(\"\\n\" + i + \": \");\n buf.append(components.get(i));\n }\n\n buf.append(\"\\nGraph = \" );\n buf.append(graph);\n\n return buf.toString();\n }", "public String getPassengersDetails(){\n waitForPageToLoad();\n String passengers = driver.findElement(oPassengerDetails).getText();\n logger.debug(\"passenger details are :\" + passengers);\n return passengers;\n }", "public int getComponentID() {\n return COMPONENT_ID;\n }", "@Override\n public String toString()\n {\n return getClass().getName() + \"[# of GrassPatches=\" + grassPatches.length+ \", # of Units=\" + walkers.size()+ \"]\";\n }", "@RequestMapping(value = {\"/admin2543/view_components\"}, method = RequestMethod.GET)\n public String view_components(Model model) {\n List<Component> components = componentDAO.getAllComponents();\n \n model.addAttribute(\"component\", new Component());\n model.addAttribute(\"components\", components);\n model.addAttribute(\"componentGroups\", this.getComponentGroupNames());\n return \"admin2543/component\";\n }", "protected ComponentStruct[] getCASComponents() throws SessionQueryException\n {\n ComponentStruct[] cases = null;\n\n try\n {\n cases = getSessionManagementAdminService().getComponentsForType(Components.SOURCE_COMPONENT);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT, cases);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT,\n \"Found \" + cases.length + \" CAS Components\");\n }\n }\n catch(Exception e)\n {\n throw new SessionQueryException(\"Could not retrieve CAS Components.\", e);\n }\n\n return cases;\n }", "public String getComponent() {\n return this.component;\n }", "@GetMapping(\"/getVehicleInformation\")\n public Iterable<Vehicle> getAllVehicle() {\n\n return vehicleService.list();\n }", "@Override\n public String getInfo() {\n return \"Car:\\n\" + \"\\tBrand: \" + getBrand() + \"\\n\" + \"\\tModel: \" + getModel() + \"\\n\"\n + \"\\tRegistration Number: \" + getRegistrationNumber() + \"\\n\"\n + \"\\tNumber of Doors: \" + getNumberOfDoors() + \"\\n\"\n + \"\\tBelongs to \" + owner.getName() + \" - \" + owner.getAddress();\n }", "@Override\n public List<TopComponent> getTopComponents() {\n synchronized(LOCK_TOPCOMPONENTS) {\n return topComponentSubModel.getTopComponents();\n }\n }", "public String toString() {\n\t\tStringBuilder returnStr = new StringBuilder();\n\t\tfor (Vehicle v : vehicles) {\n\t\t\treturnStr.append(v + \"\\n\");\n\t\t}\n\t\treturn returnStr.toString();\n\t}", "@Override\n public abstract String getComponentType();", "private List<List<XGraph.XVertex>> getComponents() {\n scc = new SCC(graph);\n int componentCount = scc.findSSC();\n List<List<XGraph.XVertex>> components = new ArrayList<>();\n for (int i = 0; i < componentCount; i++) {\n components.add(new ArrayList<>());\n }\n for (Graph.Vertex vertex : graph) {\n CC.CCVertex component = scc.getCCVertex(vertex);\n components.get(component.cno - 1).add((XGraph.XVertex) vertex);\n }\n return components;\n }", "public String toString(){\n if(isFullMessage()){\n return \"Adapter/\" + adapterController.getAdapter().getId() + \" -> \" + \"Sensor/\" + (getModel() != null ? getModel().getId() : \"Unknown sensor\");\n }else {\n return getModel() != null ? getModel().getName() + \"/\" + getModel().getId() : \"Unknown sensor\";\n }\n }", "@Override\n\tpublic void printPriceDescription() {\n\t\tfor(IComponent obj:components) {\n\t\t\tobj.printPriceDescription();\n\t\t}\n\t\t\n\t}", "public String toString() {\n return getServiceId();\n }", "public String toString(){\n return \"MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION - sysid:\"+sysid+\" compid:\"+compid+\" time_boot_ms:\"+time_boot_ms+\" firmware_version:\"+firmware_version+\" tilt_max:\"+tilt_max+\" tilt_min:\"+tilt_min+\" tilt_rate_max:\"+tilt_rate_max+\" pan_max:\"+pan_max+\" pan_min:\"+pan_min+\" pan_rate_max:\"+pan_rate_max+\" cap_flags:\"+cap_flags+\" vendor_name:\"+vendor_name+\" model_name:\"+model_name+\"\";\n }", "@Override\n\tpublic String toString() {\n\t\tString str = \"(\";\n\t\tif(this.error) str += \"1 - \";\n\t\tint i = 0;\n\t\tfor(String component : this.components) {\n\t\t\tif(i != 0) {\n\t\t\t\tstr += \" * \";\n\t\t\t}\n\t\t\tstr += component;\n\t\t\ti++;\n\t\t}\n\t\treturn str + \")\";\n\t}", "public void printAllComponentsOnStdOut() {\r\n System.out.println(\"PackageComponent: \" + this.getName());\r\n System.out.println(\"Contains these ClassDiagramComponents: \");\r\n int counter = 1;\r\n for (ComponentBase component : classDiagramComponents) {\r\n System.out.println(\"Component no.\" + counter + \": \\t\" + component.getName());\r\n counter++;\r\n }\r\n }", "@Override\n\tpublic String getOutros() {\n\t\treturn hamburguer.getOutros();\n\t}", "private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}", "public List<WebElement> getEventInformation() {\n return driver.findElements(By.className(\"list_embedded\")).get(0).findElements(By.className(\"linked\"));\n }", "public void getInfo () {\n int[] info = elevator.getInfo ();\n currFloor = info[0];\n maxCap = info[2];\n numFloors = info[3];\n currCap = info[5];\n state = info[6];\n }", "public Vector<Information> getInformation() {\n\t\t\tVector<Information> v = new Vector<Information>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tString reg = rs.getString(3);\n\t\t\t\t\tString make = rs.getString(4);\n\t\t\t\t\tString model = rs.getString(5);\n\t\t\t\t\tint drive = rs.getInt(6);\n\t\t\t\t\tboolean isAllocated = rs.getBoolean(7);\n\t\t\t\t\tInformation info = new Information(file_num, name, reg, make, model, drive, isAllocated);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(info);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public String toString()\n {\n return getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(this)) + \"[uniqueID=\" + getID()\n + \", serviceDescription=\" + data.serviceDescription + \", updateTime=\" + data.updateTime + \", lsData\"\n + ((lsData == null) ? \"=null\" : \"[language=\" + lsData.language + \"]\") + \"]\";\n }", "public Map getESBComponents()\n\t{\t\n\t\tMap endPoints = (Map)cache( \"components\" );\t\t\n\t\t\n\t\tif ( endPoints == null )\n\t\t{\n\t\t\tendPoints = new HashMap();\n\t\t\tCollection names \t= getESBComponentNames();\n\t\t\tIterator iter\t\t= names.iterator();\n\t\t\tString name\t\t\t= null;\n\t\t\t\t\n\t\t\twhile( iter.hasNext() )\n\t\t\t{\n\t\t\t\tname = (String)iter.next();\n\t\t\t\tendPoints.put( name, getESBComponentData( name ) );\n\t\t\t}\n\t\t\t\n\t\t\tcache( \"components\", endPoints );\n\t\t}\n\t\t\n\t\treturn( endPoints );\n\t}", "public List<RouteDTO> viewRouteDetails() throws FRSException\r\n\t{\n\t\treturn dao.getRouteList();\r\n\t}", "@Override\n public String toString() {\n return info();\n }", "public void getInformation(){\n if (car == null) {\n throw new InvalidParameterException(\"Service is null\");\n }\n System.out.println(\"Setter injection client\");\n System.out.println(car.getInformation());\n }", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "public String getVehicleDetails() throws VehicleException {\r\n\r\n\t\tif (weight == 0) {\r\n\t\t\tString ninthLine = String.format(\"%-20s %s\\n\", \"Clearance Height: \", CLEARANCE_HEIGHT);\r\n\t\t\treturn super.getVehicleDetails() + ninthLine;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tString ninthLine = String.format(\"%-20s %s\\n\", \"Clearance Height: \", CLEARANCE_HEIGHT);\r\n\t\tString tenthline = String.format(\"%-20s %s\\n\", \"Weight: \", weight);\r\n\t\tString eleventhLine = String.format(\"%-20s %s\\n\", \"Category: \", category);\r\n\t\treturn super.getVehicleDetails() + ninthLine + tenthline + eleventhLine;\r\n\r\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getInstanceId() != null)\n sb.append(\"InstanceId: \").append(getInstanceId()).append(\",\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getDescription() != null)\n sb.append(\"Description: \").append(getDescription()).append(\",\");\n if (getOutboundCallerConfig() != null)\n sb.append(\"OutboundCallerConfig: \").append(getOutboundCallerConfig()).append(\",\");\n if (getHoursOfOperationId() != null)\n sb.append(\"HoursOfOperationId: \").append(getHoursOfOperationId()).append(\",\");\n if (getMaxContacts() != null)\n sb.append(\"MaxContacts: \").append(getMaxContacts()).append(\",\");\n if (getQuickConnectIds() != null)\n sb.append(\"QuickConnectIds: \").append(getQuickConnectIds()).append(\",\");\n if (getTags() != null)\n sb.append(\"Tags: \").append(getTags());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\n String memory = super.toString();\n return memory + \"(\" + locations + \", \" + vehicles + \")\";\n }", "public String toString()\n {\n return \"PG/F: \" + PG + \", Department: \" + inspections + \", Contact Method: \" + method + \", Date: \" + date + \", Number: \" + num + \", Street: \" + street + \", Ward: \" + ward;\n }", "public void displayAll()\n {\n try\n {\n int i=0;\n for(HardwareDevice equip:equipment)\n {\n System.out.println(\"Equipment Number : \"+i);\n i++;\n equip.DisplayHardwareDevice();\n }\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private com.alibaba.wireless.security.framework.IRouterComponent getRouterComponent() {\n /*\n r2 = this;\n com.alibaba.wireless.security.framework.IRouterComponent r0 = gGlobalRounterComponent\n if (r0 != 0) goto L_0x0020\n java.lang.Class<com.alibaba.wireless.security.open.securityguardaccsadapter.AccsListner> r0 = com.alibaba.wireless.security.open.securityguardaccsadapter.AccsListner.class\n monitor-enter(r0)\n com.alibaba.wireless.security.framework.IRouterComponent r1 = gGlobalRounterComponent // Catch:{ all -> 0x001d }\n if (r1 != 0) goto L_0x001b\n android.content.Context r1 = com.alibaba.wireless.security.open.securityguardaccsadapter.AccsAdapter.gContext // Catch:{ Exception -> 0x001b }\n com.alibaba.wireless.security.open.SecurityGuardManager r1 = com.alibaba.wireless.security.open.SecurityGuardManager.getInstance(r1) // Catch:{ Exception -> 0x001b }\n com.alibaba.wireless.security.framework.ISGPluginManager r1 = r1.getSGPluginManager() // Catch:{ Exception -> 0x001b }\n com.alibaba.wireless.security.framework.IRouterComponent r1 = r1.getRouter() // Catch:{ Exception -> 0x001b }\n gGlobalRounterComponent = r1 // Catch:{ Exception -> 0x001b }\n L_0x001b:\n monitor-exit(r0) // Catch:{ all -> 0x001d }\n goto L_0x0020\n L_0x001d:\n r1 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x001d }\n throw r1\n L_0x0020:\n com.alibaba.wireless.security.framework.IRouterComponent r0 = gGlobalRounterComponent\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.alibaba.wireless.security.open.securityguardaccsadapter.AccsListner.getRouterComponent():com.alibaba.wireless.security.framework.IRouterComponent\");\n }", "public List<Component> getComponentNameList() throws Exception {\n\t\tLOGGER.info(\n\t\t\t\t\"Start of DataListTableBean.getComponentNameList()\");\n\t\ttry{\n\t\t\tcomponentNameList = componentService.findAllComponentName();\n\t\t} catch (Exception e) {\n\t\t\tmanageError(e, \"Error while getting Component List. \");\n\t\t}\n\t\tLOGGER.info(\n\t\t\t\t\"End of DataListTableBean.getComponentNameList()\");\n\t\treturn componentNameList;\n\t}", "public String getDetailsForVehicle() throws VehicleException {\r\n\t\tif (weight == 0) {\r\n\t\t\tString thirdLine = \",\" + CLEARANCE_HEIGHT;\r\n\t\t\treturn super.getDetailsForVehicle() + thirdLine;\r\n\t\t}\r\n\t\tString tenthLine = \",\" + CLEARANCE_HEIGHT + \",\" + weight + \",\" + \",\" + category;\r\n\t\treturn super.getDetailsForVehicle() + tenthLine;\r\n\t}", "public Collection<SimulationComponent> getSimulationComponents() {\n return Collections.unmodifiableCollection(components);\n }", "public List<Decomposition> getDecomp(){\n return decomplist;\n }", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void carDetails() {\n\t\t\r\n\t}", "java.lang.String getDetails();", "public List<StatefullComponent> getFields() {\n\t\treturn null;\r\n\t}", "public void afficheInfos() {\n int i;\n Polygone p;\n for(i=0;i<this.list.size();i++){\n p = (Polygone) this.list.get(i);\n System.out.println(\"–––––––––––––––––––––\");\n System.out.println(\"Type : \" + p.toString());\n System.out.println(\"Sommet :\");\n System.out.print(p.texteSommets());\n System.out.println(\"Perimetre : \" + p.perimetre());\n System.out.println(\"Surface : \" + p.surface());\n System.out.println(\"–––––––––––––––––––––\");\n } \n }", "@Override\n\t//for log purposes only\n\tpublic String toString() {\n\t\treturn \"[\" + id + \", \" + business_id + \", \" + \"image\" + \", \" + details\n\t\t\t\t+\",\"+ category +\",\"+ price + \"]\";\n\t}", "public SearchableInfo getSearchableInfo(ComponentName componentName) {\n try {\n return mService.getSearchableInfo(componentName);\n } catch (RemoteException ex) {\n throw ex.rethrowFromSystemServer();\n }\n }", "public DeviceDetails getDeviceDetails() throws LedgerException {\n ApduExchange.ApduResponse response = ApduExchange.exchangeApdu(device, CLA_BOLOS, INS_GET_VERSION, 0, 0);\n response.checkSW();\n return new DeviceDetails(response.getResponse());\n }", "protected String stringGoodsInfo() {\n String ret = \"Goods Supply\";\n for (G good : this.goods) {\n ret += \"\\nN = \" + good.supply;\n }\n return ret;\n }", "public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }", "public int getGadgetsSlots() {\n return base.getGadgetSlots();\n \n }", "public ImmutableComponent[] getComponents(){\n\t return this.components;\n\t}", "public List<Gadget> getGadgetList() {\n List<Gadget> gadgets = new ArrayList<>();\n orders.entrySet().stream().forEach((s) -> s.getValue().forEach((s1) -> gadgets.add(s1)));\n return gadgets;\n }", "public void scrapComponent(Lot lot, Component component) {\n\r\n\t}", "@DISPID(-2147417074)\n @PropGet\n com4j.Com4jObject all();", "@Override\r\n\tpublic String getDetails() {\r\n\t\tString result = \"\";\r\n\t\tresult += \"Vehicle ID: \t\t\t\" + getID() + \"\\n\" + \"Year:\t\t\t\t\" + getYear() + \"\\n\"\r\n\t\t\t\t+ \"Make:\t\t\t\t\" + getMake() + \"\\n\" + \"Model:\t\t\t\t\" + getModel() + \"\\n\"\r\n\t\t\t\t+ \"Number of seats:\t\t\" + getNumOfSeats() + \"\\n\" + \"Status:\t\t\t\t\" + getStatus() + \"\\n\"\r\n\t\t\t\t+ \"RENTAL RECORD:\t\t\" + \"\\n\";\r\n\r\n\t\tList<RentalRecord> carRecorder = databaseHandle.getAllRecordsByVehicleID(ID);\r\n\t\tfor (int i = 0; i < carRecorder.size() && i < 10; i++) {\r\n\t\t\tif (i == 0 && status == Status.RENTED) {\r\n\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t\t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tresult += \"------------------------------------\" + \"\\n\";\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1 - i);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t \t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\"\r\n\t\t\t\t\t\t+ \"Actual Return Date: \" + temp.getActualReturnDate() + \"\\n\" + \"Rental Fee: \t\t\t \"\r\n\t\t\t\t\t\t+ temp.getRentalFee() + \"\\n\" + \"Late Fee: \" + temp.getLateFee() + \"\\n\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tresult += \"====================================\" + \"\\n\";\r\n\t\treturn result;\r\n\t}", "public List<DetailerCall> getDetailers() {\n if (detailers == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DetailerCallDao targetDao = daoSession.getDetailerCallDao();\n List<DetailerCall> detailersNew = targetDao._queryTask_Detailers(uuid);\n synchronized (this) {\n if(detailers == null) {\n detailers = detailersNew;\n }\n }\n }\n return detailers;\n }", "public List<ProductModel> getAllDevices() {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getAllDev()\");\r\n\t\treturn deviceData.getAllDevices();\r\n\t}", "public Informations() {\n initComponents();\n \n Affichage();\n }", "private String mrqServiceProvDetail (MaintenanceRequest mrq) {\n\t\t//MaintenanceRequest maintRequest = maintenanceRequestDAO.getMaintenanceRequestByMrqId(mrqId);\n\t\tMaintenanceRequest maintRequest = mrq;\n\t\tString servProvDetail = null;\n\t\t\n\t\t//ServiceProvider serviceprovider = serviceProviderService.getServiceProvider(maintRequest.getServiceProvider().getServiceProviderId());\n\t\tServiceProvider serviceprovider = mrq.getServiceProvider();\n\t\tif(serviceprovider != null) {\t\t\t\t\n\t\t\tList<ServiceProviderAddress> addressList = serviceprovider.getServiceProviderAddresses();\n\t\t\tservProvDetail = serviceprovider.getServiceProviderName() + \"<br />No: \" + serviceprovider.getServiceProviderNumber();\n\t\t\tString address = null;\n\t\t\tif(addressList != null && addressList.size() > 0){\n\t\t\t\tfor(ServiceProviderAddress serviceProviderAddress : addressList){\n\t\t\t\t\tif(serviceProviderAddress.getDefaultInd() != null && serviceProviderAddress.getDefaultInd().equals(\"Y\")){\n\t\t\t\t\t\taddress = getServiceProviderFormattedAddress(serviceProviderAddress);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (MALUtilities.isNotEmptyString(maintRequest.getServiceProviderContactInfo())) {\n\t\t\t\tservProvDetail += \"<br />\" + maintRequest.getServiceProviderContactInfo().replaceAll(\"\\\\n\", \"<br />\");\n\t\t\t} else {\n\t\t\t\tif (address != null) {\n\t\t\t\t\tservProvDetail += \"<br />\" + address;\n\t\t\t\t}\n\t\t\t\tif(MALUtilities.isNotEmptyString(serviceprovider.getTelephoneNo())){\n\t\t\t\t\tservProvDetail = servProvDetail + \"<br>\" + serviceprovider.getTelephoneNo();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\treturn servProvDetail;\n\t}", "public String toString()\n {\n return (\"its engine has \" + cyl + \" cylinders and runs on \" +\n getFuelString() + \".\");\n }", "@Override\n\tpublic List<VisitorDetails> findAllData() {\n\t\treturn repo.findAll();\n\t}", "public Object[] getCompInfo() {\n\t\tObject comp[] = new Object[2];\n\t\tcomp[0] = \"IBM\";\n\t\tcomp[1] = 1000;\n\t\t\n\t\treturn comp;\n\t}" ]
[ "0.59107286", "0.5684355", "0.55813175", "0.5481689", "0.54512954", "0.5419652", "0.5345941", "0.5283025", "0.5183297", "0.51472104", "0.5140242", "0.5131466", "0.5129775", "0.5125835", "0.51217353", "0.51197577", "0.5106805", "0.5105062", "0.5074101", "0.5073953", "0.5073226", "0.506444", "0.506433", "0.50621504", "0.5055172", "0.5053403", "0.50469816", "0.50365126", "0.503619", "0.5030361", "0.50119567", "0.49970207", "0.49947602", "0.4987761", "0.4968237", "0.49651572", "0.49648955", "0.49630174", "0.49566436", "0.49488455", "0.49268633", "0.4925185", "0.49151808", "0.4915046", "0.4912755", "0.49088597", "0.4901929", "0.49005908", "0.48993912", "0.48935992", "0.48912722", "0.48906", "0.4889318", "0.48829558", "0.48794782", "0.4871183", "0.48696128", "0.48658273", "0.48633254", "0.48611313", "0.48580524", "0.48529282", "0.48500103", "0.4844325", "0.4838704", "0.48342192", "0.48324212", "0.4825397", "0.48134223", "0.48127523", "0.48122892", "0.4806175", "0.48015738", "0.4796371", "0.47961953", "0.47956416", "0.47944406", "0.47941995", "0.47884053", "0.47872797", "0.4786161", "0.47851238", "0.47797316", "0.47793818", "0.4778912", "0.47767085", "0.47725263", "0.47705364", "0.47693387", "0.47662738", "0.4762874", "0.47624177", "0.47586167", "0.4756831", "0.47532892", "0.4748743", "0.47394162", "0.47390935", "0.47387853", "0.47384793", "0.47362852" ]
0.0
-1
Get all the environment details
public static List<EnvironmentVO> getAllEnvironments() throws SQLException { ArrayList<EnvironmentVO> environmentVOs = new ArrayList<EnvironmentVO>(); Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria envCriteria = session.createCriteria(EnvironmentEntity.class); envCriteria.add(Restrictions.eq("envLock", 0)); @SuppressWarnings("unchecked") List<EnvironmentEntity> environmentEntities = envCriteria.list(); for(EnvironmentEntity entity : environmentEntities) { EnvironmentVO enVo = new EnvironmentVO(); enVo.setEnvironmentId(entity.getEnvironmentId()); enVo.setEnvironmentName(entity.getEnvironmentName()); enVo.setMarathonUrl(entity.getMarathonURL()); enVo.setMarathonCred(entity.getMarathonCred()); if(entity.getMarathonJson()!=null){ byte[] data = entity.getMarathonJson().getBytes(1, (int) entity.getMarathonJson().length()); enVo.setMarathonJson(new String(data)); } enVo.setEastMarathonUrl(entity.getEastMarathonURL()); if(entity.getEastMarathonJson()!=null){ byte[] data = entity.getEastMarathonJson().getBytes(1, (int) entity.getEastMarathonJson().length()); enVo.setEastMarathonJson(new String(data)); } enVo.setK8sUrl(entity.getK8sUrl()); enVo.setK8sCred(entity.getK8sCred()); enVo.setK8sTpsQuery(entity.getK8sTpsQuery()); enVo.setK8sLatencyQuery(entity.getK8sLatencyQuery()); enVo.setMesosTpsQuery(entity.getMesosTpsQuery()); enVo.setMesosLatencyQuery(entity.getMesosLatencyQuery()); environmentVOs.add(enVo); } txn.commit(); return environmentVOs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, String> getEnvironment();", "public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }", "@Override\n\tpublic String getEnvironmentVars() {\n\t\treturn model.getEnvironmentVars();\n\t}", "private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }", "java.util.List<java.lang.String>\n getEnvList();", "Properties getEnvironment();", "Properties getEnvironment();", "public Map<String, String> getEnv()\n {\n return env;\n }", "String getEnvironment();", "public int[][] getEnvironment() {\n return this.environment;\n }", "public Map<String, String> getEnv(IProject project) throws CoreException;", "public String[] getEnvironmentParams()\r\n\t{\r\n\t\treturn environmentParams;\r\n\t}", "public synchronized Map<String, String> getenv() {\n return System.getenv();\n }", "public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }", "public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }", "public String getEnvironment() {\n return environment;\n }", "public String getEnv() {\n\n return env;\n }", "public Map<String, String> environmentVariables() {\n return this.environmentVariables;\n }", "public Environment environment()\n {\n return theEnv;\n }", "public FxEnvironment getEnvironment() {\n return CacheAdmin.getFilteredEnvironment();\n }", "private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }", "@Override\n public List<EnvironmentVariable> findAll() throws Exception {\n return null;\n }", "public String[] getEnvArray()\n {\n return (String[])envMap.values().toArray(new String[envMap.size()]);\n }", "public org.eclipse.stardust.engine.api.runtime.RuntimeEnvironmentInfo\n getRuntimeEnvironmentInfo()\n throws org.eclipse.stardust.common.error.WorkflowException;", "public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}", "public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_.getUnmodifiableView();\n }", "public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_;\n }", "public Map<String, String> getEnvironmentVariables(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return environmentVariables;\n }", "public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}", "public Env getEnv() {\n\t\treturn _env;\n\t}", "public Map<String, String> getEnv(URI uri) throws CoreException;", "public int getEnvCount() {\n return env_.size();\n }", "public int getEnvCount() {\n return env_.size();\n }", "java.lang.String getEnv(int index);", "public static java.util.List<it.vmt.gh.sb.model.Environment>\n\t\tgetEnvironments(int start, int end) {\n\n\t\treturn getService().getEnvironments(start, end);\n\t}", "public abstract Map<String, String> getEnvironment(NIOWorker nw);", "public List<AppServiceEnvironmentInner> hostingEnvironments() {\n return this.hostingEnvironments;\n }", "private void cmdInfoVars() throws NoSystemException {\n MSystem system = system();\n \n System.out.print(system.getVariableEnvironment());\n }", "public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }", "public EnvironmentType getEnvTypes() {\n return envTypes;\n }", "public java.lang.String getEnv(int index) {\n return env_.get(index);\n }", "public static ApplicationEnvironment getEnvironment (){\n\t\treturn _applicationEnvironment;\n\t}", "public java.lang.String getEnv(int index) {\n return env_.get(index);\n }", "private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }", "public String getEnvironmentName() {\n return this.environmentName;\n }", "public static void printSystemVariables() {\n\t\tMap<String, String> env = System.getenv();\n\t\tfor (Map.Entry<String, String> entry : env.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \" : \" + entry.getValue());\n\t\t}\n\t}", "@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}", "public EnvironmentFrame getEnvironmentFrame() {\n\t\treturn myEnvFrame;\n\t}", "public PythonInterpreter getEnvironment(String name) {return environments.get(name);}", "public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}", "public static int getEnvironmentsCount() {\n\t\treturn getService().getEnvironmentsCount();\n\t}", "private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }", "public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }", "public List<HostingEnvironmentDeploymentInfo> hostingEnvironmentDeploymentInfos() {\n return this.hostingEnvironmentDeploymentInfos;\n }", "int getEnvCount();", "public String toString () {\n String r = \"[ \";\n for (Env env = this; env != null; env = env.next) { \n r += env.key + \" \";\n }\n r += \"]\";\n return r;\n }", "public String getContainerEnv() {\n return containerEnv;\n }", "public String getSystemEnv() {\n return \"\";\n }", "public static Map<String, Object> getAllKnownProperties(Environment env) {\n\t Map<String, Object> rtn = new HashMap<>();\n\t if (env instanceof ConfigurableEnvironment) {\n\t for (PropertySource<?> propertySource : ((ConfigurableEnvironment) env).getPropertySources()) {\n\t if (propertySource instanceof EnumerablePropertySource) {\n\t for (String key : ((EnumerablePropertySource) propertySource).getPropertyNames()) {\n\t rtn.put(key, propertySource.getProperty(key));\n\t }\n\t }\n\t }\n\t }\n\t return rtn;\n\t}", "public String[] getConnessionDetails() {\r\n\t\treturn new String[]{server.getText(),port.getText(),database.getText(),user.getText(),password.getText()};\r\n\t}", "protected HashSet<String> getEnvironmentDependentSystems() {\r\n\t\tif (environmentDependentSystems==null) {\r\n\t\t\tenvironmentDependentSystems = new HashSet<String>();\r\n\t\t}\r\n\t\treturn environmentDependentSystems;\r\n\t}", "@Override\n\tpublic Environment getEnvironment() {\n\t\tif (environment == null) {\n\t\t\tenvironment = new StandardEnvironment();\n\t\t}\n\t\treturn environment;\n\t}", "public Single<EnvironmentInfo> getDeviceInfo() {\n return Single.just(EnvironmentInfo.create(Build.VERSION.RELEASE,\n String.format(\"%s(%s)\", BuildConfig.VERSION_NAME,\n BuildConfig.VERSION_CODE), Build.MODEL));\n }", "private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }", "public String getWebEnv(int i){\n return this.webEnvs.get(i);\n }", "Environment getEnvironment() {\n return recordingEnv;\n }", "@Override\n public Environment getEnvironment(int w, int h)\n {\n return master.getEnvironment(w, h);\n }", "public String[] getDetailsAboutThisMachine() throws StoreFactoryException;", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getEnvironmentName() != null)\n sb.append(\"EnvironmentName: \").append(getEnvironmentName()).append(\",\");\n if (getMaxResults() != null)\n sb.append(\"MaxResults: \").append(getMaxResults()).append(\",\");\n if (getNextToken() != null)\n sb.append(\"NextToken: \").append(getNextToken()).append(\",\");\n if (getRequestedBy() != null)\n sb.append(\"RequestedBy: \").append(getRequestedBy()).append(\",\");\n if (getStatuses() != null)\n sb.append(\"Statuses: \").append(getStatuses());\n sb.append(\"}\");\n return sb.toString();\n }", "public static void queryEnvironments() throws SQLException {\n\t\tList<DatabaseEnv> envs = dbEnvMgr.getEnvironments();\n\t\tif (envs == null) {\n\t\t\tlog.warn(\"No environments detected. Nothing to query\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (DatabaseEnv env : envs) {\n\t\t\tString envName = env.getEnvName();\n\n\t\t\t\n\n\t\t\tfor (Query q : qMgr.getQueries()) {\t\n\t\t\t\tConnection connection = ConnectionFactory.getConnection(env, q);\n\t\t\t\tlog.info(String.format(\"Connected to database %s under user %s \", envName, q.getSchema()));\n\t\t\t\ttry {\n\t\t\t\t\tJDBCManager.executeQuery(connection, env, q);\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tif (connection != null) {\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\tconnection = null;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tlog.info(\"DONE!\");\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }", "public static java.util.List<it.vmt.gh.sb.model.Environment>\n\t\tgetEnvironmentsByUuidAndCompanyId(String uuid, long companyId) {\n\n\t\treturn getService().getEnvironmentsByUuidAndCompanyId(uuid, companyId);\n\t}", "public static List<VarListEntryType> getCommonEnvVars(API api) {\n\t\tList<VarListEntryType> list = new ArrayList<VarListEntryType>();\n\t\tEnvVariableList moduleEnvVarList = api.getEnvVariableList();\n\t\tif (moduleEnvVarList != null) {\n\t\t\tfor (EnvVariable var : moduleEnvVarList.getEnvVariables()) {\n\t\t\t\tif (var.getName().equals(\"VISHNU_CONFIG_FILE\")) {\n\t\t\t\t\tVarListEntryType entry = DocbookFactory.eINSTANCE.createVarListEntryType();\n\t\t\t\t\tgenerateEnvVarEntry(entry, var.getName(), var.getDescription(), null);\n\t\t\t\t\tlist.add(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public Continuous2D getEnvironment() {\n return environment;\n }", "public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.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\n\t }", "com.google.protobuf.ByteString\n getEnvBytes(int index);", "public String environmentId() {\n return environmentId;\n }", "public String getEnvironmentId() {\n return this.EnvironmentId;\n }", "public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }", "@Override\n public Environment getEnvironment(String organization, String uuid) throws APIManagementException {\n Environment env = APIUtil.getReadOnlyEnvironments().get(uuid);\n if (env == null) {\n env = apiMgtDAO.getEnvironment(organization, uuid);\n if (env == null) {\n String errorMessage =\n String.format(\"Failed to retrieve Environment with UUID %s. Environment not found\", uuid);\n throw new APIMgtResourceNotFoundException(errorMessage, ExceptionCodes\n .from(ExceptionCodes.GATEWAY_ENVIRONMENT_NOT_FOUND, String.format(\"UUID '%s'\", uuid)));\n }\n }\n return env;\n }", "public IEnvVarBuildPath[] getEnvVarBuildPaths();", "public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }", "public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}", "public static List<VarListEntryType> getJobEnvVars(API api) {\n\t\tList<VarListEntryType> list = new ArrayList<VarListEntryType>();\n\t\tJobEnvVariableList moduleJobEnvVarList = api.getJobEnvVariableList();\n\t\tif (moduleJobEnvVarList != null) {\n\t\t\tfor (EnvVariable var : moduleJobEnvVarList.getEnvVariables()) {\n\n\t\t\t\tVarListEntryType entry = DocbookFactory.eINSTANCE.createVarListEntryType();\n\t\t\t\tgenerateEnvVarEntry(entry, var.getName(), var.getDescription(), null);\n\t\t\t\tlist.add(entry);\n\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@SuppressWarnings(\"unchecked\")\n public static Hashtable<?, ?> getInitialEnvironment(Hashtable<?, ?> env) throws NamingException {\n String[] props = VersionHelper.PROPS; // system/applet properties\n if (env == null) {\n env = new Hashtable<>(11);\n }\n Object applet = env.get(Context.APPLET);\n\n // Merge property values from env param, applet params, and system\n // properties. The first value wins: there's no concatenation of\n // colon-separated lists.\n // Read system properties by first trying System.getProperties(),\n // and then trying System.getProperty() if that fails. The former\n // is more efficient due to fewer permission checks.\n //\n String[] jndiSysProps = helper.getJndiProperties();\n for (int i = 0; i < props.length; i++) {\n Object val = env.get(props[i]);\n if (val == null) {\n if (applet != null) {\n val = AppletParameter.get(applet, props[i]);\n }\n if (val == null) {\n // Read system property.\n val = (jndiSysProps != null) ? jndiSysProps[i] : helper.getJndiProperty(i);\n }\n if (val != null) {\n ((Hashtable<String, Object>) env).put(props[i], val);\n }\n }\n }\n\n // Return without merging if application resource files lookup\n // is disabled.\n String disableAppRes = (String) env.get(DISABLE_APP_RESOURCE_FILES);\n if (disableAppRes != null && disableAppRes.equalsIgnoreCase(\"true\")) {\n return env;\n }\n\n // Merge the above with the values read from all application\n // resource files. Colon-separated lists are concatenated.\n mergeTables((Hashtable<Object, Object>) env, getApplicationResources());\n return env;\n }", "@Test\n public void testGetEnvironmentApplications() {\n EnvironmentViewBuilder builder = EnvironmentViewBuilder.getInstance(\"Test environment\");\n builder.setServerDAO(new MockEnvironmentViewDAO());\n builder.setRunningApplicationChecker(new MockRunningApplicationChecker());\n EnvironmentView view = builder.getEnvironmentView(Long.MAX_VALUE);\n Assert.assertEquals(\"Test Application\", view.getRows().get(2).getApplicationName());\n Assert.assertEquals(\"Test Application\", view.getRows().get(2).getApplication().getNameInEnvironmentView());\n\n ServerSessionPool ssp = allSessionPools.getServerSessionPool(server);\n // if you get connection refused try installing openssh-server. On Ubuntu...\n //\n // sudo apt update\n // sudo apt install openssh-server\n // sudo systemctl status ssh\n //\n // and generate your public/private rsa key pair.\n //\n // ssh-keygen -t rsa\n //\n Session session = ssp.getSession(\"testGetEnvironmentApplications\");\n session.setEnvironmentName(\"Test environment\");\n\n ApplicationViewBuilder applicationViewBuilder = new ApplicationViewBuilder();\n String apps = applicationViewBuilder.getEnvironmentApplications(session.getSessionId());\n\n // It finds the environment from the sessionId and lists all applications on the server.\n\n Assert.assertEquals(\"sessionID............: \" + session.getSessionId() + \"\\n\" +\n \"nameInEnvironmentView: Test Application\\n\" +\n \"fileName.............: applications/test-application-with-long-name-001.txt\\n\" +\n \"ps -ef | grep java...: test-application\\n\" +\n \"and stdout '1' from..: if [ -d /var/log/test-application ] ; then echo \\\"1\\\" ; else echo \\\"0\\\"; fi\\n\" +\n \"and stdout '1' from..: echo 1\\n\" +\n \"<\\n\" +\n \"sessionID............: \" + session.getSessionId() + \"\\n\" +\n \"nameInEnvironmentView: Environment monitor\\n\" +\n \"fileName.............: applications/environment-monitor-001.txt\\n\" +\n \"ps -ef | grep java...: monitor.api.Main\"\n , apps);\n allSessionPools.logoutAllSessionsOnAllServers(\"testGetEnvironmentApplications\");\n\n }", "public static Properties getEnvVars() throws Throwable {\n Process p = null;\n Properties envVars = new Properties();\n Runtime r = Runtime.getRuntime();\n String OS = System.getProperty(\"os.name\").toLowerCase();\n if (OS.indexOf(\"windows 9\") > -1) {\n p = r.exec(\"command.com /c set\");\n } else if ((OS.indexOf(\"nt\") > -1) || (OS.indexOf(\"windows 2000\") > -1)\n || (OS.indexOf(\"windows xp\") > -1)) {\n p = r.exec(\"cmd.exe /c set\");\n } else {\n // our last hope, we assume Unix\n p = r.exec(\"env\");\n }\n try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()))) {\n String line;\n while ((line = br.readLine()) != null) {\n int idx = line.indexOf('=');\n if (idx < 0)\n continue;\n String key = line.substring(0, idx);\n String value = (idx < line.length() - 1) ? line.substring(idx + 1) : \"\";\n envVars.setProperty(key, value);\n }\n }\n // do nothing\n return envVars;\n }", "@Override\n public Page<EnvironmentVariable> findAll(PagingAndSorting pagingAndSorting) throws Exception {\n return null;\n }", "public GameEnvironment getGameEnvironment() {\r\n return this.gameE;\r\n }", "public EnvironmentStateManager getEnvironmentStateManager() {\n\t\treturn environmentStateManager;\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Environment size: \");\n sb.append(environmentSize);\n sb.append(\"\\n\");\n sb.append(\"Maximum number of iterations: \");\n sb.append(maxIterations);\n sb.append(\"\\n\");\n sb.append(\"Number of environment simulations: \");\n sb.append(numEnvironmentRuns);\n\n if (environment instanceof EnvironmentAI) {\n sb.append(\"\\n\");\n sb.append(\"Number of inputs: \").append(numInputs);\n sb.append(\"\\n\");\n sb.append(\"Number of hidden units: \").append(numHiddenUnits);\n sb.append(\"\\n\");\n sb.append(\"Number of outputs: \").append(numOutputs);\n sb.append(\"\\n\");\n sb.append(\"Activation function(s): \").append(activationFunctions);\n }\n\n return sb.toString();\n }", "Environment createEnvironment();", "Environment createEnvironment();", "String getEnvironmentProperty(String key);", "default Map<String, String> get() {\n Map<String, String> tags = new HashMap<>();\n tags.put(\"application\", serviceInfo().getServiceName());\n tags.put(\"host\", serviceInfo().getHost());\n tags.put(\"environment\", serviceInfo().getEnvironment());\n return tags;\n }", "public void intServerEnv() {\n\t\tServerUtils serverUtils = new ServerUtils();\n\t\tTouchstoneParsers parsers = new TouchstoneParsers();\n\n\t\tString CONFIGFILE = psoResourcePkg + \"/configs/server.properties\";\n\t\tString testConfigFile = ServerUtils.class.getResource(CONFIGFILE).getFile();\n\n\t\tHashMap<String, HashMap<String, String>> configPropsMap = parsers.readPropsFile(new File(testConfigFile));\n\t\thostIP = (configPropsMap.get(\"URL_PARAMS\").get(\"LOCAL_ENV\").equalsIgnoreCase(\"yes\") ? \"localhost\" : serverUtils.getHostIp());\n\n\t\t// JDBC driver name and database URL\n\t\tJDBC_DRIVER=\"com.mysql.jdbc.Driver\";\n\t\tDB_URL=\"jdbc:mysql://\" + hostIP + \"/psotest\";\n\n\t\t// Database credentials\n\t\tUSERID = configPropsMap.get(\"SERVER_ENV\").get(\"USERID\");\n\t\tPASSWORD = configPropsMap.get(\"SERVER_ENV\").get(\"PASSWORD\");\n\n\t\t// Database tables:\n\t\tCLICKS_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"CLICKS_TABLE\");\n\t\tBEACON_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"BEACON_TABLE\");\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprotected final SituatedEnvironment<?,?,?,?,IT> getEnvironment() {\n\t\tEnvironment env = Kernel.getSingleton().getEnvironment();\n\t\tif (env instanceof SituatedEnvironment) {\n\t\t\treturn (SituatedEnvironment<?,?,?,?,IT>)env;\n\t\t}\n\t\treturn null;\n\t}", "public NestedSet<Pair<String, String>> getCoverageEnvironment() {\n return coverageEnvironment;\n }", "public static it.vmt.gh.sb.model.Environment\n\t\tfetchEnvironmentByUuidAndGroupId(String uuid, long groupId) {\n\n\t\treturn getService().fetchEnvironmentByUuidAndGroupId(uuid, groupId);\n\t}", "private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }" ]
[ "0.7503618", "0.73512733", "0.7350799", "0.72285134", "0.717996", "0.71411985", "0.71411985", "0.71367586", "0.70153373", "0.69055676", "0.68585354", "0.6727734", "0.6704461", "0.66673", "0.6647733", "0.66108656", "0.66071486", "0.65755737", "0.6548353", "0.6545976", "0.65283465", "0.6517245", "0.64985317", "0.6480322", "0.6478393", "0.6444106", "0.6424229", "0.6401505", "0.6401116", "0.6339641", "0.6285339", "0.6285244", "0.6276655", "0.62449414", "0.6220075", "0.62178975", "0.61710536", "0.6154258", "0.6137464", "0.61238617", "0.61057526", "0.6092473", "0.60911804", "0.60590214", "0.60418785", "0.6015215", "0.60031706", "0.59871584", "0.59793204", "0.5956778", "0.59547037", "0.5933635", "0.59331954", "0.5932647", "0.59062165", "0.5871103", "0.58577716", "0.5845647", "0.5828811", "0.5779448", "0.57508385", "0.57376844", "0.57277083", "0.5660007", "0.5655313", "0.5654774", "0.5639563", "0.5634666", "0.5633633", "0.56090087", "0.55823916", "0.5573665", "0.5543221", "0.55424196", "0.55091345", "0.5508819", "0.5493139", "0.54860187", "0.54856646", "0.54831195", "0.5477783", "0.5464785", "0.545509", "0.54505396", "0.5438885", "0.5438524", "0.54365695", "0.5411753", "0.53632534", "0.53555155", "0.5352512", "0.5334959", "0.5334959", "0.5322903", "0.52692467", "0.5234019", "0.52205163", "0.5219365", "0.5218097", "0.520479" ]
0.64737976
25
Updates the Health CheckStatus In DB.
public static List<HealthCheckVO> updateHealthCheckStatusInDB(List<HealthCheckVO> healthCheckVOs) throws SQLException { List<HealthCheckVO> returnStatusChangedList = new ArrayList<HealthCheckVO>(); for (HealthCheckVO healthCheckVO : healthCheckVOs) { if(healthCheckVO.getStatus() == null) { logger.error("STATUS CHECK FAILED>> ComponentId : " + healthCheckVO.getHealthCheckId() + "; RegionId : " + healthCheckVO.getHealthCheckRegionId()); continue; } Status status = healthCheckVO.getStatus().getStatus(); if (status == null) { logger.error("STATUS CHECK FAILED>> ComponentId : " + healthCheckVO.getHealthCheckId() + "; RegionId : " + healthCheckVO.getHealthCheckRegionId()); continue; } if(!status.equals(Status.UP)){ logger.info("STATUS CHECK SUCCESS>> HealthCheckId : " + healthCheckVO.getHealthCheckId() + "; RegionId : " + healthCheckVO.getHealthCheckRegionId() + "; isSuccess : " + status.getStatusName() + "; Message : " + status.getStatusDesc()); } try { boolean isStatusChanged = updateStatus(healthCheckVO); if(isStatusChanged){ returnStatusChangedList.add(healthCheckVO); } } catch (Exception ex) { logger.error("Exception in DB Update Doing Rollback", ex); throw ex; } } logger.debug("DB Update Success - Doing commit"); return returnStatusChangedList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void updateHealthCheckStatus(final HealthCheckVO healthCheckVO, final int currentFailedCount) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\t\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\tif ((healthCheckVO.getCurrentStatus() == null && status == Status.UP) || status == healthCheckVO.getCurrentStatus()\n\t\t\t\t|| (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) ) {\n\t\t\tString queryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE_WITH_STATUS;\n\t\t\tif (healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\t\tqueryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE;\n\t\t\t}\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tQuery query = session.createQuery(queryString)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tif (healthCheckVO.getCurrentStatus() != null \n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()){\n\t\t\t\t/*NOT - First time status check. Failed but did not cross max-retry count */\n\t\t\t\tsts.setStatusId(healthCheckVO.getCurrentStatus().getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t} else if (!(healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue())) {\n\t\t\t\t/* First time status check. Status changed and max-retry count is crossed. No need to update lastStatusChange */\n\t\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t}\n\t\t\tquery.executeUpdate();\n\t\t} else {\n\t\t\tQuery query = session.createQuery(HQLConstants.UPDATE_HEALTH_CHECK_CHANGE)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setTimestamp(\"lastStatusChange\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\tquery.setEntity(\"status\", sts);\n\t\t\tquery.executeUpdate();\n\t\t}\n\t\ttxn.commit();\n\t}", "private static boolean updateStatus(HealthCheckVO healthCheckVO)\n\t\t\t{\n\t\tStatus status = healthCheckVO.getStatus().getStatus();\n\t\tlong currentFailedCount = 0;\n\t\tif (status != Status.UP) {\n\t\t\tif (healthCheckVO.getHealthCheckRetryCurrentCount() == null) {\n\t\t\t\tcurrentFailedCount = 1;\n\t\t\t} else {\n\t\t\t\tcurrentFailedCount = healthCheckVO.getHealthCheckRetryCurrentCount() + 1;\n\t\t\t}\n\t\t}\n\t\tupdateHealthCheckStatus(healthCheckVO, (int)currentFailedCount);\n\t\tboolean isStatusChaged = updateFilureLog(healthCheckVO, currentFailedCount);\n\t\tupdateHistory(healthCheckVO, (currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) );\n\t\treturn isStatusChaged;\n\t}", "void updateHouseStatus(long houseId, int status);", "void updateHouseStatus(String username, long houseId, int status);", "private static void updateHealthCheck(final Long healthCheckId, final Integer healthCheckTypeId) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_TYPE);\n\t\tquery.setLong(\"hcTypeId\", healthCheckTypeId);\n\t\tquery.setLong(\"healthCheckId\", healthCheckId);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "Future<UpdateHealthCheckerResponse> updateHealthChecker(\n UpdateHealthCheckerRequest request,\n AsyncHandler<UpdateHealthCheckerRequest, UpdateHealthCheckerResponse> handler);", "@Test\r\n\r\n\tpublic void testUpdateStatus() {\r\n\t\tString status = \"accept\";\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.findByEmail(\"shaline@gmail.com\"))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.save(backgroundverification1))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\tBackgroundverification backgroundverification = backgroundVerificationAndLeaseAdmnServiceImpl\r\n\t\t\t\t.updateStatus(\"shaline@gmail.com\", status);\r\n\t\tassertEquals(\"accept\", backgroundverification.getApp_bgc_status());\r\n\r\n\t}", "public void updateStatus() {\n\n //loading the driver\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //database variables\n final String db = \"jdbc:mysql://mis-sql.uhcl.edu/dingorkarj2620\";\n Connection con = null;\n Statement st = null;\n ResultSet rs = null;\n\n try {\n //connecting database\n con = DriverManager.getConnection(db, \"dingorkarj2620\", \"1289968\");\n st = con.createStatement();\n rs = st.executeQuery(\"select * from account where a_id = \" + super.id);\n\n //updating the status\n if (rs.next()) {\n //premium seller\n if (rs.getString(3).equalsIgnoreCase(\"premium\")) {\n //update the item status\n i.setI_status(\"Valid\");\n\n } else {\n //regular seller\n if (rs.getString(3).equalsIgnoreCase(\"regular\")) {\n //checking price lower or higher than 100\n if (i.getI_price() <= 100) {\n //update status valid\n i.setI_status(\"Valid\");\n } else {\n //update status pending\n i.setI_status(\"Invalid\");\n }\n }\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n con.close();\n st.close();\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n }", "ChangeStatus checkStatus(Database database);", "Status updateStatus(StatusUpdate latestStatus) throws TwitterException;", "public void status(String status) {\n FirebaseDatabase.getInstance().getReference(\"chef_account_settings\").child(firebaseUser.getUid()).child(\"status\").setValue(status);\n// HashMap<String, Object> hashMap = new HashMap<>();\n// hashMap.put(\"status\", status);\n// reference.updateChildren(hashMap);\n }", "public abstract void updateStatus() throws Throwable;", "int updateByPrimaryKey(StatusReplies record);", "public static void updateMarathonHealthCheckStatus(final int componentId, final int environmentId,\n\t\t\tfinal long regionID,final HealthCheckType healthCheckType, final Status status, boolean isStatusChanged) {\n\t\tString queryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_NO_CHG;\n\t\tif(isStatusChanged){\n\t\t\tqueryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_CHG;\n\t\t}\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(queryString);\n\t\tquery.setLong(\"statusId\", status.getStatusId());\n\t\tquery.setTimestamp(\"statusUpdateTime\", new java.sql.Timestamp(System.currentTimeMillis()));\n\t\tquery.setLong(\"healthCheckTypeId\", healthCheckType.getHealthCheckTypeId());\n\t\tquery.setLong(\"environmentId\", environmentId);\n\t\tquery.setLong(\"componentId\", componentId);\n\t\tquery.setLong(\"regionId\", regionID);\n\t\tint rowCount = query.executeUpdate();\n\t\tlogger.info(\"Number of Updated Kubernetes row - \"+ rowCount);\n\t\ttxn.commit();\n\t\t\n\t}", "public void updateStatus(JobStatus status, String userId) throws DatabaseException, IllegalArgumentException;", "List<Status> getAllChecklistStatus() throws ServiceException;", "public void updateSyncStatus(String id, String status)\n {\n SQLiteDatabase database = this.getWritableDatabase(); \n String updateQuery = \"Update UsersTable set udpateStatus = '\"+ status +\"' where userId=\"+\"'\"+ id +\"'\";\n Log.d(\"query\",updateQuery); \n database.execSQL(updateQuery);\n database.close();\n }", "default void checkIn(String name, HealthStatus status) {\n }", "Status updateStatus(String status) throws TwitterException;", "@Override\n public void updateStatus(Status status) {\n this.status = status;\n }", "public void updateStatus (DataSource pool,String status) throws SQLException {\r\n this.setStatus(status);\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set status = ? \"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatus. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getStatus());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n conn.close();\r\n conn=null;\r\n }catch(SQLException e){\r\n \r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}", "public void status(String status)\r\n {\r\n reference=FirebaseDatabase.getInstance().getReference(\"Users\").child(firebaseUser.getUid());\r\n HashMap<String,Object>hashMap=new HashMap<>() ;\r\n hashMap.put(\"status\",status) ;\r\n reference.updateChildren(hashMap);\r\n }", "public int updateCheck(Object obj) throws SQLException {\n\t\treturn dao.updateCheck(obj);\n\t}", "@Override\n\tpublic boolean updateTaskStatus(int id, String status) throws SQLException, ClassNotFoundException{\n\t\t Connection c = null;\n\t\t Statement stmt = null;\n\t\t \n\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t\t c.setAutoCommit(false);\n\t\t \n\t\t logger.info(\"Opened database successfully (updateTaskStatus)\");\n\t\t \n\t\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task WHERE id=\"+id+\";\" );\n\t rs.next();\n\t \n\t if(rs.getString(\"status\").equals(status))\n\t {\n\t \t return false;\n\t }\n\t \n\t stmt = c.createStatement();\n\t \n\t String sql = \"UPDATE task SET status='\"+status+\"' WHERE id=\"+id+\";\";\n\t \n\t stmt.executeUpdate(sql);\n\t \n\t stmt.close();\n\t c.commit();\n\t c.close();\n\t \n\t logger.info(\"Task Status changed to planned\");\n\t\t \n\t return true;\n\t}", "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "public void updateSyncStatus(String id ,String status){\n SQLiteDatabase database = this.getWritableDatabase();\n String updateQuery = \"Update farmers set updateStatus = '\"+ status +\"' where \"+ DBFarmersContract.COLUMN_ID+\"=\"+\"'\"+ id +\"'\";\n\n Log.d(\"query\", updateQuery);\n database.execSQL(updateQuery);\n\n database.close();\n }", "public void setCheckStatus(String checkStatus) {\n\t\tthis.checkStatus = checkStatus;\n\t}", "public void setCheckStatus(String checkStatus) {\n\t\tthis.checkStatus = checkStatus;\n\t}", "public void updateDB() {\n \n sql = \"UPDATE Order set \" + \"CustomerID='\"+getCustomerID()+\"',\" + \" Status='\"+getStatus()+\"'\" + \" WHERE OrderID= '\" + getOrderID()+\"'\";\n db.updateDB(sql);\n \n }", "public void updateAgentBODStatus(String profileId, int status);", "public void setStatus(String un, String status){\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n // updating user database\n collRU.findOneAndUpdate(\n eq(\"username\", un),\n Updates.set(\"status\", status)\n );\n }", "int updateByPrimaryKey(ChronicCheck record);", "public synchronized void startUpdates(){\n mStatusChecker.run();\n }", "void updateStatusForItem(HighlightsModel item, CreatingStatus currentStatus) {\n if (item.status != null) {\n item.status.currentUriIndex = currentStatus.currentUriIndex;\n item.status.maxUris = currentStatus.maxUris;\n item.status.progress = currentStatus.progress;\n } else {\n Log.e(TAG, \"Status - Error!! status == null for uriIdx:\" + currentStatus.currentUriIndex + \", maxUris:\" + currentStatus.maxUris + \",progress:\" + currentStatus.progress);\n }\n }", "public void updateResult(){\n String lastUpdateDate = User.getLastUpdateDate(getApplicationContext());\n CheckListResultDBHelper dbHelper = new CheckListResultDBHelper(this);\n dbHelper.getReadableDatabase();\n int cnt = User.getCurrentCheckListCount(getApplicationContext());\n Log.d(\"TEST\", \"start date : \" + User.getStartDate(getApplicationContext()));\n Log.d(\"TEST\", \"last update date : \" + lastUpdateDate + \", cnt : \" + cnt);\n dbHelper.close();\n\n if(!lastUpdateDate.equals(\"\") && cnt > 0 && !lastUpdateDate.equals(nowDate)){\n ArrayList<String> list = User.getBetweenDate(lastUpdateDate, nowDate);\n save(list, null, null);\n }\n }", "void onStatusUpdate(int status);", "private static boolean updateFilureLog(final HealthCheckVO healthCheckVO, final long currentFailedCount) {\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\t\n\t\t//Update the failure log only if there is a status change\n\t\tif (status == healthCheckVO.getCurrentStatus()) {\n\t\t\treturn false;\n\t\t}\n\t\t//Even if there is a failure and the max retry count is not reached - ignore\n\t\tif (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\treturn false;\n\t\t}\n\t\t//First time status check and if success - ignore\n\t\tif(healthCheckVO.getCurrentStatus() == null && status == Status.UP){\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\tString message = healthCheckVO.getStatus().getMessage();\n\t\tif (status != Status.UP && currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\tmessage = healthCheckVO.getStatus().getMessage();\n\t\t} else if (status == Status.UP) {\n\t\t\tmessage = \"Status changed from \\\"\" + (healthCheckVO.getCurrentStatus() == null ? \"Not Available\"\n\t\t\t\t\t\t\t: healthCheckVO.getCurrentStatus().getStatusDesc()) + \"\\\" to \\\"\" + status.getStatusDesc() + \"\\\"\";\n\t\t}\n\t\tfinal String updateMessage = message;\n\t\thealthCheckVO.setFailureStatusMessage(updateMessage);\n\t\tComponentFailureLogEntity cfl = new ComponentFailureLogEntity();\n\t\tcfl.setCompRegStsTime(new java.sql.Timestamp(System.currentTimeMillis()));\n\t\tcfl.setFailureMessage(updateMessage);\n\t\tcfl.setStatusId(status.getStatusId());\n\t\tcfl.setHealthCheckId(healthCheckVO.getHealthCheckId());\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tsession.save(cfl);\n\t\ttxn.commit();\n\t\t\n\t\tlogger.debug(\"Inserted Failed Status comp_failure_log : HEALTH_CHECK = \" + healthCheckVO.getHealthCheckId());\n\t\treturn true;\n\t}", "public static void trackerAdd(Status s) throws ClassNotFoundException, SQLException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\t\n\t\tDB_Interface.insertStatus(conn, s);\n\t\tconn.close();\n\t}", "public void updateContestStatus(ContestStatus arg0) throws ContestManagementException {\r\n }", "@Test\n public void checkStatusFileCorrectlyUpdated() throws Exception {\n\n when(context.getString(\"status.file.path\")).thenReturn(\"/var/lib/flume\");\n when(context.getString(\"hibernate.connection.url\")).thenReturn(\"jdbc:mysql://host:3306/database\");\n when(context.getString(\"table\")).thenReturn(\"table\");\n when(context.getString(\"status.file.name\")).thenReturn(\"statusFileName\");\n\n SQLSourceHelper sqlSourceHelper = new SQLSourceHelper(context, \"Source Name\");\n sqlSourceHelper.createStatusFile();\n sqlSourceHelper.setCurrentIndex(\"10\");\n\n sqlSourceHelper.updateStatusFile();\n\n SQLSourceHelper sqlSourceHelper2 = new SQLSourceHelper(context, \"Source Name\");\n assertEquals(\"10\", sqlSourceHelper2.getCurrentIndex());\n }", "public static boolean getHealthCheckStatus(Map<String, Object> map) {\n\n\t\tString status = UtilitaireDao.get(0).isConnectionOk() ? HEALTHCHECK_RESULT_UP : HEALTHCHECK_RESULT_DOWN;\n\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_STATUS, status);\n\n\t\tMap<String, Object> details = new HashMap<>();\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_DETAILS, details);\n\n\t\tHashMap<String, String> dbHealthCheck = new HashMap<>();\n\t\tdetails.put(HEALTHCHECK_ATTRIBUTE_DATABASEHEALTHCHECK, dbHealthCheck);\n\t\tdbHealthCheck.put(HEALTHCHECK_ATTRIBUTE_STATUS, status);\n\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_VERSION, properties.getVersion());\n\n\t\treturn map.getOrDefault(HEALTHCHECK_ATTRIBUTE_STATUS, \"\").equals(HEALTHCHECK_RESULT_UP);\n\t}", "public static void loadK8sApiStatus(final int envId, String compName, int numOfApi) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\t\n\t\tfinal int compId = getComponentIdFromCompName(compName);\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; is not available in the DB\");\n\t\t\treturn;\n\t\t}\n\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tK8sApiStatusEntity apiStatus = new K8sApiStatusEntity();\n\t\tEnvironmentEntity environment = new EnvironmentEntity();\n\t\tenvironment.setEnvironmentId(envId);\n\t\tapiStatus.setEnvironment(environment);\n\t\tapiStatus.setStatusDate(todayDate);\n\t\tComponentEntity component = new ComponentEntity();\n\t\tcomponent.setComponentId(compId);\n\t\tapiStatus.setComponent(component);\n\t\tapiStatus.setTotalApi(numOfApi);\n\t\tsession.save(apiStatus);\n\t\ttxn.commit();\n\t}", "public void updateContestStatus(long contestId, long contestStatusId) throws ContestManagementException {\r\n updatedContestId = contestId;\r\n updatedStatusId = contestStatusId;\r\n }", "public boolean updateStaffStatus(int Id,String status);", "@Override\n\tpublic int updateStatus(HashMap<String, Object> map) {\n\t\treturn paymentDao.updateStatus(map);\n\t}", "public long update(long loanID, long userID, long newStatusID)\n\tthrows Exception {\n PreparedStatement ps = null;\n Connection conn = null;\n String strSQL = null;\n long lResult = -1;\n\n try {\n\tconn = Database.getConnection();\n\tstrSQL = \" update LOAN_DISCOUNTCREDENCE set nStatusID=? where ID=?\";\n\n\tps = conn.prepareStatement(strSQL);\n\tps.setLong(1, newStatusID);\n\tps.setLong(2, loanID);\n\n\tlResult = ps.executeUpdate();\n\tcleanup(ps);\n\tcleanup(conn);\n\n\tif (lResult < 0) {\n\t\tlog.info(\"update LOAN_DISCOUNTCREDENCE property info error:\" + lResult);\n\t\treturn -1;\n\t} else {\n\t\treturn loanID;\n\t}\n} catch (Exception e) {\n\n\tcleanup(ps);\n\tcleanup(conn);\n\tthrow e;\n} finally {\n\n\tcleanup(ps);\n\tcleanup(conn);\n}\n\n}", "@Override\n public void onStatusChange(int status) {\n }", "int updateByPrimaryKeyWithBLOBs(StatusReplies record);", "public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}", "public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }", "private void setPoStatus(PoBean.Status status, int pid) throws Exception {\n String query = \"UPDATE PO SET status = ? WHERE id = ?\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n p.setString(1, status.toString());\n p.setInt(2, pid);\n p.executeUpdate();\n }\n }", "public void updateContestStatus(long contestId, long newStatusId) throws ContestManagementException {\r\n }", "private boolean updateServerTableStatus(Context ctx) {\n if(ctx == null)\n return false;\n\n //Check if network connection is available\n ConnectivityManager connMgr = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n if (networkInfo != null && networkInfo.isConnected()) {\n UpdateTableStatusTask updateTask = new UpdateTableStatusTask(ctx);\n updateTask.execute(this);\n }\n\n return true;\n\n }", "public String getCheckStatus() {\r\n return checkStatus;\r\n }", "void changeStatus(long receiptId, long statusId, long managerId) throws DbException;", "public abstract void updateStatus(PresenceType presenceType);", "void statusUpdate(boolean invalid);", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "public void UpdateStatus(SystemMessage systemMessage) {\n ContentValues cv = new ContentValues();\n cv.put(\"status\", 1);\n db.update(\"sys_message\", cv, \"_id = ?\",\n new String[] { systemMessage.get_id()+\"\" });\n }", "private boolean update(String id, String status) {\n Connection connection;\n try {\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n connection = DriverManager.getConnection(\"jdbc:derby://localhost:1527/XYZ_Assoc\");\n boolean success = true;\n try (PreparedStatement prepStatement = connection.prepareStatement(\"UPDATE MEMBERS SET \\\"status\\\" = ? WHERE \\\"id\\\" = ?\")) {\n prepStatement.setString(1, status);\n prepStatement.setString(2, id);\n success = success && prepStatement.executeUpdate() > 0;\n }\n try (PreparedStatement prepStatement = connection.prepareStatement(\"UPDATE USERS SET \\\"status\\\" = ? WHERE \\\"id\\\" = ?\")) {\n prepStatement.setString(1, status);\n prepStatement.setString(2, id);\n success = success && prepStatement.executeUpdate() > 0;\n }\n return success;\n } catch (ClassNotFoundException | SQLException ex) {\n return false;\n }\n }", "void updateRoomStatus(long roomId, int status);", "public void setJob_StatusCheck(StatusCheckDataObject job_StatusCheck) {\r\n this.job_StatusCheck = job_StatusCheck;\r\n }", "private void updateDB() {\n }", "public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "void onStatusChanged(Status newStatus);", "@PutMapping(\"/update/status\")\n public ResponseEntity updateStatus(@RequestParam String numberAsString) throws UserNotFoundException,NotUpdatedException {\n return new ResponseEntity<>(userService.updateStatus(BigInteger.valueOf(Long.parseLong(numberAsString))), HttpStatus.OK);\n }", "public void setStatus(Status newStatus){\n status = newStatus;\n }", "@Override\n\tpublic boolean update(StatusDetail item) {\n\t\treturn false;\n\t}", "@Override\n\tpublic int update(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "public void setStatus(JobStatus status);", "public synchronized void update() {\n localMemberHealth.setHeartbeat(localMemberHealth.getHeartbeat() + 1);\n long currentTime = System.currentTimeMillis();\n List<MemberHealth> removals = new ArrayList<>();\n for (MemberHealth memberHealth : memberHealths) {\n if (currentTime - memberHealth.getLastSeen() > 5500) {\n removals.add(memberHealth);\n } else if (currentTime - memberHealth.getLastSeen() > 2750) {\n if (!memberHealth.hasFailed() && !memberHealth.hasLeft()) {\n memberHealth.setHasFailed(true);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has failed\");\n }\n } else {\n if (memberHealth.hasFailed()) {\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has rejoined\");\n }\n memberHealth.setHasFailed(false);\n }\n }\n for (MemberHealth memberHealth : removals) {\n memberHealths.remove(memberHealth);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has been removed\");\n }\n }", "public void updateRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.update(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "public HrCStatitem update(HrCStatitem entity);", "private void updateAccountStatus() {\n\r\n }", "public void setUpdateStatus(Byte updateStatus) {\n this.updateStatus = updateStatus;\n }", "public void lspStatusChangeEvent(Lsp lsp) {\n instance.invalidateDB();\n }", "public String updateTableStatus(String taskMethod, String accessToken, String tableUUID, int tableStatus) {\n\n String response = null;\n IApiConnector apiConnector;\n\n Map<String, String> requestParams = new HashMap<>();\n requestParams.put(\"Status\", String.valueOf(tableStatus));\n\n Map<String, String> requestHeaders = new HashMap<>();\n requestHeaders.put(\"Content-Type\", \"application/json\");\n requestHeaders.put(\"Authorization\", String.format(\"Bearer %s\", accessToken));\n\n String url = Constants.BASE_URL + Constants.UPDATE_TABLE_STATUS_URL +\n tableUUID;\n\n if (taskMethod.equals(Constants.ASYNC_METHOD)) {\n apiConnector = new AsyncApiConnector();\n response = apiConnector.sendHttpJsonPutRequest(url, requestHeaders, requestParams, Constants.UPDATE_TABLE_STATUS);\n } else if (taskMethod.equals(Constants.SYNC_METHOD)) {\n apiConnector = new SyncApiConnector();\n response = apiConnector.sendHttpJsonPutRequest(url, requestHeaders, requestParams, Constants.UPDATE_TABLE_STATUS);\n }\n\n return response;\n }", "public void upateroomstatus(String branchid, String roomid, String status){\n\t\tString sql = \"update tb_p_room set status = '\" + status + \"' where branch_id = \" + branchid + \" and room_id = \" + roomid;\n\t\t//String hql1 = \"update Room set roomKey.status = :STATUS where id = :ID\";\n\t\t//this.executeUpdateHQL(hql1,new String[]{\"STATUS\", \"ID\"}, new Object[]{status, id});\n\t\tthis.executeUpdateSQL(sql);\n\t}", "GlobalUpdateStatus update(ServerConfiguration serverConfig, @Nullable ProgressMonitor monitor);", "public void updateStatus(Node node) throws SQLException, NodeNotFoundException {\n var statement = connection.prepareStatement(\"UPDATE nodes SET status = ? WHERE identifier = ?\");\n statement.setString(1, node.getStatus());\n statement.setInt(2, node.getIdentifier());\n try {\n if (statement.executeUpdate() == 0) throw new NodeNotFoundException();\n } finally {\n statement.close();\n }\n }", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "public void setUserStatus(int online, int id){\n\n try{\n\n String query = \"UPDATE PlayerF \"\n + \"SET Online = \" + online\n + \" WHERE Id = \"+ id;\n\n int result = stmt.executeUpdate(query);\n\n if(result > 0){\n\n System.out.println(\"@setUserStatus: possible success\");\n\n }\n else{\n System.out.println(\"@setUserStatus: Error result returned false\");\n }\n\n }catch (SQLException e){\n e.printStackTrace();\n }\n\n }", "public ApiResponse updateStatus(List<Df00201VO> list){\n List<DfDegree> dfList = ModelMapperUtils.mapList(list,DfDegree.class);\n DfDegree orgItem = null;\n int index = 0;\n String changeStatus = \"\";\n for (DfDegree item : dfList) {\n changeStatus = list.get(index).getChangeStatus() == \"\" ? \"Draft\" : list.get(index).getChangeStatus();\n orgItem = repository.findOne(item.getId());\n item.setStatusUuid(CommonCodeUtils.getCodeDetailUuid(\"CD115\",changeStatus));\n item.setInsertDate(orgItem.getInsertDate());\n item.setInsertUuid(orgItem.getInsertUuid());\n if(changeStatus.equals(\"Draft\")){\n item.setTerminatorUuid(\"\");\n item.setEndDate(null);\n item.setEndYn(\"N\");\n }\n repository.save(item);\n index++;\n }\n return ApiResponse.of(ApiStatus.SUCCESS, \"SUCCESS\");\n }", "@Override\n\t\tprotected void postUpdate(EspStatusDTO t) throws SQLException {\n\t\t\t\n\t\t}", "public void test_UpdateContestStatus_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n ContestStatus status = new ContestStatus();\r\n status.setDescription(\"description\");\r\n status.setName(\"Name\");\r\n status.setContestStatusId(10L);\r\n status.setStatusId(1L);\r\n beanUnderTest.addContestStatus(status);\r\n\r\n entityManager.close();\r\n\r\n status.setName(\"sss\");\r\n beanUnderTest.updateContestStatus(status);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public interface SocketServerInfoRespository extends JpaRepository<SocketServerInfo,Long> {\n\n @Transactional\n @Modifying\n @Query(\"update SocketServerInfo set status = 1 where id = :id \")\n void update(@Param(\"id\") Integer id);\n}", "TopicStatus updateTopicStatus(Long topicStatusId, TopicStatusRequest request);", "@Override\n\tpublic void updateStatus(int appointmentId, String status, String reason) {\n\t\ttry{\n\t\t\tjdbcTemplate.update(UPDATE_STATUS, (ps)->{\n\t\t\t\tps.setString(1, status);\n\t\t\t\tps.setString(2, reason);\n\t\t\t\tps.setInt(3, appointmentId);\n\t\t\t});\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void testUpdate() {\n Random random = new Random();\n ContentValues originalValues = makeServiceStateValues(random, mBaseDb);\n final long rowId = mBaseDb.insert(TBL_SERVICE_STATE, null, originalValues);\n\n // update state and timestamp\n ServiceStateTuple tuple = new ServiceStateTuple();\n tuple.put(COL_STATE, String.valueOf(random.nextGaussian()));\n tuple.put(COL_TIMESTAMP, random.nextLong());\n\n // update table\n ServiceStateTable table = new ServiceStateTable();\n int updated = table.update(mTestContext, tuple, null, null);\n assertEquals(1, updated);\n\n // query and verify using base db\n Cursor cursor = mBaseDb.query(TBL_SERVICE_STATE, null, null, null, null, null, null);\n assertNotNull(cursor);\n assertTrue(cursor.moveToFirst());\n assertEquals(1, cursor.getCount());\n // original values\n assertEquals(rowId, cursor.getLong(cursor.getColumnIndex(COL_ID)));\n assertEquals(TestHelper.getLong(originalValues, COL_FK_MONITOR_SESSION),\n cursor.getLong(cursor.getColumnIndex(COL_FK_MONITOR_SESSION)));\n // updated values\n try {\n assertEquals(tuple.getString(COL_STATE),\n cursor.getString(cursor.getColumnIndex(COL_STATE)));\n assertEquals(tuple.getLong(COL_TIMESTAMP),\n cursor.getLong(cursor.getColumnIndex(COL_TIMESTAMP)));\n } catch (IllegalArgumentException iae) {\n fail(iae.toString());\n }\n cursor.close();\n }", "@Override\n\tpublic boolean update() {\n\t\tActuator updated = RuntimeStorage.getMyHttp().get_state_actuator(this);\n\n\t\tif (updated != null) {\n\t\t\tthis.setNumber(updated.getNumber());\n\t\t\tthis.setName(updated.getName());\n\t\t\tthis.setType(updated.getType());\n\t\t\tthis.setValue(updated.getValue(), false);\n\t\t\tthis.setUnit(updated.getUnit());\n\t\t\tthis.setUtime(updated.getUtime());\n\t\t} else\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public void setStatus(String newStatus){\n\n //assigns the value of newStatus to the status field\n this.status = newStatus;\n }", "@Override\n\tpublic void onStatusUpdate(String arg0, int arg1, String arg2) {\n\t}", "public void doUpdateStatus() throws GameException\r\n {\n \r\n }", "public void setStatusId(long statusId);", "@Override\n\tpublic void modifyStatus(Grade grade) {\n\t\tGradeDAO gradeDAO= (GradeDAO)ObjectFactory.getObject(\"gradeDAO\");\n\t\tgradeDAO.updateState(grade);\n\t}", "@POST\n @ApiOperation(\"Update process status\")\n @javax.ws.rs.Path(\"{id}/status\")\n @Consumes(MediaType.TEXT_PLAIN)\n @WithTimer\n public void updateStatus(@ApiParam @PathParam(\"id\") UUID instanceId,\n @ApiParam(required = true) @QueryParam(\"agentId\") String agentId,\n @ApiParam(required = true) ProcessStatus status) {\n\n ProcessKey processKey = assertProcessKey(instanceId);\n processManager.updateStatus(processKey, agentId, status);\n }", "public void setStatus(OrderStatus updatedStatus) {\n this.status = updatedStatus;\n }", "public void setStatus(int v) \n {\n \n if (this.status != v)\n {\n this.status = v;\n setModified(true);\n }\n \n \n }", "private void updateStatus(boolean success) {\n if (success) {\n try {\n callSP(buildSPCall(MODIFY_STATUS_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with modify entries. \", exception);\n }\n\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n } else {\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n }\n }" ]
[ "0.6907322", "0.6595762", "0.6166049", "0.6114327", "0.5975223", "0.58480495", "0.5828713", "0.5820819", "0.56645906", "0.5569814", "0.55673605", "0.55578005", "0.5552181", "0.54829884", "0.5480843", "0.545154", "0.54503596", "0.5449034", "0.5370845", "0.5345109", "0.5328075", "0.5323958", "0.53233814", "0.53136706", "0.53056365", "0.530469", "0.53029746", "0.53029746", "0.52786297", "0.526905", "0.5262733", "0.5256661", "0.52193975", "0.5197724", "0.51976985", "0.5191895", "0.5161416", "0.51548237", "0.51370025", "0.50880617", "0.5084863", "0.5082308", "0.50760245", "0.50753933", "0.5069049", "0.50605935", "0.50527483", "0.5048385", "0.5037436", "0.5026868", "0.5023758", "0.5019866", "0.49923766", "0.4991216", "0.49848574", "0.49828878", "0.49676928", "0.4966951", "0.49649942", "0.4964493", "0.49634823", "0.49620908", "0.495541", "0.4954275", "0.49530572", "0.49520287", "0.49508917", "0.4946982", "0.4946172", "0.49425697", "0.49393868", "0.49359608", "0.49313512", "0.4924677", "0.49231032", "0.49204642", "0.4919734", "0.4917221", "0.49132562", "0.4907882", "0.48980254", "0.48889554", "0.4880812", "0.48789608", "0.48756373", "0.4868704", "0.48674187", "0.486309", "0.48617566", "0.486024", "0.48571733", "0.48547104", "0.48533273", "0.48509037", "0.4849047", "0.48426428", "0.4838387", "0.48314154", "0.4821939", "0.48218942" ]
0.67985547
1
Function to update the marathon JSON in envronment
public static void updateEnvironmentDetails( List<EnvironmentVO> environmentVOs) { for (EnvironmentVO eVO : environmentVOs) { if (eVO.getMarathonJson() != null && JSONUtil.isJSONValid(eVO.getMarathonJson())) { updateWestMarathonJson(eVO); } if (eVO.getEastMarathonJson() != null && JSONUtil.isJSONValid(eVO.getEastMarathonJson())) { updateEastMarathonJson(eVO); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateApp(String marathonJson);", "void deployApp(String marathonJson);", "public static void updateWestMarathonJson(final EnvironmentVO environmentVO) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_MARATHON_JSON);\n\t\tquery.setBinary(\"marathonJson\", environmentVO.getMarathonJson().getBytes());\n\t\tquery.setTimestamp(\"lastUpdateTime\", new java.sql.Timestamp(new Date().getTime()));\n\t\tquery.setLong(\"environmentId\", environmentVO.getEnvironmentId());\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public static void updateEastMarathonJson(final EnvironmentVO environmentVO) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_EAST_MARATHON_JSON);\n\t\tquery.setBinary(\"marathonJson\", environmentVO.getEastMarathonJson().getBytes());\n\t\tquery.setTimestamp(\"lastUpdateTime\", new java.sql.Timestamp(new Date().getTime()));\n\t\tquery.setLong(\"environmentId\", environmentVO.getEnvironmentId());\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "private static void getMarathonJson(EnvironmentVO environmentVO) throws Exception {\n\t\tlogger.debug(\"Running Marathon Backup for environment: \" + environmentVO.getEnvironmentName());\n\t\tString marathonJson = null;\n\t\tString eastMarathonJson = null;\n\t\tif(environmentVO.getMarathonUrl() != null && !environmentVO.getMarathonUrl().equals(\"\")){\n\t\t\tmarathonJson = RestCommunicationHandler.getResponse(environmentVO.getMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t \n\t\tif(marathonJson == null || marathonJson.equals(\"failed\") || marathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setMarathonJson(marathonJson);\n\t\t}\n\t\t//Get EAST marathon JSON\n\t\tif(environmentVO.getEastMarathonUrl() != null && !environmentVO.getEastMarathonUrl().equals(\"\")){\n\t\t\teastMarathonJson = RestCommunicationHandler.getResponse(environmentVO.getEastMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t\n\t\tif(eastMarathonJson == null || eastMarathonJson.equals(\"failed\") || eastMarathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setEastMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setEastMarathonJson(eastMarathonJson);\n\t\t}\n\t}", "public boolean update(JSONObject jsonProgram);", "public static void doMarathonBackUp() throws Exception {\n\t\tlogger.info(\"************** STARTED MarathonBackUp **************\");\n\t\tList<EnvironmentVO> environmentVOs = DBQueryUtil.getAllEnvironments();\n\t\tfor(EnvironmentVO eVo : environmentVOs){\n\t\t\tgetMarathonJson(eVo);\n\t\t\tlogger.info(\"Got Marathon JSON for \" + eVo.getEnvironmentName() + \" Time : \" + new Date());\n\t\t\tlogger.info(\"JSON \" + eVo.getMarathonJson());\n\t\t}\n\t\tDBQueryUtil.updateEnvironmentDetails(environmentVOs);\n\t\tMarathonConfigProcessor.updateApiList(environmentVOs);\n\t\tlogger.info(\"************** COMPLETED MarathonBackUp **************\");\n\t}", "public interface Marathon extends ClusterProcess {\n\n /**\n * If Marathon configuration requires, installs the applications\n */\n void installMarathonApps();\n\n /**\n * Deploys a Marathon app by JSON string\n *\n * @param marathonJson JSON string\n */\n void deployApp(String marathonJson);\n\n /**\n * Updates a Marathon app by JSON string\n *\n * @param marathonJson JSON string\n */\n void updateApp(String marathonJson);\n\n /**\n * Kill all apps that are currently running.\n */\n void killAllApps();\n\n void setZooKeeper(ZooKeeper zookeeper);\n\n /**\n * Delete the given app\n *\n * @param app to be deleted\n */\n Result deleteApp(String app);\n\n /**\n * Deploy a Marathon application group.\n *\n * @param groupJson JSON string with Marathon application group definition\n */\n void deployGroup(String groupJson);\n\n /**\n * Deploy a Marathon application group.\n *\n * @param group group name\n */\n Result deleteGroup(String group);\n}", "public void updateSwarm();", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "public void update(String json) {\n\t\t\tJSONObject line;\n\t\t\ttry {\n\t\t\t\t// \"GameServer\":{\"graph\":\"A0\",\"pokemons\":3,\"agents\":1}}\n\t\t\t\tline = new JSONObject(json);\n\t\t\t\tJSONObject agent = line.getJSONObject(\"Agent\");\n\t\t\t\tint id = agent.getInt(\"id\");\n\t\t\t\tif(id==this.getID() || this.getID() == -1) {\n\t\t\t\t\tif(this.getID() == -1) {\n\t\t\t\t\t\tthis.id = id;}\n\t\t\t\t\tdouble speed = agent.getDouble(\"speed\");\n\t\t\t\t\tString p = agent.getString(\"pos\");\n\t\t\t\t\tPoint3D pp= new Point3D(p);\n\t\t\t\t\tint src = agent.getInt(\"src\");\n\t\t\t\t\tint dest = agent.getInt(\"dest\");\n\t\t\t\t\tdouble value = agent.getDouble(\"value\");\n\t\t\t\t\tthis.pos = pp;\n\t\t\t\t\tthis.setCurrNode(src);\n\t\t\t\t\tthis.setSpeed(speed);\n\t\t\t\t\tthis.setNextNode(dest);\n\t\t\t\t\tthis.setValue(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public static Map<Integer, Blob> getMarathonJson() {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCrit = session.createCriteria(EnvironmentEntity.class, \"env\");\n\t\tenvCrit.add(Restrictions.isNotNull(\"env.marathonURL\"));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvironmentEntity> envList = (List<EnvironmentEntity>)envCrit.list();\n\t\t\n\t\tMap<Integer, Blob> mapEnvJson = new HashMap<Integer,Blob>();\n\t\tfor(EnvironmentEntity ee: envList){\n\t\t\tif(ee.getMarathonURL() == null || ee.getMarathonURL().trim().length() == 0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmapEnvJson.put(ee.getEnvironmentId(), ee.getMarathonJson());\n\t\t}\n\t\ttxn.commit();\n\t\treturn mapEnvJson;\n\t}", "@Override\n public void updateServiceJson(){\n synchronized (lockUpdateServiceJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Movies.json\")) {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"movies\", writer.toJsonTree(movieList));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "private void updateItem(JsonNode json) {\n }", "@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }", "@Test\n public void updateComment() throws Exception{\n JSONParser parser = new JSONParser();\n Object obj = parser.parse(new FileReader(JSON_FILE_4));\n JSONObject jsonObject = (JSONObject) obj;\n\n Response res =\n given().\n header(\"cookie\",\"JSESSIONID=\"+createSession()).and().\n header(\"Content-Type\",\"application/json\").\n body(jsonObject.toJSONString()).\n when().\n put(\"/rest/api/2/issue/10008/comment/10004\").\n then().\n statusCode(200).log().all().extract().response();\n }", "public boolean setFromJSON(JSONObject json, int pilotId) {\n\n try {\n id = json.has(\"id\") ? json.getInt(\"id\") : id;\n title = json.getString(\"name\");\n raceURL = json.getString(\"urlName\");\n raceImage = !json.isNull(\"mainImageFileName\") ? json.getString(\"mainImageFileName\") : raceImage;\n blockquote = json.getString(\"description\");\n description = json.getString(\"content\");\n chapterId = !json.isNull(\"chapterId\") ? json.getInt(\"chapterId\") : chapterId;\n dateAndTime = new SimpleDateFormat(\"yyyy-MM-dd hh:mm aa\", Locale.US).parse(json.getString(\"startDate\"));\n date = new SimpleDateFormat(\"MMMM dd, yyyy\", Locale.US).format(dateAndTime);\n time = new SimpleDateFormat(\"hh:mm aa\", Locale.US).format(dateAndTime);\n city = !json.isNull(\"city\") ? json.getString(\"city\") : city;\n state = !json.isNull(\"state\") ? json.getString(\"state\") : state;\n zip = !json.isNull(\"zip\") ? json.getString(\"zip\") : zip;\n country = !json.isNull(\"country\") ? json.getString(\"country\") : country;\n latitude = !json.isNull(\"latitude\") ? json.getDouble(\"latitude\") : -99999;\n longitude = !json.isNull(\"longitude\") ? json.getDouble(\"longitude\") : -99999;\n currentRound = !json.isNull(\"currentCycle\") ? json.getInt(\"currentCycle\") - 1 : currentRound;\n currentHeat = !json.isNull(\"currentHeat\") ? json.getInt(\"currentHeat\") - 1 : currentHeat;\n status = !json.isNull(\"status\") ? json.getString(\"status\") : status;\n // TODO targetTime;\n targetTime = !json.isNull(\"targetTime\") ? json.getLong(\"targetTime\") : targetTime;\n calculateCurrentState();\n\n // Racer information and joined status\n if (racers == null) {\n racers = new ArrayList<Racer>();\n }\n if (!json.isNull(\"entries\")) {\n racers.clear();\n joined = false;\n JSONArray entries = json.getJSONArray(\"entries\");\n for (int i = 0, size = entries.length(); i < size; i++) {\n Racer racer = new Racer(entries.getJSONObject(i));\n racers.add(racer);\n if (racer.getPilotId() == pilotId) {\n joined = true;\n }\n\n }\n }\n\n // Round information\n if (rounds == null) {\n rounds = new ArrayList<Round>();\n }\n if (!json.isNull(\"schedule\")) {\n rounds.clear();\n rounds.addAll(new Round().fromJSONToRoundList(json.getJSONObject(\"schedule\").getJSONArray(\"groups\"), racers));\n }\n\n return true;\n } catch (JSONException e) {\n e.printStackTrace();\n return false;\n } catch (ParseException e) {\n e.printStackTrace();\n return false;\n }\n }", "@Override\r\n\tpublic void updateJSON(JSONObject json, String key, Object value) {\r\n\r\n\t\ttry {\r\n\t\t\tjson.put(key, value);\r\n\t\t} catch (JSONException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void updateServerInfo() {\n ServerInfo serverInfo = new ServerInfo(serverConfig.getBaseURL(), serverConfig.getInfoURL(), serverRepositories.keySet());\n String serverInfoJson = new GsonBuilder().setPrettyPrinting().create().toJson(serverInfo);\n try {\n Files.write(Paths.get(\"\").resolve(Filenames.FILENAME_SERVERINFO), serverInfoJson.getBytes(StandardCharsets.UTF_8));\n } catch (IOException e) {\n log.error(\"could not write serverinfo file.\", e);\n }\n }", "private void addData(App yourApp, JSONObject jsonObject) {\n JSONArray jsonArray = jsonObject.getJSONArray(\"Teams\");\n for (Object json : jsonArray) {\n JSONObject nextTeam = (JSONObject) json;\n Team teamWithData = getTeamInfo(nextTeam);\n yourApp.addTeam(teamWithData);\n }\n }", "public void updateEnvironment(Context context, JSONObject post) {\n try {\n post.put(Jsonkey.Environment.getKey(), isPackageInstalled(context) ? Jsonkey.NativeApp.getKey() : Jsonkey.InstantApp.getKey());\n } catch (Exception e) {\n }\n }", "public void update(TheatreMashup todo) {\n\t\t\n\t}", "JsonNode updateData(String data);", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}", "public void run() {\n WriteConfigJson(jsonString,path);\r\n }", "public void update() throws IOException{\r\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"agenda.txt\", false));\r\n\t\toos.writeObject(artists);\r\n\t\toos.writeObject(stages);\r\n\t\toos.writeObject(performances);\r\n\t\tartists.clear();\r\n\t\tstages.clear();\r\n\t\tperformances.clear();\r\n\t\toos.close();\r\n\t}", "void installMarathonApps();", "public void mo9092a(JSONObject jSONObject) throws JSONException {\n }", "@PutMapping(value = \"/updatestory\")\n\tpublic void updatePost(@RequestBody String jsonString) {\n\t\tStory s = null;\n\t\ttry {\n\t\t\ts = new ObjectMapper().readValue(jsonString, Story.class);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tloggy.info(\"Update Story Controller Accessed\");\n\t\tstoryServ.update(s);\n\t}", "public void test_01() {\n\t\tpostobject jsonobjectdata = new postobject();\n\n\t\tjsonobjectdata.setID(\"5\");\n\t\tjsonobjectdata.settitle(\"updated Mr\");\n\t\tjsonobjectdata.setfirst_name(\"updated Rahaman\");\n\t\tjsonobjectdata.setauthor(\"updated Ata\");\n\n\t\tResponse reponse = given().\n\t\t\t\tbody(jsonobjectdata).\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tput(\"http://localhost:3000/posts/05\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}", "@PostConstruct\n\tprivate void init() {\n\t\ttry {\n\t\t\tif (environment.getProperty(\"marathon.uri\") != null)\n\t\t\t\tmarathonUrl = environment.getProperty(\"marathon.uri\");\n\t\t\tif (environment.getProperty(\"quay.url\") != null)\n\t\t\t\tquayHost = environment.getProperty(\"quay.url\");\n\t\t\t{\n\t\t\t\tint slashslash = quayHost.indexOf(\"//\") + 2;\n\t\t\t\tquayHost = quayHost.substring(slashslash, quayHost.indexOf('/', slashslash));\n\t\t\t\t/*\n\t\t\t\t * URL aURL = new URL(\"quayhost\"); quayhost = aURL.getHost();\n\t\t\t\t */\n\t\t\t}\n\t\t\tif (environment.getProperty(\"chronos.uri.prefix\") != null) {\n\t\t\t\tchronosUrlPrefix = environment.getProperty(\"chronos.uri.prefix\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"docker.uri.prefix\") != null) {\n\t\t\t\tdockerUri = environment.getProperty(\"docker.uri.prefix\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"websocket.retsapi.server.url\") != null) {\n\t\t\t\twebsocketServerUrl = environment.getProperty(\"websocket.retsapi.server.url\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"tomcat.url\") != null) {\n\t\t\t\ttomcatUri = environment.getProperty(\"tomcat.url\");\n\t\t\t\t// String myString = tomcatUri;\n\t\t\t\t// tomcatUri = myString.replace(\"http://\",\"\").replace(\"http://\n\t\t\t\t// www.\",\"\").replace(\"www.\",\"\");\n\t\t\t\t// int slashslash = tomcatUri.indexOf(\"//\") + 2;\n\t\t\t\t// tomcatUri = tomcatUri.substring(slashslash,\n\t\t\t\t// tomcatUri.indexOf('/', slashslash));\n\t\t\t\t// System.out.println(a);\n\t\t\t}\n\t\t\tif (environment.getProperty(\"nvidia.host\") != null) {\n\t\t\t\tnvidiaHost = environment.getProperty(\"nvidia.host\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"mesos.slave.prefix\") != null) {\n\t\t\t\tmesosSlvaePrefix = environment.getProperty(\"mesos.slave.prefix\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error while reading properties for Marathon\", e);\n\n\t\t}\n\t}", "public void punchIn(){\n Date currentDate = new Date();\n String currentTime = hoursFormat.format(currentDate);\n String timeString = String.format(\"You have clocked in.\\nThe current time is %s\", currentTime);\n JOptionPane.showMessageDialog(null, timeString, \"Coronos Time Clock\", JOptionPane.INFORMATION_MESSAGE);\n employee.setClockedIn(true);\n JSONArray clockTimes = employee.getClockTimes();\n Date date = new Date();\n long now = date.getTime();\n JSONObject newPunch = new JSONObject();\n newPunch.put(\"in\", now);\n clockTimes.add(newPunch);\n employee.setPunches(clockTimes);\n }", "JobResponse.Update update();", "void update(Env world) throws Exception;", "void updateWarehouseDepot(String username, LightWarehouseDepot warehouseDepot);", "@Test\r\n\tpublic void updateProductDetails() {\r\n\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Banana\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.put(\"/5\");\r\n\t\tSystem.out.println(\"Update Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "public void lite() {\n\t\t\r\n\t\tthis.setJson(\"[]\");\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tRestAssured.baseURI=\"https://rahulshettyacademy.com\";\n\t\tString response=given().log().all().queryParam(\"key\",\"qaclick123\").header(\"Content-Type\",\"application/json\")\n\t\t.body(Paylod.Addplace()).when().post(\"maps/api/place/add/json\")\n\t\t.then().assertThat().statusCode(200).body(\"scope\", equalTo(\"APP\")).\n\t\theader(\"Server\",\"Apache/2.4.18 (Ubuntu)\").extract().response().asString();\n\t\t\n\t\tSystem.out.println(response);\n\t\tJsonPath jsonparse =jsonParsing.inputToJson(response);\n\t\t//JsonPath jsonparse = new JsonPath(response);\n\t\tString placeID=jsonparse.getString(\"place_id\");\n\t\tSystem.out.println(placeID);\n\t\tSystem.out.println(\"-----------------End of Add API Test----------------------------------------\");\n\t\t\n//update the place added with new address - automation PUT (update place) API\n\t\t\n\t\t\n\t\tString newAddress = \"170 IndraNagar,IND\";\n\n\t\tgiven().log().all().queryParam(\"key\", \"qaclick123\").header(\"Content-Type\",\"application/json\")\n\t\t.body(\"{\\r\\n\" + \n\t\t\t\t\"\\\"place_id\\\":\\\"\"+placeID+\"\\\",\\r\\n\" + \n\t\t\t\t\"\\\"address\\\":\\\"\"+newAddress+\"\\\",\\r\\n\" + \n\t\t\t\t\"\\\"key\\\":\\\"qaclick123\\\"\\r\\n\" + \n\t\t\t\t\"}\\r\\n\" + \"\").when().put(\"maps/api/place/update/json\")\n\t\t.then().log().all().assertThat().statusCode(200).body(\"msg\", equalTo(\"Address successfully updated\"));\n\t\tSystem.out.println(\"-----------------End of Update API Test----------------------------------------\");\n\t\t\n\t\t// GetAPI to get the place to see if new address is added to the Place\n\t\tString newPlace=given().log().all().queryParam(\"key\", \"qaclick123\").queryParam(\"place_id\", placeID)\n\t\t.when().get(\"/maps/api/place/get/json\")\n\t\t.then().log().all().assertThat().statusCode(200).extract().response().asString();\n\t\t\n\t\t\n\t\tJsonPath jsparse =jsonParsing.inputToJson(newPlace);\n\t\t//JsonPath jsparse = new JsonPath(newPlace);\n\t\tString actualAddress=jsparse.getString(\"address\");\n\t\tSystem.out.println(actualAddress);\n\t\t//cucumber junit , testng testing framework - to add assertions -we have to use one of this frmwork,\n\t\t//since in java we do not have such assertion scenarios\n\t\tAssert.assertEquals(actualAddress,newAddress);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n String jsonString = \"{\\\"name\\\":\\\"Pourush\\\"}\";\n JsonObject jsonObject = new JsonObject(jsonString);\n jsonObject.put(\"location\",\"Utsav\");\n System.out.println(jsonObject);\n Myitem myitem = new Myitem();\n myitem.name = \"falanadhimkana\";\n myitem.description = \"some description\";\n jsonObject.put(\"Myitem\",jsonObject.mapFrom(myitem));\n System.out.println(jsonObject);\n }", "@PUT\n\t@Path(\"/\") \n\t@Consumes(MediaType.APPLICATION_JSON) \n\t@Produces(MediaType.TEXT_PLAIN) \n\tpublic String updatesystem_editor(String systData) \n\t{\n\t\tJsonObject itemObject = new JsonParser().parse(systData).getAsJsonObject(); \n\t\t\n\t\t//Read the values from the JSON object\n\t\tString sid = itemObject.get(\"sid\").getAsString(); \n\t\tString username = itemObject.get(\"username\").getAsString(); \n\t\tString email = itemObject.get(\"email\").getAsString(); \n\t\tString password = itemObject.get(\"password\").getAsString(); \n\t\t\n\t\tString output = sysObj.updatesystem_editor(sid, username, email,password);\n\t\t\n\t\treturn output; \n\t}", "protected Response updateRuntimeConfig(\n String cluster,\n String role,\n String environment,\n String name,\n MultivaluedMap<String, String> params,\n List<String> runtimeConfigs) {\n return Response.ok()\n .type(MediaType.APPLICATION_JSON)\n .entity(Utils.createMessage(String.format(\"%s updated\", name)))\n .build();\n }", "public UpdateEntity(String json) throws JSONException {\n\n JSONObject jso = new JSONObject(json);\n JSONObject jsonObject = jso.getJSONObject(\"data\");\n String code = jsonObject.getString(\"versionCode\");\n if (!StringUtils.isStringNull(code)) {\n\t\t\tthis.versionCode = Integer.valueOf(code);\n\t\t}else{\n\t\t\tthis.versionCode = 0;\n\t\t}\n this.versionName = jsonObject.getString(\"versionName\");\n this.isForceUpdate = jsonObject.getString(\"isForceUpdate\");\n this.downUrl = jsonObject.getString(\"downUrl\");\n this.preBaselineCode = jsonObject.getString(\"preBaselineCode\");\n this.updateLog = jsonObject.getString(\"updateLog\");\n// this.md5 = jsonObject.getString(\"md5\");\n\n }", "public static void main(String[] args) {\n\t\tJSONObject obj=new JSONObject(); \n\t\tobj.put(\"userId\", \"r.g@rebrand.clouzer.com\");\n\t\tJSONObject obj2=new JSONObject();\n\t\tobj2.put(\"modulename\", \"SCM\");\n\t\tobj2.put(\"hitserverflag\",1);\n\t\tobj.put(\"extraParam\",obj2);\n\t\tobj.put(\"action\",\"UPDATE\");\n\t\tJSONArray arr=new JSONArray();\n\t\tJSONObject obj3=new JSONObject();\n\t\tJSONArray arr3=new JSONArray();\n\t\tarr3.add(\"UPDATE_PRODUCT\");\n\t\tobj3.put(\"actionarray\",arr3);\n\t\tJSONObject obj4=new JSONObject();\n\t\tobj4.put(\"CML_TITLE\",\"CCR-2\");\n\t\tJSONArray arr4=new JSONArray();\n\t\tobj4.put(\"CML_IMAGE_PATH\",arr4);\n\t\tobj4.put(\"SYNC_PENDING_STATUS\",0);\n\t\tobj4.put(\"LAST_MODIFIED_ON\",\"2019-12-31T06:52:36.441Z\");\n\t\tobj4.put(\"stockMinValue\",36);\n\t\tobj3.put(\"calmailobject\",obj4);\n\t\tobj3.put(\"keyType\",\"TSK\");\n\t\tobj3.put(\"keyVal\",\"rebrand.clouzer.com#PRJ_DEPT_ORG_1231231231231_1234#SEC_WIZ_PRD_DB_0011#TSK_PRD_LST_1577774826691_49\");\n\t\tobj3.put(\"subKeyType\",\"TSK_PRD_LST\");\n\t\tarr.add(obj3);\n\t\t\n\t\tobj.put(\"dataarray\",arr);\n\t\tobj.put(\"modulename\",\"SCM\" );\n\t\tobj.put(\"requestId\",\"/sync#/sync#wjYh2leVm1goGm_DAABHr.g@rebrand.clouzer.com#1577710294530r168r226\");\n\t\tobj.put(\"FROM\",\"senddatatoserver\");\n\t\tobj.put(\"socketId\",\"/sync#wjYh2leVm1goGm_DAABH\");\n\t\tJSONArray arr12=new JSONArray();\n\t\tJSONObject obj9=new JSONObject();\n\t\tobj9.put(\"Location\",\"serverOperation : front_end\");\n\t\tobj9.put(\"Timestamp\",157770);\n\t\tarr12.add(obj9);\n\t\tJSONObject obj11=new JSONObject();\n\t\tobj11.put(\"Location\",\"etRouteHandler2Paget_serverOperation : node\");\n\t\tobj11.put(\"Timestamp\",157770);\n\t\tarr.add(obj11);\n\t\tJSONObject obj12=new JSONObject();\n\t\tobj12.put(\"Location\",\"etOrgActionCreator_sendtoJava : node\");\n\t\tobj12.put(\"Timestamp\",157770);\n\t\tarr12.add(obj12);\n\t\tJSONObject obj13=new JSONObject();\n\t\tobj13.put(\"Location\",\"etDirectToQueue_sendToJavaProcess : node\");\n\t\tobj13.put(\"Timestamp\",157770);\n\t\tarr12.add(obj13);\n\t\tJSONObject obj14=new JSONObject();\n\t\tobj14.put(\"Location\",\"etKafka_producer_sendMessage:node\");\n\t\tobj14.put(\"Timestamp\",157770);\n\t\tarr12.add(obj14);\n\t\tobj.put(\"baton\",arr12);\n\t\tobj.put(\"topic\",\"CCR_CLZ_COM\");\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\n\t}", "public void testJson() {\n\t\t\n\t\tSmallTalkEpisode episode = new SmallTalkEpisode();\n\t\tSmallTalkGespraech gespraech = new SmallTalkGespraech(0);\n\t\t\n\t\tSmallTalkJsonHelper testInstanz1 = new SmallTalkJsonHelper(\"We\", 2.34 , 0);\n\t\tSmallTalkJsonHelper testInstanz2 = new SmallTalkJsonHelper(\"Bez\", 5.24 , 0);\n\t\tSmallTalkJsonHelper testInstanz3 = new SmallTalkJsonHelper(\"Begr\", 22.34 , 1);\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(testInstanz1);\n\t\tString myJson1 = jsonObject.toString();\n\t\tgespraech.addGespraech(myJson1);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz2);\n\t\tString myJson2 = jsonObject.toString();\n\t\tgespraech.addGespraech(myJson2);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz3);\n\t\tString myJson3 = jsonObject.toString();\n\t\tgespraech.addGespraech(myJson3);\n\t\t\n\t\tepisode.addGespraech(gespraech.createInnerJson());\n\t\t\n\t\tSmallTalkGespraech gespraech1 = new SmallTalkGespraech(1);\n\t\t\n\t\tSmallTalkJsonHelper testInstanz4 = new SmallTalkJsonHelper(\"We\", 2.34 , 0);\n\t\tSmallTalkJsonHelper testInstanz5 = new SmallTalkJsonHelper(\"Bez\", 5.24 , 0);\n\t\tSmallTalkJsonHelper testInstanz6 = new SmallTalkJsonHelper(\"Begr\", 22.34 , 1);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz1);\n\t\tString myJson4 = jsonObject.toString();\n\t\tgespraech1.addGespraech(myJson1);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz2);\n\t\tString myJson5 = jsonObject.toString();\n\t\tgespraech1.addGespraech(myJson2);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz3);\n\t\tString myJson6 = jsonObject.toString();\n\t\tgespraech1.addGespraech(myJson3);\n\t\t\n\t\tepisode.addGespraech(gespraech1.createInnerJson());\n\t\t\n\t\tSystem.out.println(episode.createInnerJson());\n\t\t\n\t\tFileSaver fileSaver = new FileSaver();\n\t\tfileSaver.stringAsJson(episode.createInnerJson(), \"FinalJson.json\");\n\t}", "@PutMapping(\"/Mensajeros/actualizar/{id}\")\r\npublic Mensajeros update(@RequestBody Mensajeros ms, @PathVariable(\"id\") Long id) {\r\n\tMensajeros oldM = mService.buscarM_Id(id);\r\n\tString nombreM = ms.getNombreM();\r\n\toldM.setNombreM(nombreM);\r\n\tString cedulaM = ms.getCedulaM();\r\n\toldM.setCedulaM(cedulaM);\r\n\tString celularM = ms.getCelularM();\r\n\toldM.setCelularM(celularM);\r\n\tString placa = ms.getPlaca();\r\n\toldM.setPlaca(placa);\r\n\tString direccionM = ms.getDireccionM();\r\n\toldM.setDireccionM(direccionM);\r\n\treturn mService.actualizarM(oldM);\r\n}", "void addPlaceAPI() {\n RestAssured.baseURI = \"https://rahulshettyacademy.com/\";\n String response = given().log().all().queryParam(\"key\",\"qaclick123\")\n .header(\"Content-Type\",\"application/json\")\n\n .body(Payloads.addPlaceJson())\n .when().post(\"maps/api/place/add/json\")\n .then().log().all().assertThat().statusCode(200).body(\"scope\",equalTo(\"APP\"))\n .header(\"server\",\"Apache/2.4.18 (Ubuntu)\").extract().response().asString();\n System.out.println(\"the response is\" + response );\n JsonPath jsonpath = new JsonPath(response); // for parsing the json body/payload\n String OriginalpalaceId = jsonpath.getString(\"place_id\");\n System.out.println(\"the place id is\" + OriginalpalaceId );\n\n // update the address using original place id\n\n String updateResponse = given().log().all().queryParam(\"key\",\"qaclick123\")\n .header(\"Content-Type\",\"application/json\")\n .body(\"{\\n\" +\n \"\\\"place_id\\\":\\\"\"+ OriginalpalaceId + \"\\\",\\n\" +\n \"\\\"address\\\":\\\"70 Summer walk, USA\\\",\\n\" +\n \"\\\"key\\\":\\\"qaclick123\\\"\\n\" +\n \"}\")\n .when().put(\"maps/api/place/update/json\")\n .then().log().all().assertThat().statusCode(200).body(\"msg\",equalTo(\"Address successfully updated\"))\n .extract().response().asString();\n jsonpath = null;\n jsonpath = new JsonPath(updateResponse);\n String msg = jsonpath.getString(\"msg\");\n System.out.println(\"the successful msg is \" + msg );\n\n // now getPlace API call to get the updated Place Id\n\n String getResponse = given().log().all().queryParam(\"key\",\"qaclick123\")\n .queryParam(\"place_id\",OriginalpalaceId)\n .when().get(\"maps/api/place/get/json\")\n .then().log().all().assertThat().statusCode(200).extract().response().asString();\n\n jsonpath = null;\n jsonpath = new JsonPath(getResponse);\n System.out.println(jsonpath.getString(\"address\"));\n System.out.println(\"the response of the get API method \"+ getResponse);\n\n Assert.assertEquals(jsonpath.getString(\"address\"),\"70 Summer walk, USA\",\"Address not matched\" );\n\n }", "@Test\n public void testUpdateDietStatusById() throws Exception{\n\n String URI = \"/healthreminder/followup_dietstatus_update/{patientId}/status/{dietStatus}\";\n FollowUpDietStatusInfo followUpDietStatusInfo = new FollowUpDietStatusInfo();\n followUpDietStatusInfo.setPatientId(1);\n followUpDietStatusInfo.setDietStatus(false);\n \n String jsonInput = this.converttoJson(followUpDietStatusInfo);\n\n Mockito.when(followUpDietStatusInfoServices.updateDietStatusById(Mockito.any(),Mockito.anyBoolean())).thenReturn(followUpDietStatusInfo);\n MvcResult mvcResult = this.mockMvc.perform(MockMvcRequestBuilders.put(URI, 1, true).accept(MediaType.APPLICATION_JSON).content(jsonInput).contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n MockHttpServletResponse mockHttpServletResponse = mvcResult.getResponse();\n String jsonOutput = mockHttpServletResponse.getContentAsString();\n\n assertThat(jsonInput).isEqualTo(jsonOutput);\n }", "@Override\n\tpublic void setObjectFromJSON(JSONObject j) throws JSONException{\n\t\tsetID(Integer.parseInt(j.getString(KEY_ID)));\n\t\tsetVehicleID(Integer.parseInt(j.getString(KEY_VEHICLE_IDVEHICLE)));\n\t\tsetItemID(Integer.parseInt(j.getString(KEY_ITEMS_IDITEMS)));\n\t\tsetReceiptID(Integer.parseInt(j.getString(KEY_RECEIPT_IDRECEIPT)));\n\t\tsetMileage(Integer.parseInt(j.getString(KEY_WORKMILEAGE)));\n\t\tsetNotes(j.getString(KEY_WORKNOTES));\n\t\t\n\t}", "public void scheduleMarathon()\n\t{\n\n\t\t//Create new threads\n\t\tThread h = new Thread(new ThreadRunner(HARE,H_REST,H_SPEED)); \n\t\tThread t = new Thread(new ThreadRunner(TORTOISE,T_REST,T_SPEED)); \n\n\t\tArrayList<Thread> runnerList = new ArrayList<Thread>();\n\t\trunnerList.add(h);\n\t\trunnerList.add(t);\n\n\t\tSystem.out.println(\"Get set...Go! \");\n\t\t//Start threads\n\t\tfor (Thread i: runnerList){\n\t\t\ti.start();\n\t\t}\n\n\t\twaitMarathonFinish(runnerList);\n\t}", "public JSONObject save();", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/apiservers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<APIServer> replaceAPIServer(\n @Path(\"name\") String name, \n @Body APIServer body);", "public static void updateFlight() {\n\n String flightId;\n String flightDestination;\n String flightOrigin;\n String airline;\n\n Flights myFlights = new Flights();\n\n if (myFlights == null) {\n System.out.println(\"Flight not available.\");\n updateFlight();\n\n } else {\n flightId = writeText(\"Please enter new flight ID: \");\n myFlights.setFlightId(flightId);\n\n flightDestination = writeText(\"Please enter new destination: \");\n myFlights.setFlightDestination(flightDestination);\n\n flightOrigin = writeText(\"Please enter new flight origin: \");\n myFlights.setFlightOrigin(flightOrigin);\n\n airline = writeText(\"Please enter new airline: \");\n myFlights.setAirline(airline);\n\n }\n\n }", "@Override\n\tpublic int update_munti_config_nganluong(String json_nganluong_update)\n\t\t\tthrows InstantiationException, ClassNotFoundException, SQLException {\n\t\tGson gson= new Gson();\n\t\tList<AllcodeModel> list = gson.fromJson(json_nganluong_update, new TypeToken<List<AllcodeModel>>(){}.getType());\n\t\treturn allcode.update_munti_config_nganluong(list);\n\t}", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "public int put(String json, String path)\n {\n\n Client client = Client.create();\n\n WebResource webResource = client.resource(getHostAddress() + \":\" + getPort() + \"/api/\" + path);\n ClientResponse response = webResource.type(\"application/json\").put(ClientResponse.class, json);\n\n\n int responser = response.getStatus();\n\n return responser;\n }", "@Test\n @DisplayName(\"replace updates anime when successful\")\n void replace_UpdatesAnime_WhenSuccessful() {\n Anime savedAnime = animeRepository.save(AnimeCreator.createAnimeToBeSaved());\n devDojoRepository.save(USER);\n\n // setting a new name so that we update the anime aftewards\n savedAnime.setName(\"new name\");\n \n ResponseEntity<Void> animeResponseEntity = testRestTemplateRoleUser.exchange(\n \"/animes\",\n HttpMethod.PUT,\n new HttpEntity<>(savedAnime),\n Void.class\n );\n\n Assertions.assertThat(animeResponseEntity).isNotNull();\n \n Assertions.assertThat(animeResponseEntity.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);\n\n }", "@Test\r\n\tpublic void updateUpdate() throws InterruptedException, ExecutionException {\r\n\t\tLOGGER.debugf(\"BEGINN\");\r\n\t\t\r\n\t\t// Given\r\n\t\tfinal Long zahlId = ZAHLUNGSINFORMATION_ID_UPDATE;\r\n \tfinal String neuerKontoinhaber = NEUER_KONTOINHABER;\r\n \tfinal String neuerKontoinhaber2 = NEUER_KONTOINHABER_2;\r\n\t\tfinal String username = USERNAME_ADMIN;\r\n\t\tfinal String password = PASSWORD_ADMIN;\r\n\t\t\r\n\t\t// When\r\n\t\tResponse response = given().header(ACCEPT, APPLICATION_JSON)\r\n\t\t\t\t .pathParameter(ZAHLUNGSINFORMATIONEN_ID_PATH_PARAM, zahlId)\r\n .get(ZAHLUNGSINFORMATIONEN_ID_PATH);\r\n\t\tJsonObject jsonObject;\r\n\t\ttry (final JsonReader jsonReader =\r\n\t\t\t\t getJsonReaderFactory().createReader(new StringReader(response.asString()))) {\r\n\t\t\tjsonObject = jsonReader.readObject();\r\n\t\t}\r\n\r\n \t// Konkurrierendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n \tfinal JsonObjectBuilder job2 = getJsonBuilderFactory().createObjectBuilder();\r\n \tSet<String> keys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob2.add(\"kontoinhaber\", neuerKontoinhaber2);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob2.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tfinal JsonObject jsonObject2 = job2.build();\r\n \tfinal ConcurrentUpdate concurrentUpdate = new ConcurrentUpdate(jsonObject2, ZAHLUNGSINFORMATIONEN_PATH,\r\n \t\t\t username, password);\r\n \tfinal ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n\t\tfinal Future<Response> future = executorService.submit(concurrentUpdate);\r\n\t\tresponse = future.get(); // Warten bis der \"parallele\" Thread fertig ist\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_NO_CONTENT));\r\n\t\t\r\n \t// Fehlschlagendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n\t\tfinal JsonObjectBuilder job1 = getJsonBuilderFactory().createObjectBuilder();\r\n \tkeys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob1.add(\"kontoinhaber\", neuerKontoinhaber);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob1.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tjsonObject = job1.build();\r\n\t\tresponse = given().contentType(APPLICATION_JSON)\r\n\t\t\t\t .body(jsonObject.toString())\r\n\t\t .auth()\r\n\t\t .basic(username, password)\r\n\t\t .put(ZAHLUNGSINFORMATIONEN_PATH);\r\n \t\r\n\t\t// Then\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_CONFLICT));\r\n\t\t\r\n\t\tLOGGER.debugf(\"ENDE\");\r\n\t}", "@PUT\n @Consumes(MediaType.APPLICATION_JSON)\n public void putJson(WarehouseType content) {\n }", "public Weather update(Weather weather);", "@Override\n\tpublic JSONObject update(JSONObject obj) {\n\t\treturn null;\n\t}", "public void test_02() {\n\n\t\tResponse reponse = given().\n\t\t\t\tbody(\"{\\\"first_name\\\": \\\"updated by PATCH Rahaman\\\"}\").\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tpatch(\"http://localhost:3000/posts/05\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\t\n\t}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/apiservers/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<APIServer> replaceAPIServerStatus(\n @Path(\"name\") String name, \n @Body APIServer body);", "@PutMapping(\"/locations\")\n public Location updateLocation(@RequestBody Location location){\n\n service.saveItem(location);\n\n return location;\n }", "public boolean addProgram(JSONObject programJSON);", "private void storeJsonInPayload(JsonObject dataJson, JsonObject metaJson,\r\n DigitalObject object) throws HarvesterException {\r\n \r\n Payload payload = null;\r\n JsonSimple json = new JsonSimple();\r\n try {\r\n // New payloads\r\n payload = object.getPayload(payloadId);\r\n //log.debug(\"Updating existing payload: '{}' => '{}'\",\r\n // object.getId(), payloadId);\r\n \r\n // Get the old JSON to merge\r\n try {\r\n json = new JsonSimple(payload.open());\r\n } catch (IOException ex) {\r\n log.error(\"Error parsing existing JSON: '{}' => '{}'\",\r\n object.getId(), payloadId);\r\n throw new HarvesterException(\r\n \"Error parsing existing JSON: \", ex);\r\n } finally {\r\n payload.close();\r\n }\r\n \r\n // Update storage\r\n try {\r\n InputStream in = streamMergedJson(dataJson, metaJson, json);\r\n object.updatePayload(payloadId, in);\r\n \r\n } catch (IOException ex2) {\r\n throw new HarvesterException(\r\n \"Error processing JSON data: \", ex2);\r\n } catch (StorageException ex2) {\r\n throw new HarvesterException(\r\n \"Error updating payload: \", ex2);\r\n }\r\n \r\n } catch (StorageException ex) {\r\n // Create a new Payload\r\n try {\r\n //log.debug(\"Creating new payload: '{}' => '{}'\",\r\n // object.getId(), payloadId);\r\n InputStream in = streamMergedJson(dataJson, metaJson, json);\r\n payload = object.createStoredPayload(payloadId, in);\r\n \r\n } catch (IOException ex2) {\r\n throw new HarvesterException(\r\n \"Error parsing JSON encoding: \", ex2);\r\n } catch (StorageException ex2) {\r\n throw new HarvesterException(\r\n \"Error creating new payload: \", ex2);\r\n }\r\n }\r\n \r\n // Tidy up before we finish\r\n if (payload != null) {\r\n try {\r\n payload.setContentType(\"application/json\");\r\n payload.close();\r\n } catch (Exception ex) {\r\n log.error(\"Error setting Payload MIME type and closing: \", ex);\r\n }\r\n }\r\n }", "private void update_medplan(final Context context) {\n SharedPreferences pref = getSharedPreferences(\"user_key\", MODE_PRIVATE);\n String url = \"https://mobsysbackend.herokuapp.com/request.json\";\n\n RequestQueue queue = Volley.newRequestQueue(this);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"uat\", pref.getString(\"user_key\", \"missing\"));\n JSONObject parameters = new JSONObject(params);\n\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST,\n url, parameters,\n new Response.Listener() {\n @Override\n public void onResponse(Object response) {\n if (Meds.listAll(Meds.class).size() > 0) {\n for (Meds m : Meds.listAll(Meds.class)) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n }\n JSONObject json = (JSONObject) response;\n Gson g = new Gson();\n medplan = g.fromJson(json.toString(), MedPlan.class);\n Log.i(\"JSONtoString\", \"onResponse: \" + json.toString());\n tvarzt.setText(\"Austellender Arzt: \" + medplan.getDoctor());\n tvpatient.setText(\"Ausgestellt für: \" + medplan.getPatient());\n\n List<Meds> medlist = medplan.getMeds();\n MedicineListAdapter adapter = new MedicineListAdapter(context, R.layout.adapter_view_layout, medlist);\n listView.setAdapter(adapter);\n\n for (Meds m : Meds.listAll(Meds.class)) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n //doing some databse stuff\n //remember record indexes start with 1\n Medplaninfo check = Medplaninfo.findById(Medplaninfo.class, (long) 1);\n\n if (check == null) {\n Log.e(\"CHECK\", \"No empty object was found. something must have went wrong\");\n } else {\n check.setDoctor(medplan.getDoctor());\n check.setMedcount(medplan.getMedcount());\n check.setPatient(medplan.getPatient());\n //delete old meds\n Meds.deleteAll(Meds.class);\n //save new meds\n for (Meds _med : medplan.meds) {\n _med.save();\n }\n check.save();\n }\n\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Log.i(\"TAG\", \"onErrorResponse: Something went wrong during the updateing\");\n\n }\n }\n );\n requestQueue.add(jsonObjReq);\n }", "@Override\n\tpublic void updateNode(JsonObject jsonData) {\n\t\t\n\t}", "private void updatePostPut() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.putPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "public String updatePatientInfo(JSONObject updateRequest) throws Exception {\n String oldRecord;\n String newRecord;\n int patientID;\n try {\n patientID=updateRequest.getInt(\"Patient ID\");\n }\n catch (Exception e){\n e.printStackTrace();\n String postBody=\"\\\"{\\n\\t\\\"Patient ID\\\":23,\\n\\t\\\"Patient Name\\\":\\\"Ji Klink\\\",\\n\\t\\\"\" +\n \"Last Visited\\\":\\\"\\\",\\n\\t\\\"Status\\\":\\\"Ongoing\\\",\\n\\t\\\"DOB\\\":\" +\n \"\\\"\\\",\\n\\t\\\"Address\\\":\\\"\\\",\\n\\t\\\"Created Date\\\":\\n}\\\"\";\n return \"POST BODY Mandatory Field \\\"Patient ID\\\"\\n\"+\"Rest Field ID are\\n\"+postBody;\n }\n System.out.println(updateRequest.keySet());\n updateRequest.keySet();\n String updateQueryHead = \"UPDATE BasicInfo SET \";\n String updateQueryTail = \" WHERE patientid=\"+patientID;\n String setBody=\"\";\n int comm=0;\n\n //update BasicInfo set gender='Female', address = 'nowhwere' where patientid=23;\n for (String temp: updateRequest.keySet()){\n switch (temp){\n case \"Status\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"status=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",status=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Patient Name\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"patientname=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",patientname=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Address\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"address=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",address=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Last Visited\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"lastvisited=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",lastvisited=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Created Date\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"createddate=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",createddate=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Dob\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"dob=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",dob=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Gender\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"gender=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",gender=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Symptom\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else{\n if( comm == 0){\n setBody=setBody + \"symptom=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",symptom=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Diagnosis\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n\n else{\n\n if( comm == 0){\n setBody=setBody + \"diagnosis=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",diagnosis=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Treatment\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else{\n\n if( comm == 0){\n setBody=setBody + \"treatment=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",treatment=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Phone Number\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"phonenumber=\"+updateRequest.get(temp);\n }\n else setBody=setBody+\",phonenumber=\"+updateRequest.get(temp);\n }\n comm++;\n break;\n default:\n System.out.println(\"Skipping \"+temp);\n }\n System.out.println(updateRequest.get(temp));\n }\n String queryWithPid= \"SELECT * FROM BasicInfo where patientid = \"+patientID;\n System.out.println(queryWithPid);\n JSONArray response =client.queryFromDB(queryWithPid);\n oldRecord=response.toString();\n String finalQuery=updateQueryHead+setBody+updateQueryTail;\n System.out.println(\"FINAL QUERY\\n\"+finalQuery);\n Session session=client.getSession();\n session.execute(finalQuery);\n newRecord = client.queryFromDB(queryWithPid).toString();\n updateCache(\"Update\");\n return \"Updated Info from\\n\"+oldRecord+\"To\\n\"+newRecord;\n\n }", "@Test\r\n public void testUpdate() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n PodamFactory pf = new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity = pf.manufacturePojo(MonitoriaEntity.class);\r\n nuevaEntity.setId(entity.getId());\r\n persistence.update(nuevaEntity);\r\n// Assert.assertEquals(nuevaEntity.getName(), resp.getName());\r\n }", "@Test\n public void patch01(){\n Response responseBeforePatch =given().\n spec(spec03).\n when().\n get(\"/200\");\n responseBeforePatch.prettyPrint();\n JSONObject jsonObject=new JSONObject();\n jsonObject.put(\"title\",\"Hasan\");\n Response responseAfterPatch =given().\n contentType(ContentType.JSON).\n spec(spec03).\n body(jsonObject.toString()).\n when().\n patch(\"/200\");\n responseAfterPatch.prettyPrint();\n responseAfterPatch.\n then().\n assertThat().\n statusCode(200);\n JsonPath jsonPath=responseAfterPatch.jsonPath();\n //title hard assertion\n assertEquals(jsonObject.get(\"title\"),jsonPath.get(\"title\"));\n // title soft assertion\n SoftAssert softAssert = new SoftAssert();\n softAssert.assertEquals(jsonPath.getString(\"title\"),jsonObject.get(\"title\"));\n softAssert.assertAll();\n\n }", "public void updateWorkspace()\n {\n workspace.update();\n }", "public static void putStation(String key, JSONArray entry){\n\t\tJSON.put(radioStationsMap, key, entry);\n\t}", "public static void dataSetter() {\n\t\ttry {\n\t\t\t//Sets jsonCities to the JSONObject called in the FileParser class\n\t\t\tjsonCities = FileParser.dataSetter();\n\t\n\t\t}\n\t\t//This exception is to stop misreading files\n\t\t//Same as all other cases below\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n @PUT\n @Consumes(\"application/json\")\n public Response updateCluster(String requestBody) throws Exception {\n if (log.isTraceEnabled()) {\n log.trace(String.format(\"updateCluster(ID=%d) started. Data: %s\", cluster.getClusterId(), requestBody));\n }\n\n EntityManager em = PersistenceUtils.getInstance().getEntityManager();\n try {\n JSONObject json = new JSONObject(requestBody);\n cluster.update(json);\n\n em.getTransaction().begin();\n em.merge(cluster);\n em.getTransaction().commit();\n return Response.status(Response.Status.NO_CONTENT).build();\n }\n catch (Exception e) {\n log.error(\"Update failed: \", e);\n throw new WebApplicationException(\n Response.status(Response.Status.BAD_REQUEST).\n entity(String.format(\"Update failed: %s.\", e.getMessage())).\n build()\n );\n }\n finally {\n PersistenceUtils.getInstance().closeEntityManager(em);\n }\n }", "@Override\r\n\tpublic String[] updateJsonProperties() {\n\t\treturn null;\r\n\t}", "@Test\n\tvoid testUpdatePlant() {\n\t\tPlant plant = service.updatePlant(new Plant( 8.0, \"Lemon\", \"Antihairfall\", 22.0, 5, 170.0, \"shurb\"));\n\t\tassertEquals(170.0, plant.getCost());\n\t}", "@Override\r\n\tpublic void update(Plant plant) throws Exception {\n\r\n\t}", "public App update(App obj) {\n JsonNode n = getClient().put(\n String.format(Routes.APP_UPDATE, obj.getId()),\n toJsonNode(obj)\n );\n obj.merge(getMapper().convertValue(n, App.class));\n return obj;\n }", "@BodyParser.Of(play.mvc.BodyParser.Json.class)\n public static Result update(Long id) throws JsonParseException, JsonMappingException, IOException {\n JsonNode json = request().body().asJson();\n Thing thing = mapper.treeToValue(json, Thing.class);\n thing.cachedJson = json.toString();\n Logger.debug(\"Content: \" + thing.content);\n Logger.debug(\"Content: \" + thing.content);\n thing.update();\n return ok();\n }", "private void saveWorld() {\n try {\n jsonWriter.open();\n jsonWriter.write(world);\n jsonWriter.close();\n System.out.println(\"Saved world to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }", "TimelineMeta update(TimelineMeta meta);", "void deployGroup(String groupJson);", "public boolean updateCustomer(String customerJSON);", "public void updateJoueurs();", "private void updateSeat(Seat seat) {\n\n Retrofit retrofit = new Retrofit.Builder().baseUrl(\"http://10.0.2.2:5000/api/\")\n .addConverterFactory(GsonConverterFactory.create()).build();\n\n SeatRestAPI seatRestAPI = retrofit.create(SeatRestAPI.class);\n\n Call<Seat> call = seatRestAPI.putSeat(seat.getScreeningId(), seat.getRowNum(), seat.getColumnNum(), seat);\n call.enqueue(new Callback<Seat>() {\n @Override\n public void onResponse(Call<Seat> call, retrofit2.Response<Seat> response) {\n\n try {\n\n if (!response.isSuccessful()) {\n\n Toast.makeText(ConfirmationActivity.this, \"API Update Failed\", Toast.LENGTH_SHORT).show();\n\n }\n\n } catch (Exception exception) {\n\n //Toast.makeText(RegisterActivity.this, exception.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n\n }\n\n @Override\n public void onFailure(Call<Seat> call, Throwable t) {\n\n //Toast.makeText(RegisterActivity.this, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\n }\n });\n\n }", "@Override\r\n\tpublic void updateWorklow(Appointment a) throws DBAccessException {\n\t\tsteps = cr.getWorkflowSteps();\r\n\t\t\r\n\t\t// TODO Anhand des Termins die Objekte aus steps aktualisieren \r\n\t\t\r\n\t\t// da es bei Updates der App passieren kann, dass der Ablaufplan sich ändert, müssen vorherige Ablaufpläne gelöscht werden\r\n\t\tdb.deleteWorkflow();\r\n\t\t\r\n\t\tfor (Step step : steps) {\r\n\t\t\tint seperator = step.getTime().indexOf(\":\");\r\n\t\t\tString s = step.getTime().substring(0, seperator-1); // -1, damit das \":\" nicht dabei ist\r\n\t\t\tint hour = Integer.parseInt(s);\r\n\t\t\ts = step.getTime().substring(seperator+1); // +1, damit das \":\" nicht dabei ist\r\n\t\t\tint min = Integer.parseInt(s);\r\n\t\t\t// dieser Konstruktor ist zwar veraltet, aber für unseren Zweck perfekt\r\n\t\t\tstep.setTimestamp(new Timestamp(a.getYear(), a.getMonth(), a.getDay()-step.getDaysBefore(), hour, min, 0, 0));\r\n\t\t}\r\n\t\t\r\n\t\tdb.saveWorkflow(steps);\r\n\t\t\r\n\t}", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_json_format(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_format_json);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"Cool setpoint cannot be null.\")); \n Assert.assertTrue(content.contains(\"40006\"));\n Assert.assertTrue(content.contains(\"End timestamp cannot be null.\")); \n Assert.assertTrue(content.contains(\"40009\")); \n Assert.assertTrue(content.contains(\"Heat setpoint cannot be null.\"));\n Assert.assertTrue(content.contains(\"40007\"));\n\n }", "@Test\n void update() throws WriteFailedException {\n Config newData = new ConfigBuilder().addAugmentation(NiPfIfCiscoAug.class,\n new NiPfIfCiscoAugBuilder()\n .setInputServicePolicy(\"input-pol1\")\n .build())\n .build();\n\n this.writer.updateCurrentAttributes(iid, data, newData, context);\n\n Mockito.verify(cli, Mockito.times(1))\n .executeAndRead(response.capture());\n\n assertEquals(UPDATE_INPUT, response.getAllValues()\n .get(0)\n .getContent());\n }", "@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}", "private void setConfiguration(JSONObject config) throws JSONException{\n\t\tif(config.has(\"api\")){\n\t\t\tJSONObject obj=config.getJSONObject(\"api\");\n\t\t\tif(obj.has(\"bind\")){\n\t\t\t\tbind=obj.getString(\"bind\");\n\t\t\t}\n\t\t\tif(obj.has(\"port\")){\n\t\t\t\tport=obj.getInt(\"port\");\n\t\t\t}\n\t\t}\n\t\tif(config.has(\"streams\")){\n\t\t\tJSONObject obj=config.getJSONObject(\"streams\");\n\t\t\tif(obj.has(\"port\")){\n\t\t\t\tstreamPort=obj.getInt(\"port\");\n\t\t\t}\n\t\t\tif(obj.has(\"host\")){\n\t\t\t\tstreamHost=obj.getString(\"host\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 2. Overlay environment variables\n\t\tMap<String,String>env=System.getenv();\n\t\tif(env.containsKey(\"BIND\")){\n\t\t\tbind=env.get(\"BIND\");\n\t\t}\n\t\tif(env.containsKey(\"PORT\")){\n\t\t\tport=Integer.parseInt(env.get(\"PORT\"));\n\t\t}\n\t\tif(env.containsKey(\"STREAMSHOST\")){\n\t\t\tstreamHost=env.get(\"STREAMSHOST\");\n\t\t}\n\t\tif(env.containsKey(\"STREAMSPORT\")){\n\t\t\tstreamPort=Integer.parseInt(env.get(\"STREAMSPORT\"));\n\t\t}\n\t}", "public void updateForecast(String date){\n\n forecast_repository.updateForecast(date);\n }", "@Test\r\n\tpublic void UpdatebookingTest()\r\n\t{\n\t\t\r\n\t\tResponse responsecreate = createBooking(); \r\n\t\tresponsecreate.print();\r\n\t\t//get bookingid of booking\r\n\t\tint bookingid=responsecreate.jsonPath().getInt(\"bookingid\");\r\n\t\t\r\n\t\t//update \r\n\t\t//\r\n\t\t\r\n\t\tJSONObject body=new JSONObject();\r\n\t\tbody.put(\"firstname\", \"Devaaa\");\r\n\t\tbody.put(\"lastname\", \"Dadhavjadhav\");\r\n\t\tbody.put(\"totalprice\", 125);\r\n\t\tbody.put(\"depositpaid\", false);\r\n\r\n \r\n\t\tJSONObject bookingdates=new JSONObject();\r\n\t\tbookingdates.put(\"checkin\", \"2021-08-16\");\r\n\t\tbookingdates.put(\"checkout\", \"2021-09-17\");\r\n\t\t\r\n\t\tbody.put(\"bookingdates\", bookingdates);\r\n\t\tbody.put(\"additionalneeds\", \"Breakfast\");\r\n\t\t\r\n\t\t// update booking //username and password add\r\n\r\n\t\tResponse responseUpdate=RestAssured.given().auth().preemptive().basic(\"admin\", \"password123\").contentType(ContentType.JSON)\r\n\t\t\t\t.body(body.toString()).put(\"https://restful-booker.herokuapp.com/booking/\"+ bookingid);\r\n\t\t\r\n\t\tresponseUpdate.print();\r\n\t\tresponseUpdate.getStatusCode();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t// verify response 200\r\n\t\tAssert.assertEquals(responseUpdate.getStatusCode(), 200);\r\n//\t\t\t//verify all field\r\n//\t\t\tSoftAssert softassert=new SoftAssert();\r\n//\t\t\t\r\n//\t\t\tString actualfirstname=response.jsonPath().getString(\"firstname\");\r\n//\t\t\tsoftassert.assertEquals(actualfirstname, \"deva\");\r\n//\t\t\t\r\n//\t\t\tString actuallastname=response.jsonPath().getString(\"lastname\");\r\n//\t\t\tsoftassert.assertEquals(actuallastname, \"jadhav\");\r\n//\t\t\t\r\n//\t\t\tint actualtotalprice=response.jsonPath().getInt(\"totalprice\");\r\n//\t\t\tsoftassert.assertEquals(actualtotalprice, 255);\r\n//\t\t\t\r\n//\t\t\tboolean actualdepositpaid=response.jsonPath().getBoolean(\"depositpaid\");\r\n//\t\t\tsoftassert.assertFalse(actualdepositpaid, \"false\");\r\n//\t\t\t \r\n//\t\t\tString actualcheckin=response.jsonPath().getString(\"bookingdates.checkin\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckin, \"2021-08-14\");\r\n//\t\t\t\r\n//\t\t\tString actualcheckout=response.jsonPath().getString(\"bookingdates.checkout\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckout, \"2021-09-07\");\r\n//\t\t\t\r\n//\t\t\tString actualadditionalneeds=response.jsonPath().getString(\"additionalneeds\");\r\n//\t\t\tsoftassert.assertEquals(actualadditionalneeds, \"c\");\r\n//\t\t\tsoftassert.assertAll();\r\n//\t\r\n\r\n}", "@Test\n public void testUpdateExample() throws Exception{\n MvcResult result = this.mockMvc.perform(get(\"/api/example/{id}\",50))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n // Parses it\n Example example = convertFromJson(result.getResponse().getContentAsString(), Example.class);\n \n // Change name value\n example.setName(\"Test 27\");\n\n // Updates it and checks if it was updated\n this.mockMvc.perform(put(\"/api/example\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(convertToJson(example)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.name\", equalTo(\"Test 27\")));\n }", "@Override\r\n\tpublic String update(String userInfo, String updateJson) {\n\t\t DubboServiceResultInfo info=new DubboServiceResultInfo();\r\n\t\t try {\r\n\t\t\t StandardRole standardRole=JacksonUtils.fromJson(updateJson, StandardRole.class);\r\n\t\t\t StandardRole standardRoleOld=standardRoleService.getObjectById(standardRole.getId());\r\n\t\t\t Map<String,Object> map = new HashMap<String,Object>();\r\n\t\t\t map.put(\"delflag\", \"0\");\r\n\r\n\t\t\t //如果状态没有改变不更改下级\r\n\t\t\t if(!standardRole.getStatus().equals(standardRoleOld.getStatus())){\r\n\t\t\t\t //启用角色,并启用其上级目录\r\n\t\t\t\t if(standardRole.getStatus().equals(\"1\")){//启用角色,并启用其上级目录\r\n\t\t\t\t\t String prefixId=standardRoleOld.getPrefixId();\r\n\t\t\t\t\t String orgIds[]=prefixId.split(\"/\");\r\n\t\t\t\t\t map.put(\"roleIds\", orgIds);\r\n\t\t\t\t\t roleCatalogService.unLockRole(map);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t //如果名称或者上级目录进行更改了,同时要更改全路径\r\n\t\t\t if(standardRoleOld.getCatalogId().equals(standardRole.getCatalogId()) || standardRoleOld.getName().equals(standardRole.getName())){\r\n\t\t\t\t RoleCatalog parentRoleCatalog = roleCatalogService.getObjectById(standardRole.getCatalogId());\r\n\t\t\t\t standardRole.setPrefixId(parentRoleCatalog.getPrefixId()+\"/\"+standardRole.getId());\r\n\t\t\t\t standardRole.setPrefixName(parentRoleCatalog.getPrefixName()+\"/\"+standardRole.getName());\r\n\t\t\t\t standardRole.setPrefixSort(parentRoleCatalog.getPrefixSort()+\"-\"+String.format(\"B%05d\", standardRole.getSort()));\r\n\t\t\t }\r\n\t\t\t //检查是否重名\r\n\t\t\t Map mapcon = new HashMap<>();\r\n\t\t\t mapcon.put(\"pId\", standardRole.getCatalogId());\r\n\t\t\t mapcon.put(\"name\", standardRole.getName());\r\n\t\t\t mapcon.put(\"type\", \"role\");\r\n\t\t\t mapcon.put(\"id\", standardRole.getId());\r\n\t\t\t\t\t \r\n\t\t\t Integer c=roleCatalogService.checkName(mapcon);\r\n\t\t\t\tif(c>0){\r\n\t\t\t\t\tthrow new InvalidCustomException(\"名称已存在,不可重复\");\r\n\t\t\t\t}\r\n\t\t\t int result= standardRoleService.update(standardRole);\r\n\t\t\t info.setResult(JacksonUtils.toJson(result));\r\n\t\t\t info.setSucess(true);\r\n\t\t\t info.setMsg(\"更新对象成功!\");\r\n\t\t } catch (Exception e) {\r\n\t\t\t log.error(\"更新对象失败!\"+e.getMessage());\r\n\t\t\t info.setSucess(false);\r\n\t\t\t info.setMsg(\"更新对象失败!\");\r\n\t\t\t info.setExceptionMsg(e.getMessage());\r\n\t\t }\r\n\t\t return JacksonUtils.toJson(info);\r\n\t}", "public void changeKey(String key, Object newValue){\n try {\n myJSON.put(key, newValue);\n writeToFile();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void configurationUpdated();", "Flight updateFlight(Flight flight);", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/apiservers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<APIServer> replaceAPIServer(\n @Path(\"name\") String name, \n @Body APIServer body, \n @QueryMap ReplaceAPIServer queryParameters);", "private void storeJsonInPayload(JsonObject dataJson, JsonObject metaJson,\n\t\t\t\t\t\t\t\t\tDigitalObject object) throws HarvesterException {\n\n\t\tPayload payload = null;\n\t\tJsonSimple json = new JsonSimple();\n\t\ttry {\n\t\t\t// New payloads\n\t\t\tpayload = object.getPayload(payloadId);\n\t\t\t//log.debug(\"Updating existing payload: '{}' => '{}'\",\n\t\t\t// object.getId(), payloadId);\n\n\t\t\t// Get the old JSON to merge\n\t\t\ttry {\n\t\t\t\tjson = new JsonSimple(payload.open());\n\t\t\t} catch (IOException ex) {\n\t\t\t\tlog.error(\"Error parsing existing JSON: '{}' => '{}'\",\n\t\t\t\t\t\tobject.getId(), payloadId);\n\t\t\t\tthrow new HarvesterException(\n\t\t\t\t\t\t\"Error parsing existing JSON: \", ex);\n\t\t\t} finally {\n\t\t\t\tpayload.close();\n\t\t\t}\n\n\t\t\t// Update storage\n\t\t\ttry {\n\t\t\t\tInputStream in = streamMergedJson(dataJson, metaJson, json);\n\t\t\t\tobject.updatePayload(payloadId, in);\n\n\t\t\t} catch (IOException ex2) {\n\t\t\t\tthrow new HarvesterException(\n\t\t\t\t\t\t\"Error processing JSON data: \", ex2);\n\t\t\t} catch (StorageException ex2) {\n\t\t\t\tthrow new HarvesterException(\n\t\t\t\t\t\t\"Error updating payload: \", ex2);\n\t\t\t}\n\n\t\t} catch (StorageException ex) {\n\t\t\t// Create a new Payload\n\t\t\ttry {\n\t\t\t\t//log.debug(\"Creating new payload: '{}' => '{}'\",\n\t\t\t\t// object.getId(), payloadId);\n\t\t\t\tInputStream in = streamMergedJson(dataJson, metaJson, json);\n\t\t\t\tpayload = object.createStoredPayload(payloadId, in);\n\n\t\t\t} catch (IOException ex2) {\n\t\t\t\tthrow new HarvesterException(\n\t\t\t\t\t\t\"Error parsing JSON encoding: \", ex2);\n\t\t\t} catch (StorageException ex2) {\n\t\t\t\tthrow new HarvesterException(\n\t\t\t\t\t\t\"Error creating new payload: \", ex2);\n\t\t\t}\n\t\t}\n\n\t\t// Tidy up before we finish\n\t\tif (payload != null) {\n\t\t\ttry {\n\t\t\t\tpayload.setContentType(\"application/json\");\n\t\t\t\tpayload.close();\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlog.error(\"Error setting Payload MIME type and closing: \", ex);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7903733", "0.6846991", "0.6632398", "0.64456654", "0.6137083", "0.5865225", "0.54033846", "0.539835", "0.5255236", "0.5244594", "0.51968825", "0.51764494", "0.5153239", "0.51315635", "0.51297355", "0.5122711", "0.5120652", "0.50942713", "0.5071969", "0.5036429", "0.5035328", "0.50346833", "0.4940982", "0.49356425", "0.49170616", "0.49059233", "0.48941594", "0.48751968", "0.48727697", "0.48542026", "0.48307645", "0.48294422", "0.47982502", "0.4794978", "0.47893643", "0.47861338", "0.4761898", "0.4760019", "0.475418", "0.47510642", "0.47495684", "0.47493374", "0.47357786", "0.47270283", "0.47225165", "0.47182798", "0.47176552", "0.46996894", "0.46857798", "0.46815974", "0.4681548", "0.46780044", "0.46699965", "0.46553192", "0.4649388", "0.4635759", "0.4635298", "0.4634189", "0.46332392", "0.46296686", "0.4622775", "0.46208584", "0.45988527", "0.45826262", "0.45774233", "0.4571771", "0.45689327", "0.456706", "0.4563772", "0.45634353", "0.45514762", "0.4551137", "0.4548453", "0.45363924", "0.4536144", "0.45351642", "0.45341942", "0.45280454", "0.45269266", "0.45262882", "0.45190012", "0.45114326", "0.4510702", "0.45029318", "0.45000827", "0.44998834", "0.44993564", "0.4497354", "0.44824633", "0.44809252", "0.44797316", "0.44717222", "0.44671795", "0.44658715", "0.44596127", "0.4457652", "0.44564864", "0.44555333", "0.4451214", "0.4445998" ]
0.54526156
6
Update the status in DB for the given healthCheckVO.
private static boolean updateStatus(HealthCheckVO healthCheckVO) { Status status = healthCheckVO.getStatus().getStatus(); long currentFailedCount = 0; if (status != Status.UP) { if (healthCheckVO.getHealthCheckRetryCurrentCount() == null) { currentFailedCount = 1; } else { currentFailedCount = healthCheckVO.getHealthCheckRetryCurrentCount() + 1; } } updateHealthCheckStatus(healthCheckVO, (int)currentFailedCount); boolean isStatusChaged = updateFilureLog(healthCheckVO, currentFailedCount); updateHistory(healthCheckVO, (currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) ); return isStatusChaged; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void updateHealthCheckStatus(final HealthCheckVO healthCheckVO, final int currentFailedCount) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\t\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\tif ((healthCheckVO.getCurrentStatus() == null && status == Status.UP) || status == healthCheckVO.getCurrentStatus()\n\t\t\t\t|| (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) ) {\n\t\t\tString queryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE_WITH_STATUS;\n\t\t\tif (healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\t\tqueryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE;\n\t\t\t}\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tQuery query = session.createQuery(queryString)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tif (healthCheckVO.getCurrentStatus() != null \n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()){\n\t\t\t\t/*NOT - First time status check. Failed but did not cross max-retry count */\n\t\t\t\tsts.setStatusId(healthCheckVO.getCurrentStatus().getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t} else if (!(healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue())) {\n\t\t\t\t/* First time status check. Status changed and max-retry count is crossed. No need to update lastStatusChange */\n\t\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t}\n\t\t\tquery.executeUpdate();\n\t\t} else {\n\t\t\tQuery query = session.createQuery(HQLConstants.UPDATE_HEALTH_CHECK_CHANGE)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setTimestamp(\"lastStatusChange\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\tquery.setEntity(\"status\", sts);\n\t\t\tquery.executeUpdate();\n\t\t}\n\t\ttxn.commit();\n\t}", "public static List<HealthCheckVO> updateHealthCheckStatusInDB(List<HealthCheckVO> healthCheckVOs) throws SQLException {\n\t\t\n\t\tList<HealthCheckVO> returnStatusChangedList = new ArrayList<HealthCheckVO>();\n\t\tfor (HealthCheckVO healthCheckVO : healthCheckVOs) {\n\t\t\tif(healthCheckVO.getStatus() == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tStatus status = healthCheckVO.getStatus().getStatus();\n\t\t\tif (status == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!status.equals(Status.UP)){\n\t\t\t\tlogger.info(\"STATUS CHECK SUCCESS>> HealthCheckId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId()\n\t\t\t\t\t\t+ \"; isSuccess : \" + status.getStatusName()\n\t\t\t\t\t\t+ \"; Message : \" + status.getStatusDesc());\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tboolean isStatusChanged = updateStatus(healthCheckVO);\n\t\t\t\tif(isStatusChanged){\n\t\t\t\t\treturnStatusChangedList.add(healthCheckVO);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlogger.error(\"Exception in DB Update Doing Rollback\", ex);\n\t\t\t\tthrow ex;\n\t\t\t}\n\t\t}\n\t\tlogger.debug(\"DB Update Success - Doing commit\");\n\t\treturn returnStatusChangedList;\n\t}", "void updateHouseStatus(long houseId, int status);", "void updateHouseStatus(String username, long houseId, int status);", "@PUT\n @Path(\"/report\")\n @Consumes(\"application/json\")\n @Produces(\"application/json\")\n @RolesAllowed({ \"admin\" })\n public String updateReportStatus(ReportVo reportVo) {\n\n log.info(\"Updating status of report \" + reportVo.getId() + \" to \" + reportVo.getStatus());\n\n reportService.updateReportStatus(reportVo.getId(), reportVo.getStatus());\n return \"OK\";\n }", "private static boolean updateFilureLog(final HealthCheckVO healthCheckVO, final long currentFailedCount) {\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\t\n\t\t//Update the failure log only if there is a status change\n\t\tif (status == healthCheckVO.getCurrentStatus()) {\n\t\t\treturn false;\n\t\t}\n\t\t//Even if there is a failure and the max retry count is not reached - ignore\n\t\tif (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\treturn false;\n\t\t}\n\t\t//First time status check and if success - ignore\n\t\tif(healthCheckVO.getCurrentStatus() == null && status == Status.UP){\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\tString message = healthCheckVO.getStatus().getMessage();\n\t\tif (status != Status.UP && currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\tmessage = healthCheckVO.getStatus().getMessage();\n\t\t} else if (status == Status.UP) {\n\t\t\tmessage = \"Status changed from \\\"\" + (healthCheckVO.getCurrentStatus() == null ? \"Not Available\"\n\t\t\t\t\t\t\t: healthCheckVO.getCurrentStatus().getStatusDesc()) + \"\\\" to \\\"\" + status.getStatusDesc() + \"\\\"\";\n\t\t}\n\t\tfinal String updateMessage = message;\n\t\thealthCheckVO.setFailureStatusMessage(updateMessage);\n\t\tComponentFailureLogEntity cfl = new ComponentFailureLogEntity();\n\t\tcfl.setCompRegStsTime(new java.sql.Timestamp(System.currentTimeMillis()));\n\t\tcfl.setFailureMessage(updateMessage);\n\t\tcfl.setStatusId(status.getStatusId());\n\t\tcfl.setHealthCheckId(healthCheckVO.getHealthCheckId());\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tsession.save(cfl);\n\t\ttxn.commit();\n\t\t\n\t\tlogger.debug(\"Inserted Failed Status comp_failure_log : HEALTH_CHECK = \" + healthCheckVO.getHealthCheckId());\n\t\treturn true;\n\t}", "public boolean update(BaseVo vo) {\n\t\tGatherIndicators gatherIndicators = (GatherIndicators)vo;\n\t\tStringBuffer sql = new StringBuffer(200);\n sql.append(\"update nms_gather_indicators set name='\");\n sql.append(gatherIndicators.getName());\n sql.append(\"',type='\");\n sql.append(gatherIndicators.getType());\n sql.append(\"',subtype='\");\n sql.append(gatherIndicators.getSubtype()); \n sql.append(\"',alias='\");\n sql.append(gatherIndicators.getAlias()); \n sql.append(\"',description='\");\n sql.append(gatherIndicators.getDescription());\n sql.append(\"',category='\");\n sql.append(gatherIndicators.getCategory());\n sql.append(\"',isDefault='\");\n sql.append(gatherIndicators.getIsDefault());\n sql.append(\"',isCollection='\");\n sql.append(gatherIndicators.getIsCollection());\n sql.append(\"',poll_interval='\");\n sql.append(gatherIndicators.getPoll_interval());\n sql.append(\"',interval_unit='\");\n sql.append(gatherIndicators.getInterval_unit());\n sql.append(\"',classpath='\");\n sql.append(gatherIndicators.getClasspath());\n sql.append(\"' where id=\");\n sql.append(gatherIndicators.getId());\n\t\treturn saveOrUpdate(sql.toString());\n\t\t\n\t}", "@Test\r\n\r\n\tpublic void testUpdateStatus() {\r\n\t\tString status = \"accept\";\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.findByEmail(\"shaline@gmail.com\"))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.save(backgroundverification1))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\tBackgroundverification backgroundverification = backgroundVerificationAndLeaseAdmnServiceImpl\r\n\t\t\t\t.updateStatus(\"shaline@gmail.com\", status);\r\n\t\tassertEquals(\"accept\", backgroundverification.getApp_bgc_status());\r\n\r\n\t}", "public int updateCheck(Object obj) throws SQLException {\n\t\treturn dao.updateCheck(obj);\n\t}", "private static void updateHealthCheck(final Long healthCheckId, final Integer healthCheckTypeId) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_TYPE);\n\t\tquery.setLong(\"hcTypeId\", healthCheckTypeId);\n\t\tquery.setLong(\"healthCheckId\", healthCheckId);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public void updateAgentBODStatus(String profileId, int status);", "@Override\n\tpublic void updateStatus(int appointmentId, String status, String reason) {\n\t\ttry{\n\t\t\tjdbcTemplate.update(UPDATE_STATUS, (ps)->{\n\t\t\t\tps.setString(1, status);\n\t\t\t\tps.setString(2, reason);\n\t\t\t\tps.setInt(3, appointmentId);\n\t\t\t});\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void updateStatus (DataSource pool,String status) throws SQLException {\r\n this.setStatus(status);\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set status = ? \"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatus. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getStatus());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n conn.close();\r\n conn=null;\r\n }catch(SQLException e){\r\n \r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}", "boolean updateSchoolMasterDetail(SchoolMasterVo vo);", "int updateByPrimaryKey(StatusReplies record);", "@Override\n public void updateStatus(Status status) {\n this.status = status;\n }", "@POST\n @ApiOperation(\"Update process status\")\n @javax.ws.rs.Path(\"{id}/status\")\n @Consumes(MediaType.TEXT_PLAIN)\n @WithTimer\n public void updateStatus(@ApiParam @PathParam(\"id\") UUID instanceId,\n @ApiParam(required = true) @QueryParam(\"agentId\") String agentId,\n @ApiParam(required = true) ProcessStatus status) {\n\n ProcessKey processKey = assertProcessKey(instanceId);\n processManager.updateStatus(processKey, agentId, status);\n }", "public void updateStatus(JobStatus status, String userId) throws DatabaseException, IllegalArgumentException;", "private void setPoStatus(PoBean.Status status, int pid) throws Exception {\n String query = \"UPDATE PO SET status = ? WHERE id = ?\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n p.setString(1, status.toString());\n p.setInt(2, pid);\n p.executeUpdate();\n }\n }", "void updateStatusForItem(HighlightsModel item, CreatingStatus currentStatus) {\n if (item.status != null) {\n item.status.currentUriIndex = currentStatus.currentUriIndex;\n item.status.maxUris = currentStatus.maxUris;\n item.status.progress = currentStatus.progress;\n } else {\n Log.e(TAG, \"Status - Error!! status == null for uriIdx:\" + currentStatus.currentUriIndex + \", maxUris:\" + currentStatus.maxUris + \",progress:\" + currentStatus.progress);\n }\n }", "Future<UpdateHealthCheckerResponse> updateHealthChecker(\n UpdateHealthCheckerRequest request,\n AsyncHandler<UpdateHealthCheckerRequest, UpdateHealthCheckerResponse> handler);", "public boolean update(BaseVo vo) {\n\t\t\t\treturn false;\n\t\t\t}", "protected void updateForSuspend(NbaSuspendVO suspendVO) throws NbaBaseException {\n\t\tgetLogger().logDebug(\"Starting updateForSuspend\");\n\t\tupdateWork(getUser(), getWork());\t//SPR3009, NBA213\n\t\tsuspendWork(getUser(), suspendVO);\t//SPR3009, NBA213\n\t\tunlockWork(getUser(), getWork());\t//SPR3009, NBA213\n\t\t}", "public void status(String status) {\n FirebaseDatabase.getInstance().getReference(\"chef_account_settings\").child(firebaseUser.getUid()).child(\"status\").setValue(status);\n// HashMap<String, Object> hashMap = new HashMap<>();\n// hashMap.put(\"status\", status);\n// reference.updateChildren(hashMap);\n }", "@Override\r\n\tpublic boolean update(ReviewVO vo) {\n\t\tsqlSession.update(namespace + \".update\", vo);\r\n\t\treturn true;\r\n\t}", "public void afterUpdate(RoomstatusBean pObject) throws SQLException;", "public void update(AuctionVO auctionVO) {\n\t\tSession session = null;\n\t\t\n\t\t try{\n\t\t \n\t\t\t session = MyUtility.getSession();// Static Method which makes only one object as method is static\n\t\t\n\t\t\t Transaction tr = session.beginTransaction();\n\t\t \n\t\t\t session.update(auctionVO);\n\t\t \n\t\t\t tr.commit();\n\t\t \n\t\t }catch(Exception e)\n\t\t { \t\t\t\t\n\t\t\tSystem.out.println(e.getMessage());\n\t\t }\n\t\t finally\n\t\t {\n\t\t session.close();\n\t\t }\n\t\n\t}", "Transfer updateStatus(Long id, Payment.Status status);", "ChangeStatus checkStatus(Database database);", "@Override\r\n\tpublic int updateDBInfo(AgentDBInfoVO vo){\n\t\treturn sqlSession.getMapper(CollectMapper.class).updateDBInfo(vo);\r\n\t}", "public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }", "public boolean updateStaffStatus(int Id,String status);", "public boolean updateDocumentStatus(ImagingDocument imgDoc, int status, String docName, Environment env) {\n\t\tPreparedStatement stmt = null;\n\t\tConnection connection = DataSourceUtils.getConnection(dataSource);\n\t\tboolean updateOK = false;\n\t\t\n\t\ttry {\n\t\t\tstmt = connection.prepareStatement(SQL_UEWI_UPDATE_STATUS);\n\t\t\tif (Environment.DEV.equals(env) || Environment.TEST.equals(env)) {\n\t\t\t\tstatus = status + 30;\n\t\t\t}\n\t\t\tstmt.setInt(1, status);\n\t\t\tstmt.setString(2, docName);\n\t\t\tstmt.setString(3, imgDoc.getLegacyDocId());\n\t\t\tint rowAffected = stmt.executeUpdate();\n\t\t\tupdateOK = (rowAffected == 1);\n\t\t\tconnection.commit();\n\t\t\tconnection.close();\n\t\t\tstmt.close();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(\"Cannot update record status !\", e);\n\t\t}\n\t\t\n\t\treturn updateOK;\n\t}", "int updateByPrimaryKeyWithBLOBs(StatusReplies record);", "@Override\r\n\tpublic boolean update(NoticeVO vo) {\n\t\tsqlSession.update(namespace + \".update\", vo);\r\n\t\treturn true;\r\n\t}", "public void setStatus(String un, String status){\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n // updating user database\n collRU.findOneAndUpdate(\n eq(\"username\", un),\n Updates.set(\"status\", status)\n );\n }", "@RequestMapping(value = \"/update\", method = RequestMethod.POST)\n @ResponseBody\n public ResponseVO update(@RequestBody SettingVO settingVO) {\n boolean isSuccess = settingService.update(settingVO);\n if(isSuccess){\n return ResponseVO.success(ResultEnum.SUCCESS);\n }\n return ResponseVO.error(ResultEnum.Error);\n }", "public void updateSyncStatus(String id ,String status){\n SQLiteDatabase database = this.getWritableDatabase();\n String updateQuery = \"Update farmers set updateStatus = '\"+ status +\"' where \"+ DBFarmersContract.COLUMN_ID+\"=\"+\"'\"+ id +\"'\";\n\n Log.d(\"query\", updateQuery);\n database.execSQL(updateQuery);\n\n database.close();\n }", "void onStatusUpdate(int status);", "public void updateSyncStatus(String id, String status)\n {\n SQLiteDatabase database = this.getWritableDatabase(); \n String updateQuery = \"Update UsersTable set udpateStatus = '\"+ status +\"' where userId=\"+\"'\"+ id +\"'\";\n Log.d(\"query\",updateQuery); \n database.execSQL(updateQuery);\n database.close();\n }", "public void updateVentureCheckList(VentureChecklist ventureChecklist) {\n\t\tSl = \"UPDATE venture_checklist SET ventureChecklistContent = ? WHERE memberAccount= ? AND mapSubClassID = ?\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl);\r\n\t\t\tsmt.setString(1, ventureChecklist.getContent());\r\n\t\t\tsmt.setString(2, ventureChecklist.getAccount());\r\n\t\t\tsmt.setInt(3, ventureChecklist.getClassID());\r\n\t\t\tsmt.executeUpdate();\t\r\n\t\t\trs.close();\r\n\t\t\tsmt.close(); \r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n \r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void lspStatusChangeEvent(Lsp lsp) {\n instance.invalidateDB();\n }", "private void updateStatus(String docId, final String status) {\n db.collection(\"orders\")\n .document(docId)\n .update(\"Status\", status)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(\"This done\", \"DocumentSnapshot successfully updated!\");\n //Toast.makeText(getActivity().getApplicationContext(),foodList.get(position).getFoodName()+\":Updated\",Toast.LENGTH_LONG).show();\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(\"This error\", \"Error updating document\", e);\n Toast.makeText(getActivity().getApplicationContext(), \"Server issue\", Toast.LENGTH_LONG).show();\n }\n });\n }", "void updateRoomStatus(long roomId, int status);", "public void updateContestStatus(ContestStatus arg0) throws ContestManagementException {\r\n }", "public void setStatus(int v) \n {\n \n if (this.status != v)\n {\n this.status = v;\n setModified(true);\n }\n \n \n }", "public static void updateMarathonHealthCheckStatus(final int componentId, final int environmentId,\n\t\t\tfinal long regionID,final HealthCheckType healthCheckType, final Status status, boolean isStatusChanged) {\n\t\tString queryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_NO_CHG;\n\t\tif(isStatusChanged){\n\t\t\tqueryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_CHG;\n\t\t}\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(queryString);\n\t\tquery.setLong(\"statusId\", status.getStatusId());\n\t\tquery.setTimestamp(\"statusUpdateTime\", new java.sql.Timestamp(System.currentTimeMillis()));\n\t\tquery.setLong(\"healthCheckTypeId\", healthCheckType.getHealthCheckTypeId());\n\t\tquery.setLong(\"environmentId\", environmentId);\n\t\tquery.setLong(\"componentId\", componentId);\n\t\tquery.setLong(\"regionId\", regionID);\n\t\tint rowCount = query.executeUpdate();\n\t\tlogger.info(\"Number of Updated Kubernetes row - \"+ rowCount);\n\t\ttxn.commit();\n\t\t\n\t}", "public void setStatus(Status vmStatus) {\n this.vmStatus = vmStatus;\n }", "@RequestMapping(path = \"/{appointmentId}\", method = RequestMethod.PATCH, produces = \"application/json\", consumes = \"application/json\")\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic Appointment updateStatus(@PathVariable Long appointmentId, @RequestBody Appointment appointment) {\n\t\treturn appointmentService.updateStatus(appointmentId, appointment);\n\t}", "public void updateStatus() {\n\n //loading the driver\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //database variables\n final String db = \"jdbc:mysql://mis-sql.uhcl.edu/dingorkarj2620\";\n Connection con = null;\n Statement st = null;\n ResultSet rs = null;\n\n try {\n //connecting database\n con = DriverManager.getConnection(db, \"dingorkarj2620\", \"1289968\");\n st = con.createStatement();\n rs = st.executeQuery(\"select * from account where a_id = \" + super.id);\n\n //updating the status\n if (rs.next()) {\n //premium seller\n if (rs.getString(3).equalsIgnoreCase(\"premium\")) {\n //update the item status\n i.setI_status(\"Valid\");\n\n } else {\n //regular seller\n if (rs.getString(3).equalsIgnoreCase(\"regular\")) {\n //checking price lower or higher than 100\n if (i.getI_price() <= 100) {\n //update status valid\n i.setI_status(\"Valid\");\n } else {\n //update status pending\n i.setI_status(\"Invalid\");\n }\n }\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n con.close();\n st.close();\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n }", "public ApiResponse updateStatus(List<Df00201VO> list){\n List<DfDegree> dfList = ModelMapperUtils.mapList(list,DfDegree.class);\n DfDegree orgItem = null;\n int index = 0;\n String changeStatus = \"\";\n for (DfDegree item : dfList) {\n changeStatus = list.get(index).getChangeStatus() == \"\" ? \"Draft\" : list.get(index).getChangeStatus();\n orgItem = repository.findOne(item.getId());\n item.setStatusUuid(CommonCodeUtils.getCodeDetailUuid(\"CD115\",changeStatus));\n item.setInsertDate(orgItem.getInsertDate());\n item.setInsertUuid(orgItem.getInsertUuid());\n if(changeStatus.equals(\"Draft\")){\n item.setTerminatorUuid(\"\");\n item.setEndDate(null);\n item.setEndYn(\"N\");\n }\n repository.save(item);\n index++;\n }\n return ApiResponse.of(ApiStatus.SUCCESS, \"SUCCESS\");\n }", "public void updateAuditTrailEntity(IAuditTrailEntity obj)\n {\n getDAO().update(obj);\n }", "@Override\r\n\tpublic void update(CustVO custVO) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(UPDATE);\r\n\r\n\t\t\tpstmt.setString(1, custVO.getCust_acc());\r\n\t\t\tpstmt.setString(2, custVO.getCust_pwd());\r\n\t\t\tpstmt.setString(3, custVO.getCust_name());\r\n\t\t\tpstmt.setString(4, custVO.getCust_sex());\r\n\t\t\tpstmt.setString(5, custVO.getCust_tel());\r\n\t\t\tpstmt.setString(6, custVO.getCust_addr());\r\n\t\t\tpstmt.setString(7, custVO.getCust_pid());\r\n\t\t\tpstmt.setString(8, custVO.getCust_mail());\r\n\t\t\tpstmt.setDate(9, custVO.getCust_brd());\r\n\t\t\tpstmt.setDate(10, custVO.getCust_reg());\r\n\t\t\tpstmt.setBytes(11, custVO.getCust_pic());\r\n\t\t\tpstmt.setString(12, custVO.getCust_status());\r\n\t\t\tpstmt.setString(13, custVO.getCust_niname());\r\n\t\t\tpstmt.setString(14, custVO.getCust_ID());\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "void onStatusChanged(Status newStatus);", "public void alterarStatusChamado(StatusChamado statusChamado){\n statusChamadoDAO.alterar(statusChamado);\n }", "public void updateStatusVisible (DataSource pool,String status) throws SQLException {\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set status = ?, visible = 1\"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatusVisible. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getStatus());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n }catch(SQLException e){\r\n \r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}", "int updateByPrimaryKey(ChronicCheck record);", "@Override\n\tpublic int update(ReplyVO vo) throws Exception {\n\t\tlog.info(\"update().vo : \" + vo);\n\t\treturn mapper.update(vo);\n\t}", "public int update(ReviewVO review_memberVO);", "Status updateStatus(String status) throws TwitterException;", "void setStatus(final UserStatus status);", "@Override\r\n\tpublic void stockUpdate(adminStockVO vo) {\n\t\tadminDAO.stockUpdate(vo);\r\n\t}", "public abstract void updateStatus() throws Throwable;", "public void setJob_StatusCheck(StatusCheckDataObject job_StatusCheck) {\r\n this.job_StatusCheck = job_StatusCheck;\r\n }", "@Test\n public void checkStatusFileCorrectlyUpdated() throws Exception {\n\n when(context.getString(\"status.file.path\")).thenReturn(\"/var/lib/flume\");\n when(context.getString(\"hibernate.connection.url\")).thenReturn(\"jdbc:mysql://host:3306/database\");\n when(context.getString(\"table\")).thenReturn(\"table\");\n when(context.getString(\"status.file.name\")).thenReturn(\"statusFileName\");\n\n SQLSourceHelper sqlSourceHelper = new SQLSourceHelper(context, \"Source Name\");\n sqlSourceHelper.createStatusFile();\n sqlSourceHelper.setCurrentIndex(\"10\");\n\n sqlSourceHelper.updateStatusFile();\n\n SQLSourceHelper sqlSourceHelper2 = new SQLSourceHelper(context, \"Source Name\");\n assertEquals(\"10\", sqlSourceHelper2.getCurrentIndex());\n }", "public void salvarStatus(StatusDefinicao status) throws Exception {\n new StatusDao().salvarAtualizar(status);\n }", "public void status(String status)\r\n {\r\n reference=FirebaseDatabase.getInstance().getReference(\"Users\").child(firebaseUser.getUid());\r\n HashMap<String,Object>hashMap=new HashMap<>() ;\r\n hashMap.put(\"status\",status) ;\r\n reference.updateChildren(hashMap);\r\n }", "@Override\n\tpublic boolean update(StatusDetail item) {\n\t\treturn false;\n\t}", "Status updateStatus(StatusUpdate latestStatus) throws TwitterException;", "private void updateStatus() {\n \tif (!status.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tcurrentProfile.setStatus(status.getText());\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Status updated to \" + status.getText());\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change status\");\n\t\t\t}\n\t\t}\n\t}", "int updateByPrimaryKey(WizardValuationHistoryEntity record);", "@Override // 프로필 사진 업로드\r\n\tpublic int photoupdate(MemberVO vo) {\n\t\treturn sqlSession.update(NAMESPACE + \".photoupdate\", vo);\r\n\t}", "public final void serviceCheck(final String checkName, final Integer status,\n final JSONObject builddata) {\n logger.fine(String.format(\"Sending service check '%s' with status %s\", checkName, status));\n\n // Build payload\n JSONObject payload = new JSONObject();\n payload.put(\"check\", checkName);\n payload.put(\"host_name\", builddata.get(\"hostname\"));\n payload.put(\"timestamp\", System.currentTimeMillis() / this.THOUSAND_LONG); // current time in s\n payload.put(\"status\", status);\n payload.put(\"tags\", assembleTags(builddata));\n\n post(payload, this.SERVICECHECK);\n }", "@GetMapping(\"/status\")\n public String changeStatus(@RequestParam(\"status\") String status,\n @RequestParam(\"id\") Long id, Model model){\n\n WorkOrder workOrder = taskService.findOne(id);\n\n workOrder.setStatus(status);\n\n taskService.save(workOrder);\n\n return \"redirect:/dev/detail?id=\" + id;\n\n }", "public void setStatus(JobStatus status);", "void updateOrderStatus(String orderNr, String status, Long businessId);", "@Test\n public void testUpdateApartmentStatus() {\n System.out.println(\"updateApartmentStatus\");\n String status = \"Unavailable\";\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n instance.updateApartmentStatus(status, apartmentid);\n }", "public void updateContestStatus(long contestId, long contestStatusId) throws ContestManagementException {\r\n updatedContestId = contestId;\r\n updatedStatusId = contestStatusId;\r\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic HeadUnit updateControlStatus(long headUnitId, String featureType, String featureStatus) {\n\t\t// check if given headUnitId is registered with any userID\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tlogger.info(\"Send updateControlStatus From Simulator To Find My Car For HeadLight-Door-Trunk \");\n\t\tHeadUnit hdunit = new HeadUnit();\n\t\tString check_query = \"select count(1) from user where \"\n\t\t\t\t+ \"user_id = (SELECT user_id from headunit where headunit_id = ?)\";\n\n\t\tint result = jdbcTemplate.queryForObject(check_query, new Object[] { headUnitId }, Integer.class);\n\n\t\tif (result > 0) {\n\t\t\t// if userID is available, send the status\n\t\t\t// get GCM key\n\t\t\tString gcm_key_query = \"select gcmregistartionkey from user where \"\n\t\t\t\t\t+ \"user_id = (SELECT user_id from headunit where headunit_id = ?)\";\n\n\t\t\tString query_result = (String) jdbcTemplate.queryForObject(gcm_key_query, new Object[] { headUnitId },\n\t\t\t\t\tString.class);\n\n\t\t\tSystem.out.println(\"GCM KEY ============================= \" + query_result);\n\t\t\t// if GCM key not null or empty\n\t\t\t// prepare message\n\t\t\tif (query_result != null && !query_result.isEmpty()) {\n\t\t\t\tSender sender = new Sender(utilityObj.getGcmApiKeyVehiclelocatorapp());\n\t\t\t\tlogger.info(\n\t\t\t\t\t\t\"IN updateControlStatus Create Sender Using : \" + utilityObj.getGcmApiKeyVehiclelocatorapp());\n\t\t\t\t// create JSON object to send notification in json format\n\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t// build message based on featureType and featurestatus\n\t\t\t\tobj.put(\"featuretype\", featureType);\n\t\t\t\tobj.put(\"featurestatus\", featureStatus);\n\t\t\t\tString prepare_msg = obj.toJSONString();\n\t\t\t\tgcm_message = new Message.Builder().timeToLive(30).delayWhileIdle(true)\n\t\t\t\t\t\t.addData(MESSAGE_KEY, prepare_msg).build();\n\t\t\t\tResult gcm_result = null;\n\t\t\t\ttry {\n\t\t\t\t\t// get gcm_message and gcm_register key\n\t\t\t\t\t// send message to that gcm_register_key\n\t\t\t\t\t// set message and status\n\t\t\t\t\tgcm_result = sender.send(gcm_message, query_result, 1);\n\t\t\t\t\tlogger.info(\"In updateControlStatus GCM Result From GOOGLE API : \" + gcm_result.toString());\n\t\t\t\t\thdunit.setGcmregistartionkey(query_result);\n\t\t\t\t\thdunit.setHeadunitid(headUnitId);\n\t\t\t\t\thdunit.setStatus(true);\n\t\t\t\t\thdunit.setMessage(prepare_msg);\n\t\t\t\t\thdunit.setFeaturetype(featureType);\n\t\t\t\t\thdunit.setFeaturestatus(featureStatus);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// GCM key null\n\t\t\t\thdunit.setMessage(\"NO GCM KEY FOUND\");\n\t\t\t}\n\n\t\t} else {\n\t\t\t// no userID data found for given headUnitID\n\t\t\t// set message and status\n\t\t\thdunit.setStatus(false);\n\t\t\thdunit.setMessage(\"NO USER DATA FOUND FOR HEAD UNIT ID : \" + headUnitId);\n\t\t\tlogger.info(\"NO USER DATA FOUND FOR HEAD UNIT ID : \" + headUnitId);\n\t\t}\n\t\treturn hdunit;\n\t}", "public void updateDB() {\n \n sql = \"UPDATE Order set \" + \"CustomerID='\"+getCustomerID()+\"',\" + \" Status='\"+getStatus()+\"'\" + \" WHERE OrderID= '\" + getOrderID()+\"'\";\n db.updateDB(sql);\n \n }", "public void upateroomstatus(String branchid, String roomid, String status){\n\t\tString sql = \"update tb_p_room set status = '\" + status + \"' where branch_id = \" + branchid + \" and room_id = \" + roomid;\n\t\t//String hql1 = \"update Room set roomKey.status = :STATUS where id = :ID\";\n\t\t//this.executeUpdateHQL(hql1,new String[]{\"STATUS\", \"ID\"}, new Object[]{status, id});\n\t\tthis.executeUpdateSQL(sql);\n\t}", "@Override\n\tpublic int boardUpdate(SpringBoardVO bvo) {\n\t\treturn springBoardDAO.boardUpdate(bvo);\n\t}", "public void verifyMarkAsCompleteBackend(String engagementField, String engagementValue, String todoName,\n String status) throws SyncFactoryException {\n try {\n getLogger().info(\"Verify Completed field updated on database.\");\n // JSONObject jsonObject = MongoDB.getToDoObject(getEngagementCollection(), engagementField, engagementValue, todoName);\n JSONObject jsonObject = MongoDBService.getToDoObject(getEngagementCollection(), engagementField, engagementValue, todoName);\n if (jsonObject.get(\"completed\").toString().equals(status)) {\n NXGReports.addStep(\"Verify Completed field updated on database.\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify Completed field updated on database.\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } catch (Exception ex) {\n NXGReports\n .addStep(\"Verify Completed field updated on database.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n ex.printStackTrace();\n }\n }", "void documentModifyStatusUpdated(SingleDocumentModel model);", "void documentModifyStatusUpdated(SingleDocumentModel model);", "@Override\n\tpublic int update(MemberVO memberVo) {\n\t\treturn 0;\n\t}", "public boolean update(MealVoucherConfiguration bean) {\r\n\t\tboolean result = false;\r\n\t\tObject Obj[][] = new Object[1][3];\r\n\t\tObj[0][0] = bean.getCreditCode();\r\n\t\tObj[0][1] = bean.getFreqencyOfChange();\r\n\t\tObj[0][2] = bean.getMealvoucherconfID();\r\n\t\tString updateQery = \"UPDATE HRMS_MEAL_VOUCHER_CONFIG SET MEAL_CONFIG_CASH = ? ,MEAL_CONFIG_FREQUENCY = ? WHERE MEAL_CONFIG_CODE = ?\";\r\n\t\tresult = getSqlModel().singleExecute(updateQery, Obj);\r\n\t\treturn result;\r\n\t}", "public void updateGame(GameStatusMessage gameStatus) {\n logger.info(\"Game update: \" + gameStatus.toString());\n this.gameStatus = gameStatus;\n gameUpdated = true;\n selectedTile = null;\n moved = false;\n }", "boolean updateOrderStatus(long orderId, Order.Status status) throws DaoProjectException;", "public void setStatus(OrderStatus updatedStatus) {\n this.status = updatedStatus;\n }", "public void setStatus(@NotNull Status status) { this.myStatus = status; }", "public int updateReportSyncStatus(Long reportBaseId, SyncStatus syncStatus) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportEntry.COLUMN_SYNC_STATUS,\n syncStatus.toString());\n\n // update the report and set the sync status to SYNCED\n // build a report uri with the base id\n return getContext().getContentResolver().update(\n ReportEntry.buildReportUriNoNetworkSync(reportBaseId),\n contentValues,\n null,\n null\n );\n }", "int updateByExample(@Param(\"record\") StatusByUser record, @Param(\"example\") StatusByUserExample example);", "private void updateStatus(boolean success) {\n if (success) {\n try {\n callSP(buildSPCall(MODIFY_STATUS_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with modify entries. \", exception);\n }\n\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n } else {\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n }\n }", "List<Status> getAllChecklistStatus() throws ServiceException;", "private boolean update(String id, String status) {\n Connection connection;\n try {\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n connection = DriverManager.getConnection(\"jdbc:derby://localhost:1527/XYZ_Assoc\");\n boolean success = true;\n try (PreparedStatement prepStatement = connection.prepareStatement(\"UPDATE MEMBERS SET \\\"status\\\" = ? WHERE \\\"id\\\" = ?\")) {\n prepStatement.setString(1, status);\n prepStatement.setString(2, id);\n success = success && prepStatement.executeUpdate() > 0;\n }\n try (PreparedStatement prepStatement = connection.prepareStatement(\"UPDATE USERS SET \\\"status\\\" = ? WHERE \\\"id\\\" = ?\")) {\n prepStatement.setString(1, status);\n prepStatement.setString(2, id);\n success = success && prepStatement.executeUpdate() > 0;\n }\n return success;\n } catch (ClassNotFoundException | SQLException ex) {\n return false;\n }\n }", "public void setCheckStatus(String checkStatus) {\n\t\tthis.checkStatus = checkStatus;\n\t}", "public void setCheckStatus(String checkStatus) {\n\t\tthis.checkStatus = checkStatus;\n\t}", "@Override\n\tpublic int setUpdate(BoardVO boardVO) throws Exception {\n\t\treturn qnaMapper.setUpdate(boardVO);\n\t}", "public void setStatusId(long statusId);" ]
[ "0.74504757", "0.68415546", "0.62256867", "0.600189", "0.5962937", "0.58340174", "0.58214945", "0.57726943", "0.56886476", "0.5560965", "0.54807526", "0.5341747", "0.5331027", "0.5327717", "0.52876085", "0.52812374", "0.5217117", "0.5202716", "0.51923275", "0.51666397", "0.5127871", "0.5109495", "0.50968313", "0.50634754", "0.5057485", "0.5027272", "0.5018951", "0.50036883", "0.49938947", "0.49798468", "0.49743629", "0.49725387", "0.49658757", "0.49612987", "0.49522108", "0.49483666", "0.49449074", "0.49445507", "0.49357972", "0.49288526", "0.49174136", "0.49063617", "0.4905298", "0.49032345", "0.4887414", "0.487896", "0.4869999", "0.48696974", "0.48601153", "0.485507", "0.48490572", "0.48434842", "0.48385268", "0.48238325", "0.4821405", "0.48206958", "0.4814974", "0.480528", "0.4802413", "0.4795549", "0.47898367", "0.4789801", "0.47860044", "0.47825456", "0.4780603", "0.47780344", "0.47649968", "0.47633445", "0.47626892", "0.47589812", "0.47567806", "0.47541088", "0.47455794", "0.47429246", "0.4738986", "0.4728531", "0.47267932", "0.47239423", "0.47169524", "0.47068915", "0.47051367", "0.4704933", "0.47042987", "0.46998972", "0.46998972", "0.4698278", "0.4698021", "0.46897087", "0.46888062", "0.467619", "0.46733445", "0.46596044", "0.46476108", "0.46463227", "0.46437094", "0.46389213", "0.46339378", "0.46339378", "0.46338966", "0.46329716" ]
0.7585615
0
Update the status and message in comp_failure_log.
private static boolean updateFilureLog(final HealthCheckVO healthCheckVO, final long currentFailedCount) { final Status status = healthCheckVO.getStatus().getStatus(); //Update the failure log only if there is a status change if (status == healthCheckVO.getCurrentStatus()) { return false; } //Even if there is a failure and the max retry count is not reached - ignore if (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) { return false; } //First time status check and if success - ignore if(healthCheckVO.getCurrentStatus() == null && status == Status.UP){ return false; } String message = healthCheckVO.getStatus().getMessage(); if (status != Status.UP && currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) { message = healthCheckVO.getStatus().getMessage(); } else if (status == Status.UP) { message = "Status changed from \"" + (healthCheckVO.getCurrentStatus() == null ? "Not Available" : healthCheckVO.getCurrentStatus().getStatusDesc()) + "\" to \"" + status.getStatusDesc() + "\""; } final String updateMessage = message; healthCheckVO.setFailureStatusMessage(updateMessage); ComponentFailureLogEntity cfl = new ComponentFailureLogEntity(); cfl.setCompRegStsTime(new java.sql.Timestamp(System.currentTimeMillis())); cfl.setFailureMessage(updateMessage); cfl.setStatusId(status.getStatusId()); cfl.setHealthCheckId(healthCheckVO.getHealthCheckId()); Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); session.save(cfl); txn.commit(); logger.debug("Inserted Failed Status comp_failure_log : HEALTH_CHECK = " + healthCheckVO.getHealthCheckId()); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "private void updateStatus(boolean success) {\n if (success) {\n try {\n callSP(buildSPCall(MODIFY_STATUS_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with modify entries. \", exception);\n }\n\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n } else {\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n }\n }", "public void setFailStatus(java.lang.String newFailStatus) {\n\tfailStatus = newFailStatus;\n}", "private GeobatchRunInfo updateRunInfoStatus(GeobatchRunInfo runInfo) {\n RESTConsumerStatus status = null;\n try {\n status = getFlowService().getConsumerStatus(\n runInfo.getFlowUid());\n } catch (Exception e) {\n // status it's FAIL\n }\n runInfo.setFlowStatus(status != null ? status.getStatus().name()\n : \"FAIL\");\n runInfo = updateRunInfo(runInfo);\n return runInfo;\n }", "void updateCardLogsFailed(Throwable throwable);", "@Override\n public void onFailure(final Throwable t) {\n LOG.error(\"Failed to update cup status\", t);\n resetCupData();\n notifyCallback(false);\n }", "public void brakeFailureStatus() {\n \tthis.brakeFailureActive = this.trainModelGUI.brakeFailStatus();\n }", "public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }", "void setFailed(Throwable lastFailure);", "private String getStatusMessage() {\n\t\treturn (m_isTestPassed == true) ? \" successfully...\" : \" with failures...\";\n\t}", "@Override\n public void onTestFailure(ITestResult tr) {\n StatusPrinter.printTestFailure(tr);\n }", "protected void logStatusMessage(int status) {\n switch (status) {\n case EXIT_OK:\n logger.info(\"SCHEMA CHANGE: OK\");\n break;\n case EXIT_BAD_ARGS:\n logger.severe(\"SCHEMA CHANGE: BAD ARGS\");\n break;\n case EXIT_RUNTIME_ERROR:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n case EXIT_VALIDATION_FAILED:\n logger.warning(\"SCHEMA CHANGE: FAILED\");\n break;\n default:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n }\n }", "void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Log.i(\"update\", \"failed\");\n }", "public void failed(String msg) {\n failureMsg = msg;\n }", "@Then ( \"^The labor and delivery report is not updated successfully$\" )\n public void unsuccessfulEdit () {\n // confirm that the error message is displayed\n waitForAngular();\n try {\n final String temp = driver.findElement( By.name( \"errorMsg\" ) ).getText();\n if ( temp.equals( \"\" ) ) {\n fail();\n }\n }\n catch ( final Exception e ) {\n }\n }", "public void onUpdateFailure();", "@Override\n public void onFailure(int code, String msg) {\n Log.i(\"bmob\", \"更新失败:\" + msg);\n updateListener.onFailure(code, msg);\n }", "public void onFailure(Throwable caught) {\n\t\t\tGWT.log(\"Error changing status\", caught);\t\n\t\t}", "@Override\n public void onFailure(Throwable t) {\n isSucessful.compareAndSet(true, false);\n failedMessages.put(id.getName(), t.getMessage());\n handleIfFinished(t, isSucessful.get());\n }", "public void setToFailed() {\n if (currentStep.getCurrentPhase() != Step.Phase.FAILED) {\n changeCurrentStep(Step.Phase.FAILED);\n }\n setCompleteTime(System.currentTimeMillis());\n }", "private void setFailed(int errorCode){\n\t\tCartPayIndent currentIndent = mCoffeeIndentsList.get(mCurrentIndentIndex);\n\t\tString indentID = currentIndent.getIndentID();\n\t\tint coffeeID = currentIndent.getCoffeeID();\n\t\tLogUtil.e(TAG, \"make coffee unsuccessully, code:\" + errorCode + \", indent:\" + indentID);\n\t\tupdateIndentStatusDB(FLAG_ERROR, indentID, coffeeID);\n\t\t// rollback order\n\t\trollBackOrder(errorCode);\n\t\t// report server\n\t\tList<Integer> status = new ArrayList<Integer>();\n\t\tMachineStatusReportInfo info = new MachineStatusReportInfo();\n\t\tinfo.setUid(U.getMyVendorNum());\n\t\tinfo.setTimestamp(TimeUtil.getNow_millisecond());\n\t\tstatus.add(errorCode);\n\t\tinfo.setStatus(status);\n\t\texecute(info.toRemote());\n\n\t\tmMachineStatus = CoffeeMachineStatus.READY;\n\t\t// quit time\n\t\tmUIHandler.sendEmptyMessage(MSG_UI_MAKE_COFFEE_FAIL);\n\t\tmQuitTimer.startCountDownTimer(QUIT_WAIT_TIME, 1000, 1000);\n\t}", "public JoinStatusImpl(String errorMessage) {\n this.errorMessage = errorMessage;\n status = Status.FAILED;\n }", "public void markAsFailed() {\n execution.setErrorReported();\n }", "private static void setFailed() {\n HealthCheck.failed = true;\n }", "@Override\r\n\tpublic void onTestFailure(ITestResult iTestResult) {\r\n\t\tString text3 = iTestResult.getTestContext().getName() + \"->\"\r\n\t\t\t\t+ iTestResult.getName() + \"--\" + \" failed\";\r\n\t\tSystem.out.println(iTestResult.getTestContext().getName() + \"->\"\r\n\t\t\t\t+ iTestResult.getName() + \"--\" + \" failed\");\r\n\t\ttestFailed++;\r\n\t\tpassStatusMap.put(Thread.currentThread().getId(), false);\r\n\t\tappendHtlmFileTestName(iTestResult.getName(), \"failed\");\r\n\t\t// appendHtlmFileTestResult(\"failed\");\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\tlogger.info(\"onTestFailedButWithinSuccessPercentage \" + result.getName());\n\t}", "String getFailureMessage();", "public void fail() {\r\n\t\tcontestantIt.currentC().updatePoints(-FAIL);\r\n\t}", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "public String getFailureMessage() {\n return this.failureMessage;\n }", "public void log(ScreeningResult message) {\n if (message == null) {\n throw new NullPointerException(\"message should not be null.\");\n }\n\n Connection conn = null;\n PreparedStatement stmt = null;\n\n try {\n conn = DbHelper.getConnection();\n\n if (this.request instanceof SubmissionScreeningRequest) {\n stmt = conn.prepareStatement(\"UPDATE submission SET passed_auto_screening = ? WHERE submission_v_id = ?\");\n } else if (request instanceof SpecificationScreeningRequest){\n stmt = conn.prepareStatement(\"UPDATE specification SET passed_auto_screening = ? WHERE specification_id = ?\");\n }\n\n stmt.setBoolean(1, message.isSuccess());\n stmt.setLong(2, this.request.getArtifactId());\n\n if (!executeUpdate(stmt, maxRetries, retrySleepTime)) {\n throw new DatabaseException(\"Log result failed after \" + maxRetries + \" retries.\");\n }\n } catch (SQLException sqle) {\n throw new DatabaseException(\"Log result fails.\", sqle);\n } finally {\n DbHelper.dispose(conn, stmt, null);\n }\n }", "public void onTestFailure(ITestResult result) {\n\t\tSystem.out.println(\"********** \tTest Failed : \"+result.getName());\n\t\t\n\t}", "public void signalFailureStatus() {\n \tthis.signalFailureActive = this.trainModelGUI.signalFailStatus();\n \tif(this.signalFailureActive) {\n \tthis.setGPSAntenna(true);\n \tthis.setMBOAntenna(true);\n \t} else {\n \t\tthis.setGPSAntenna(false);\n \tthis.setMBOAntenna(false);\n \t}\n\n \t\n }", "void setContainerStatusActionError(RuleContextContainer rccContext, String sStatusInfo)\r\n throws StorageProviderException;", "@CrossOrigin\n\t@RequestMapping(value=\"/setFailure\", method= RequestMethod.POST)\n\tpublic JSONObject setFailure(@RequestBody StatusRequestBodyMessage requestBody, @RequestHeader HttpHeaders headers) {\n\t\tHeadersManager.setHeaders(headers);\n\t\ttry {\n\t\t String jobId = requestBody.jobId;\n\t\t \n\t\t SimpleResultSet res = new SimpleResultSet();\n\t\t LoggerRestClient logger = LoggerRestClient.getInstance(log_prop);\n\t \tLoggerRestClient.easyLog(logger, \"Status Service\", \"setFailure start\", \"JobId\", jobId, \"Message\", requestBody.message);\n\t \tLocalLogger.logToStdOut(\"Status Service setFailure start JobId=\" + jobId + \" Message=\" + requestBody.message);\n\t \t\n\t\t try {\n\t\t \t\n\t\t \tJobTracker tracker = this.getTracker();\n\t\t \ttracker.setJobFailure(jobId, requestBody.message);\n\t\t\t res.setSuccess(true);\n\t\t\t \n\t\t } catch (Exception e) {\n\t\t \tres.setSuccess(false);\n\t\t \tres.addRationaleMessage(SERVICE_NAME, \"setFailure\", e);\n\t\t\t LoggerRestClient.easyLog(logger, \"Status Service\", \"setFailure exception\", \"message\", e.toString());\n\t\t\t LocalLogger.logToStdOut(\"Status Service setFailure exception message=\" + e.toString());\n\t\t } \n\t\t \n\t\t return res.toJson();\n\t\t \n\t\t} finally {\n\t \tHeadersManager.clearHeaders();\n\t }\n\t\t \n\t}", "private void logStatusMessage(String string) {\n if (m_log != null) {\n m_log.statusMessage(string);\n if (string.contains(\"WARNING\") || string.contains(\"ERROR\")) {\n m_log.logMessage(string);\n }\n }\n }", "public void setFailureMessage(String failureMessage) {\n this.failureMessage = failureMessage;\n }", "@Override\n\tpublic void onFailed(String status, String msg, Object result) {\n\t\tsuper.onFailed(status, msg, result);\n if(back!=null){\n \t back.fail(status, msg, result);\n\t\t}\n\t}", "@Override\n\tpublic void onFailed(String status, String msg, Object result) {\n\t\tsuper.onFailed(status, msg, result);\n if(back!=null){\n \t back.fail(status, msg, result);\n\t\t}\n\t}", "@Override\n\tpublic void onFailed(String status, String msg, Object result) {\n\t\tsuper.onFailed(status, msg, result);\n if(back!=null){\n \t back.fail(status, msg, result);\n\t\t}\n\t}", "public synchronized void setErrorMessage(String errorMessage) {\n this.errorMessage = errorMessage;\n status = Status.FAILED;\n }", "@Override\n\t\t\tpublic void onFailure(Throwable t, String errorMsg, int statusCode) {\n\t\t\t}", "public void setFailure(AfFailure failure)\n {\n _failure = failure;\n }", "@Override\r\n\tpublic void jobFailed(Job failedJob, Job retry) {\n\t\tgetCloudsim().log(\"WARNING: Job failed: \" + failedJob.getID());\r\n\t}", "@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tWindow.alert(\"failed to add new Information Request in Updated list\");\r\n\t\t\t}", "private void updateValidationMessages()\r\n {\r\n String errorMessage = myModel.getErrorMessage();\r\n String warningMessage = myModel.getWarningMessage();\r\n\r\n if (StringUtils.isNotEmpty(errorMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.ERROR, errorMessage);\r\n }\r\n else if (StringUtils.isNotEmpty(warningMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.WARNING, warningMessage);\r\n }\r\n else\r\n {\r\n myValidator.setValidationResult(ValidationStatus.VALID, null);\r\n }\r\n }", "protected void failed(Throwable e, Description description, String status) {\n TestBench.out().println();\n // Instance of is the best way I know to retrieve this data.\n if (e instanceof MultipleFailureException) {\n /*\n * MultipleFailureExceptions hold multiple exceptions in one exception.\n * In order to properly display these stack traces we have to cast the\n * throwable and work with the list of thrown exceptions stored within\n * it.\n */\n int i = 1; // Running exception count\n int failureCount = ((MultipleFailureException) e).getFailures().size();\n for (Throwable singleThrown : ((MultipleFailureException) e).getFailures()) {\n getClassLogger().logp(\n Level.SEVERE,\n description.getClassName(),\n description.getMethodName(),\n (i++) + \"/\" + failureCount + \" \" + description.getDisplayName() + \" failed \"\n + singleThrown.getMessage() + \"\\n\" + status, singleThrown);\n }\n\n } else {\n getClassLogger().logp(Level.SEVERE, description.getClassName(),\n description.getMethodName(),\n description.getDisplayName() + \" failed \" + e.getMessage() + \"\\n\" + status, e);\n }\n super.failed(e, description);\n }", "public abstract void updateStatus() throws Throwable;", "public void printFailure() {\n //\n }", "@Override\n\t\t\tpublic void onFail() {\n\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t}", "public Failure(ErrorModel errorModel) {\n super(null);\n j.b(errorModel, CrashlyticsController.EVENT_TYPE_LOGGED);\n this.error = errorModel;\n }", "protected abstract String persistFailedMessage();", "@Override\n public void fail(String status, String msg, Object object) {\n\n }", "public void onTestFailure(ITestResult result) {\n\t \n\t if(result.getStatus()==ITestResult.FAILURE) {\n\t \t\n\t \ttest.log(Status.FAIL,\n\t\t\t\t\t\tMarkupHelper.createLabel(result.getName() + \" - Test Case Failed\", ExtentColor.RED));\n\t \ttest.log(Status.FAIL, MarkupHelper.createLabel(result.getThrowable()+\"The Test Case Fail\", ExtentColor.RED));\n\t \t String imgPath= screenShot.takeScreenShotOfFailTC(BaseClass.getDriver(), result.getMethod().getMethodName());\n\t \ttry {\n\t\t\t\t\ttest.fail(\"ScreenShot is Attached\",MediaEntityBuilder.createScreenCaptureFromPath(imgPath).build());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t \t\n\t \t\n\t }\n\t }", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\tSystem.out.println(\"*********Test onTestFailedButWithinSuccessPercentage :\"+result.getName());\r\n\t}", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "void setContainerStatusError(RuleContextContainer rccContext, String sStatusInfo)\r\n throws StorageProviderException;", "@Override\n\t\t\tpublic void onFailure(Throwable t, String errorMsg, int statusCode) {\n\t\t\t\tmListLayout.setLoadFailure();\n\t\t\t}", "public void onTestFailure(ITestResult result) {\n\t\tSystem.out.println(\"*********Test onTestFailure :\"+result.getName());\r\n\t}", "public synchronized void setStatus(Status stat) {\n if (!isMutable()) {\n throw new IllegalStateException(\n \"This TestResult is no longer mutable!\");\n }\n\n if (stat == null) {\n throw new IllegalArgumentException(\n \"TestResult status cannot be set to null!\");\n }\n\n // close out message section\n sections[0].setStatus(null);\n\n execStatus = stat;\n\n if (execStatus == inProgress) {\n execStatus = interrupted;\n }\n\n // verify integrity of status in all sections\n for (Section section : sections) {\n if (section.isMutable()) {\n section.setStatus(incomplete);\n }\n }\n\n props = PropertyArray.put(props, SECTIONS,\n StringArray.join(getSectionTitles()));\n props = PropertyArray.put(props, EXEC_STATUS,\n execStatus.toString());\n\n // end time now required\n // mainly for writing in the TRC for the Last Run Filter\n if (PropertyArray.get(props, END) == null) {\n props = PropertyArray.put(props, END, formatDate(new Date()));\n }\n\n // this object is now immutable\n notifyCompleted();\n }", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "public void fail() {\n _siteStatus = false;\n _lockTable.clear();\n _accessedTransactions.clear();\n _uncommitDataMap.clear();\n _lastFailTime = _tm.getCurrentTime();\n }", "void statusUpdate(boolean invalid);", "public void reportInitFailed() {\n System.out.println(\"Subsystem \" + getName() + \" failed to initialize!\");\n\n SmartDashboard.putBoolean(getName()+\" status\", false);\n\n isWorking = false;\n }", "@Override\r\n\t\t\t\t\t\tpublic void onCheckUpdateFail(ErrorInfoBean errorInfo) {\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"errInfo:\" + errorInfo.toString());\r\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"init_fail\");\r\n\t\t\t\t\t\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Failed\";\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void testFailure(final Failure failure) {\n\n AgentClient reportingClient = AgentClient.getInstance();\n\n if (reportingClient == null) {\n LOG.error(\"No reporting client available, please make sure you have a TestProject driver initialized\");\n return;\n }\n\n // Report the error.\n // Proceed only if error is instance of assertion error.\n if (!(failure.getException() instanceof AssertionError)) {\n return;\n }\n\n // Get the assertion error message.\n String resultDescription = failure.getException().getMessage();\n // Proceed only if message is not empty.\n if (resultDescription.isEmpty()) {\n return;\n }\n\n // Skip reporting when disabled, just log it.\n if (reportingClient.getReportsDisabled()) {\n LOG.trace(\"Step [{}] - [{}]\", resultDescription, false);\n return;\n }\n\n // Finally, submit the report\n StepReport report = new StepReport(resultDescription, null, false, null);\n if (!reportingClient.reportStep(report)) {\n LOG.error(\"Failed reporting exception: [{}]\", report);\n }\n\n }", "public void testFailure(Failure failure) throws java.lang.Exception {\n test.fail(failure.getException().getLocalizedMessage());\n\n System.out.println(\"Execution of test case failed : \" + failure.getMessage());\n }", "SendFailure() {\n super(ACLMessage.FAILURE);\n }", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "private void updateStatus(String message) {\n setErrorMessage(message);\n setPageComplete(message == null);\n }", "private void notifyUploadFail() {\n numberOfFail++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "public void test_UpdateContestStatus_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n ContestStatus status = new ContestStatus();\r\n status.setDescription(\"description\");\r\n status.setName(\"Name\");\r\n status.setContestStatusId(10L);\r\n status.setStatusId(1L);\r\n beanUnderTest.addContestStatus(status);\r\n\r\n entityManager.close();\r\n\r\n status.setName(\"sss\");\r\n beanUnderTest.updateContestStatus(status);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Override\n\tpublic void onTestFailure(ITestResult result) {\n\t\t\n\t\tSystem.out.println(\"Failed Test \" + result.getName());\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "protected String failedMatcherMessage() {\n return \"FAILED!\";\n }", "@Override\n public void onFailure(@NonNull @NotNull Exception e) {\n Snackbar.make(save, R.string.update_fail, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "public void onTestFailure(ITestResult result) {\n \t\n \tSystem.out.println(\"The test case is failed :\"+result.getName());\n }", "public static void reportFailure(String message) {\n System.err.println(\"\\nData verification failed:\");\n System.err.println('\\t' + message);\n }", "@Override\n\tpublic void onTestFailure(ITestResult tr) {\n\t\tsuper.onTestFailure(tr);\n\t}", "@Override\n\tpublic void onTestFailure(ITestResult tr) {\n\t\tsuper.onTestFailure(tr);\n\t}", "public void onTestFailure(ITestResult result) {\n\t\tSystem.out.println(result.getName()+\"**********Test Fail.............This is result.getName\");\r\n\t\t\r\n\t}", "private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult Result) {\n\t\t\r\n\t}", "void showSyncFailMessage();", "public void onTestFailure(ITestResult result) {\r\n\t\ttry {\r\n\t\t\t//used to write result details in html\r\n\t\t\tgenerateTestExecution(result);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "public void setStatusMessage(IStatus status);", "@Override\n\t\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\t\n\t\t}", "public void setStatus(Status result) {\n synchronized (TestResult.this) {\n synchronized (this) {\n checkMutable();\n for (OutputBuffer b : buffers) {\n if (b instanceof WritableOutputBuffer) {\n WritableOutputBuffer wb = (WritableOutputBuffer) b;\n wb.getPrintWriter().close();\n }\n }\n if (env == null) {\n env = emptyStringArray;\n }\n this.result = result;\n if (env == null) {\n env = emptyStringArray;\n }\n notifyCompletedSection(this);\n }\n }\n }", "public void onTestFailure(ITestResult result) {\n\n\t\ttry {\n\t\t\tString name=result.getName();\n\t\t\tLog4J2PropertiesConf.screenshot(name);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createFailure() {\n\t\tgetController().changeFree(true);\t\t\n\t\tdisplayAdvertisement(\"opponent failure\");\n\t\tvalidate();\n\t}" ]
[ "0.6310793", "0.59530836", "0.59101844", "0.58114594", "0.5796318", "0.57535094", "0.5705836", "0.56879675", "0.55965877", "0.5595312", "0.5592505", "0.5578057", "0.5543081", "0.55414426", "0.55198956", "0.5510062", "0.55050355", "0.549956", "0.54841816", "0.54817045", "0.5426778", "0.54224", "0.5420952", "0.5383565", "0.5355668", "0.53143644", "0.5304038", "0.5294975", "0.5294803", "0.5294025", "0.5285054", "0.52739304", "0.5273803", "0.52620393", "0.5241262", "0.5239243", "0.523848", "0.52349085", "0.5215558", "0.5215558", "0.5215558", "0.52128893", "0.5210327", "0.52093184", "0.52079487", "0.52054447", "0.52046627", "0.52029335", "0.5202234", "0.52021617", "0.51936406", "0.5191856", "0.51878244", "0.5184629", "0.51648486", "0.51634187", "0.51588255", "0.51569396", "0.5154556", "0.5147048", "0.5146872", "0.5132438", "0.51315093", "0.51228476", "0.5110673", "0.51017714", "0.5092515", "0.50810224", "0.50810224", "0.50810224", "0.5076389", "0.50736547", "0.5073543", "0.5070079", "0.50696784", "0.50592566", "0.50549734", "0.50544643", "0.50525665", "0.50525665", "0.50525665", "0.50525665", "0.50525665", "0.50496554", "0.50455314", "0.5029639", "0.50124824", "0.5005096", "0.5005096", "0.50048786", "0.5003949", "0.4990745", "0.49899352", "0.4984425", "0.49812612", "0.49714932", "0.4966624", "0.49564105", "0.49537206", "0.4953193" ]
0.6501829
0
Updates the HEALTH_CHECK table with status.
private static void updateHealthCheckStatus(final HealthCheckVO healthCheckVO, final int currentFailedCount) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); final Status status = healthCheckVO.getStatus().getStatus(); if ((healthCheckVO.getCurrentStatus() == null && status == Status.UP) || status == healthCheckVO.getCurrentStatus() || (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) ) { String queryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE_WITH_STATUS; if (healthCheckVO.getCurrentStatus() == null && status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) { queryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE; } StatusEntity sts = new StatusEntity(); Query query = session.createQuery(queryString) .setTimestamp("updateTime", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() )) .setInteger("failedCount", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount) .setInteger("healthCheckId", healthCheckVO.getHealthCheckId().intValue()); if (healthCheckVO.getCurrentStatus() != null && status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()){ /*NOT - First time status check. Failed but did not cross max-retry count */ sts.setStatusId(healthCheckVO.getCurrentStatus().getStatusId()); query.setEntity("status", sts); } else if (!(healthCheckVO.getCurrentStatus() == null && status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue())) { /* First time status check. Status changed and max-retry count is crossed. No need to update lastStatusChange */ sts.setStatusId(status.getStatusId()); query.setEntity("status", sts); } query.executeUpdate(); } else { Query query = session.createQuery(HQLConstants.UPDATE_HEALTH_CHECK_CHANGE) .setTimestamp("updateTime", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() )) .setTimestamp("lastStatusChange", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() )) .setInteger("failedCount", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount) .setInteger("healthCheckId", healthCheckVO.getHealthCheckId().intValue()); StatusEntity sts = new StatusEntity(); sts.setStatusId(status.getStatusId()); query.setEntity("status", sts); query.executeUpdate(); } txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean updateStatus(HealthCheckVO healthCheckVO)\n\t\t\t{\n\t\tStatus status = healthCheckVO.getStatus().getStatus();\n\t\tlong currentFailedCount = 0;\n\t\tif (status != Status.UP) {\n\t\t\tif (healthCheckVO.getHealthCheckRetryCurrentCount() == null) {\n\t\t\t\tcurrentFailedCount = 1;\n\t\t\t} else {\n\t\t\t\tcurrentFailedCount = healthCheckVO.getHealthCheckRetryCurrentCount() + 1;\n\t\t\t}\n\t\t}\n\t\tupdateHealthCheckStatus(healthCheckVO, (int)currentFailedCount);\n\t\tboolean isStatusChaged = updateFilureLog(healthCheckVO, currentFailedCount);\n\t\tupdateHistory(healthCheckVO, (currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) );\n\t\treturn isStatusChaged;\n\t}", "Future<UpdateHealthCheckerResponse> updateHealthChecker(\n UpdateHealthCheckerRequest request,\n AsyncHandler<UpdateHealthCheckerRequest, UpdateHealthCheckerResponse> handler);", "void updateHouseStatus(String username, long houseId, int status);", "public static List<HealthCheckVO> updateHealthCheckStatusInDB(List<HealthCheckVO> healthCheckVOs) throws SQLException {\n\t\t\n\t\tList<HealthCheckVO> returnStatusChangedList = new ArrayList<HealthCheckVO>();\n\t\tfor (HealthCheckVO healthCheckVO : healthCheckVOs) {\n\t\t\tif(healthCheckVO.getStatus() == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tStatus status = healthCheckVO.getStatus().getStatus();\n\t\t\tif (status == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!status.equals(Status.UP)){\n\t\t\t\tlogger.info(\"STATUS CHECK SUCCESS>> HealthCheckId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId()\n\t\t\t\t\t\t+ \"; isSuccess : \" + status.getStatusName()\n\t\t\t\t\t\t+ \"; Message : \" + status.getStatusDesc());\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tboolean isStatusChanged = updateStatus(healthCheckVO);\n\t\t\t\tif(isStatusChanged){\n\t\t\t\t\treturnStatusChangedList.add(healthCheckVO);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlogger.error(\"Exception in DB Update Doing Rollback\", ex);\n\t\t\t\tthrow ex;\n\t\t\t}\n\t\t}\n\t\tlogger.debug(\"DB Update Success - Doing commit\");\n\t\treturn returnStatusChangedList;\n\t}", "public abstract void updateStatus() throws Throwable;", "void updateHouseStatus(long houseId, int status);", "public void buildAccountStatus() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS account_status (user_id\"\n + \" TEXT UNIQUE, status INT, FOREIGN KEY (user_id) REFERENCES users\"\n + \"(id)\" + \" ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException e) {\n e.printStackTrace();\n }\n }", "private static void updateHealthCheck(final Long healthCheckId, final Integer healthCheckTypeId) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_TYPE);\n\t\tquery.setLong(\"hcTypeId\", healthCheckTypeId);\n\t\tquery.setLong(\"healthCheckId\", healthCheckId);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "private void refreshWealthStatus(){\n SharedPreferences prefs = getSharedPreferences(\"Account_Status_Prefs\", 0);\n // todo, push to class item\n Set<String> account_fields = prefs.getStringSet(\"account_fields\", new HashSet<String>());\n // to remember :\n // - getSharedPreferences(\"Account_Status_Prefs\", 0) => \"named\" prefs\n // - getPreferences(0) => preferences per Activity\n\n TableLayout table = (TableLayout) findViewById(R.id.bilans_view_statuses_table);\n table.removeAllViews(); // TODO: For now this empties table, and generates rows from start. Optimize.\n for(String name: account_fields)\n {\n TableRow row = (TableRow) LayoutInflater.from(this).inflate(R.layout.activity_bilans_view_status_row, null);\n ((TextView)row.findViewById(R.id.attrib_name)).setText(name);\n\n TextView e = (TextView)row.findViewById(R.id.attrib_value);\n e.setText(Float.toString(prefs.getFloat(name, 0.0f)));\n //e.setTag(e); // TODO: is it right use of tags?\n table.addView(row);\n }\n table.requestLayout();\n }", "default void checkIn(String name, HealthStatus status) {\n }", "public void setCheckStatus(String checkStatus) {\n\t\tthis.checkStatus = checkStatus;\n\t}", "public void setCheckStatus(String checkStatus) {\n\t\tthis.checkStatus = checkStatus;\n\t}", "public void updateStatus() {\n\n //loading the driver\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //database variables\n final String db = \"jdbc:mysql://mis-sql.uhcl.edu/dingorkarj2620\";\n Connection con = null;\n Statement st = null;\n ResultSet rs = null;\n\n try {\n //connecting database\n con = DriverManager.getConnection(db, \"dingorkarj2620\", \"1289968\");\n st = con.createStatement();\n rs = st.executeQuery(\"select * from account where a_id = \" + super.id);\n\n //updating the status\n if (rs.next()) {\n //premium seller\n if (rs.getString(3).equalsIgnoreCase(\"premium\")) {\n //update the item status\n i.setI_status(\"Valid\");\n\n } else {\n //regular seller\n if (rs.getString(3).equalsIgnoreCase(\"regular\")) {\n //checking price lower or higher than 100\n if (i.getI_price() <= 100) {\n //update status valid\n i.setI_status(\"Valid\");\n } else {\n //update status pending\n i.setI_status(\"Invalid\");\n }\n }\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n con.close();\n st.close();\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n }", "public boolean occupyTable(Context ctx, boolean notify) {\n status = BUSY_STATUS;\n isStatusChanged = true;\n\n if (notify)\n updateServerTableStatus(ctx); //Send the new status to iDempiere\n\n return updateTable(ctx);\n }", "public static int supvCheck(int myId, int taskid, int updatenum){\n try {\n Statement st = conn.createStatement();\n\n //add checkerid in indvprogressupdate for this updatenum\n String addChecker = \"UPDATE progressupdate SET checkerid = %d WHERE updatenum = \" + updatenum ;\n st.executeUpdate(String.format(addChecker, myId));\n\n //remove updatenum from indvsupvupdate in user for supv\n //TODO remove all otherstaskupdate of all group member\n String getMembersCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskid;\n ResultSet taskInfo = st.executeQuery(getMembersCommand);\n taskInfo.next();\n Long[] members = (Long[])taskInfo.getArray(\"member\").getArray();\n for(Long memberid : members){\n String removeUpdate = \"UPDATE users SET otherstaskupdate = array_remove(otherstaskupdate, '%d') WHERE userid = \" + memberid ;\n st.executeUpdate(String.format(removeUpdate, updatenum));\n }\n\n //update task owner progress(increment) in individual TODO:check deadline, repetition etc.\n //String updateMyIndv = \"UPDATE grouptask SET progress = progress + 1 WHERE taskid =\" + taskid;\n //st.executeUpdate(updateMyIndv);\n\n //add updatenum to indvupdate in user\n ResultSet ownerResult = st.executeQuery(\"SELECT userid FROM progressupdate WHERE updatenum =\" + updatenum);\n ownerResult.next();\n int ownerid = Integer.parseInt(ownerResult.getString(\"userid\"));\n String addIndvUpdate = \"UPDATE users SET mytaskupdate = array_append(mytaskupdate, '%d') WHERE userid=%d;\";\n st.execute(String.format(addIndvUpdate, updatenum , ownerid));\n\n //TODO update progress\n String progressTrackCommand = String.format(\n \"UPDATE progresstrack SET progress = progress+1, checkcount = checkcount+1 WHERE taskid = %d AND memberid = %d\",\n taskid, ownerid);\n st.executeUpdate(progressTrackCommand);\n\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }", "void statusUpdate(boolean invalid);", "public synchronized void startUpdates(){\n mStatusChecker.run();\n }", "Status updateStatus(String status) throws TwitterException;", "void doCheckHealthy();", "public void doUpdateStatus() throws GameException\r\n {\n \r\n }", "Status updateStatus(StatusUpdate latestStatus) throws TwitterException;", "public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }", "public static void addCheck(String property, CHECK check) {\n HealthCheck.checks.put(property, new CheckState(check));\n }", "HealthCheck createHealthCheck(TableName tableName);", "@Override\n\tpublic int update(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "List<Status> getAllChecklistStatus() throws ServiceException;", "@Override\n\tpublic void msgCheckReady(double check, int table) {\n\t\tlog.add(new LoggedEvent(\"received msgCheckReady. check is \"+check+\" and table is \"+table));\n\t}", "public static void checkForHealthUpdate(EntityLiving entity) {\n int health = Math.max(0, entity.getHealth());\n int healthPrev = -1;\n if (hasPreviousHealth(entity))\n healthPrev = getPreviousHealth(entity);\n if (health != healthPrev) {\n HealthBarHandler.markEntityForUpdate(entity);\n updatePreviousHealth(entity);\n }\n }", "@Override\r\n\tprotected void checkUpdate(Fingerprint entity) throws BusinessException {\n\t}", "protected void status(String status) throws InvalidKeyException {\n task.setStatus(status);\n }", "public void updateEnoughCoinProperty(Boolean status) {\n enoughCoins.set(status);\n }", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "public void updateContestStatus(ContestStatus arg0) throws ContestManagementException {\r\n }", "void onStatusUpdate(int status);", "void updatePassengerInCheck(int passengerInCheck);", "public void status(String status) {\n FirebaseDatabase.getInstance().getReference(\"chef_account_settings\").child(firebaseUser.getUid()).child(\"status\").setValue(status);\n// HashMap<String, Object> hashMap = new HashMap<>();\n// hashMap.put(\"status\", status);\n// reference.updateChildren(hashMap);\n }", "int updateByPrimaryKey(ChronicCheck record);", "@Override\n public final void addCheckIsReadyToAccount(\n final Map<String, Object> pAddParam,\n final GoodsLoss pEntity) throws Exception {\n //nothing\n }", "public int updateCheck(Object obj) throws SQLException {\n\t\treturn dao.updateCheck(obj);\n\t}", "public int updateCheck(int PID, Boolean check) {\n ContentValues cv = new ContentValues();\n cv.put(DBHelper.SHOPPINGLIST_CHECKMARK, check);\n\n String wheresql = DBHelper.SHOPPINGLIST_PID + \"=?\";\n String[] args = new String[]{String.valueOf(PID)};\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n int updates = db.update(DBHelper.TABLE_SHOPPINGLIST, cv, wheresql, args);\n db.close();\n\n return updates;\n }", "public void setJob_StatusCheck(StatusCheckDataObject job_StatusCheck) {\r\n this.job_StatusCheck = job_StatusCheck;\r\n }", "private void updateAccountStatus() {\n\r\n }", "public synchronized void update() {\n localMemberHealth.setHeartbeat(localMemberHealth.getHeartbeat() + 1);\n long currentTime = System.currentTimeMillis();\n List<MemberHealth> removals = new ArrayList<>();\n for (MemberHealth memberHealth : memberHealths) {\n if (currentTime - memberHealth.getLastSeen() > 5500) {\n removals.add(memberHealth);\n } else if (currentTime - memberHealth.getLastSeen() > 2750) {\n if (!memberHealth.hasFailed() && !memberHealth.hasLeft()) {\n memberHealth.setHasFailed(true);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has failed\");\n }\n } else {\n if (memberHealth.hasFailed()) {\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has rejoined\");\n }\n memberHealth.setHasFailed(false);\n }\n }\n for (MemberHealth memberHealth : removals) {\n memberHealths.remove(memberHealth);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has been removed\");\n }\n }", "@Override\r\n\tpublic int update(PtHrUserBak t) {\n\t\treturn 0;\r\n\t}", "public void addCheckHealthListener(ActionListener actionListener) {\r\n jCheckHealth.addActionListener(actionListener);\r\n }", "private void monitorHBase() {\n if (hadoopRetrieveService == null) {\n return;\n }\n // logger.info(\"Checking Hbase health status ...\");\n List<PVTypeInfo> pvInfos = new ArrayList<>(aaRetrieveService.getAllPVInfo());\n if (pvInfos.isEmpty()) {\n // logger.info(\"No archving PV.\");\n return;\n }\n // Use the first PV for the checking\n String pv = pvInfos.get(0).getPvName();\n Calendar end = Calendar.getInstance();\n end.setTime(new Date());\n end.add(Calendar.YEAR, -10);\n Calendar start = Calendar.getInstance();\n start.setTime(end.getTime());\n start.add(Calendar.MINUTE, -30);\n try {\n hadoopRetrieveService.getData(pv, new Timestamp(start.getTime().getTime()),\n new Timestamp(end.getTime().getTime()), PostProcessing.FIRSTSAMPLE, 60, false, 1.0);\n } catch (IOException e) {\n logger.warn(\"HBase is down.\");\n hadoopRetrieveService = null;\n scheduledService.scheduleAtFixedRate(() -> reInitializeHBase(), 1000,\n SiteConfigUtil.getHbaseCheckingInterval(), TimeUnit.MILLISECONDS);\n }\n }", "private String evaluateCheckStatus(CheckStatus status) {\n switch (status) {\n case AWAITING:\n return \"color: blue !important;\";\n case DECLINED:\n return \"color: #DC143C !important;\";\n case PAID:\n return \"color: #449d44 !important;\";\n default:\n return \"\";\n }\n }", "@Override\n\tpublic void updateEntity()\n\t{\n\t\tif (structureComplete() && checkCountdown >= CHECK_MAX)\n\t\t{\n\t\t\tcheckCountdown = 0;\n\t\t\t\n\t\t\t// Refresh the core structure.\n\t\t\tupdateStructure();\n\t\t}\n\t\telse checkCountdown++;\n\t}", "private static void setFailed() {\n HealthCheck.failed = true;\n }", "public void setStatus(JobStatus status);", "@Override\n public void updateStatus(Status status) {\n this.status = status;\n }", "void updateUserActivateStatus(User user, int newStatus);", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "private void battleTickStatuses(){\n updateStatuses(battleEnemies);\n updateStatuses(battleAllies);\n }", "public static void putStatusOffline()\n {\n try\n {\n DatabaseData.updateUserStatusOffline(userId);\n }catch(Exception e) {\n putStatusOffline();\n }\n }", "public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "public void setUserStatus(int online, int id){\n\n try{\n\n String query = \"UPDATE PlayerF \"\n + \"SET Online = \" + online\n + \" WHERE Id = \"+ id;\n\n int result = stmt.executeUpdate(query);\n\n if(result > 0){\n\n System.out.println(\"@setUserStatus: possible success\");\n\n }\n else{\n System.out.println(\"@setUserStatus: Error result returned false\");\n }\n\n }catch (SQLException e){\n e.printStackTrace();\n }\n\n }", "void setStatus(TaskStatus status);", "private void hockeyAppCheckForUpdates() {\n UpdateManager.register(this);\n }", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "public void updateStatus(JobStatus status, String userId) throws DatabaseException, IllegalArgumentException;", "public void setCheckStatus(String checkStatus) {\r\n this.checkStatus = checkStatus == null ? null : checkStatus.trim();\r\n }", "public int Approvedbroker(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set userstatus='approved'where loginid=\"+id+\"\");\r\n\treturn i;\r\n}", "public void UpCheck_status1(MajorChange mc) ;", "public static int updateStatusAlerts(int id) {\r\n\t\tString query = \"UPDATE appliance_message_status SET msg_seen = \" + 1\r\n\t\t\t\t+ \" WHERE msg_id=\" + id;\r\n\t\tint row = 0;\r\n\t\ttry (Connection con = Connect.getConnection();) {\r\n\t\t\tStatement st = con.createStatement();\r\n\t\t\trow = st.executeUpdate(query);\r\n\t\t\tif (row > 0) {\r\n\t\t\t\tSystem.out.println(\"Data is updated\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Data is not updated\");\r\n\t\t\t}\r\n\t\t\tst.close();\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn row;\r\n\t}", "public void updateVentureCheckList(VentureChecklist ventureChecklist) {\n\t\tSl = \"UPDATE venture_checklist SET ventureChecklistContent = ? WHERE memberAccount= ? AND mapSubClassID = ?\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl);\r\n\t\t\tsmt.setString(1, ventureChecklist.getContent());\r\n\t\t\tsmt.setString(2, ventureChecklist.getAccount());\r\n\t\t\tsmt.setInt(3, ventureChecklist.getClassID());\r\n\t\t\tsmt.executeUpdate();\t\r\n\t\t\trs.close();\r\n\t\t\tsmt.close(); \r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n \r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void setStatus(final UserStatus status);", "public String getCheckStatus() {\r\n return checkStatus;\r\n }", "public final void serviceCheck(final String checkName, final Integer status,\n final JSONObject builddata) {\n logger.fine(String.format(\"Sending service check '%s' with status %s\", checkName, status));\n\n // Build payload\n JSONObject payload = new JSONObject();\n payload.put(\"check\", checkName);\n payload.put(\"host_name\", builddata.get(\"hostname\"));\n payload.put(\"timestamp\", System.currentTimeMillis() / this.THOUSAND_LONG); // current time in s\n payload.put(\"status\", status);\n payload.put(\"tags\", assembleTags(builddata));\n\n post(payload, this.SERVICECHECK);\n }", "@Test\r\n\r\n\tpublic void testUpdateStatus() {\r\n\t\tString status = \"accept\";\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.findByEmail(\"shaline@gmail.com\"))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.save(backgroundverification1))\r\n\t\t\t\t.thenReturn(backgroundverification1);\r\n\t\tBackgroundverification backgroundverification = backgroundVerificationAndLeaseAdmnServiceImpl\r\n\t\t\t\t.updateStatus(\"shaline@gmail.com\", status);\r\n\t\tassertEquals(\"accept\", backgroundverification.getApp_bgc_status());\r\n\r\n\t}", "public void status(String status)\r\n {\r\n reference=FirebaseDatabase.getInstance().getReference(\"Users\").child(firebaseUser.getUid());\r\n HashMap<String,Object>hashMap=new HashMap<>() ;\r\n hashMap.put(\"status\",status) ;\r\n reference.updateChildren(hashMap);\r\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "public void updateSyncStatus(String id, String status)\n {\n SQLiteDatabase database = this.getWritableDatabase(); \n String updateQuery = \"Update UsersTable set udpateStatus = '\"+ status +\"' where userId=\"+\"'\"+ id +\"'\";\n Log.d(\"query\",updateQuery); \n database.execSQL(updateQuery);\n database.close();\n }", "public abstract void updateStatus(PresenceType presenceType);", "public CheckStatus(String host, String service, Status status, Date lastCheck, long durationMillis,\n int attempt, int maxAttempts, String statusInfo, boolean ack, boolean downtime) {\n this.host = host;\n this.service = service;\n this.status = status;\n if (lastCheck != null) {\n this.lastCheck = new Date(lastCheck.getTime());\n } else {\n this.lastCheck = null;\n }\n this.durationMillis = durationMillis;\n this.attempt = attempt;\n this.maxAttempts = maxAttempts;\n this.statusInfo = statusInfo;\n this.ack = ack;\n this.downtime = downtime;\n }", "void setStatus(STATUS status);", "public HwStatus() {\n \t\tsuper();\n \t\tthis.hwSig = 0;\n \t\tthis.microtickPeriod = 10000;\t// default\n \t\tthis.cf_version = \"\";\n \t}", "protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}", "@Override\n\tpublic boolean updateTaskStatus(int id, String status) throws SQLException, ClassNotFoundException{\n\t\t Connection c = null;\n\t\t Statement stmt = null;\n\t\t \n\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t\t c.setAutoCommit(false);\n\t\t \n\t\t logger.info(\"Opened database successfully (updateTaskStatus)\");\n\t\t \n\t\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task WHERE id=\"+id+\";\" );\n\t rs.next();\n\t \n\t if(rs.getString(\"status\").equals(status))\n\t {\n\t \t return false;\n\t }\n\t \n\t stmt = c.createStatement();\n\t \n\t String sql = \"UPDATE task SET status='\"+status+\"' WHERE id=\"+id+\";\";\n\t \n\t stmt.executeUpdate(sql);\n\t \n\t stmt.close();\n\t c.commit();\n\t c.close();\n\t \n\t logger.info(\"Task Status changed to planned\");\n\t\t \n\t return true;\n\t}", "public static void updatePreviousHealth(EntityLiving entity) {\n entity.getEntityData().setInteger(\"phb\", entity.getHealth());\n }", "public void setStatus(String un, String status){\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n // updating user database\n collRU.findOneAndUpdate(\n eq(\"username\", un),\n Updates.set(\"status\", status)\n );\n }", "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "@SuppressLint({\"CommitPrefEdits\"})\n public void checkForUpdates() {\n synchronized (this.preferenceStore) {\n if (this.preferenceStore.get().contains(\"last_update_check\")) {\n this.preferenceStore.save(this.preferenceStore.edit().remove(\"last_update_check\"));\n }\n }\n long currentTimeMillis = this.currentTimeProvider.getCurrentTimeMillis();\n long j = ((long) this.betaSettings.updateSuspendDurationSeconds) * 1000;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Check for updates delay: \");\n sb.append(j);\n Fabric.getLogger().d(\"Beta\", sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Check for updates last check time: \");\n sb2.append(getLastCheckTimeMillis());\n Fabric.getLogger().d(\"Beta\", sb2.toString());\n long lastCheckTimeMillis2 = getLastCheckTimeMillis() + j;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Check for updates current time: \");\n sb3.append(currentTimeMillis);\n sb3.append(\", next check time: \");\n sb3.append(lastCheckTimeMillis2);\n Fabric.getLogger().d(\"Beta\", sb3.toString());\n if (currentTimeMillis >= lastCheckTimeMillis2) {\n try {\n performUpdateCheck();\n } finally {\n setLastCheckTimeMillis(currentTimeMillis);\n }\n } else {\n Fabric.getLogger().d(\"Beta\", \"Check for updates next check time was not passed\");\n }\n }", "public void updateRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.update(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }", "private boolean updateServerTableStatus(Context ctx) {\n if(ctx == null)\n return false;\n\n //Check if network connection is available\n ConnectivityManager connMgr = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n if (networkInfo != null && networkInfo.isConnected()) {\n UpdateTableStatusTask updateTask = new UpdateTableStatusTask(ctx);\n updateTask.execute(this);\n }\n\n return true;\n\n }", "int updateByPrimaryKey(StatusReplies record);", "private void updateStatus() {\n \tif (!status.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tcurrentProfile.setStatus(status.getText());\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Status updated to \" + status.getText());\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change status\");\n\t\t\t}\n\t\t}\n\t}", "protected void checkHealth(MonitoredService module) {\n if (!isActive()) {\n return;\n }\n final ModuleOutputDevice moduleLog = ModuleOutputDeviceFarm.getDevice(this, ModuleLoggerMessage.LOG_OUTPUT_TYPE);\n moduleLog.associate(\"Processing heart-beat for '\" + module + \"' module\");\n moduleLog.actionBegin();\n // service is active for the moment, process module's heart-beat\n try {\n moduleLog.out(\"Saving heart-beat of module \", module.toString());\n storage.saveHeartBeat(module);\n moduleLog.out(\"Getting config updates for module \", module.toString());\n final Map<String, ConfiguredVariableItem> updated\n = configurationService.getUpdatedVariables(module, module.getConfiguration());\n if (!updated.isEmpty()) {\n moduleLog.out(\"Updating module configuration.\");\n module.configurationChanged(updated);\n }\n moduleLog.actionEnd();\n } catch (Throwable t) {\n LOG.error(\"Can't process heartbeat for module '{}'\", module, t);\n moduleLog.actionFail();\n }\n }", "void updatePurchaseOrderLinkedBoqStatus(long pohId);", "protected void setStatus(DBRowStatus p_status)\n\t{\n\t\t_Status = p_status;\n\t}", "public static void trackerAdd(Status s) throws ClassNotFoundException, SQLException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\t\n\t\tDB_Interface.insertStatus(conn, s);\n\t\tconn.close();\n\t}", "public void salvarStatus(StatusDefinicao status) throws Exception {\n new StatusDao().salvarAtualizar(status);\n }", "public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "TopicStatus updateTopicStatus(Long topicStatusId, TopicStatusRequest request);", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "public void changeStatus(String user, String method){\n ArrayList friends = new ArrayList();\n try {\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT * FROM \" + user);\n //add the friends to the list\n while (myResult.next()){\n friends.add(myResult.getString(\"friend\"));\n }\n\n //now set the user online/offline in all the friends lists\n Iterator it = friends.iterator();\n while (it.hasNext()){\n if (method.equals(\"online\")){\n statement.executeUpdate(\"UPDATE \" + it.next().toString() + \" SET online = 'online' WHERE friend ='\"+ user +\" '\");\n }\n else {\n statement.executeUpdate(\"UPDATE \" + it.next().toString() + \" SET online = 'offline' WHERE friend ='\"+ user +\" '\");\n }\n\n }\n\n\n\n }catch (SQLException ex){ex.printStackTrace();}\n\n }", "public void updateHealth(boolean up){\n\t\tif (up){\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"HealthOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"HealthOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbChange\");\n\t\t}\n\t\telse{\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"HealthOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbFade\");\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"HealthOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t}\n\t}" ]
[ "0.57187104", "0.56707966", "0.5632532", "0.5566291", "0.54590183", "0.5427545", "0.54263496", "0.5366543", "0.53638715", "0.52923495", "0.52706575", "0.52706575", "0.52661616", "0.5259572", "0.5246195", "0.5203777", "0.5172974", "0.5158694", "0.51378715", "0.51294655", "0.5114672", "0.50999963", "0.50700575", "0.50403607", "0.50268346", "0.501834", "0.5008435", "0.5008073", "0.49873912", "0.49826297", "0.49682397", "0.49468637", "0.4923934", "0.4922047", "0.49186173", "0.49086425", "0.49011734", "0.48996788", "0.4899239", "0.4897026", "0.48939067", "0.48918426", "0.48798108", "0.48615733", "0.48566946", "0.4853878", "0.48503464", "0.48420018", "0.4829662", "0.48282906", "0.48148337", "0.4797739", "0.47948697", "0.47948697", "0.47910425", "0.47899225", "0.478992", "0.47744066", "0.47546756", "0.47492382", "0.47470868", "0.4740666", "0.47344702", "0.47337073", "0.472265", "0.47217697", "0.47114155", "0.47060108", "0.46977484", "0.46969372", "0.46920013", "0.46906924", "0.46873698", "0.4678092", "0.46770883", "0.46716687", "0.46691588", "0.4668223", "0.46676674", "0.4651234", "0.46463737", "0.46350172", "0.46347693", "0.4629717", "0.46272868", "0.46237814", "0.46230224", "0.4606981", "0.4594073", "0.4589475", "0.4588291", "0.4588142", "0.45856735", "0.4576138", "0.4572763", "0.45675045", "0.45659402", "0.45557687", "0.45503545", "0.45495" ]
0.5737607
0
Function the update the marathon json in the environment table
public static void updateWestMarathonJson(final EnvironmentVO environmentVO) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_MARATHON_JSON); query.setBinary("marathonJson", environmentVO.getMarathonJson().getBytes()); query.setTimestamp("lastUpdateTime", new java.sql.Timestamp(new Date().getTime())); query.setLong("environmentId", environmentVO.getEnvironmentId()); query.executeUpdate(); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateApp(String marathonJson);", "public static void updateEastMarathonJson(final EnvironmentVO environmentVO) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_EAST_MARATHON_JSON);\n\t\tquery.setBinary(\"marathonJson\", environmentVO.getEastMarathonJson().getBytes());\n\t\tquery.setTimestamp(\"lastUpdateTime\", new java.sql.Timestamp(new Date().getTime()));\n\t\tquery.setLong(\"environmentId\", environmentVO.getEnvironmentId());\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "void deployApp(String marathonJson);", "private static void getMarathonJson(EnvironmentVO environmentVO) throws Exception {\n\t\tlogger.debug(\"Running Marathon Backup for environment: \" + environmentVO.getEnvironmentName());\n\t\tString marathonJson = null;\n\t\tString eastMarathonJson = null;\n\t\tif(environmentVO.getMarathonUrl() != null && !environmentVO.getMarathonUrl().equals(\"\")){\n\t\t\tmarathonJson = RestCommunicationHandler.getResponse(environmentVO.getMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t \n\t\tif(marathonJson == null || marathonJson.equals(\"failed\") || marathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setMarathonJson(marathonJson);\n\t\t}\n\t\t//Get EAST marathon JSON\n\t\tif(environmentVO.getEastMarathonUrl() != null && !environmentVO.getEastMarathonUrl().equals(\"\")){\n\t\t\teastMarathonJson = RestCommunicationHandler.getResponse(environmentVO.getEastMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t\n\t\tif(eastMarathonJson == null || eastMarathonJson.equals(\"failed\") || eastMarathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setEastMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setEastMarathonJson(eastMarathonJson);\n\t\t}\n\t}", "public boolean update(JSONObject jsonProgram);", "public static void updateEnvironmentDetails(\n\t\t\tList<EnvironmentVO> environmentVOs) {\n\t\tfor (EnvironmentVO eVO : environmentVOs) {\n\t\t\tif (eVO.getMarathonJson() != null && JSONUtil.isJSONValid(eVO.getMarathonJson())) {\n\t\t\t\tupdateWestMarathonJson(eVO);\n\t\t\t}\n\t\t\tif (eVO.getEastMarathonJson() != null && JSONUtil.isJSONValid(eVO.getEastMarathonJson())) {\n\t\t\t\tupdateEastMarathonJson(eVO);\n\t\t\t}\n\t\t}\n\t}", "public static Map<Integer, Blob> getMarathonJson() {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCrit = session.createCriteria(EnvironmentEntity.class, \"env\");\n\t\tenvCrit.add(Restrictions.isNotNull(\"env.marathonURL\"));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvironmentEntity> envList = (List<EnvironmentEntity>)envCrit.list();\n\t\t\n\t\tMap<Integer, Blob> mapEnvJson = new HashMap<Integer,Blob>();\n\t\tfor(EnvironmentEntity ee: envList){\n\t\t\tif(ee.getMarathonURL() == null || ee.getMarathonURL().trim().length() == 0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmapEnvJson.put(ee.getEnvironmentId(), ee.getMarathonJson());\n\t\t}\n\t\ttxn.commit();\n\t\treturn mapEnvJson;\n\t}", "public static void doMarathonBackUp() throws Exception {\n\t\tlogger.info(\"************** STARTED MarathonBackUp **************\");\n\t\tList<EnvironmentVO> environmentVOs = DBQueryUtil.getAllEnvironments();\n\t\tfor(EnvironmentVO eVo : environmentVOs){\n\t\t\tgetMarathonJson(eVo);\n\t\t\tlogger.info(\"Got Marathon JSON for \" + eVo.getEnvironmentName() + \" Time : \" + new Date());\n\t\t\tlogger.info(\"JSON \" + eVo.getMarathonJson());\n\t\t}\n\t\tDBQueryUtil.updateEnvironmentDetails(environmentVOs);\n\t\tMarathonConfigProcessor.updateApiList(environmentVOs);\n\t\tlogger.info(\"************** COMPLETED MarathonBackUp **************\");\n\t}", "@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }", "int updateByPrimaryKey(ec_environment record);", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "public String updatePatientInfo(JSONObject updateRequest) throws Exception {\n String oldRecord;\n String newRecord;\n int patientID;\n try {\n patientID=updateRequest.getInt(\"Patient ID\");\n }\n catch (Exception e){\n e.printStackTrace();\n String postBody=\"\\\"{\\n\\t\\\"Patient ID\\\":23,\\n\\t\\\"Patient Name\\\":\\\"Ji Klink\\\",\\n\\t\\\"\" +\n \"Last Visited\\\":\\\"\\\",\\n\\t\\\"Status\\\":\\\"Ongoing\\\",\\n\\t\\\"DOB\\\":\" +\n \"\\\"\\\",\\n\\t\\\"Address\\\":\\\"\\\",\\n\\t\\\"Created Date\\\":\\n}\\\"\";\n return \"POST BODY Mandatory Field \\\"Patient ID\\\"\\n\"+\"Rest Field ID are\\n\"+postBody;\n }\n System.out.println(updateRequest.keySet());\n updateRequest.keySet();\n String updateQueryHead = \"UPDATE BasicInfo SET \";\n String updateQueryTail = \" WHERE patientid=\"+patientID;\n String setBody=\"\";\n int comm=0;\n\n //update BasicInfo set gender='Female', address = 'nowhwere' where patientid=23;\n for (String temp: updateRequest.keySet()){\n switch (temp){\n case \"Status\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"status=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",status=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Patient Name\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"patientname=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",patientname=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Address\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"address=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",address=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Last Visited\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"lastvisited=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",lastvisited=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Created Date\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"createddate=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",createddate=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Dob\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"dob=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",dob=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Gender\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"gender=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",gender=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Symptom\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else{\n if( comm == 0){\n setBody=setBody + \"symptom=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",symptom=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Diagnosis\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n\n else{\n\n if( comm == 0){\n setBody=setBody + \"diagnosis=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",diagnosis=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Treatment\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else{\n\n if( comm == 0){\n setBody=setBody + \"treatment=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",treatment=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Phone Number\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"phonenumber=\"+updateRequest.get(temp);\n }\n else setBody=setBody+\",phonenumber=\"+updateRequest.get(temp);\n }\n comm++;\n break;\n default:\n System.out.println(\"Skipping \"+temp);\n }\n System.out.println(updateRequest.get(temp));\n }\n String queryWithPid= \"SELECT * FROM BasicInfo where patientid = \"+patientID;\n System.out.println(queryWithPid);\n JSONArray response =client.queryFromDB(queryWithPid);\n oldRecord=response.toString();\n String finalQuery=updateQueryHead+setBody+updateQueryTail;\n System.out.println(\"FINAL QUERY\\n\"+finalQuery);\n Session session=client.getSession();\n session.execute(finalQuery);\n newRecord = client.queryFromDB(queryWithPid).toString();\n updateCache(\"Update\");\n return \"Updated Info from\\n\"+oldRecord+\"To\\n\"+newRecord;\n\n }", "@Override\n public void execute(DelegateExecution delegateExecution) throws Exception {\n JsonValue candidate = delegateExecution.getVariableTyped(\"new_candidate\");\n Integer candidate_id = (Integer) delegateExecution.getVariable(\"candidate_id\");\n\n // Convert birthdate\n String s_birth_date = candidate.getValue().prop(\"birth_date\").stringValue();\n java.util.Date util_birth_date = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(s_birth_date);\n java.sql.Date birth_date = new java.sql.Date(util_birth_date.getTime());\n\n // Prepare Update Statement\n String candidate_update =\n \"UPDATE Candidate SET \" +\n //\"first_name = \\'\" + candidate.getValue().prop(\"first_name\").stringValue() + \"\\', \" +\n //\"last_name = \\'\" + candidate.getValue().prop(\"last_name\").stringValue() + \"\\', \" +\n \"sex = \\'\" + candidate.getValue().prop(\"sex\").stringValue() + \"\\', \" +\n \"email = \\'\" + candidate.getValue().prop(\"email\").stringValue() + \"\\', \" +\n \"title = \\'\" + candidate.getValue().prop(\"title\").stringValue() + \"\\', \" +\n \"address = \\'\" + candidate.getValue().prop(\"address\").stringValue() + \"\\' \" +\n //\"birth_date = \\'\" + birth_date + \"\\' \" +\n \"WHERE candidate_id = \" + candidate_id;\n\n Connection con = DriverManager.getConnection(\"jdbc:h2:./camunda-db\", \"sa\", \"sa\");\n PreparedStatement statement = con.prepareStatement(candidate_update);\n Integer index = statement.executeUpdate();\n\n // Index = Updated PK id\n System.out.println(index);\n\n // insert new application to db\n String application_insert = \"INSERT INTO Application ( CA_AP_FK, FK_job_Opening_Id) VALUES (?,?)\";\n PreparedStatement statement_application = con.prepareStatement(application_insert, Statement.RETURN_GENERATED_KEYS);\n statement_application.setInt(1, candidate_id);\n statement_application.setInt(2, (Integer) delegateExecution.getVariable(\"openingId\"));\n statement_application.executeUpdate();\n ResultSet rs_application = statement_application.getGeneratedKeys();\n\n if (rs_application.next()){\n // set process variable required for next step\n delegateExecution.setVariable(\"applications_received\", true);\n delegateExecution.setVariable(\"candidate_email\", \"wplacmrecruiting@gmail.com\");\n delegateExecution.setVariable(\"candidate_confirmation_text\", \"hello this is a test\");\n\n // add application to collection\n String application = \"{\\\"application_id\\\" : \\\"\" + rs_application.getInt(1) + \"\\\",\"\n + \"\\\"candidate_id\\\" : \\\"\" + candidate_id + \"\\\",\"\n + \"\\\"first_name\\\" : \\\"\" + candidate.getValue().prop(\"first_name\").stringValue() + \"\\\",\"\n + \"\\\"last_name\\\" : \\\"\" + candidate.getValue().prop(\"last_name\").stringValue() + \"\\\",\"\n + \"\\\"cv\\\" : \\\"\" + \"cv link\" + \"\\\"\"\n + \"}\";\n\n System.out.println(application);\n SpinJsonNode application_json = JSON(application);\n\n JsonValueImpl collApplication = (JsonValueImpl) delegateExecution.getVariableTyped(\"collectedApplications\");\n\n SpinJsonNode application_collection = JSON(collApplication.getValueSerialized());\n\n if (!application_collection.hasProp(\"applications\")){\n application_collection.prop(\"applications\", application_json);\n }\n else{\n application_collection.prop(\"applications\").append(application_json);\n }\n delegateExecution.setVariable(\"collectedApplications\", application_collection);\n }\n else {\n //error\n }\n }", "public void update(TheatreMashup todo) {\n\t\t\n\t}", "public Map<String, Tabela> update(String komenda) throws Exception {\n\n komenda = komenda.substring(7);\n char[] zbiorSymboli = komenda.toCharArray();\n\n boolean wystapilaNazwaTablicy = false;\n boolean wystapilSET = false;\n boolean wystapilyKolumnaWartosc = false;\n boolean wystapilWHERE = false;\n boolean wystapilaZmiana = false;\n\n String temp = \"\";\n String nazwaTablicy = \"\";\n String trescSet = \"\";\n String warunek = \"\";\n\n // UPDATE SYNTAX CHECKER\n for (int i = 0; i < zbiorSymboli.length; i++) {\n // ; - wyjscie\n if (i == zbiorSymboli.length - 1 || zbiorSymboli[i] == ';') {\n if (zbiorSymboli[i] != ';')\n throw new Exception(\"Oczekiwano ';'\");\n else {\n // to średnik ; i jest sens sprawdzac\n if (wystapilSET == true & wystapilWHERE == true) {\n if (temp.matches(\".*[a-z].*\")) {\n // tu jest caly ten WHERE condition\n warunek = temp; // bez srednika, bo na srednik sprawdzasz ta czesc kodu\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz warunek\");\n }\n // sam SET columna0 = wartosc0 , columna1 = wartosc1\n if (wystapilaNazwaTablicy == true) {\n if (temp.contains(\"=\") == true && temp.length() > 2) {\n wystapilyKolumnaWartosc = true;\n trescSet = temp; // bez srednika\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz 'SET kolumna0 = wartosc0;'\");\n }\n }\n }\n\n if (temp.contains(\" SET\")) {\n if (wystapilSET == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie SET!\");\n wystapilSET = true;\n nazwaTablicy = temp.substring(0, temp.length() - 4);\n if (nazwaTablicy.matches(\".*[a-z].*\")) {\n wystapilaNazwaTablicy = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Nazwa tablicy nie zawiera liter\");\n }\n\n if (temp.contains(\" WHERE\")) {\n if (wystapilWHERE == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie WHERE!\");\n\n wystapilWHERE = true;\n trescSet = temp.substring(0, temp.length() - 6);\n if (temp.contains(\"=\") == true && temp.length() > 2) {\n wystapilyKolumnaWartosc = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Brak 'SET columna = value;'\");\n }\n\n temp += zbiorSymboli[i];\n }\n\n if (wystapilaZmiana == false)\n throw new Exception(\"Błąd składni!\");\n\n // TODO: odkomentuj to potem, to ponizej...\n // if (czyIstniejeTabela(nazwaTablicy) == false)\n // throw new Exception(\"Nie ma takiej tablicy\");\n\n // jest jakas skladnia ^^ porazka\n nazwaTablicy = nazwaTablicy.replaceAll(\" \", \"\");\n\n String[] setKolumnaWartosc = trescSet.replaceAll(\" \", \"\").split(\",\");\n String[] warunekKolumnaWartosc = warunek.replaceAll(\" \", \"\").split(\"=\");\n\n temp = \"\";\n\n for (String string : setKolumnaWartosc) {\n if (string.contains(\"=\") == false)\n throw new Exception(\"Błąd składni, miało być 'SET kolumna = wartosc'\");\n }\n\n if (warunekKolumnaWartosc.length < 2) {\n ;\n }\n\n //TODO: tu gdzies skonczylem, denerwuje sie zbednie\n\n return this.zbiorTabel;\n }", "@Override\r\n public void onSuccess(JSONArray result)\r\n {\r\n dataBase.updateAllProgramsToTable(result);\r\n }", "private void updateItem(JsonNode json) {\n }", "@Test\n public void testUpdateDietStatusById() throws Exception{\n\n String URI = \"/healthreminder/followup_dietstatus_update/{patientId}/status/{dietStatus}\";\n FollowUpDietStatusInfo followUpDietStatusInfo = new FollowUpDietStatusInfo();\n followUpDietStatusInfo.setPatientId(1);\n followUpDietStatusInfo.setDietStatus(false);\n \n String jsonInput = this.converttoJson(followUpDietStatusInfo);\n\n Mockito.when(followUpDietStatusInfoServices.updateDietStatusById(Mockito.any(),Mockito.anyBoolean())).thenReturn(followUpDietStatusInfo);\n MvcResult mvcResult = this.mockMvc.perform(MockMvcRequestBuilders.put(URI, 1, true).accept(MediaType.APPLICATION_JSON).content(jsonInput).contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n MockHttpServletResponse mockHttpServletResponse = mvcResult.getResponse();\n String jsonOutput = mockHttpServletResponse.getContentAsString();\n\n assertThat(jsonInput).isEqualTo(jsonOutput);\n }", "@Test\n public void updateTest12() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}", "@Test\r\n public void testUpdate() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n PodamFactory pf = new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity = pf.manufacturePojo(MonitoriaEntity.class);\r\n nuevaEntity.setId(entity.getId());\r\n persistence.update(nuevaEntity);\r\n// Assert.assertEquals(nuevaEntity.getName(), resp.getName());\r\n }", "JsonNode updateData(String data);", "public void updateSwarm();", "@PutMapping(\"/Mensajeros/actualizar/{id}\")\r\npublic Mensajeros update(@RequestBody Mensajeros ms, @PathVariable(\"id\") Long id) {\r\n\tMensajeros oldM = mService.buscarM_Id(id);\r\n\tString nombreM = ms.getNombreM();\r\n\toldM.setNombreM(nombreM);\r\n\tString cedulaM = ms.getCedulaM();\r\n\toldM.setCedulaM(cedulaM);\r\n\tString celularM = ms.getCelularM();\r\n\toldM.setCelularM(celularM);\r\n\tString placa = ms.getPlaca();\r\n\toldM.setPlaca(placa);\r\n\tString direccionM = ms.getDireccionM();\r\n\toldM.setDireccionM(direccionM);\r\n\treturn mService.actualizarM(oldM);\r\n}", "private void addData(App yourApp, JSONObject jsonObject) {\n JSONArray jsonArray = jsonObject.getJSONArray(\"Teams\");\n for (Object json : jsonArray) {\n JSONObject nextTeam = (JSONObject) json;\n Team teamWithData = getTeamInfo(nextTeam);\n yourApp.addTeam(teamWithData);\n }\n }", "public UpdateEntity(String json) throws JSONException {\n\n JSONObject jso = new JSONObject(json);\n JSONObject jsonObject = jso.getJSONObject(\"data\");\n String code = jsonObject.getString(\"versionCode\");\n if (!StringUtils.isStringNull(code)) {\n\t\t\tthis.versionCode = Integer.valueOf(code);\n\t\t}else{\n\t\t\tthis.versionCode = 0;\n\t\t}\n this.versionName = jsonObject.getString(\"versionName\");\n this.isForceUpdate = jsonObject.getString(\"isForceUpdate\");\n this.downUrl = jsonObject.getString(\"downUrl\");\n this.preBaselineCode = jsonObject.getString(\"preBaselineCode\");\n this.updateLog = jsonObject.getString(\"updateLog\");\n// this.md5 = jsonObject.getString(\"md5\");\n\n }", "public void updateByEntity(Paciente paciente) {\n\t\n}", "public boolean setFromJSON(JSONObject json, int pilotId) {\n\n try {\n id = json.has(\"id\") ? json.getInt(\"id\") : id;\n title = json.getString(\"name\");\n raceURL = json.getString(\"urlName\");\n raceImage = !json.isNull(\"mainImageFileName\") ? json.getString(\"mainImageFileName\") : raceImage;\n blockquote = json.getString(\"description\");\n description = json.getString(\"content\");\n chapterId = !json.isNull(\"chapterId\") ? json.getInt(\"chapterId\") : chapterId;\n dateAndTime = new SimpleDateFormat(\"yyyy-MM-dd hh:mm aa\", Locale.US).parse(json.getString(\"startDate\"));\n date = new SimpleDateFormat(\"MMMM dd, yyyy\", Locale.US).format(dateAndTime);\n time = new SimpleDateFormat(\"hh:mm aa\", Locale.US).format(dateAndTime);\n city = !json.isNull(\"city\") ? json.getString(\"city\") : city;\n state = !json.isNull(\"state\") ? json.getString(\"state\") : state;\n zip = !json.isNull(\"zip\") ? json.getString(\"zip\") : zip;\n country = !json.isNull(\"country\") ? json.getString(\"country\") : country;\n latitude = !json.isNull(\"latitude\") ? json.getDouble(\"latitude\") : -99999;\n longitude = !json.isNull(\"longitude\") ? json.getDouble(\"longitude\") : -99999;\n currentRound = !json.isNull(\"currentCycle\") ? json.getInt(\"currentCycle\") - 1 : currentRound;\n currentHeat = !json.isNull(\"currentHeat\") ? json.getInt(\"currentHeat\") - 1 : currentHeat;\n status = !json.isNull(\"status\") ? json.getString(\"status\") : status;\n // TODO targetTime;\n targetTime = !json.isNull(\"targetTime\") ? json.getLong(\"targetTime\") : targetTime;\n calculateCurrentState();\n\n // Racer information and joined status\n if (racers == null) {\n racers = new ArrayList<Racer>();\n }\n if (!json.isNull(\"entries\")) {\n racers.clear();\n joined = false;\n JSONArray entries = json.getJSONArray(\"entries\");\n for (int i = 0, size = entries.length(); i < size; i++) {\n Racer racer = new Racer(entries.getJSONObject(i));\n racers.add(racer);\n if (racer.getPilotId() == pilotId) {\n joined = true;\n }\n\n }\n }\n\n // Round information\n if (rounds == null) {\n rounds = new ArrayList<Round>();\n }\n if (!json.isNull(\"schedule\")) {\n rounds.clear();\n rounds.addAll(new Round().fromJSONToRoundList(json.getJSONObject(\"schedule\").getJSONArray(\"groups\"), racers));\n }\n\n return true;\n } catch (JSONException e) {\n e.printStackTrace();\n return false;\n } catch (ParseException e) {\n e.printStackTrace();\n return false;\n }\n }", "public void updateEnvironment(Context context, JSONObject post) {\n try {\n post.put(Jsonkey.Environment.getKey(), isPackageInstalled(context) ? Jsonkey.NativeApp.getKey() : Jsonkey.InstantApp.getKey());\n } catch (Exception e) {\n }\n }", "@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Override\n\tpublic int update_munti_config_nganluong(String json_nganluong_update)\n\t\t\tthrows InstantiationException, ClassNotFoundException, SQLException {\n\t\tGson gson= new Gson();\n\t\tList<AllcodeModel> list = gson.fromJson(json_nganluong_update, new TypeToken<List<AllcodeModel>>(){}.getType());\n\t\treturn allcode.update_munti_config_nganluong(list);\n\t}", "public void update(String json) {\n\t\t\tJSONObject line;\n\t\t\ttry {\n\t\t\t\t// \"GameServer\":{\"graph\":\"A0\",\"pokemons\":3,\"agents\":1}}\n\t\t\t\tline = new JSONObject(json);\n\t\t\t\tJSONObject agent = line.getJSONObject(\"Agent\");\n\t\t\t\tint id = agent.getInt(\"id\");\n\t\t\t\tif(id==this.getID() || this.getID() == -1) {\n\t\t\t\t\tif(this.getID() == -1) {\n\t\t\t\t\t\tthis.id = id;}\n\t\t\t\t\tdouble speed = agent.getDouble(\"speed\");\n\t\t\t\t\tString p = agent.getString(\"pos\");\n\t\t\t\t\tPoint3D pp= new Point3D(p);\n\t\t\t\t\tint src = agent.getInt(\"src\");\n\t\t\t\t\tint dest = agent.getInt(\"dest\");\n\t\t\t\t\tdouble value = agent.getDouble(\"value\");\n\t\t\t\t\tthis.pos = pp;\n\t\t\t\t\tthis.setCurrNode(src);\n\t\t\t\t\tthis.setSpeed(speed);\n\t\t\t\t\tthis.setNextNode(dest);\n\t\t\t\t\tthis.setValue(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void updateJSON(JSONObject json, String key, Object value) {\r\n\r\n\t\ttry {\r\n\t\t\tjson.put(key, value);\r\n\t\t} catch (JSONException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Test\r\n void testUpdateMedicine() throws Exception{\r\n\r\n String URI = \"/medicine/update/{medicineId}\";\r\n Medicine medicine = new Medicine();\r\n\t\tmedicine.setMedicineId(134);\r\n\t\tmedicine.setMedicineName(\"crosin\");\r\n\t\tmedicine.setMedicineCost(200);\r\n\t\t\r\n\t\tString jsonInput = this.converttoJson(medicine);\r\n Mockito.when(medicineService.updateMedicineById(Mockito.any(),Mockito.anyString())).thenReturn(medicine);\r\n MvcResult mvcResult = this.mockMvc.perform(MockMvcRequestBuilders.put(URI ,105).accept(MediaType.APPLICATION_JSON).content(jsonInput).contentType(MediaType.APPLICATION_JSON)).andReturn();\r\n MockHttpServletResponse mockHttpServletResponse = mvcResult.getResponse();\r\n String jsonOutput = mockHttpServletResponse.getContentAsString();\r\n assertNotNull(jsonOutput);\r\n }", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "private ServerError updateDatabase() {\n return updateDatabase(WebConf.DB_CONN, WebConf.JSON_OBJECTS, WebConf.DEFAULT_VERSION);\r\n }", "protected void updateLocalData(Building[] data){\n new DBHandler(cx).updateBuildings(data);\n }", "@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "void updateWarehouseDepot(String username, LightWarehouseDepot warehouseDepot);", "@Test\n public void updateComment() throws Exception{\n JSONParser parser = new JSONParser();\n Object obj = parser.parse(new FileReader(JSON_FILE_4));\n JSONObject jsonObject = (JSONObject) obj;\n\n Response res =\n given().\n header(\"cookie\",\"JSESSIONID=\"+createSession()).and().\n header(\"Content-Type\",\"application/json\").\n body(jsonObject.toJSONString()).\n when().\n put(\"/rest/api/2/issue/10008/comment/10004\").\n then().\n statusCode(200).log().all().extract().response();\n }", "public void updateForecast(String date){\n\n forecast_repository.updateForecast(date);\n }", "private void updateSeat(Seat seat) {\n\n Retrofit retrofit = new Retrofit.Builder().baseUrl(\"http://10.0.2.2:5000/api/\")\n .addConverterFactory(GsonConverterFactory.create()).build();\n\n SeatRestAPI seatRestAPI = retrofit.create(SeatRestAPI.class);\n\n Call<Seat> call = seatRestAPI.putSeat(seat.getScreeningId(), seat.getRowNum(), seat.getColumnNum(), seat);\n call.enqueue(new Callback<Seat>() {\n @Override\n public void onResponse(Call<Seat> call, retrofit2.Response<Seat> response) {\n\n try {\n\n if (!response.isSuccessful()) {\n\n Toast.makeText(ConfirmationActivity.this, \"API Update Failed\", Toast.LENGTH_SHORT).show();\n\n }\n\n } catch (Exception exception) {\n\n //Toast.makeText(RegisterActivity.this, exception.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n\n }\n\n @Override\n public void onFailure(Call<Seat> call, Throwable t) {\n\n //Toast.makeText(RegisterActivity.this, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\n }\n });\n\n }", "@Test\n public void updateTest8() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }", "@PutMapping(value = \"/updatestory\")\n\tpublic void updatePost(@RequestBody String jsonString) {\n\t\tStory s = null;\n\t\ttry {\n\t\t\ts = new ObjectMapper().readValue(jsonString, Story.class);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tloggy.info(\"Update Story Controller Accessed\");\n\t\tstoryServ.update(s);\n\t}", "@Test\n public void updateTest4() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "public static void updateObjPodss(int environmentId, String objName, ArrayList<Integer> podContList){\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tString updateApiStsQry = null;\n\t\tupdateApiStsQry = HQLConstants.UPDATE_K8S_OBJECT_PODS;\n\t\t\n\t\tQuery query = session.createQuery(updateApiStsQry);\n\t\tquery.setInteger(\"pods\", podContList.get(0));\n\t\tquery.setInteger(\"containers\", podContList.get(1));\n\t\tquery.setString(\"objName\", objName);\n\t\tquery.setLong(\"environmentId\", environmentId);\n\t\tquery.setDate(\"stsDate\", todayDate);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "public void mo9092a(JSONObject jSONObject) throws JSONException {\n }", "public synchronized void saveTableInJson(Table table) throws IOException {\r\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\r\n\r\n /*\r\n * I don't know why but this line below doesn't work...\r\n * The strange thing is it was working fine, but just in one moment stopped.\r\n * I checked everything, I even reverted the done work to the initial state.\r\n * Nothing helped.\r\n */\r\n //gson.toJson(table, new FileWriter(stringPathToTable));\r\n\r\n String jsonTable = gson.toJson(table);\r\n FileWriter fileWriter = new FileWriter(stringPathToTable);\r\n fileWriter.write(jsonTable);\r\n fileWriter.close();\r\n }", "public interface Marathon extends ClusterProcess {\n\n /**\n * If Marathon configuration requires, installs the applications\n */\n void installMarathonApps();\n\n /**\n * Deploys a Marathon app by JSON string\n *\n * @param marathonJson JSON string\n */\n void deployApp(String marathonJson);\n\n /**\n * Updates a Marathon app by JSON string\n *\n * @param marathonJson JSON string\n */\n void updateApp(String marathonJson);\n\n /**\n * Kill all apps that are currently running.\n */\n void killAllApps();\n\n void setZooKeeper(ZooKeeper zookeeper);\n\n /**\n * Delete the given app\n *\n * @param app to be deleted\n */\n Result deleteApp(String app);\n\n /**\n * Deploy a Marathon application group.\n *\n * @param groupJson JSON string with Marathon application group definition\n */\n void deployGroup(String groupJson);\n\n /**\n * Deploy a Marathon application group.\n *\n * @param group group name\n */\n Result deleteGroup(String group);\n}", "@PutMapping(\"/containers\")\n\tpublic Container updateContainer(@RequestBody Container container) {\n\t\tcontainerDAO.save(container);\n\t\t\n\t\treturn container;\n\t\t//despite postman returning the updated data, i could not get mysql to reflect the changes\n\t\t//until i added @Transactional to the \"save\" method in the Service layer. \n\t\t//i did not have any issues adding a container prior to adding @transactional, however\n\t}", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "@Test\n public void testUpdatePharmacy() throws Exception {\n System.out.println(\"updatePharmacy\");\n\n //Null test\n PharmacyDTO pharmacy = null;\n ManagePharmaciesController instance = new ManagePharmaciesController();\n PharmacyDTO expResult = null;\n PharmacyDTO result = instance.updatePharmacy(pharmacy);\n Assertions.assertEquals(expResult, result);\n\n //Value test\n instance = new ManagePharmaciesController();\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n PharmacyDTO update = getPharmacyDTOTest(\"teste1\");\n Pharmacy returnedP = convertPharmacyDTO(update);\n when(db.updatePharmacy(any(Pharmacy.class))).thenReturn(returnedP);\n Assertions.assertEquals(instance.updatePharmacy(update).getName(), update.getName());\n Assertions.assertEquals(instance.updatePharmacy(update).getId(), update.getId());\n \n when(db.updatePharmacy(any(Pharmacy.class))).thenReturn(null);\n Assertions.assertNull(instance.updatePharmacy(update));\n }", "@Test\n @IfProfileValue(name=\"dept-test-group\", values = {\"all\",\"dept-update\"})\n public void _2_4_1_updateExistDept() throws Exception {\n Department d = d_1;\n d.setDescription(\"修改部门1描述\");\n this.mockMvc.perform(put(\"/api/v1.0/companies/\"+\n d.getCompany()+\n \"/departments/\"+\n d.getId())\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(d)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(d.getId().toString())))\n .andExpect(jsonPath(\"$.description\",is(d.getDescription())));\n }", "public void updateJoueurs();", "@Override\n\tpublic void setObjectFromJSON(JSONObject j) throws JSONException{\n\t\tsetID(Integer.parseInt(j.getString(KEY_ID)));\n\t\tsetVehicleID(Integer.parseInt(j.getString(KEY_VEHICLE_IDVEHICLE)));\n\t\tsetItemID(Integer.parseInt(j.getString(KEY_ITEMS_IDITEMS)));\n\t\tsetReceiptID(Integer.parseInt(j.getString(KEY_RECEIPT_IDRECEIPT)));\n\t\tsetMileage(Integer.parseInt(j.getString(KEY_WORKMILEAGE)));\n\t\tsetNotes(j.getString(KEY_WORKNOTES));\n\t\t\n\t}", "@Test(groups = \"his.wardadmission.test\", dependsOnMethods = { \"addWardTestCase\" })\n\tpublic void updateAdmissionBedNoTestCase() throws IOException, JSONException {\n\n\t\tJSONObject jsonRequestObject = new JSONObject(RequestUtil\n\t\t\t\t.requestByID(TestCaseConstants.UPDATE_ADMISSION_BED_NO));\n\t\t\n\t\tArrayList<String> resArrayList = getHTTPResponse(\n\t\t\t\tproperties\n\t\t\t\t\t\t.getProperty(TestCaseConstants.URL_APPEND_UPDATE_ADMISSION_BED_NO),\n\t\t\t\tTestCaseConstants.HTTP_PUT, jsonRequestObject.toString());\n\n\t\tSystem.out.println(\"message :\"+resArrayList.get(0));\n\n\t\tAssert.assertEquals(Integer.parseInt(resArrayList.get(1)),\n\t\t\t\tSUCCESS_STATUS_CODE);\n\t\t\n\t}", "@Test\r\n\tpublic void updateProductDetails() {\r\n\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Banana\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.put(\"/5\");\r\n\t\tSystem.out.println(\"Update Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "Weather update(Long id, WeatherInformation weatherInformation);", "public void test_01() {\n\t\tpostobject jsonobjectdata = new postobject();\n\n\t\tjsonobjectdata.setID(\"5\");\n\t\tjsonobjectdata.settitle(\"updated Mr\");\n\t\tjsonobjectdata.setfirst_name(\"updated Rahaman\");\n\t\tjsonobjectdata.setauthor(\"updated Ata\");\n\n\t\tResponse reponse = given().\n\t\t\t\tbody(jsonobjectdata).\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tput(\"http://localhost:3000/posts/05\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}", "@Test\n\tvoid testUpdatePlant() {\n\t\tPlant plant = service.updatePlant(new Plant( 8.0, \"Lemon\", \"Antihairfall\", 22.0, 5, 170.0, \"shurb\"));\n\t\tassertEquals(170.0, plant.getCost());\n\t}", "@Override\n public void updateServiceJson(){\n synchronized (lockUpdateServiceJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Movies.json\")) {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"movies\", writer.toJsonTree(movieList));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "public void updateRoomChanges_DB() throws SQLException{\n \n //update all rooms\n for(int i=0;i<roomCounter;i++){\n String sqlstmt = \"UPDATE \\\"APP\\\".\\\"HOTELROOMS\\\" \"\n + \"SET ISAVAILABLE = \"+myHotel[i].getStatus()\n + \", OCCUPANT = '\" + myHotel[i].getOccupant()\n + \"', GUESTID = \" + myHotel[i].getOccupantID()\n + \" , STARTDATE = '\"+ myHotel[i].getStartDate()\n + \"', ENDDATE = '\"+ myHotel[i].getEndDate()\n + \"' WHERE ROOMNUMBER = \" + myHotel[i].getRoomNum();\n \n cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n }\n \n }", "@Override\n\tpublic void updateApartment(ApartmentDetailsBean aptUpdated) {\n\t\tString query = \"update Apartments set depositAmt=?,rent=?,utilities=?,area=?,street=?,city=?,doorNo=?,no_of_rooms=?,type_bathroom=?,flooring=? where apartmentId=?\";\n\t\tResultSet rs=null;\n\t\tPreparedStatement pstmt;\n\t\ttry {\n\t\t\tpstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, aptUpdated.getDepositAmt());\n\t\t\tpstmt.setInt(2, aptUpdated.getRent());\n\t\t\t//pstmt.setDate(4, aptUpdated);\n\t\t\tpstmt.setString(3, aptUpdated.getUtilities());\n\t\t\tpstmt.setString(4, aptUpdated.getArea());\n\t\t\tpstmt.setString(5, aptUpdated.getStreet());\n\t\t\tpstmt.setString(7, aptUpdated.getDoorNo());\n\t\t\tpstmt.setString(6, aptUpdated.getCity());\n\t\t\tpstmt.setInt(8, aptUpdated.getno_of_rooms());\n\t\t\tpstmt.setString(9, aptUpdated.getType_bathroom());\n\t\t\tpstmt.setString(10, aptUpdated.getFlooring());\n\t\t\tpstmt.setInt(11, aptUpdated.getApartmentId());\n\t\t\tpstmt.executeUpdate();\n\t\t\t\n\t\t}catch(SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "private void reloadPlanTable() {\n\t\t\r\n\t}", "public void updateDisplayBoardTable(){\n try{\n // Connect to db\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/nfqdb\", \"root\", \"\");\n \n Statement st = con.createStatement();\n // MySQL Query\n String sql = \"select * from visit\";\n ResultSet rs = st.executeQuery(sql);\n \n // Delete old data from the table\n DefaultTableModel dm = (DefaultTableModel) DisplayBoard.screenTable.getModel();\n int rowCount = dm.getRowCount();\n //Remove rows one by one from the end of the table\n for (int i = rowCount - 1; i >= 0; i--) {\n dm.removeRow(i);\n }\n \n // Add new data in table\n while(rs.next()){\n // data will be added until finish\n String id = \"000\" + String.valueOf(rs.getInt(\"id_visit\")); //conversion due to int value\n String specid = String.valueOf(rs.getInt(\"spec_id\")); //conversion due to int value\n String date = String.valueOf(rs.getTimestamp(\"datetime\"));\n String spcnam = rs.getString(\"spec_name\");\n String cusnam = rs.getString(\"customer_name\");\n String status = rs.getString(\"status\");\n \n // String array for store data into jtable\n \n String tbData[] = {id, specid, date, spcnam, cusnam, status};\n DefaultTableModel tblModel = (DefaultTableModel)DisplayBoard.screenTable.getModel();\n tblModel.addRow(tbData);\n }\n con.close();\n }\n catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n }", "void update( ExperimentDTO item );", "@Test\n public void updateTest1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "void updateTableToken(TableToken tableToken);", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "public static void updateAppointments(Appointment PlaceholderAppointment) {\n String sql = \"UPDATE appointments SET Title =?, Description=?, Location=?, Type=?, start=?, end=?, Customer_ID=?, User_ID=?, Contact_ID=? WHERE Appointment_ID = ?\";\n\n try {\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n ps.setString(1, PlaceholderAppointment.getTitle());\n ps.setString(2, PlaceholderAppointment.getDescription());\n ps.setString(3, PlaceholderAppointment.getLocation());\n ps.setString(4, PlaceholderAppointment.getType());\n LocalDateTime start = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getStartTime());\n start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n LocalDateTime end = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getEndTime());\n end = WashTimeZone(end, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n Timestamp Tstart = Timestamp.valueOf(start);\n Timestamp Tend = Timestamp.valueOf(end);\n ps.setTimestamp(5, Tstart);\n ps.setTimestamp(6, Tend);\n//timezone work needs to happen here\n\n ps.setInt(7, PlaceholderAppointment.getCustomerid());\n ps.setInt(8, PlaceholderAppointment.getUserid());\n ps.setInt(9, PlaceholderAppointment.getContactid());\n ps.setInt(10, PlaceholderAppointment.getAppointment_ID());\n ps.execute();\n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n }", "@Test\r\n\tpublic void update() throws Exception {\r\n\t\t\r\n\t\ttr.deleteAll();\r\n\t\tTransformer tf = new Transformer( null, \"Soundwave\", Team.DECEPTICON, 8, 9, 2, 6, 7, 5, 6, 10); \r\n\t\ttf = tr.save(tf);\r\n\t\tint id=tf.getId();\r\n\t\t\r\n\t\tString content = \"{\\r\\n\" + \r\n\t\t\t\t\" \\\"id\\\": 3,\\r\\n\" + \r\n\t\t\t\t\" \\\"name\\\": \\\"TF1\\\",\\r\\n\" + \r\n\t\t\t\t\" \\\"team\\\": \\\"DECEPTICON\\\",\\r\\n\" + \r\n\t\t\t\t\" \\\"strength\\\": 8,\\r\\n\" + \r\n\t\t\t\t\" \\\"intelligence\\\": 9,\\r\\n\" + \r\n\t\t\t\t\" \\\"speed\\\": 2,\\r\\n\" + \r\n\t\t\t\t\" \\\"endurance\\\": 6,\\r\\n\" + \r\n\t\t\t\t\" \\\"rank\\\": 7,\\r\\n\" + \r\n\t\t\t\t\" \\\"courage\\\": 5,\\r\\n\" + \r\n\t\t\t\t\" \\\"firepower\\\": 6,\\r\\n\" + \r\n\t\t\t\t\" \\\"skill\\\": 1\\r\\n\" + \r\n\t\t\t\t\"}\";\r\n\t\t\r\n\t\tmockMvc.perform(put(\"/transformers/\" + id ).contentType(MediaType.APPLICATION_JSON).content(content.getBytes(\"UTF-8\")))\r\n\t\t\t\t.andExpect(status().isCreated())\r\n\t\t\t\t.andExpect(content().contentTypeCompatibleWith(\"application/json\"))\r\n\t\t\t\t;\r\n\t\t\r\n\t\tTransformer res = tr.findById(id).get();\r\n\t\tassertEquals( \"TF1\", res.getName());\r\n\t\tassertEquals( 1, res.getSkill());\r\n\t\t\r\n\t}", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_json_format(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_format_json);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"Cool setpoint cannot be null.\")); \n Assert.assertTrue(content.contains(\"40006\"));\n Assert.assertTrue(content.contains(\"End timestamp cannot be null.\")); \n Assert.assertTrue(content.contains(\"40009\")); \n Assert.assertTrue(content.contains(\"Heat setpoint cannot be null.\"));\n Assert.assertTrue(content.contains(\"40007\"));\n\n }", "void mo350a(C0636l c0636l, JsonValue jsonValue);", "JobResponse.Update update();", "@Override\r\n\tpublic void updateWorklow(Appointment a) throws DBAccessException {\n\t\tsteps = cr.getWorkflowSteps();\r\n\t\t\r\n\t\t// TODO Anhand des Termins die Objekte aus steps aktualisieren \r\n\t\t\r\n\t\t// da es bei Updates der App passieren kann, dass der Ablaufplan sich ändert, müssen vorherige Ablaufpläne gelöscht werden\r\n\t\tdb.deleteWorkflow();\r\n\t\t\r\n\t\tfor (Step step : steps) {\r\n\t\t\tint seperator = step.getTime().indexOf(\":\");\r\n\t\t\tString s = step.getTime().substring(0, seperator-1); // -1, damit das \":\" nicht dabei ist\r\n\t\t\tint hour = Integer.parseInt(s);\r\n\t\t\ts = step.getTime().substring(seperator+1); // +1, damit das \":\" nicht dabei ist\r\n\t\t\tint min = Integer.parseInt(s);\r\n\t\t\t// dieser Konstruktor ist zwar veraltet, aber für unseren Zweck perfekt\r\n\t\t\tstep.setTimestamp(new Timestamp(a.getYear(), a.getMonth(), a.getDay()-step.getDaysBefore(), hour, min, 0, 0));\r\n\t\t}\r\n\t\t\r\n\t\tdb.saveWorkflow(steps);\r\n\t\t\r\n\t}", "public static void main(String[] args) throws SQLException {\r\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/test?autoReconnect=true&useSSL=false\",\"root\",\"1234\");\r\n BuildAuto build=new BuildAuto();\r\n build.BuildAuto(\"src\\\\test1.txt\",\"test1\");\r\n build.BuildAuto(\"src\\\\test2.txt\",\"test2\");\r\n LinkedHashMap<String,Automobile> list=build.getMap();\r\n CreateDatabase cdb=new CreateDatabase();\r\n UpdateDatabase udb=new UpdateDatabase(list); \r\n Statement stat = conn.createStatement();\r\n System.out.println(\"************Show automobile table************\");\r\n showTable(\"test.automobile\",stat);\r\n System.out.println(\"************Show optionset table************\");\r\n showTable(\"test.optionset\",stat);\r\n System.out.println(\"************Show optionchoice table************\");\r\n showTable(\"test.optionchoice\",stat);\r\n System.out.println(\"************Update make name in automobile table************\");\r\n udb.updateAutoMake(1,\"Nissan\");\r\n showTable(\"test.automobile\",stat);\r\n System.out.println(\"************Update model name in automobile table************\");\r\n udb.updateAutoModel(1,\"Sport\");\r\n showTable(\"test.automobile\",stat);\r\n System.out.println(\"************Update optionset name in optionset table************\");\r\n udb.updateOptionSetName(1,\"Color Choice\");\r\n showTable(\"test.optionset\",stat);\r\n System.out.println(\"************Update option name in optionchoice table************\");\r\n udb.updateOptionName(23,\"Light Green\");\r\n showTable(\"test.optionchoice\",stat);\r\n System.out.println(\"************Update option price in optionchoice table************\");\r\n udb.updateOptionPrice(2,800);\r\n showTable(\"test.optionchoice\",stat);\r\n System.out.println(\"************Delete Automobile in automobile table************\");\r\n DeleteDatabase ddb=new DeleteDatabase();\r\n ddb.deleteAuto(2);\r\n showTable(\"test.automobile\",stat);\r\n showTable(\"test.optionset\",stat);\r\n showTable(\"test.optionchoice\",stat);\r\n System.out.println(\"************Delete optionset in optionset table************\");\r\n ddb.deleteOptionSet(1);\r\n showTable(\"test.automobile\",stat);\r\n showTable(\"test.optionset\",stat);\r\n showTable(\"test.optionchoice\",stat);\r\n System.out.println(\"************Delete option in optionset table************\");\r\n ddb.deleteOption(11);\r\n showTable(\"test.automobile\",stat);\r\n showTable(\"test.optionset\",stat);\r\n showTable(\"test.optionchoice\",stat);\r\n System.out.println(\"************Delete All************\");\r\n ddb.deleteAll();\r\n showTable(\"test.automobile\",stat);\r\n showTable(\"test.optionset\",stat);\r\n showTable(\"test.optionchoice\",stat); \r\n }", "public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}", "@Test\n public void updateAll_501() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n addMOToDb(2);\n addMOToDb(3);\n\n Workflow mo = new Workflow();\n\n // PREPARE THE TEST\n // Nothing to do\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\", mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(501, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n\n }", "private void updateDB() {\n }", "void installMarathonApps();", "@Test\n public void updateQuejaTest() {\n QuejaEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n\n newEntity.setId(entity.getId());\n\n quejaPersistence.update(newEntity);\n\n QuejaEntity resp = em.find(QuejaEntity.class, entity.getId());\n\n Assert.assertEquals(newEntity.getName(), resp.getName());\n }", "@Test\r\n\tpublic void UpdatebookingTest()\r\n\t{\n\t\t\r\n\t\tResponse responsecreate = createBooking(); \r\n\t\tresponsecreate.print();\r\n\t\t//get bookingid of booking\r\n\t\tint bookingid=responsecreate.jsonPath().getInt(\"bookingid\");\r\n\t\t\r\n\t\t//update \r\n\t\t//\r\n\t\t\r\n\t\tJSONObject body=new JSONObject();\r\n\t\tbody.put(\"firstname\", \"Devaaa\");\r\n\t\tbody.put(\"lastname\", \"Dadhavjadhav\");\r\n\t\tbody.put(\"totalprice\", 125);\r\n\t\tbody.put(\"depositpaid\", false);\r\n\r\n \r\n\t\tJSONObject bookingdates=new JSONObject();\r\n\t\tbookingdates.put(\"checkin\", \"2021-08-16\");\r\n\t\tbookingdates.put(\"checkout\", \"2021-09-17\");\r\n\t\t\r\n\t\tbody.put(\"bookingdates\", bookingdates);\r\n\t\tbody.put(\"additionalneeds\", \"Breakfast\");\r\n\t\t\r\n\t\t// update booking //username and password add\r\n\r\n\t\tResponse responseUpdate=RestAssured.given().auth().preemptive().basic(\"admin\", \"password123\").contentType(ContentType.JSON)\r\n\t\t\t\t.body(body.toString()).put(\"https://restful-booker.herokuapp.com/booking/\"+ bookingid);\r\n\t\t\r\n\t\tresponseUpdate.print();\r\n\t\tresponseUpdate.getStatusCode();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t// verify response 200\r\n\t\tAssert.assertEquals(responseUpdate.getStatusCode(), 200);\r\n//\t\t\t//verify all field\r\n//\t\t\tSoftAssert softassert=new SoftAssert();\r\n//\t\t\t\r\n//\t\t\tString actualfirstname=response.jsonPath().getString(\"firstname\");\r\n//\t\t\tsoftassert.assertEquals(actualfirstname, \"deva\");\r\n//\t\t\t\r\n//\t\t\tString actuallastname=response.jsonPath().getString(\"lastname\");\r\n//\t\t\tsoftassert.assertEquals(actuallastname, \"jadhav\");\r\n//\t\t\t\r\n//\t\t\tint actualtotalprice=response.jsonPath().getInt(\"totalprice\");\r\n//\t\t\tsoftassert.assertEquals(actualtotalprice, 255);\r\n//\t\t\t\r\n//\t\t\tboolean actualdepositpaid=response.jsonPath().getBoolean(\"depositpaid\");\r\n//\t\t\tsoftassert.assertFalse(actualdepositpaid, \"false\");\r\n//\t\t\t \r\n//\t\t\tString actualcheckin=response.jsonPath().getString(\"bookingdates.checkin\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckin, \"2021-08-14\");\r\n//\t\t\t\r\n//\t\t\tString actualcheckout=response.jsonPath().getString(\"bookingdates.checkout\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckout, \"2021-09-07\");\r\n//\t\t\t\r\n//\t\t\tString actualadditionalneeds=response.jsonPath().getString(\"additionalneeds\");\r\n//\t\t\tsoftassert.assertEquals(actualadditionalneeds, \"c\");\r\n//\t\t\tsoftassert.assertAll();\r\n//\t\r\n\r\n}", "@Override\r\n public JSONObject editFood(JSONObject input) {\n int id = (Integer) input.get(\"id\");\r\n Date dateExpired = (Date) input.get(\"dateExpired\");\r\n\r\n Refrigerator refrigerator = em.find(Refrigerator.class, id);\r\n if (refrigerator != null) {\r\n refrigerator.setDateExpired(dateExpired);\r\n\r\n em.merge(refrigerator);\r\n }\r\n \r\n //Tra ket qua\r\n JSONObject result = new JSONObject();\r\n result.put(\"result\", \"Edited\");\r\n return result;\r\n }", "@RequestMapping(value = \"addUpdateManagment\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n protected void addUpdateManagment(HttpServletRequest request, HttpServletResponse response) throws Exception {\n String json = \"\";\n String resultado = \"\";\n String idLab = null;\n Integer management = 0;\n Integer idRecord = 0;\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream(), \"UTF8\"));\n json = br.readLine();\n //Recuperando Json enviado desde el cliente\n JsonObject jsonpObject = new Gson().fromJson(json, JsonObject.class);\n\n if(jsonpObject.get(\"idLab\") != null && !jsonpObject.get(\"idLab\").getAsString().isEmpty() ) {\n idLab = jsonpObject.get(\"idLab\").getAsString();\n }\n\n if (jsonpObject.get(\"management\") != null && !jsonpObject.get(\"management\").getAsString().isEmpty()) {\n management = jsonpObject.get(\"management\").getAsInt();\n }\n\n\n if (jsonpObject.get(\"idRecord\") != null && !jsonpObject.get(\"idRecord\").getAsString().isEmpty()) {\n idRecord = jsonpObject.get(\"idRecord\").getAsInt();\n }\n\n User usuario = seguridadService.getUsuario(seguridadService.obtenerNombreUsuario());\n\n if (idRecord == 0) {\n if (management != 0 && idLab != null) {\n\n //search record\n DireccionLaboratorio record = organizationChartService.getManagmentLabRecord(idLab, management);\n\n if (record == null) {\n DireccionLaboratorio managLab = new DireccionLaboratorio();\n managLab.setFechaRegistro(new Timestamp(new Date().getTime()));\n managLab.setUsuarioRegistro(usuario);\n managLab.setDireccion(laboratoriosService.getDireccionById(management));\n managLab.setLaboratorio(laboratoriosService.getLaboratorioByCodigo(idLab));\n managLab.setPasivo(false);\n organizationChartService.addOrUpdateManagmentLab(managLab);\n } else {\n resultado = messageSource.getMessage(\"msg.existing.record.error\", null, null);\n throw new Exception(resultado);\n }\n\n }\n } else {\n DireccionLaboratorio rec = organizationChartService.getManagmentLabById(idRecord);\n if (rec != null) {\n rec.setPasivo(true);\n organizationChartService.addOrUpdateManagmentLab(rec);\n }\n }\n\n\n\n\n } catch (Exception ex) {\n logger.error(ex.getMessage(), ex);\n ex.printStackTrace();\n resultado = messageSource.getMessage(\"msg.add.managLab.error\", null, null);\n resultado = resultado + \". \\n \" + ex.getMessage();\n\n } finally {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idLab\", String.valueOf(idLab));\n map.put(\"mensaje\", resultado);\n map.put(\"idRecord\", \"\");\n map.put(\"management\", \"\");\n String jsonResponse = new Gson().toJson(map);\n response.getOutputStream().write(jsonResponse.getBytes());\n response.getOutputStream().close();\n }\n }", "public boolean updateCustomer(String customerJSON);", "@Test\n public void updateTest11() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }", "public HrJBorrowcontract update(HrJBorrowcontract entity);", "public void update(RaceSituation raceSituation);", "@Test\n public void updateViajeroTest() {\n ViajeroEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n ViajeroEntity newEntity = factory.manufacturePojo(ViajeroEntity.class);\n\n newEntity.setId(entity.getId());\n\n vp.update(newEntity);\n\n ViajeroEntity resp = em.find(ViajeroEntity.class, entity.getId());\n\n Assert.assertEquals(newEntity.getId(), resp.getId());\n }", "@Test\n @DisplayName(\"replace updates anime when successful\")\n void replace_UpdatesAnime_WhenSuccessful() {\n Anime savedAnime = animeRepository.save(AnimeCreator.createAnimeToBeSaved());\n devDojoRepository.save(USER);\n\n // setting a new name so that we update the anime aftewards\n savedAnime.setName(\"new name\");\n \n ResponseEntity<Void> animeResponseEntity = testRestTemplateRoleUser.exchange(\n \"/animes\",\n HttpMethod.PUT,\n new HttpEntity<>(savedAnime),\n Void.class\n );\n\n Assertions.assertThat(animeResponseEntity).isNotNull();\n \n Assertions.assertThat(animeResponseEntity.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);\n\n }", "public String updateMR() throws Exception {\r\n\t\t\r\n\t\tString mode = dao_impl.updateMR(addMRPojo);\r\n\t\taddMRPojo.setMode(mode);\r\n\t\t\r\n\t\tSystem.out.println(\"mode --> \"+addMRPojo.getMode());\r\n\t\t\r\n\t\treturn \"SUCCESS\";\t\r\n\t}", "@Test\n public void updateTest7() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateTest13() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setWifi(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true , servizio.isWifi() ,\"Should return true if update Servizio\");\n }", "public static void updateKitchen(KitchenModel kitchen) {\n //Creating session\n Session session = SetupPersistence.getSession();\n //Updating object in database\n session.update(kitchen);\n //Closing session\n SetupPersistence.closeSession(session);\n }", "private ServerError updateDatabase(String conn, String[] objJS, int serverVersion) {\n int numObjJS = objJS.length;\r\n\r\n // In case there are no JSON object to process on the server shows an error message\r\n if (numObjJS == 0) {\r\n return ServerError.OBJECT_NOT_FOUND;\r\n }\r\n\r\n // Instance of List of entities\r\n ArrayList<HttpEntity> objJSEntities = new ArrayList<HttpEntity>();\r\n\r\n // Create a number of JSON arrays equals to the number of JSON objects\r\n // because each JSON object contains a JSON array\r\n JSONArray[] arrayJson = new JSONArray[numObjJS];\r\n\r\n // Check if the objects passed have been parsed correctly, in case even one of those\r\n // has not been parsed correctly the app will return an error\r\n ServerError res = tryToParseJSON(conn, objJS, numObjJS, objJSEntities, arrayJson, serverVersion);\r\n\r\n return res;\r\n }", "public static void UpdateFlight(Flight flight){\n \n //java.sql.Date sqlDate = new java.sql.Date(flight.getDatetime());\n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM flight WHERE FlightNumber = '\" + flight.getFlightNumber() + \"'\")){\n \n resultSet.absolute(1);\n resultSet.updateString(\"FlightNumber\", flight.getFlightNumber());\n resultSet.updateString(\"DepartureAirport\", flight.getDepartureAirport());\n resultSet.updateString(\"DestinationAirport\", flight.getDestinationAirport());\n resultSet.updateDouble(\"Price\", flight.getPrice());\n\n //Ask Andrew\n// java.sql.Date sqlDate = new java.sql.Date();\n// resultSet.updateDate(\"datetime\", flight.getDatetime());\n resultSet.updateString(\"Plane\", flight.getPlane());\n resultSet.updateInt(\"SeatsTaken\", flight.getSeatsTaken());\n \n resultSet.updateRow();\n \n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n }" ]
[ "0.70817536", "0.68849206", "0.5910109", "0.5632381", "0.55566484", "0.55200857", "0.53854066", "0.53628385", "0.53148866", "0.5159423", "0.51357657", "0.49972212", "0.4930647", "0.4918032", "0.49119985", "0.4900467", "0.4896073", "0.48848888", "0.48609647", "0.4857745", "0.48488382", "0.48241937", "0.48159552", "0.4814187", "0.48138085", "0.48043332", "0.4795469", "0.47866744", "0.47572392", "0.47513202", "0.4751104", "0.4750685", "0.47495353", "0.47478655", "0.47348553", "0.47288328", "0.47271067", "0.47269502", "0.4719202", "0.47175014", "0.47103184", "0.46703637", "0.46688387", "0.46579808", "0.465151", "0.46500817", "0.46500316", "0.46403444", "0.4624641", "0.46221507", "0.46190733", "0.4615449", "0.46114781", "0.46067914", "0.4601308", "0.46010673", "0.4596205", "0.4594004", "0.45937225", "0.4592272", "0.45819968", "0.45778173", "0.4577406", "0.45768228", "0.4570826", "0.45680094", "0.45611703", "0.4556321", "0.45531195", "0.45499584", "0.4547824", "0.45472652", "0.4538893", "0.45376328", "0.45305017", "0.4528476", "0.45284283", "0.4522292", "0.45185018", "0.45139465", "0.45127457", "0.4511092", "0.4508104", "0.45064366", "0.45061272", "0.45047435", "0.450378", "0.4502873", "0.4500101", "0.44959894", "0.44957986", "0.4495592", "0.44901955", "0.44837028", "0.44832253", "0.44769546", "0.44732013", "0.44684565", "0.44669127", "0.44635925" ]
0.69746184
1
Function the update the East marathon json in the environment table
public static void updateEastMarathonJson(final EnvironmentVO environmentVO) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_EAST_MARATHON_JSON); query.setBinary("marathonJson", environmentVO.getEastMarathonJson().getBytes()); query.setTimestamp("lastUpdateTime", new java.sql.Timestamp(new Date().getTime())); query.setLong("environmentId", environmentVO.getEnvironmentId()); query.executeUpdate(); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void updateWestMarathonJson(final EnvironmentVO environmentVO) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_MARATHON_JSON);\n\t\tquery.setBinary(\"marathonJson\", environmentVO.getMarathonJson().getBytes());\n\t\tquery.setTimestamp(\"lastUpdateTime\", new java.sql.Timestamp(new Date().getTime()));\n\t\tquery.setLong(\"environmentId\", environmentVO.getEnvironmentId());\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "void updateApp(String marathonJson);", "public static void updateEnvironmentDetails(\n\t\t\tList<EnvironmentVO> environmentVOs) {\n\t\tfor (EnvironmentVO eVO : environmentVOs) {\n\t\t\tif (eVO.getMarathonJson() != null && JSONUtil.isJSONValid(eVO.getMarathonJson())) {\n\t\t\t\tupdateWestMarathonJson(eVO);\n\t\t\t}\n\t\t\tif (eVO.getEastMarathonJson() != null && JSONUtil.isJSONValid(eVO.getEastMarathonJson())) {\n\t\t\t\tupdateEastMarathonJson(eVO);\n\t\t\t}\n\t\t}\n\t}", "private static void getMarathonJson(EnvironmentVO environmentVO) throws Exception {\n\t\tlogger.debug(\"Running Marathon Backup for environment: \" + environmentVO.getEnvironmentName());\n\t\tString marathonJson = null;\n\t\tString eastMarathonJson = null;\n\t\tif(environmentVO.getMarathonUrl() != null && !environmentVO.getMarathonUrl().equals(\"\")){\n\t\t\tmarathonJson = RestCommunicationHandler.getResponse(environmentVO.getMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t \n\t\tif(marathonJson == null || marathonJson.equals(\"failed\") || marathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setMarathonJson(marathonJson);\n\t\t}\n\t\t//Get EAST marathon JSON\n\t\tif(environmentVO.getEastMarathonUrl() != null && !environmentVO.getEastMarathonUrl().equals(\"\")){\n\t\t\teastMarathonJson = RestCommunicationHandler.getResponse(environmentVO.getEastMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t\n\t\tif(eastMarathonJson == null || eastMarathonJson.equals(\"failed\") || eastMarathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setEastMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setEastMarathonJson(eastMarathonJson);\n\t\t}\n\t}", "int updateByPrimaryKey(ec_environment record);", "public static void doMarathonBackUp() throws Exception {\n\t\tlogger.info(\"************** STARTED MarathonBackUp **************\");\n\t\tList<EnvironmentVO> environmentVOs = DBQueryUtil.getAllEnvironments();\n\t\tfor(EnvironmentVO eVo : environmentVOs){\n\t\t\tgetMarathonJson(eVo);\n\t\t\tlogger.info(\"Got Marathon JSON for \" + eVo.getEnvironmentName() + \" Time : \" + new Date());\n\t\t\tlogger.info(\"JSON \" + eVo.getMarathonJson());\n\t\t}\n\t\tDBQueryUtil.updateEnvironmentDetails(environmentVOs);\n\t\tMarathonConfigProcessor.updateApiList(environmentVOs);\n\t\tlogger.info(\"************** COMPLETED MarathonBackUp **************\");\n\t}", "void deployApp(String marathonJson);", "public boolean update(JSONObject jsonProgram);", "public static Map<Integer, Blob> getMarathonJson() {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCrit = session.createCriteria(EnvironmentEntity.class, \"env\");\n\t\tenvCrit.add(Restrictions.isNotNull(\"env.marathonURL\"));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvironmentEntity> envList = (List<EnvironmentEntity>)envCrit.list();\n\t\t\n\t\tMap<Integer, Blob> mapEnvJson = new HashMap<Integer,Blob>();\n\t\tfor(EnvironmentEntity ee: envList){\n\t\t\tif(ee.getMarathonURL() == null || ee.getMarathonURL().trim().length() == 0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmapEnvJson.put(ee.getEnvironmentId(), ee.getMarathonJson());\n\t\t}\n\t\ttxn.commit();\n\t\treturn mapEnvJson;\n\t}", "@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "public String updatePatientInfo(JSONObject updateRequest) throws Exception {\n String oldRecord;\n String newRecord;\n int patientID;\n try {\n patientID=updateRequest.getInt(\"Patient ID\");\n }\n catch (Exception e){\n e.printStackTrace();\n String postBody=\"\\\"{\\n\\t\\\"Patient ID\\\":23,\\n\\t\\\"Patient Name\\\":\\\"Ji Klink\\\",\\n\\t\\\"\" +\n \"Last Visited\\\":\\\"\\\",\\n\\t\\\"Status\\\":\\\"Ongoing\\\",\\n\\t\\\"DOB\\\":\" +\n \"\\\"\\\",\\n\\t\\\"Address\\\":\\\"\\\",\\n\\t\\\"Created Date\\\":\\n}\\\"\";\n return \"POST BODY Mandatory Field \\\"Patient ID\\\"\\n\"+\"Rest Field ID are\\n\"+postBody;\n }\n System.out.println(updateRequest.keySet());\n updateRequest.keySet();\n String updateQueryHead = \"UPDATE BasicInfo SET \";\n String updateQueryTail = \" WHERE patientid=\"+patientID;\n String setBody=\"\";\n int comm=0;\n\n //update BasicInfo set gender='Female', address = 'nowhwere' where patientid=23;\n for (String temp: updateRequest.keySet()){\n switch (temp){\n case \"Status\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"status=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",status=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Patient Name\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"patientname=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",patientname=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Address\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"address=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",address=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Last Visited\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"lastvisited=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",lastvisited=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Created Date\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"createddate=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",createddate=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Dob\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"dob=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",dob=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n case \"Gender\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"gender=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n else setBody=setBody+\",gender=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n comm++;\n break;\n\n case \"Symptom\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else{\n if( comm == 0){\n setBody=setBody + \"symptom=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",symptom=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Diagnosis\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n\n else{\n\n if( comm == 0){\n setBody=setBody + \"diagnosis=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",diagnosis=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Treatment\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else{\n\n if( comm == 0){\n setBody=setBody + \"treatment=\\'\"+updateRequest.get(temp)+\"\\'\";\n }else{\n setBody=setBody+\",treatment=\\'\"+updateRequest.get(temp)+\"\\'\";\n }\n }\n comm++;\n break;\n\n case \"Phone Number\":\n if(updateRequest.get(temp).equals(\"\")){\n break;\n }\n else {\n if (comm==0){\n setBody=setBody+\"phonenumber=\"+updateRequest.get(temp);\n }\n else setBody=setBody+\",phonenumber=\"+updateRequest.get(temp);\n }\n comm++;\n break;\n default:\n System.out.println(\"Skipping \"+temp);\n }\n System.out.println(updateRequest.get(temp));\n }\n String queryWithPid= \"SELECT * FROM BasicInfo where patientid = \"+patientID;\n System.out.println(queryWithPid);\n JSONArray response =client.queryFromDB(queryWithPid);\n oldRecord=response.toString();\n String finalQuery=updateQueryHead+setBody+updateQueryTail;\n System.out.println(\"FINAL QUERY\\n\"+finalQuery);\n Session session=client.getSession();\n session.execute(finalQuery);\n newRecord = client.queryFromDB(queryWithPid).toString();\n updateCache(\"Update\");\n return \"Updated Info from\\n\"+oldRecord+\"To\\n\"+newRecord;\n\n }", "@Test\n public void testUpdateDietStatusById() throws Exception{\n\n String URI = \"/healthreminder/followup_dietstatus_update/{patientId}/status/{dietStatus}\";\n FollowUpDietStatusInfo followUpDietStatusInfo = new FollowUpDietStatusInfo();\n followUpDietStatusInfo.setPatientId(1);\n followUpDietStatusInfo.setDietStatus(false);\n \n String jsonInput = this.converttoJson(followUpDietStatusInfo);\n\n Mockito.when(followUpDietStatusInfoServices.updateDietStatusById(Mockito.any(),Mockito.anyBoolean())).thenReturn(followUpDietStatusInfo);\n MvcResult mvcResult = this.mockMvc.perform(MockMvcRequestBuilders.put(URI, 1, true).accept(MediaType.APPLICATION_JSON).content(jsonInput).contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n MockHttpServletResponse mockHttpServletResponse = mvcResult.getResponse();\n String jsonOutput = mockHttpServletResponse.getContentAsString();\n\n assertThat(jsonInput).isEqualTo(jsonOutput);\n }", "public UpdateEntity(String json) throws JSONException {\n\n JSONObject jso = new JSONObject(json);\n JSONObject jsonObject = jso.getJSONObject(\"data\");\n String code = jsonObject.getString(\"versionCode\");\n if (!StringUtils.isStringNull(code)) {\n\t\t\tthis.versionCode = Integer.valueOf(code);\n\t\t}else{\n\t\t\tthis.versionCode = 0;\n\t\t}\n this.versionName = jsonObject.getString(\"versionName\");\n this.isForceUpdate = jsonObject.getString(\"isForceUpdate\");\n this.downUrl = jsonObject.getString(\"downUrl\");\n this.preBaselineCode = jsonObject.getString(\"preBaselineCode\");\n this.updateLog = jsonObject.getString(\"updateLog\");\n// this.md5 = jsonObject.getString(\"md5\");\n\n }", "public Map<String, Tabela> update(String komenda) throws Exception {\n\n komenda = komenda.substring(7);\n char[] zbiorSymboli = komenda.toCharArray();\n\n boolean wystapilaNazwaTablicy = false;\n boolean wystapilSET = false;\n boolean wystapilyKolumnaWartosc = false;\n boolean wystapilWHERE = false;\n boolean wystapilaZmiana = false;\n\n String temp = \"\";\n String nazwaTablicy = \"\";\n String trescSet = \"\";\n String warunek = \"\";\n\n // UPDATE SYNTAX CHECKER\n for (int i = 0; i < zbiorSymboli.length; i++) {\n // ; - wyjscie\n if (i == zbiorSymboli.length - 1 || zbiorSymboli[i] == ';') {\n if (zbiorSymboli[i] != ';')\n throw new Exception(\"Oczekiwano ';'\");\n else {\n // to średnik ; i jest sens sprawdzac\n if (wystapilSET == true & wystapilWHERE == true) {\n if (temp.matches(\".*[a-z].*\")) {\n // tu jest caly ten WHERE condition\n warunek = temp; // bez srednika, bo na srednik sprawdzasz ta czesc kodu\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz warunek\");\n }\n // sam SET columna0 = wartosc0 , columna1 = wartosc1\n if (wystapilaNazwaTablicy == true) {\n if (temp.contains(\"=\") == true && temp.length() > 2) {\n wystapilyKolumnaWartosc = true;\n trescSet = temp; // bez srednika\n wystapilaZmiana = true;\n break;\n } else\n throw new Exception(\"Wprowadz 'SET kolumna0 = wartosc0;'\");\n }\n }\n }\n\n if (temp.contains(\" SET\")) {\n if (wystapilSET == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie SET!\");\n wystapilSET = true;\n nazwaTablicy = temp.substring(0, temp.length() - 4);\n if (nazwaTablicy.matches(\".*[a-z].*\")) {\n wystapilaNazwaTablicy = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Nazwa tablicy nie zawiera liter\");\n }\n\n if (temp.contains(\" WHERE\")) {\n if (wystapilWHERE == true)\n throw new Exception(\"Błąd składni, dwukrotne wystąpienie WHERE!\");\n\n wystapilWHERE = true;\n trescSet = temp.substring(0, temp.length() - 6);\n if (temp.contains(\"=\") == true && temp.length() > 2) {\n wystapilyKolumnaWartosc = true;\n temp = \"\";\n continue;\n } else\n throw new Exception(\"Brak 'SET columna = value;'\");\n }\n\n temp += zbiorSymboli[i];\n }\n\n if (wystapilaZmiana == false)\n throw new Exception(\"Błąd składni!\");\n\n // TODO: odkomentuj to potem, to ponizej...\n // if (czyIstniejeTabela(nazwaTablicy) == false)\n // throw new Exception(\"Nie ma takiej tablicy\");\n\n // jest jakas skladnia ^^ porazka\n nazwaTablicy = nazwaTablicy.replaceAll(\" \", \"\");\n\n String[] setKolumnaWartosc = trescSet.replaceAll(\" \", \"\").split(\",\");\n String[] warunekKolumnaWartosc = warunek.replaceAll(\" \", \"\").split(\"=\");\n\n temp = \"\";\n\n for (String string : setKolumnaWartosc) {\n if (string.contains(\"=\") == false)\n throw new Exception(\"Błąd składni, miało być 'SET kolumna = wartosc'\");\n }\n\n if (warunekKolumnaWartosc.length < 2) {\n ;\n }\n\n //TODO: tu gdzies skonczylem, denerwuje sie zbednie\n\n return this.zbiorTabel;\n }", "@Override\r\n public void onSuccess(JSONArray result)\r\n {\r\n dataBase.updateAllProgramsToTable(result);\r\n }", "@Override\n public void execute(DelegateExecution delegateExecution) throws Exception {\n JsonValue candidate = delegateExecution.getVariableTyped(\"new_candidate\");\n Integer candidate_id = (Integer) delegateExecution.getVariable(\"candidate_id\");\n\n // Convert birthdate\n String s_birth_date = candidate.getValue().prop(\"birth_date\").stringValue();\n java.util.Date util_birth_date = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(s_birth_date);\n java.sql.Date birth_date = new java.sql.Date(util_birth_date.getTime());\n\n // Prepare Update Statement\n String candidate_update =\n \"UPDATE Candidate SET \" +\n //\"first_name = \\'\" + candidate.getValue().prop(\"first_name\").stringValue() + \"\\', \" +\n //\"last_name = \\'\" + candidate.getValue().prop(\"last_name\").stringValue() + \"\\', \" +\n \"sex = \\'\" + candidate.getValue().prop(\"sex\").stringValue() + \"\\', \" +\n \"email = \\'\" + candidate.getValue().prop(\"email\").stringValue() + \"\\', \" +\n \"title = \\'\" + candidate.getValue().prop(\"title\").stringValue() + \"\\', \" +\n \"address = \\'\" + candidate.getValue().prop(\"address\").stringValue() + \"\\' \" +\n //\"birth_date = \\'\" + birth_date + \"\\' \" +\n \"WHERE candidate_id = \" + candidate_id;\n\n Connection con = DriverManager.getConnection(\"jdbc:h2:./camunda-db\", \"sa\", \"sa\");\n PreparedStatement statement = con.prepareStatement(candidate_update);\n Integer index = statement.executeUpdate();\n\n // Index = Updated PK id\n System.out.println(index);\n\n // insert new application to db\n String application_insert = \"INSERT INTO Application ( CA_AP_FK, FK_job_Opening_Id) VALUES (?,?)\";\n PreparedStatement statement_application = con.prepareStatement(application_insert, Statement.RETURN_GENERATED_KEYS);\n statement_application.setInt(1, candidate_id);\n statement_application.setInt(2, (Integer) delegateExecution.getVariable(\"openingId\"));\n statement_application.executeUpdate();\n ResultSet rs_application = statement_application.getGeneratedKeys();\n\n if (rs_application.next()){\n // set process variable required for next step\n delegateExecution.setVariable(\"applications_received\", true);\n delegateExecution.setVariable(\"candidate_email\", \"wplacmrecruiting@gmail.com\");\n delegateExecution.setVariable(\"candidate_confirmation_text\", \"hello this is a test\");\n\n // add application to collection\n String application = \"{\\\"application_id\\\" : \\\"\" + rs_application.getInt(1) + \"\\\",\"\n + \"\\\"candidate_id\\\" : \\\"\" + candidate_id + \"\\\",\"\n + \"\\\"first_name\\\" : \\\"\" + candidate.getValue().prop(\"first_name\").stringValue() + \"\\\",\"\n + \"\\\"last_name\\\" : \\\"\" + candidate.getValue().prop(\"last_name\").stringValue() + \"\\\",\"\n + \"\\\"cv\\\" : \\\"\" + \"cv link\" + \"\\\"\"\n + \"}\";\n\n System.out.println(application);\n SpinJsonNode application_json = JSON(application);\n\n JsonValueImpl collApplication = (JsonValueImpl) delegateExecution.getVariableTyped(\"collectedApplications\");\n\n SpinJsonNode application_collection = JSON(collApplication.getValueSerialized());\n\n if (!application_collection.hasProp(\"applications\")){\n application_collection.prop(\"applications\", application_json);\n }\n else{\n application_collection.prop(\"applications\").append(application_json);\n }\n delegateExecution.setVariable(\"collectedApplications\", application_collection);\n }\n else {\n //error\n }\n }", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_json_format(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_format_json);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"Cool setpoint cannot be null.\")); \n Assert.assertTrue(content.contains(\"40006\"));\n Assert.assertTrue(content.contains(\"End timestamp cannot be null.\")); \n Assert.assertTrue(content.contains(\"40009\")); \n Assert.assertTrue(content.contains(\"Heat setpoint cannot be null.\"));\n Assert.assertTrue(content.contains(\"40007\"));\n\n }", "@Test\r\n public void testUpdate() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n PodamFactory pf = new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity = pf.manufacturePojo(MonitoriaEntity.class);\r\n nuevaEntity.setId(entity.getId());\r\n persistence.update(nuevaEntity);\r\n// Assert.assertEquals(nuevaEntity.getName(), resp.getName());\r\n }", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}", "@Test\n\tvoid testUpdatePlant() {\n\t\tPlant plant = service.updatePlant(new Plant( 8.0, \"Lemon\", \"Antihairfall\", 22.0, 5, 170.0, \"shurb\"));\n\t\tassertEquals(170.0, plant.getCost());\n\t}", "private void WriteFallToDatabase(String uuid, String latitude, String longitude) {\n\n // Create the JSON Object and the request queue to add it to\n JSONObject jsonData = new JSONObject();\n try{\n jsonData.put(\"hi\", latitude);\n jsonData.put(\"bye\", longitude);\n\n }catch (JSONException e){\n e.printStackTrace();\n }\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n JSONObject jsonBodyObj = new JSONObject();\n\n // Specify URL to send the request to\n String url = \"http://81.109.61.10/manage\";\n try{\n jsonBodyObj.put(\"action\", \"insert_fall\");\n jsonBodyObj.put(\"uuid\", uuid);\n jsonBodyObj.put(\"timestamp\", getTimestamp());\n jsonBodyObj.put(\"data\", jsonData);\n }catch (JSONException e){\n e.printStackTrace();\n }\n\n final String requestBody = jsonBodyObj.toString();\n\n // Send POST request to the script\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST,\n url, null, new Response.Listener<JSONObject>(){\n\n @Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Fall data saved to online database\",Toast.LENGTH_SHORT).show();\n }\n\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(\"Error: \", error.getMessage());\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }\n\n\n @Override public byte[] getBody() {\n byte[] bytes = requestBody.getBytes();\n return bytes;\n }\n };\n\n // Add request to the queue\n requestQueue.add(jsonObjectRequest);\n }", "@Test\r\n\tpublic void test_updateEmployeeDetail() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t.queryParam(\"id\", \"2\")//\r\n\t\t\t\t.body(new EmployeeDto(2L, \"sunil\", \"changed\", \"sunil.changed@gmail.com\"))//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.put(\"/api/v1/employee\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"id\", equalTo(2))//\r\n\t\t\t\t.body(\"firstName\", equalTo(\"sunil\"))//\r\n\t\t\t\t.body(\"lastName\", equalTo(\"changed\"))//\r\n\t\t\t\t.body(\"emailId\", equalTo(\"sunil.changed@gmail.com\"));\r\n\r\n\t}", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "public void updateSwarm();", "void updateWarehouseDepot(String username, LightWarehouseDepot warehouseDepot);", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "protected void updateLocalData(Building[] data){\n new DBHandler(cx).updateBuildings(data);\n }", "public void update(Employee e) {\n\t\t\r\n\t}", "public void updateByEntity(Paciente paciente) {\n\t\n}", "public HrJBorrowcontract update(HrJBorrowcontract entity);", "public static void updateApiDetails(final int envId, String compName, int numOfApi, String platform){\n\t\tfinal int compId = getComponentIdFromCompName(compName);\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; is not available in the DB\");\n\t\t\treturn;\n\t\t}\n\t\tString updateApiStsQry = null;\n\t\tif(platform.equalsIgnoreCase(\"Mesos\")){\n\t\t\tupdateApiStsQry = HQLConstants.UPDATE_API_DETAILS;\n\t\t}else if(platform.equalsIgnoreCase(\"K8s\")){\n\t\t\tupdateApiStsQry = HQLConstants.UPDATE_K8S_API_DETAILS;\n\t\t}\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(updateApiStsQry);\n\t\tquery.setInteger(\"numOfApi\", numOfApi);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"environmentId\", envId);\n\t\tquery.setDate(\"stsDate\", todayDate);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@Test\r\n void testUpdateMedicine() throws Exception{\r\n\r\n String URI = \"/medicine/update/{medicineId}\";\r\n Medicine medicine = new Medicine();\r\n\t\tmedicine.setMedicineId(134);\r\n\t\tmedicine.setMedicineName(\"crosin\");\r\n\t\tmedicine.setMedicineCost(200);\r\n\t\t\r\n\t\tString jsonInput = this.converttoJson(medicine);\r\n Mockito.when(medicineService.updateMedicineById(Mockito.any(),Mockito.anyString())).thenReturn(medicine);\r\n MvcResult mvcResult = this.mockMvc.perform(MockMvcRequestBuilders.put(URI ,105).accept(MediaType.APPLICATION_JSON).content(jsonInput).contentType(MediaType.APPLICATION_JSON)).andReturn();\r\n MockHttpServletResponse mockHttpServletResponse = mvcResult.getResponse();\r\n String jsonOutput = mockHttpServletResponse.getContentAsString();\r\n assertNotNull(jsonOutput);\r\n }", "private void updateEISAndEAS(){\n eas.registerPayment(paymentDTO);\n eis.updateInventory(saleDTO);\n }", "int updateByPrimaryKeySelective(ec_environment record);", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "public static void updateContainerDetails(final int envId, String compName, int numOfcont, String parentCompName, String platform){\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tfinal int compId = getComponentId(compName, parentCompName);\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; Parent Component Name = \" + parentCompName + \"; is not available in the DB\");\n\t\t\treturn;\n\t\t}\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tString updateApiStsQry = null;\n\t\tif(platform.equalsIgnoreCase(\"Mesos\")){\n\t\t\tupdateApiStsQry = HQLConstants.UPDATE_CONTAINER_DETAILS;\n\t\t}\n\t\tQuery query = session.createQuery(updateApiStsQry);\n\t\tquery.setInteger(\"numOfContainers\", numOfcont);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"environmentId\", envId);\n\t\tquery.setDate(\"stsDate\", todayDate);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@Test\n public void updateViajeroTest() {\n ViajeroEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n ViajeroEntity newEntity = factory.manufacturePojo(ViajeroEntity.class);\n\n newEntity.setId(entity.getId());\n\n vp.update(newEntity);\n\n ViajeroEntity resp = em.find(ViajeroEntity.class, entity.getId());\n\n Assert.assertEquals(newEntity.getId(), resp.getId());\n }", "public static void updateObjPodss(int environmentId, String objName, ArrayList<Integer> podContList){\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tString updateApiStsQry = null;\n\t\tupdateApiStsQry = HQLConstants.UPDATE_K8S_OBJECT_PODS;\n\t\t\n\t\tQuery query = session.createQuery(updateApiStsQry);\n\t\tquery.setInteger(\"pods\", podContList.get(0));\n\t\tquery.setInteger(\"containers\", podContList.get(1));\n\t\tquery.setString(\"objName\", objName);\n\t\tquery.setLong(\"environmentId\", environmentId);\n\t\tquery.setDate(\"stsDate\", todayDate);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@Test\n @IfProfileValue(name=\"dept-test-group\", values = {\"all\",\"dept-update\"})\n public void _2_4_1_updateExistDept() throws Exception {\n Department d = d_1;\n d.setDescription(\"修改部门1描述\");\n this.mockMvc.perform(put(\"/api/v1.0/companies/\"+\n d.getCompany()+\n \"/departments/\"+\n d.getId())\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(d)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(d.getId().toString())))\n .andExpect(jsonPath(\"$.description\",is(d.getDescription())));\n }", "@Test\r\n\tpublic void updateProductDetails() {\r\n\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Banana\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.put(\"/5\");\r\n\t\tSystem.out.println(\"Update Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "@PutMapping(\"/employees/{employeeId}\")\r\n\tpublic Employee updateEmployee(@RequestBody Employee theEmployee) {\r\n\t\t\r\n\t\t\temployeeService.saveEmployee(theEmployee);\r\n\t\t\r\n\t\treturn theEmployee;\r\n\t}", "public void update(String json) {\n\t\t\tJSONObject line;\n\t\t\ttry {\n\t\t\t\t// \"GameServer\":{\"graph\":\"A0\",\"pokemons\":3,\"agents\":1}}\n\t\t\t\tline = new JSONObject(json);\n\t\t\t\tJSONObject agent = line.getJSONObject(\"Agent\");\n\t\t\t\tint id = agent.getInt(\"id\");\n\t\t\t\tif(id==this.getID() || this.getID() == -1) {\n\t\t\t\t\tif(this.getID() == -1) {\n\t\t\t\t\t\tthis.id = id;}\n\t\t\t\t\tdouble speed = agent.getDouble(\"speed\");\n\t\t\t\t\tString p = agent.getString(\"pos\");\n\t\t\t\t\tPoint3D pp= new Point3D(p);\n\t\t\t\t\tint src = agent.getInt(\"src\");\n\t\t\t\t\tint dest = agent.getInt(\"dest\");\n\t\t\t\t\tdouble value = agent.getDouble(\"value\");\n\t\t\t\t\tthis.pos = pp;\n\t\t\t\t\tthis.setCurrNode(src);\n\t\t\t\t\tthis.setSpeed(speed);\n\t\t\t\t\tthis.setNextNode(dest);\n\t\t\t\t\tthis.setValue(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "void update(EmployeeDetail detail) throws DBException;", "@Test\n public void testUpdatePharmacy() throws Exception {\n System.out.println(\"updatePharmacy\");\n\n //Null test\n PharmacyDTO pharmacy = null;\n ManagePharmaciesController instance = new ManagePharmaciesController();\n PharmacyDTO expResult = null;\n PharmacyDTO result = instance.updatePharmacy(pharmacy);\n Assertions.assertEquals(expResult, result);\n\n //Value test\n instance = new ManagePharmaciesController();\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n PharmacyDTO update = getPharmacyDTOTest(\"teste1\");\n Pharmacy returnedP = convertPharmacyDTO(update);\n when(db.updatePharmacy(any(Pharmacy.class))).thenReturn(returnedP);\n Assertions.assertEquals(instance.updatePharmacy(update).getName(), update.getName());\n Assertions.assertEquals(instance.updatePharmacy(update).getId(), update.getId());\n \n when(db.updatePharmacy(any(Pharmacy.class))).thenReturn(null);\n Assertions.assertNull(instance.updatePharmacy(update));\n }", "public static void main(String[] args) {\n\t\tRestAssured.baseURI=\"https://rahulshettyacademy.com\";\n\t\tString response=given().log().all().queryParam(\"key\",\"qaclick123\").header(\"Content-Type\",\"application/json\")\n\t\t.body(Paylod.Addplace()).when().post(\"maps/api/place/add/json\")\n\t\t.then().assertThat().statusCode(200).body(\"scope\", equalTo(\"APP\")).\n\t\theader(\"Server\",\"Apache/2.4.18 (Ubuntu)\").extract().response().asString();\n\t\t\n\t\tSystem.out.println(response);\n\t\tJsonPath jsonparse =jsonParsing.inputToJson(response);\n\t\t//JsonPath jsonparse = new JsonPath(response);\n\t\tString placeID=jsonparse.getString(\"place_id\");\n\t\tSystem.out.println(placeID);\n\t\tSystem.out.println(\"-----------------End of Add API Test----------------------------------------\");\n\t\t\n//update the place added with new address - automation PUT (update place) API\n\t\t\n\t\t\n\t\tString newAddress = \"170 IndraNagar,IND\";\n\n\t\tgiven().log().all().queryParam(\"key\", \"qaclick123\").header(\"Content-Type\",\"application/json\")\n\t\t.body(\"{\\r\\n\" + \n\t\t\t\t\"\\\"place_id\\\":\\\"\"+placeID+\"\\\",\\r\\n\" + \n\t\t\t\t\"\\\"address\\\":\\\"\"+newAddress+\"\\\",\\r\\n\" + \n\t\t\t\t\"\\\"key\\\":\\\"qaclick123\\\"\\r\\n\" + \n\t\t\t\t\"}\\r\\n\" + \"\").when().put(\"maps/api/place/update/json\")\n\t\t.then().log().all().assertThat().statusCode(200).body(\"msg\", equalTo(\"Address successfully updated\"));\n\t\tSystem.out.println(\"-----------------End of Update API Test----------------------------------------\");\n\t\t\n\t\t// GetAPI to get the place to see if new address is added to the Place\n\t\tString newPlace=given().log().all().queryParam(\"key\", \"qaclick123\").queryParam(\"place_id\", placeID)\n\t\t.when().get(\"/maps/api/place/get/json\")\n\t\t.then().log().all().assertThat().statusCode(200).extract().response().asString();\n\t\t\n\t\t\n\t\tJsonPath jsparse =jsonParsing.inputToJson(newPlace);\n\t\t//JsonPath jsparse = new JsonPath(newPlace);\n\t\tString actualAddress=jsparse.getString(\"address\");\n\t\tSystem.out.println(actualAddress);\n\t\t//cucumber junit , testng testing framework - to add assertions -we have to use one of this frmwork,\n\t\t//since in java we do not have such assertion scenarios\n\t\tAssert.assertEquals(actualAddress,newAddress);\n\t\t\n\t\t\n\t\t\n\t}", "public static List<EnvironmentVO> getAllEnvironments() throws SQLException {\n\t\tArrayList<EnvironmentVO> environmentVOs = new ArrayList<EnvironmentVO>();\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCriteria = session.createCriteria(EnvironmentEntity.class);\n\t\tenvCriteria.add(Restrictions.eq(\"envLock\", 0));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvironmentEntity> environmentEntities = envCriteria.list();\n\t\tfor(EnvironmentEntity entity : environmentEntities) {\n\t\t\tEnvironmentVO enVo = new EnvironmentVO();\n\t\t\tenVo.setEnvironmentId(entity.getEnvironmentId());\n\t\t\tenVo.setEnvironmentName(entity.getEnvironmentName());\n\t\t\tenVo.setMarathonUrl(entity.getMarathonURL());\n\t\t\tenVo.setMarathonCred(entity.getMarathonCred());\n\t\t\tif(entity.getMarathonJson()!=null){\n\t\t\t\tbyte[] data = entity.getMarathonJson().getBytes(1, (int) entity.getMarathonJson().length());\n\t\t\t\tenVo.setMarathonJson(new String(data));\n\t\t\t}\n\t\t\tenVo.setEastMarathonUrl(entity.getEastMarathonURL());\n\t\t\tif(entity.getEastMarathonJson()!=null){\n\t\t\t\tbyte[] data = entity.getEastMarathonJson().getBytes(1, (int) entity.getEastMarathonJson().length());\n\t\t\t\tenVo.setEastMarathonJson(new String(data));\n\t\t\t}\n\t\t\tenVo.setK8sUrl(entity.getK8sUrl());\n\t\t\tenVo.setK8sCred(entity.getK8sCred());\n\t\t\tenVo.setK8sTpsQuery(entity.getK8sTpsQuery());\n\t\t\tenVo.setK8sLatencyQuery(entity.getK8sLatencyQuery());\n\t\t\tenVo.setMesosTpsQuery(entity.getMesosTpsQuery());\n\t\t\tenVo.setMesosLatencyQuery(entity.getMesosLatencyQuery());\n\t\t\tenvironmentVOs.add(enVo);\n\t\t}\n\t\ttxn.commit();\n\t\treturn environmentVOs;\n\t}", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "void addPlaceAPI() {\n RestAssured.baseURI = \"https://rahulshettyacademy.com/\";\n String response = given().log().all().queryParam(\"key\",\"qaclick123\")\n .header(\"Content-Type\",\"application/json\")\n\n .body(Payloads.addPlaceJson())\n .when().post(\"maps/api/place/add/json\")\n .then().log().all().assertThat().statusCode(200).body(\"scope\",equalTo(\"APP\"))\n .header(\"server\",\"Apache/2.4.18 (Ubuntu)\").extract().response().asString();\n System.out.println(\"the response is\" + response );\n JsonPath jsonpath = new JsonPath(response); // for parsing the json body/payload\n String OriginalpalaceId = jsonpath.getString(\"place_id\");\n System.out.println(\"the place id is\" + OriginalpalaceId );\n\n // update the address using original place id\n\n String updateResponse = given().log().all().queryParam(\"key\",\"qaclick123\")\n .header(\"Content-Type\",\"application/json\")\n .body(\"{\\n\" +\n \"\\\"place_id\\\":\\\"\"+ OriginalpalaceId + \"\\\",\\n\" +\n \"\\\"address\\\":\\\"70 Summer walk, USA\\\",\\n\" +\n \"\\\"key\\\":\\\"qaclick123\\\"\\n\" +\n \"}\")\n .when().put(\"maps/api/place/update/json\")\n .then().log().all().assertThat().statusCode(200).body(\"msg\",equalTo(\"Address successfully updated\"))\n .extract().response().asString();\n jsonpath = null;\n jsonpath = new JsonPath(updateResponse);\n String msg = jsonpath.getString(\"msg\");\n System.out.println(\"the successful msg is \" + msg );\n\n // now getPlace API call to get the updated Place Id\n\n String getResponse = given().log().all().queryParam(\"key\",\"qaclick123\")\n .queryParam(\"place_id\",OriginalpalaceId)\n .when().get(\"maps/api/place/get/json\")\n .then().log().all().assertThat().statusCode(200).extract().response().asString();\n\n jsonpath = null;\n jsonpath = new JsonPath(getResponse);\n System.out.println(jsonpath.getString(\"address\"));\n System.out.println(\"the response of the get API method \"+ getResponse);\n\n Assert.assertEquals(jsonpath.getString(\"address\"),\"70 Summer walk, USA\",\"Address not matched\" );\n\n }", "public void updateRoomChanges_DB() throws SQLException{\n \n //update all rooms\n for(int i=0;i<roomCounter;i++){\n String sqlstmt = \"UPDATE \\\"APP\\\".\\\"HOTELROOMS\\\" \"\n + \"SET ISAVAILABLE = \"+myHotel[i].getStatus()\n + \", OCCUPANT = '\" + myHotel[i].getOccupant()\n + \"', GUESTID = \" + myHotel[i].getOccupantID()\n + \" , STARTDATE = '\"+ myHotel[i].getStartDate()\n + \"', ENDDATE = '\"+ myHotel[i].getEndDate()\n + \"' WHERE ROOMNUMBER = \" + myHotel[i].getRoomNum();\n \n cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n }\n \n }", "private void adjustPlanetData()\n\t{\n\t\t//variables for function\n\t\tdouble meanAnomalyEarth;\n\t\tdouble helioLongEarth;\n\t\tdouble trueAnomalyEarth;\n\t\tdouble radiusVectorEarth;\n\t\tdouble meanAnomalyPlanet;\n\t\tdouble helioLongPlanet;\n\t\tdouble trueAnomalyPlanet;\n\t\tdouble radiusVectorPlanet;\n\t\tdouble geoLongPlanet;\n\t\tdouble declinationPlanet;\n\t\tdouble rightAscensionPlanet;\n\t\tdouble hourAnglePlanet;\n\t\tPlanet planet;\n\t\tdouble days;\n\t\tdouble n;\n\t\t\n\t\t//find number of days since epoch\n\t\tdays = ((userYear - 1990)* 365.25) + userDecimalDay + ((userMonth - 1) * 30);\n\t\t\n\t\t//normalize the number of days to the orbital period of the planet\n\t\tn = theCalculator.findN(earth.getOrbitalPeriod(), days);\n\t\t\t\t\n\t\t//calculate Mean Anomaly of earth\n\t\tmeanAnomalyEarth = theCalculator.findMeanAnomaly(earth, n);\n\t\t\n\t\t//calculate heliocentric longitude of earth\n\t\thelioLongEarth = theCalculator.findHeliocentricLongitude(earth, meanAnomalyEarth, n);\n\t\t\n\t\t//calculate true anomaly of earth\n\t\ttrueAnomalyEarth = theCalculator.findTrueAnomaly(earth, helioLongEarth);\n\t\t\n\t\t//calculate radius vector length for earth \n\t\tradiusVectorEarth = theCalculator.findVectorRadius(earth, trueAnomalyEarth);\n\t\t\n\t\t//for each planet except earth\n\t\tfor(int i = 0; i < planetList.size(); i++)\n\t\t{\n\t\t\t//get the Planet\n\t\t\tplanet = planetList.get(i);\n\t\t\t\n\t\t\t//normalize days\n\t\t\tn = theCalculator.findN(planet.getOrbitalPeriod(), days);\n\t\t\t\n\t\t\t//calculate mean anomaly\n\t\t\tmeanAnomalyPlanet = theCalculator.findMeanAnomaly(planet, n);\n\t\t\t\n\t\t\t//calculate heliocentric longitude\n\t\t\thelioLongPlanet = theCalculator.findHeliocentricLongitude(planet, meanAnomalyPlanet, n);\n\t\t\t\n\t\t\t//calculate true anomaly\n\t\t\ttrueAnomalyPlanet = theCalculator.findTrueAnomaly(planet, helioLongPlanet);\n\t\t\t\n\t\t\t//calculate radius vector length\n\t\t\tradiusVectorPlanet = theCalculator.findVectorRadius(planet, trueAnomalyPlanet);\n\t\t\t\t\t\t\n\t\t\t//calculate geocentric longitude\n\t\t\tString name = planet.getName();\n\t\t\tgeoLongPlanet = theCalculator.findGeocentricLongitude(name, radiusVectorPlanet, helioLongPlanet, radiusVectorEarth, helioLongEarth);\n\t\t\t\n\t\t\t//calculate and set declination \n\t\t\tdeclinationPlanet = theCalculator.findPlanetDeclination(planet.getMeanLongitude(), 0.0, geoLongPlanet);\n\t\t\tplanet.setDeclination(declinationPlanet);\n\t\t\t\n\t\t\t//calculate and set right ascension\n\t\t\trightAscensionPlanet = theCalculator.findPlanetRightAscension(planet.getMeanLongitude(), 0.0, geoLongPlanet);\n\t\t\tplanet.setRightAscension(rightAscensionPlanet);\n\t\t\t\n\t\t\t//calculate and set hour angle\n\t\t\thourAnglePlanet = theCalculator.findHourAngle(rightAscensionPlanet, userLocalTime);\n\t\t\tplanet.setHourAngle(hourAnglePlanet);\n\t\t\t\n\t\t\t//update planetList\n\t\t\tplanetList.set(i, planet);\n\t\t}\n\t}", "@Override\n\tpublic void updateApartment(ApartmentDetailsBean aptUpdated) {\n\t\tString query = \"update Apartments set depositAmt=?,rent=?,utilities=?,area=?,street=?,city=?,doorNo=?,no_of_rooms=?,type_bathroom=?,flooring=? where apartmentId=?\";\n\t\tResultSet rs=null;\n\t\tPreparedStatement pstmt;\n\t\ttry {\n\t\t\tpstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, aptUpdated.getDepositAmt());\n\t\t\tpstmt.setInt(2, aptUpdated.getRent());\n\t\t\t//pstmt.setDate(4, aptUpdated);\n\t\t\tpstmt.setString(3, aptUpdated.getUtilities());\n\t\t\tpstmt.setString(4, aptUpdated.getArea());\n\t\t\tpstmt.setString(5, aptUpdated.getStreet());\n\t\t\tpstmt.setString(7, aptUpdated.getDoorNo());\n\t\t\tpstmt.setString(6, aptUpdated.getCity());\n\t\t\tpstmt.setInt(8, aptUpdated.getno_of_rooms());\n\t\t\tpstmt.setString(9, aptUpdated.getType_bathroom());\n\t\t\tpstmt.setString(10, aptUpdated.getFlooring());\n\t\t\tpstmt.setInt(11, aptUpdated.getApartmentId());\n\t\t\tpstmt.executeUpdate();\n\t\t\t\n\t\t}catch(SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Weather update(Long id, WeatherInformation weatherInformation);", "Table8 update(Table8 table8) throws EntityNotFoundException;", "@PutMapping(\"/Mensajeros/actualizar/{id}\")\r\npublic Mensajeros update(@RequestBody Mensajeros ms, @PathVariable(\"id\") Long id) {\r\n\tMensajeros oldM = mService.buscarM_Id(id);\r\n\tString nombreM = ms.getNombreM();\r\n\toldM.setNombreM(nombreM);\r\n\tString cedulaM = ms.getCedulaM();\r\n\toldM.setCedulaM(cedulaM);\r\n\tString celularM = ms.getCelularM();\r\n\toldM.setCelularM(celularM);\r\n\tString placa = ms.getPlaca();\r\n\toldM.setPlaca(placa);\r\n\tString direccionM = ms.getDireccionM();\r\n\toldM.setDireccionM(direccionM);\r\n\treturn mService.actualizarM(oldM);\r\n}", "public static void UpdateLocation(Location location){\n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT City, AirportCode from Location WHERE AirportCode = '\" + location.getAirportCode() + \"'\")){\n \n resultSet.absolute(1);\n resultSet.updateString(\"City\", location.getCity());\n resultSet.updateString(\"AirportCode\", location.getAirportCode());\n resultSet.updateRow();\n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n }", "private ServerError updateDatabase() {\n return updateDatabase(WebConf.DB_CONN, WebConf.JSON_OBJECTS, WebConf.DEFAULT_VERSION);\r\n }", "public void updateEnvironment(Context context, JSONObject post) {\n try {\n post.put(Jsonkey.Environment.getKey(), isPackageInstalled(context) ? Jsonkey.NativeApp.getKey() : Jsonkey.InstantApp.getKey());\n } catch (Exception e) {\n }\n }", "public void updateForecast(String date){\n\n forecast_repository.updateForecast(date);\n }", "@Override\n\tpublic void update(EmpType entity) {\n\t\t\n\t}", "@PutMapping(\"/UpdateHR/{hrId}\")\r\n public String updateHR(@RequestBody HR hr, @PathVariable String hrId) {\r\n return admin.updateHRService(hr, hrId);\r\n }", "E update(E entiry);", "public void updateEmp(Emp emp) {\n\t\t\n\t}", "@PutMapping(\"/locations\")\n public Location updateLocation(@RequestBody Location location){\n\n service.saveItem(location);\n\n return location;\n }", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "public static void updateAppointments(Appointment PlaceholderAppointment) {\n String sql = \"UPDATE appointments SET Title =?, Description=?, Location=?, Type=?, start=?, end=?, Customer_ID=?, User_ID=?, Contact_ID=? WHERE Appointment_ID = ?\";\n\n try {\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n ps.setString(1, PlaceholderAppointment.getTitle());\n ps.setString(2, PlaceholderAppointment.getDescription());\n ps.setString(3, PlaceholderAppointment.getLocation());\n ps.setString(4, PlaceholderAppointment.getType());\n LocalDateTime start = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getStartTime());\n start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n LocalDateTime end = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getEndTime());\n end = WashTimeZone(end, ZoneId.systemDefault(), ZoneId.of(\"UTC\"));\n Timestamp Tstart = Timestamp.valueOf(start);\n Timestamp Tend = Timestamp.valueOf(end);\n ps.setTimestamp(5, Tstart);\n ps.setTimestamp(6, Tend);\n//timezone work needs to happen here\n\n ps.setInt(7, PlaceholderAppointment.getCustomerid());\n ps.setInt(8, PlaceholderAppointment.getUserid());\n ps.setInt(9, PlaceholderAppointment.getContactid());\n ps.setInt(10, PlaceholderAppointment.getAppointment_ID());\n ps.execute();\n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n }", "void updateStation() {\n\n // only do this if the station did not exist ????\n if ((!stationExists || stationUpdated)\n && !\"\".equals(station.getStationId(\"\")) &&\n station.getMaxSpldep()!= Tables.FLOATNULL) { // for sediments\n\n MrnStation updStation = new MrnStation();\n updStation.setMaxSpldep(station.getMaxSpldep());\n\n MrnStation whereStation =\n new MrnStation(station.getStationId());\n\n try {\n whereStation.upd(updStation);\n } catch(Exception e) {\n System.err.println(\"updateStation: upd whereStation = \" + whereStation);\n System.err.println(\"updateStation: upd updStation = \" + updStation);\n System.err.println(\"updateStation: upd sql = \" + whereStation.getUpdStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>updateStation: upd whereStation = \" + whereStation);\n if (dbg3) System.out.println(\"<br>updateStation: upd updStation = \" + updStation);\n //if (dbg3) System.out.println(\"<br>updateStation: sql = \" + whereStation.getUpdStr());\n\n } // if (!stationExists)\n\n // commit this station's data - for stations with many depths\n common2.DbAccessC.commit(); //ub04\n\n }", "public void markDestroyed() {\n\t\tsetupResult = environmentStatus;\n\t\tenvironmentStatus = State.DESTROYED.name();\n\t\tdestroyedAt = System.currentTimeMillis();\n\t\tBasicDBObject updateQuery = new BasicDBObject(); \n\t\tBasicDBObject fieldSets = new BasicDBObject(); \n\t\tfieldSets.put(\"environmentStatus\", environmentStatus); \n\t\tfieldSets.put(\"destroyedAt\", destroyedAt); \n\t\tfieldSets.put(\"numDestroyed\", numDestroyed); \n\t\tfieldSets.put(\"destroyError\", destroyError); \n\t\tfieldSets.put(\"setupResult\", setupResult); \n\t\tupdateQuery.put( \"$set\", fieldSets); \n\t\tappendData(updateQuery);\n\t}", "public void update(TheatreMashup todo) {\n\t\t\n\t}", "public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;", "@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test(groups = \"his.wardadmission.test\", dependsOnMethods = { \"addWardTestCase\" })\n\tpublic void updateAdmissionBedNoTestCase() throws IOException, JSONException {\n\n\t\tJSONObject jsonRequestObject = new JSONObject(RequestUtil\n\t\t\t\t.requestByID(TestCaseConstants.UPDATE_ADMISSION_BED_NO));\n\t\t\n\t\tArrayList<String> resArrayList = getHTTPResponse(\n\t\t\t\tproperties\n\t\t\t\t\t\t.getProperty(TestCaseConstants.URL_APPEND_UPDATE_ADMISSION_BED_NO),\n\t\t\t\tTestCaseConstants.HTTP_PUT, jsonRequestObject.toString());\n\n\t\tSystem.out.println(\"message :\"+resArrayList.get(0));\n\n\t\tAssert.assertEquals(Integer.parseInt(resArrayList.get(1)),\n\t\t\t\tSUCCESS_STATUS_CODE);\n\t\t\n\t}", "@PutMapping(\"/products/{id}\")\r\n\tpublic Employee update(@RequestBody Employee employee, @PathVariable Integer id) {\r\n\t \r\n\t Employee exitEmployee= empService.get(id);\r\n\t empService.save(employee); \r\n\t return exitEmployee;\r\n\t}", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "public static void updateContainerDetails(final int envId, int compId, int numOfcont){\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.UPDATE_CONTAINER_DETAILS);\n\t\tquery.setInteger(\"numOfContainers\", numOfcont);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"environmentId\", envId);\n\t\tquery.setDate(\"stsDate\", todayDate);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "void update(Employee nurse);", "private void updateItem(JsonNode json) {\n }", "public void updateEmployeeDetails(EmployeeDetails employeeDetails);", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_using_over_max_coolsetpoint(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_over_max_coolsetpoint);\n System.out.println(\"result2\" + jsonString);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"15005\"));\n Assert.assertTrue(content.contains(\"Cool setpoint out of range.\"));\n\n }", "@Test\n public void updateTest12() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "JsonNode updateData(String data);", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_using_over_max_heatsetpoint(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_over_max_heatsetpoint);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"15004\"));\n Assert.assertTrue(content.contains(\"Heat setpoint out of range.\"));\n\n }", "public void updateDeviceAir(){\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.DATE, -1);\n\t\tDate date = calendar.getTime();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tString time = df.format(date);\n\t\t\n\t\tHashMap<String, Integer> insideMap = deviceStatusDao.getAverageInside(time + \"%\");\n\t\tHashMap<String, Integer> outsideMap = deviceStatusDao.getAverageOutside(time + \"%\");\n\t\t//pair device air & city air\n\t\tfor(String device_id : insideMap.keySet()){\n\t\t\tDeviceAir deviceAir = new DeviceAir();\n\t\t\tdeviceAir.setDeviceID(device_id);\n\t\t\tdeviceAir.setInsideAir(insideMap.get(device_id));\n\t\t\tif(!outsideMap.containsKey(device_id)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdeviceAir.setOutsideAir(outsideMap.get(device_id));\n\t\t\tdeviceAir.setDate(time);\n\t\t\tdeviceStatusDao.insertDeviceAir(deviceAir);\n\t\t}\n\t}", "@PutMapping(\"/containers\")\n\tpublic Container updateContainer(@RequestBody Container container) {\n\t\tcontainerDAO.save(container);\n\t\t\n\t\treturn container;\n\t\t//despite postman returning the updated data, i could not get mysql to reflect the changes\n\t\t//until i added @Transactional to the \"save\" method in the Service layer. \n\t\t//i did not have any issues adding a container prior to adding @transactional, however\n\t}", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_month_timestamp(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_month_timestamp);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"40004\"));\n Assert.assertTrue(content.contains(\"Invalid end time date format.\"));\n\n }", "@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_invalid_day_timestamp(final String username,\n final String password, final String thermostatId) throws IOException {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_day_timestamp);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"40004\"));\n Assert.assertTrue(content.contains(\"Invalid end time date format.\"));\n\n }", "@Override\n\tpublic int update_munti_config_nganluong(String json_nganluong_update)\n\t\t\tthrows InstantiationException, ClassNotFoundException, SQLException {\n\t\tGson gson= new Gson();\n\t\tList<AllcodeModel> list = gson.fromJson(json_nganluong_update, new TypeToken<List<AllcodeModel>>(){}.getType());\n\t\treturn allcode.update_munti_config_nganluong(list);\n\t}", "@Override\n\tpublic void update(Empleado e) {\n\t\tSystem.out.println(\"Actualiza el empleado \" + e + \" en la BBDD.\");\n\t}", "@Test(dataProvider = \"hvacSystems\", dataProviderClass = ApiDataProvider.class)\n public void test_setting_Away_Data_using_null_heatsetpoint(final String username,\n final String password, final String thermostatId) {\n\n client = ClientBuilder.newClient();\n final Invocation.Builder ib = client\n .target(apiConfig.get(AWAY_URL).replaceFirst(THERMOSTATID, thermostatId))\n .request(MediaType.APPLICATION_JSON).cookie(securityCookie);\n jsonString = apiConfig.get(ApiConfig.json_away_invalid_null_heatsetpoint);\n final Response response = ib.put(Entity.json(jsonString));\n String content = response.readEntity(String.class);\n setLogString(\"response :'\" + response + \"'\", true);\n Assert.assertTrue(content.contains(\"40007\"));\n Assert.assertTrue(content.contains(\"Heat setpoint cannot be null.\"));\n\n }", "@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "public void update(Employee employee){\n employeeRepository.save(employee);\n }", "void update(Env world) throws Exception;", "@Override\n @PUT\n @Consumes(\"application/json\")\n public Response updateCluster(String requestBody) throws Exception {\n if (log.isTraceEnabled()) {\n log.trace(String.format(\"updateCluster(ID=%d) started. Data: %s\", cluster.getClusterId(), requestBody));\n }\n\n EntityManager em = PersistenceUtils.getInstance().getEntityManager();\n try {\n JSONObject json = new JSONObject(requestBody);\n cluster.update(json);\n\n em.getTransaction().begin();\n em.merge(cluster);\n em.getTransaction().commit();\n return Response.status(Response.Status.NO_CONTENT).build();\n }\n catch (Exception e) {\n log.error(\"Update failed: \", e);\n throw new WebApplicationException(\n Response.status(Response.Status.BAD_REQUEST).\n entity(String.format(\"Update failed: %s.\", e.getMessage())).\n build()\n );\n }\n finally {\n PersistenceUtils.getInstance().closeEntityManager(em);\n }\n }", "@Test\n public void updateQuejaTest() {\n QuejaEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n\n newEntity.setId(entity.getId());\n\n quejaPersistence.update(newEntity);\n\n QuejaEntity resp = em.find(QuejaEntity.class, entity.getId());\n\n Assert.assertEquals(newEntity.getName(), resp.getName());\n }", "@RequestMapping(value = \"addUpdateArea\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n protected void addUpdateArea(HttpServletRequest request, HttpServletResponse response) throws Exception {\n String json = \"\";\n String resultado = \"\";\n Integer idDepManag = 0;\n Integer area = 0;\n Integer idRecord = 0;\n\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream(), \"UTF8\"));\n json = br.readLine();\n //Recuperando Json enviado desde el cliente\n JsonObject jsonpObject = new Gson().fromJson(json, JsonObject.class);\n\n if(jsonpObject.get(\"idDepManag\") != null && !jsonpObject.get(\"idDepManag\").getAsString().isEmpty() ) {\n idDepManag = jsonpObject.get(\"idDepManag\").getAsInt();\n }\n\n if (jsonpObject.get(\"area\") != null && !jsonpObject.get(\"area\").getAsString().isEmpty()) {\n area = jsonpObject.get(\"area\").getAsInt();\n }\n\n if (jsonpObject.get(\"idRecord\") != null && !jsonpObject.get(\"idRecord\").getAsString().isEmpty()) {\n idRecord = jsonpObject.get(\"idRecord\").getAsInt();\n }\n\n User usuario = seguridadService.getUsuario(seguridadService.obtenerNombreUsuario());\n\n if (idRecord == 0) {\n if (area != 0 && idDepManag!= 0) {\n\n //search record\n AreaDepartamento record = organizationChartService.getAreaDepRecord(idDepManag, area);\n\n if (record == null) {\n AreaDepartamento areaD = new AreaDepartamento();\n areaD.setFechaRegistro(new Timestamp(new Date().getTime()));\n areaD.setUsuarioRegistro(usuario);\n areaD.setDepDireccion(organizationChartService.getDepManagementById(idDepManag));\n areaD.setArea(areaService.getArea(area));\n areaD.setPasivo(false);\n organizationChartService.addOrUpdateArea(areaD);\n } else {\n resultado = messageSource.getMessage(\"msg.existing.record.error\", null, null);\n throw new Exception(resultado);\n }\n }\n } else {\n AreaDepartamento rec = organizationChartService.getAreaDepById(idRecord);\n if (rec != null) {\n rec.setPasivo(true);\n organizationChartService.addOrUpdateArea(rec);\n }\n }\n\n\n } catch (Exception ex) {\n logger.error(ex.getMessage(), ex);\n ex.printStackTrace();\n resultado = messageSource.getMessage(\"msg.add.area.error\", null, null);\n resultado = resultado + \". \\n \" + ex.getMessage();\n\n } finally {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idDepManag\", idDepManag.toString());\n map.put(\"mensaje\", resultado);\n map.put(\"idRecord\", \"\");\n map.put(\"area\", \"\");\n String jsonResponse = new Gson().toJson(map);\n response.getOutputStream().write(jsonResponse.getBytes());\n response.getOutputStream().close();\n }\n }", "@Test\r\n\tpublic void UpdatebookingTest()\r\n\t{\n\t\t\r\n\t\tResponse responsecreate = createBooking(); \r\n\t\tresponsecreate.print();\r\n\t\t//get bookingid of booking\r\n\t\tint bookingid=responsecreate.jsonPath().getInt(\"bookingid\");\r\n\t\t\r\n\t\t//update \r\n\t\t//\r\n\t\t\r\n\t\tJSONObject body=new JSONObject();\r\n\t\tbody.put(\"firstname\", \"Devaaa\");\r\n\t\tbody.put(\"lastname\", \"Dadhavjadhav\");\r\n\t\tbody.put(\"totalprice\", 125);\r\n\t\tbody.put(\"depositpaid\", false);\r\n\r\n \r\n\t\tJSONObject bookingdates=new JSONObject();\r\n\t\tbookingdates.put(\"checkin\", \"2021-08-16\");\r\n\t\tbookingdates.put(\"checkout\", \"2021-09-17\");\r\n\t\t\r\n\t\tbody.put(\"bookingdates\", bookingdates);\r\n\t\tbody.put(\"additionalneeds\", \"Breakfast\");\r\n\t\t\r\n\t\t// update booking //username and password add\r\n\r\n\t\tResponse responseUpdate=RestAssured.given().auth().preemptive().basic(\"admin\", \"password123\").contentType(ContentType.JSON)\r\n\t\t\t\t.body(body.toString()).put(\"https://restful-booker.herokuapp.com/booking/\"+ bookingid);\r\n\t\t\r\n\t\tresponseUpdate.print();\r\n\t\tresponseUpdate.getStatusCode();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t// verify response 200\r\n\t\tAssert.assertEquals(responseUpdate.getStatusCode(), 200);\r\n//\t\t\t//verify all field\r\n//\t\t\tSoftAssert softassert=new SoftAssert();\r\n//\t\t\t\r\n//\t\t\tString actualfirstname=response.jsonPath().getString(\"firstname\");\r\n//\t\t\tsoftassert.assertEquals(actualfirstname, \"deva\");\r\n//\t\t\t\r\n//\t\t\tString actuallastname=response.jsonPath().getString(\"lastname\");\r\n//\t\t\tsoftassert.assertEquals(actuallastname, \"jadhav\");\r\n//\t\t\t\r\n//\t\t\tint actualtotalprice=response.jsonPath().getInt(\"totalprice\");\r\n//\t\t\tsoftassert.assertEquals(actualtotalprice, 255);\r\n//\t\t\t\r\n//\t\t\tboolean actualdepositpaid=response.jsonPath().getBoolean(\"depositpaid\");\r\n//\t\t\tsoftassert.assertFalse(actualdepositpaid, \"false\");\r\n//\t\t\t \r\n//\t\t\tString actualcheckin=response.jsonPath().getString(\"bookingdates.checkin\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckin, \"2021-08-14\");\r\n//\t\t\t\r\n//\t\t\tString actualcheckout=response.jsonPath().getString(\"bookingdates.checkout\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckout, \"2021-09-07\");\r\n//\t\t\t\r\n//\t\t\tString actualadditionalneeds=response.jsonPath().getString(\"additionalneeds\");\r\n//\t\t\tsoftassert.assertEquals(actualadditionalneeds, \"c\");\r\n//\t\t\tsoftassert.assertAll();\r\n//\t\r\n\r\n}", "public void updateEntity();" ]
[ "0.71024144", "0.6522672", "0.5956367", "0.5611386", "0.55444586", "0.54469174", "0.54332846", "0.53963214", "0.52731246", "0.5262559", "0.5047643", "0.5016752", "0.49377498", "0.49245694", "0.49122235", "0.48492068", "0.48469448", "0.48466146", "0.48393622", "0.48314875", "0.48223418", "0.4814684", "0.48020098", "0.4795558", "0.47844446", "0.47834846", "0.4781628", "0.47748074", "0.47673428", "0.47662294", "0.4765775", "0.4757128", "0.47545248", "0.47506827", "0.47461414", "0.47449833", "0.47434333", "0.47352058", "0.4732214", "0.47308397", "0.47301105", "0.4718629", "0.47153476", "0.4707645", "0.4698484", "0.46916825", "0.4691515", "0.46754044", "0.4674414", "0.4671123", "0.4669861", "0.46669564", "0.46598604", "0.46575555", "0.46561173", "0.4655597", "0.46536258", "0.46486297", "0.46439838", "0.46322298", "0.46295506", "0.46284708", "0.4627814", "0.4626029", "0.46237323", "0.4623703", "0.46213713", "0.46200523", "0.4617215", "0.4617177", "0.46154606", "0.46127817", "0.46052438", "0.46027172", "0.46022257", "0.46007058", "0.4599592", "0.45989898", "0.4597338", "0.4594984", "0.4589607", "0.45887774", "0.45878556", "0.45856556", "0.4584598", "0.45805568", "0.45783633", "0.45750478", "0.45741996", "0.45725104", "0.4563364", "0.45631889", "0.45570782", "0.4550802", "0.45488265", "0.45438394", "0.45349953", "0.453056", "0.45300034", "0.45277882" ]
0.7457901
0
Checks the current Status and updates the comp_failure_log.
public static boolean checkAndUpdateMessage(final int componentId, final int environmentId, final long regionID,final HealthCheckType healthCheckType, final Status currentStatus, final String marathonMessage) { HealthCheckVO currentDBData = getCurrentHealthCheckDetails(componentId, environmentId,regionID,healthCheckType); if(currentDBData == null){ return false; } currentDBData.setStatus(new StatusVO(currentStatus, marathonMessage)); currentDBData.setHealthCheckComponentId((long)componentId); currentDBData.setHealthCheckRegionId(regionID); currentDBData.setHealthCheckRetryCurrentCount(1L); currentDBData.setHealthCheckRetryMaxCount(1L); return updateFilureLog(currentDBData, 6); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean updateFilureLog(final HealthCheckVO healthCheckVO, final long currentFailedCount) {\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\t\n\t\t//Update the failure log only if there is a status change\n\t\tif (status == healthCheckVO.getCurrentStatus()) {\n\t\t\treturn false;\n\t\t}\n\t\t//Even if there is a failure and the max retry count is not reached - ignore\n\t\tif (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\treturn false;\n\t\t}\n\t\t//First time status check and if success - ignore\n\t\tif(healthCheckVO.getCurrentStatus() == null && status == Status.UP){\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\tString message = healthCheckVO.getStatus().getMessage();\n\t\tif (status != Status.UP && currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\tmessage = healthCheckVO.getStatus().getMessage();\n\t\t} else if (status == Status.UP) {\n\t\t\tmessage = \"Status changed from \\\"\" + (healthCheckVO.getCurrentStatus() == null ? \"Not Available\"\n\t\t\t\t\t\t\t: healthCheckVO.getCurrentStatus().getStatusDesc()) + \"\\\" to \\\"\" + status.getStatusDesc() + \"\\\"\";\n\t\t}\n\t\tfinal String updateMessage = message;\n\t\thealthCheckVO.setFailureStatusMessage(updateMessage);\n\t\tComponentFailureLogEntity cfl = new ComponentFailureLogEntity();\n\t\tcfl.setCompRegStsTime(new java.sql.Timestamp(System.currentTimeMillis()));\n\t\tcfl.setFailureMessage(updateMessage);\n\t\tcfl.setStatusId(status.getStatusId());\n\t\tcfl.setHealthCheckId(healthCheckVO.getHealthCheckId());\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tsession.save(cfl);\n\t\ttxn.commit();\n\t\t\n\t\tlogger.debug(\"Inserted Failed Status comp_failure_log : HEALTH_CHECK = \" + healthCheckVO.getHealthCheckId());\n\t\treturn true;\n\t}", "private void checkStatus()\n {\n // If the last command failed\n if(!project.getLastCommandStatus())\n {\n view.alert(\"Error: \" + project.getLastCommandStatusMessage());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCommand lastCmd = project.getLastCommand();\n\t\t\tif (lastCmd != null && lastCmd.hasOptionalState())\n\t\t\t{\n\t\t\t\tview.loadFromJSON(lastCmd.getOptionalState());\n\t\t\t\tview.onUpdate(project.getProjectSnapshot(), false);\n\t\t\t}\n\t\t}\n }", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "private void updateStatus(boolean success) {\n if (success) {\n try {\n callSP(buildSPCall(MODIFY_STATUS_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with modify entries. \", exception);\n }\n\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n } else {\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n }\n }", "private GeobatchRunInfo updateRunInfoStatus(GeobatchRunInfo runInfo) {\n RESTConsumerStatus status = null;\n try {\n status = getFlowService().getConsumerStatus(\n runInfo.getFlowUid());\n } catch (Exception e) {\n // status it's FAIL\n }\n runInfo.setFlowStatus(status != null ? status.getStatus().name()\n : \"FAIL\");\n runInfo = updateRunInfo(runInfo);\n return runInfo;\n }", "public void brakeFailureStatus() {\n \tthis.brakeFailureActive = this.trainModelGUI.brakeFailStatus();\n }", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }", "public static void getStatus() {\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tList<Object[]>serverDetails = ServerStatus.getServerDetails();\n\t\t\tfor (Object[] servers:serverDetails){\n\t\t\t\tServerStatus.verifyServerStatus(i,(String)servers[0], (String)servers[1], (String)servers[2]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private static boolean updateStatus(HealthCheckVO healthCheckVO)\n\t\t\t{\n\t\tStatus status = healthCheckVO.getStatus().getStatus();\n\t\tlong currentFailedCount = 0;\n\t\tif (status != Status.UP) {\n\t\t\tif (healthCheckVO.getHealthCheckRetryCurrentCount() == null) {\n\t\t\t\tcurrentFailedCount = 1;\n\t\t\t} else {\n\t\t\t\tcurrentFailedCount = healthCheckVO.getHealthCheckRetryCurrentCount() + 1;\n\t\t\t}\n\t\t}\n\t\tupdateHealthCheckStatus(healthCheckVO, (int)currentFailedCount);\n\t\tboolean isStatusChaged = updateFilureLog(healthCheckVO, currentFailedCount);\n\t\tupdateHistory(healthCheckVO, (currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) );\n\t\treturn isStatusChaged;\n\t}", "private void getStatus() {\n\t\t\n\t}", "private static void setFailed() {\n HealthCheck.failed = true;\n }", "private void checkStatus() {\n if (switchOff) {\n String msg = \"Locker is switched off - no data source accessible.\";\n log.error(msg);\n throw new IllegalStateException(msg);\n }\n }", "public abstract void updateStatus() throws Throwable;", "public boolean checkComplete(){\n return Status;\n }", "protected void checkStatus(Status status) {\n if (status != Status.SUCCESS) {\n throw new FatalError(status.toString() + \"\\n\" + CairoContext.statusToString(status));\n }\n }", "private static void updateHealthCheckStatus(final HealthCheckVO healthCheckVO, final int currentFailedCount) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\t\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\tif ((healthCheckVO.getCurrentStatus() == null && status == Status.UP) || status == healthCheckVO.getCurrentStatus()\n\t\t\t\t|| (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) ) {\n\t\t\tString queryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE_WITH_STATUS;\n\t\t\tif (healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\t\tqueryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE;\n\t\t\t}\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tQuery query = session.createQuery(queryString)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tif (healthCheckVO.getCurrentStatus() != null \n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()){\n\t\t\t\t/*NOT - First time status check. Failed but did not cross max-retry count */\n\t\t\t\tsts.setStatusId(healthCheckVO.getCurrentStatus().getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t} else if (!(healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue())) {\n\t\t\t\t/* First time status check. Status changed and max-retry count is crossed. No need to update lastStatusChange */\n\t\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t}\n\t\t\tquery.executeUpdate();\n\t\t} else {\n\t\t\tQuery query = session.createQuery(HQLConstants.UPDATE_HEALTH_CHECK_CHANGE)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setTimestamp(\"lastStatusChange\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\tquery.setEntity(\"status\", sts);\n\t\t\tquery.executeUpdate();\n\t\t}\n\t\ttxn.commit();\n\t}", "void statusUpdate(boolean invalid);", "public void validateUIStatus() {\n\n boolean timeZoneCheck = false, timeFormatCheck = false, fetchTimeCheck = false, statusPathCheck = false;\n\n if (!timeZone.getText().isEmpty()) {\n timeZoneCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Time zone should not be Empty.\\n\");\n }\n if (!statusPath.getText().isEmpty()) {\n statusPathCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Status File should not be empty.\\n\");\n }\n if (!fetchTime.getText().isEmpty()) {\n fetchTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Refresh Time should not be empty.\\n\");\n }\n if (!timeFormat.getText().isEmpty()) {\n timeFormatCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Date & Time format should not be Empty.\\n\");\n }\n\n if (timeFormatCheck == true && timeZoneCheck == true && fetchTimeCheck == true && statusPathCheck == true) {\n uiStatusCheck = true;\n } else {\n\n uiStatusCheck = false;\n timeZoneCheck = false;\n timeFormatCheck = false;\n fetchTimeCheck = false;\n statusPathCheck = false;\n }\n }", "@Override\n public void onFailure(final Throwable t) {\n LOG.error(\"Failed to update cup status\", t);\n resetCupData();\n notifyCallback(false);\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }", "private void processStatus(Element statusElement) {\n\t\tNode statusNode=statusElement.getFirstChild();\n\t\tString statusText=statusNode.getTextContent();\n\t\tint status=Integer.parseInt(statusText);\n\t\t//System.err.println(\"status was \"+status+\" at \"+System.currentTimeMillis());\n\t\tif(status!=0) {\n\t\t\tlog.error(\"Status code was \"+status+\" after last command\");\n\t\t} else {\n\t\t\tlog.info(\"Status code 0 after last command\");\n\t\t}\n\t}", "public synchronized void startUpdates(){\n mStatusChecker.run();\n }", "public void verifyEngagementOverviewStatusIsComplete() {\n String strStepSuccess = \"Verify engagement overview status is complete\";\n String strStepFail = \"TestScript Failed: Verify engagement overview status is not complete\";\n try {\n boolean result;\n result = ENGAGEMENT_OVER_VIEW_STATUS_COMPLETE.toLowerCase().equals(eleEngagementOverViewStatusText.getText().trim().toLowerCase());\n // will update to assert false when bug has fixed\n Assert.assertTrue(result, \"Engagement overview status is complete\");\n NXGReports.addStep(strStepSuccess, LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(strStepFail, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "protected void logStatusMessage(int status) {\n switch (status) {\n case EXIT_OK:\n logger.info(\"SCHEMA CHANGE: OK\");\n break;\n case EXIT_BAD_ARGS:\n logger.severe(\"SCHEMA CHANGE: BAD ARGS\");\n break;\n case EXIT_RUNTIME_ERROR:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n case EXIT_VALIDATION_FAILED:\n logger.warning(\"SCHEMA CHANGE: FAILED\");\n break;\n default:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n }\n }", "public void fail() {\n _siteStatus = false;\n _lockTable.clear();\n _accessedTransactions.clear();\n _uncommitDataMap.clear();\n _lastFailTime = _tm.getCurrentTime();\n }", "@Override\n\t\t\tpublic void onFail() {\n\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t}", "public void reportInitFailed() {\n System.out.println(\"Subsystem \" + getName() + \" failed to initialize!\");\n\n SmartDashboard.putBoolean(getName()+\" status\", false);\n\n isWorking = false;\n }", "public void doUpdateStatus() throws GameException\r\n {\n \r\n }", "public int checkStatus(){\n\t\t\n\t\tint status = 0;\n\t\t\n\t\tif(numRows != numCols || !isValidSymbol(treeSymbol) || !isValidSymbol(tentSymbol)) {\n\t\t\tstatus = 0;\n\t\t\treturn status;\n\t\t}\n\t\t\n\t\tif(numRows != numCols) {\n\t\t\tstatus = 3;\n\t\t\treturn status;\n\t\t}\n\t\t\n\t\treturn 2;\n\t\t\n\t}", "public void getSystemStatus() throws Exception\r\n\t{\r\n\t\tsystemDump.delete(0, systemDump.length());\r\n\r\n\t\tboolean needAlarm = memoryLogging();\r\n\r\n\t\tif (Database.appDatasource != null)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Database connection status: \\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number database connection\\t\\t\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number busy database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumBusyConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumIdleConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumUnclosedOrphanedConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tString queueWarningMessage = \"\";\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Local queue status: \\r\\n\");\r\n\r\n\t\tfor (String key : QueueFactory.localQueues.keySet())\r\n\t\t{\r\n\t\t\tLocalQueue localQueue = QueueFactory.getLocalQueue(key);\r\n\r\n\t\t\tsystemDump.append(\"Local queue (\");\r\n\t\t\tsystemDump.append(key);\r\n\t\t\tsystemDump.append(\"): \");\r\n\t\t\tsystemDump.append(localQueue.getSize());\r\n\r\n\t\t\tif (localQueue.getMaxSize() > 0)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"/\");\r\n\t\t\t\tsystemDump.append(localQueue.getMaxSize());\r\n\t\t\t}\r\n\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\t\tif (QueueFactory.getTotalLocalPending() > 0)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"Total pending counter : \");\r\n\t\t\tsystemDump.append(QueueFactory.getTotalLocalPending());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tif (queueDispatcherEnable)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Remote queue status: \\r\\n\");\r\n\r\n\t\t\tQueueSession session = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsession = getQueueSession();\r\n\r\n\t\t\t\tfor (int j = 0; j < externalQueues.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (externalQueues[j].equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString queueName = externalQueues[j];\r\n\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tQueue checkQueue = QueueFactory.getQueue(queueName);\r\n\r\n\t\t\t\t\t\tint size = QueueFactory.getQueueSize(session, checkQueue);\r\n\r\n\t\t\t\t\t\tQueueFactory.queueSnapshot.put(queueName, new Integer(size));\r\n\r\n\t\t\t\t\t\tsystemDump.append(\"Total command request for \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\" : \");\r\n\t\t\t\t\t\tsystemDump.append(size);\r\n\t\t\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\t\t\tqueueWarningMessage += queueWarning(checkQueue, queueName, size);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsystemDump.append(\"Error occur when get size of queue \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\": \");\r\n\t\t\t\t\t\tsystemDump.append(e.getMessage());\r\n\r\n\t\t\t\t\t\tlogMonitor(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"Can not get remote queue size: \");\r\n\t\t\t\tsystemDump.append(e.getMessage());\r\n\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\tlogMonitor(e);\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tQueueFactory.closeQueue(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"WARNING: Disk space is running low\");\r\n\t\t}\r\n\t\tif (!queueWarningMessage.equals(\"\"))\r\n\t\t{\r\n\t\t\tneedAlarm = true;\r\n\t\t\tsystemDump.append(queueWarningMessage);\r\n\t\t}\r\n\r\n\t\tlogMonitor(systemDump);\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsendInstanceAlarm(\"system-resource\", systemDump.toString());\r\n\t\t}\r\n\t}", "private String getStatusMessage() {\n\t\treturn (m_isTestPassed == true) ? \" successfully...\" : \" with failures...\";\n\t}", "private void validateListOfStatus( ActionMapping pMapping, HttpServletRequest pRequest )\n {\n setQCClosedDefectStatus( getQCClosedDefectStatus().trim() );\n if ( getQCClosedDefectStatus().length() == 0 )\n {\n addError( \"QCClosedDefectStatus\", new ActionError( \"project_creation.QC.testmanager.error.closedDefects\" ) );\n }\n setQCCoveredReqStatus( getQCCoveredReqStatus().trim() );\n if ( getQCCoveredReqStatus().length() == 0 )\n {\n addError( \"QCCoveredReqStatus\", new ActionError( \"project_creation.QC.testmanager.error.coveredReq\" ) );\n }\n setQCOkRunStatus( getQCOkRunStatus().trim() );\n if ( getQCOkRunStatus().length() == 0 )\n {\n addError( \"QCOkRunStatus\", new ActionError( \"project_creation.QC.testmanager.error.okRun\" ) );\n }\n setQCOpenedReqStatus( getQCOpenedReqStatus().trim() );\n if ( getQCOpenedReqStatus().length() == 0 )\n {\n addError( \"QCOpenedReqStatus\", new ActionError( \"project_creation.QC.testmanager.error.openedReq\" ) );\n }\n setQCPassedStepStatus( getQCPassedStepStatus().trim() );\n if ( getQCPassedStepStatus().length() == 0 )\n {\n addError( \"QCPassedStepStatus\", new ActionError( \"project_creation.QC.testmanager.error.passedStep\" ) );\n }\n setQCToValidateReqStatus( getQCToValidateReqStatus().trim() );\n if ( getQCToValidateReqStatus().length() == 0 )\n {\n addError( \"QCToValidateReqStatus\", new ActionError( \"project_creation.QC.testmanager.error.toValidateReq\" ) );\n }\n }", "@Override\n public int status() {\n if (currentLoad <= maxLoad && currentLoad >= 0.6 * maxLoad) return GOOD;\n if (currentLoad < 0.6 * maxLoad && currentLoad >= 0.1 * maxLoad) return CHECK;\n else return BAD;\n }", "private void resolveOutcomeWithChecks(FileValidationReport fileValRep) {\n\t\tif (fileValRep.hasFailedChecks()) {\n\t\t\tfileValRep.setValidationOutcome(ValidationOutcome.NOT_VALID);\n\t\t} else {\n\t\t\tfileValRep.setValidationOutcome(ValidationOutcome.VALID);\n\t\t}\n\t}", "public void verifyEngagementOverviewStatusChange() {\n String strStepSuccess = \"Verify engagement overview status change when click on archive button\";\n String strStepFail = \"TestScript Failed: Verify engagement overview status does not change when click on archive button\";\n try {\n boolean result;\n waitForVisibleElement(eleEngagementOverViewStatusText, \"Wait engagement overview status\");\n result = engagementOverViewStatusBefore.toLowerCase().equals(eleEngagementOverViewStatusText.getText().trim().toLowerCase());\n // will update to assert false when bug has fixed\n Assert.assertTrue(result, \"Engagement overview status change\");\n NXGReports.addStep(strStepSuccess, LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(strStepFail, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "private void setNewStatusIfNeeded() {\n \t\tfor(FileDiffDirectory dir : directories ) {\n \t\t\tif (dir.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor(FileDiffFile file : files ) {\n \t\t\tif (file.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}", "public void checkFinish()\t{\n\t\tif(readCompareResult() == true)\t{\n\t\t\tfinished = true;\n\t\t}\n\t}", "public CheckStatus(String host, String service, Status status, Date lastCheck, long durationMillis,\n int attempt, int maxAttempts, String statusInfo, boolean ack, boolean downtime) {\n this.host = host;\n this.service = service;\n this.status = status;\n if (lastCheck != null) {\n this.lastCheck = new Date(lastCheck.getTime());\n } else {\n this.lastCheck = null;\n }\n this.durationMillis = durationMillis;\n this.attempt = attempt;\n this.maxAttempts = maxAttempts;\n this.statusInfo = statusInfo;\n this.ack = ack;\n this.downtime = downtime;\n }", "public synchronized void setStatus(Status stat) {\n if (!isMutable()) {\n throw new IllegalStateException(\n \"This TestResult is no longer mutable!\");\n }\n\n if (stat == null) {\n throw new IllegalArgumentException(\n \"TestResult status cannot be set to null!\");\n }\n\n // close out message section\n sections[0].setStatus(null);\n\n execStatus = stat;\n\n if (execStatus == inProgress) {\n execStatus = interrupted;\n }\n\n // verify integrity of status in all sections\n for (Section section : sections) {\n if (section.isMutable()) {\n section.setStatus(incomplete);\n }\n }\n\n props = PropertyArray.put(props, SECTIONS,\n StringArray.join(getSectionTitles()));\n props = PropertyArray.put(props, EXEC_STATUS,\n execStatus.toString());\n\n // end time now required\n // mainly for writing in the TRC for the Last Run Filter\n if (PropertyArray.get(props, END) == null) {\n props = PropertyArray.put(props, END, formatDate(new Date()));\n }\n\n // this object is now immutable\n notifyCompleted();\n }", "private void updateStatus() {\n \tif (!status.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tcurrentProfile.setStatus(status.getText());\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Status updated to \" + status.getText());\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change status\");\n\t\t\t}\n\t\t}\n\t}", "public void reportWorking() {\n if (isWorking == false) {\n System.out.println(\"Subsystem \" + getName() + \" is now working.\");\n SmartDashboard.putBoolean(getName()+\" status\", true);\n isWorking = true;\n }\n }", "protected void clearStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\tbackground.clearStatus();\n\t}", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "public void loadStatus() {\r\n\r\n\t\ttry {\r\n\t\t\tRemoteOffice objRemoteOffice = Application.UNITY_CLIENT_APPLICATION.getreRemoteOffice();\r\n\t\t\tif (objRemoteOffice != null) {\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"Going to load the status of the components from broadworks.\");\r\n\r\n\t\t\t\tboolean isActive = objRemoteOffice.isActive();\r\n\t\t\t\tString phnumber = objRemoteOffice.getPhoneNumber();\r\n\t\t\t\tobjRemoteOfficeEnableJCheckBox.setSelected(isActive);\r\n\t\t\t\tobjRemoteOfficeJTextField.setText(phnumber);\r\n\r\n\t\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(true);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(false);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status not loaded successfully\");\r\n\t\t}\r\n\t}", "public boolean checkStatus() {\r\n return isTiling;\r\n }", "@Override\r\n\t\t\t\t\t\tpublic void onCheckUpdateFail(ErrorInfoBean errorInfo) {\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"errInfo:\" + errorInfo.toString());\r\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"init_fail\");\r\n\t\t\t\t\t\t}", "@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}", "public String getCheckStatus() {\r\n return checkStatus;\r\n }", "@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}", "private void updateStatus() {\n String statusString = dataModel.getStatus().toString();\n if (dataModel.getStatus() == DefinitionStatus.MARKER_DEFINITION) {\n statusString += \" Number of markers: \" + dataModel.getNumberOfMarkers() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n if (dataModel.getStatus() == DefinitionStatus.POINTS_DEFINITION) {\n statusString += \" Number of point fields: \" + dataModel.getNumberOfPoints() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n statusLabel.setText(statusString);\n }", "void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }", "private String evaluateCheckStatus(CheckStatus status) {\n switch (status) {\n case AWAITING:\n return \"color: blue !important;\";\n case DECLINED:\n return \"color: #DC143C !important;\";\n case PAID:\n return \"color: #449d44 !important;\";\n default:\n return \"\";\n }\n }", "@SuppressLint({\"CommitPrefEdits\"})\n public void checkForUpdates() {\n synchronized (this.preferenceStore) {\n if (this.preferenceStore.get().contains(\"last_update_check\")) {\n this.preferenceStore.save(this.preferenceStore.edit().remove(\"last_update_check\"));\n }\n }\n long currentTimeMillis = this.currentTimeProvider.getCurrentTimeMillis();\n long j = ((long) this.betaSettings.updateSuspendDurationSeconds) * 1000;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Check for updates delay: \");\n sb.append(j);\n Fabric.getLogger().d(\"Beta\", sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Check for updates last check time: \");\n sb2.append(getLastCheckTimeMillis());\n Fabric.getLogger().d(\"Beta\", sb2.toString());\n long lastCheckTimeMillis2 = getLastCheckTimeMillis() + j;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Check for updates current time: \");\n sb3.append(currentTimeMillis);\n sb3.append(\", next check time: \");\n sb3.append(lastCheckTimeMillis2);\n Fabric.getLogger().d(\"Beta\", sb3.toString());\n if (currentTimeMillis >= lastCheckTimeMillis2) {\n try {\n performUpdateCheck();\n } finally {\n setLastCheckTimeMillis(currentTimeMillis);\n }\n } else {\n Fabric.getLogger().d(\"Beta\", \"Check for updates next check time was not passed\");\n }\n }", "public String getStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\treturn background.getStatus();\n\t}", "public void checkProgress() {\n\t\tupdateBitfield();\n\t\tlog(\"Checking progress...\");\n\t\tFileInfo[] fileinfo = files.getFiles();\n\t\tfor (int i = 0; i < fileinfo.length; i++) {\n\t\t\tFileInfo info = fileinfo[i];\n\t\t\tRandomAccessFile file = info.getFileAcces();\n\t\t\ttry {\n\t\t\t\tif (file.length() > 0L) {\n\t\t\t\t\tint pieceIndex = (int) (info.getFirstByteOffset() / files.getPieceSize());\n\t\t\t\t\tint lastPieceIndex = pieceIndex + info.getPieceCount();\n\t\t\t\t\tfor (; pieceIndex < lastPieceIndex; pieceIndex++) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (files.getPiece(pieceIndex).checkHash()) {\n\t\t\t\t\t\t\t\t// log(\"Progress Check: Have \" + pieceIndex);\n\t\t\t\t\t\t\t\tif (torrentStatus == STATE_DOWNLOAD_DATA) {\n\t\t\t\t\t\t\t\t\tbroadcastHave(pieceIndex);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfiles.havePiece(pieceIndex);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\t\tlog(\"Checking progress done\");\n\t}", "private void setComponentStatus() {}", "public boolean compileStatus(GL2 gl2, int shaderID) {\r\n int[] params = new int[]{0};\r\n \r\n gl2.glGetShaderiv( shaderID, GL2.GL_COMPILE_STATUS, params, 0);\r\n if ( params[0] != 1 ) {\r\n System.err.println(\"compile status: \" + params[0]);\r\n gl2.glGetShaderiv( shaderID, GL2.GL_INFO_LOG_LENGTH, params, 0);\r\n System.err.println(\"log length: \" + params[0]);\r\n byte[] abInfoLog = new byte[params[0]];\r\n gl2.glGetShaderInfoLog(shaderID, params[0], params, 0, abInfoLog, 0);\r\n System.err.println( new String(abInfoLog) );\r\n return false;\r\n }\r\n return true;\r\n }", "private void checkFileStatus() throws CustomException, IOException\n\t{\n\t\t//For all .mgf files\n\t\tfor (int i=0; i<mgfFiles.size(); i++)\n\t\t{\n\n\t\t\tString resultFileName = \n\t\t\t\t\tmgfFiles.get(i).substring(0,mgfFiles.get(i).lastIndexOf(\".\"))+\"_Results.csv\";\n\t\t\t//TODO: Cannot write files if checking for file. \n\t\t\t/*\n\t\t\tif (isFileUnlocked(resultFileName))\n\t\t\t\tthrow new CustomException(\"Please close \"+resultFileName, null);\n\t\t\t */\n\t\t}\n\n\t}", "boolean hasStatusChanged();", "private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }", "private void wizardChanged() {\r\n\t\t\r\n\t\tboolean valid = true;\r\n\t\t\r\n\t\t// The project name can't be empty\r\n\t\tif (nameText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.NameEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// The project description can't be empty\r\n\t\tif (valid && descriptionText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.DescriptionEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: validar que la fecha de inicio sea anterior a la de final\r\n\t\t\t\t\r\n\t\t// The project budget can't be empty\r\n\t\tif (valid && budgetText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.BudgetEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// The quantity of lines of the project can't be empty\r\n\t\tif (valid && quantityLinesText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.NumberCodeLinesEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// The project domain of the project can't be empty\r\n\t\tif (valid && domainText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.DomainEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid && progLanguageCombo.getSelectionIndex()==-1) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.ProgrammingLanguageNotSelected\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid && estimatedHoursText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.EstimatedHoursEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid) \r\n\t\t\tupdateStatus(null);\r\n\t\t\r\n\t}", "private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }", "@Override\n public RefactoringStatus isValid(IProgressMonitor progress) throws CoreException,\n OperationCanceledException\n {\n return new RefactoringStatus();\n }", "@Override\n\tpublic void checkMaintenanceStatus() {\n\t}", "@Override\n public void onStatusChange(int status) {\n }", "boolean isValidStatus();", "public void onFailure(Throwable caught) {\n\t\t\tGWT.log(\"Error changing status\", caught);\t\n\t\t}", "public void reportInitSuccessful() {\n\n System.out.println(\"Subsystem \" + getName() + \" has initialized successfully.\");\n\n SmartDashboard.putBoolean(getName()+\" status\", true);\n }", "void onStatusUpdate(int status);", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public String getStatus() {\n if (this.getSize()==0)\n return \"Error\";\n else\n return \"Ok\";\n }", "public void setFailStatus(java.lang.String newFailStatus) {\n\tfailStatus = newFailStatus;\n}", "public boolean updateStatus() {\n boolean rc;\n\n long now = System.currentTimeMillis();\n if (now > (timeOfLastRefresh + millisecsToRefreshStatus)) {\n rc = Workflow.refresh();\n rc = WorkflowJob.refresh();\n timeOfLastRefresh = now;\n }\n\n for (int i = 0; i < nworkflows; i++) {\n if (workflows[i].basedir.equals(basedir)\n && workflows[i].vogroup.equals(vogroup)\n && workflows[i].wfname.equals(wfname)\n && workflows[i].run.equals(run)) {\n wfid = workflows[i].wfid;\n creator = workflows[i].creator;\n ctime = workflows[i].ctime;\n state = workflows[i].state;\n exitstatus = workflows[i].exitstatus;\n mtime = workflows[i].mtime;\n break;\n }\n }\n\n if (wfid == null) return false;\n\n //\tSystem.out.println (\"basedir = \" + basedir + \" vogroup = \" + vogroup + \" wfname = \" +\n // wfname + \" run = \" + run + \" wfid = \" + wfid + \" creator = \" + creator + \" ctime = \" +\n // ctime + \" state = \" + state + \" exitstatus = \" + exitstatus + \" mtime = \" + mtime);\n\n jobs = new WorkflowJob[WFMAXJOBS];\n njobs = 0;\n for (int i = 0; i < WorkflowJob.njobs; i++) {\n if (WorkflowJob.jobs[i].wfid.equals(wfid))\n if (njobs < WFMAXJOBS) jobs[njobs++] = WorkflowJob.jobs[i];\n }\n return true;\n }", "public RefactoringStatus getValidationStatus() {\n return fValidationStatus;\n }", "public void signalFailureStatus() {\n \tthis.signalFailureActive = this.trainModelGUI.signalFailStatus();\n \tif(this.signalFailureActive) {\n \tthis.setGPSAntenna(true);\n \tthis.setMBOAntenna(true);\n \t} else {\n \t\tthis.setGPSAntenna(false);\n \tthis.setMBOAntenna(false);\n \t}\n\n \t\n }", "private void setStatus() {\n\t\t// adjust the status of the rest\n\t\tif (rest.getState().equals(RestState.INACTIVE)) {\n\t\t\t// set status to heating\n\t\t\trest.setState(RestState.HEATING);\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t} else if (rest.getState().equals(RestState.HEATING) && temperatureSensor.getTemperature() >= (rest.getTemperature() - tolerance)) {\n\t\t\t// set status to active\n\t\t\trest.setState(RestState.ACTIVE);\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t} else if (rest.getState().equals(RestState.ACTIVE)\n\t\t\t\t&& (new GregorianCalendar().getTimeInMillis() - rest.getActive().getTimeInMillis()) / 1000 / 60 > rest.getDuration()) {\n\t\t\t// time is up :)\n\t\t\tif (rest.isContinueAutomatically()) {\n\t\t\t\trest.setState(RestState.COMPLETED);\n\t\t\t} else {\n\t\t\t\trest.setState(RestState.WAITING_COMPLETE);\n\t\t\t}\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t}\n\t}", "public void updateCommitRecordState() {\n\n List<String> lsNames = new ArrayList<>();\n lsNames = projectDb.listAllProjectNames();\n\n for (String name : lsNames) {\n\n Map<String, Integer> map = commitRecordDb.getCommitRecordStateCounts(name);\n\n int bs = 0;\n int ini = 0;\n int utf = 0;\n int csf = 0;\n int cpf = 0;\n\n if (map.containsKey(StatusEnum.BUILD_SUCCESS.getTypeName())) {\n bs = map.get(StatusEnum.BUILD_SUCCESS.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.INITIALIZATION.getTypeName())) {\n ini = map.get(StatusEnum.INITIALIZATION.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.UNIT_TEST_FAILURE.getTypeName())) {\n utf = map.get(StatusEnum.UNIT_TEST_FAILURE.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.CHECKSTYLE_FAILURE.getTypeName())) {\n csf = map.get(StatusEnum.CHECKSTYLE_FAILURE.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.COMPILE_FAILURE.getTypeName())) {\n cpf = map.get(StatusEnum.COMPILE_FAILURE.getTypeName());\n }\n\n int ccs = 0;\n ccs = bs + utf + csf + cpf;\n\n boolean check;\n check = crsdb.checkCommitRecordStatehw(name);\n\n if (check) {\n crsdb.updateCommitRecordState(name, bs, csf, cpf, utf, ini, ccs);\n\n } else {\n crsdb.addCommitRecordState(name, bs, csf, cpf, utf, ini, ccs);\n }\n\n }\n\n }", "public String getCheckStatus() {\n\t\treturn checkStatus;\n\t}", "public String getCheckStatus() {\n\t\treturn checkStatus;\n\t}", "public void setToFailed() {\n if (currentStep.getCurrentPhase() != Step.Phase.FAILED) {\n changeCurrentStep(Step.Phase.FAILED);\n }\n setCompleteTime(System.currentTimeMillis());\n }", "@Override\n\tpublic boolean updateStatus() {\n\t\treturn false;\n\t}", "public void checkApplication() {\r\n logger.info(\"ADIT monitor - Checking application.\");\r\n List<String> errorMessages = new ArrayList<String>();\r\n double duration = 0;\r\n DecimalFormat df = new DecimalFormat(\"0.000\");\r\n\r\n Date start = new Date();\r\n long startTime = start.getTime();\r\n\r\n // 1. Check temporary folder\r\n try {\r\n\r\n String tempDir = this.getConfiguration().getTempDir();\r\n File tempDirFile = new File(tempDir);\r\n String randomFileName = Util.generateRandomFileName();\r\n File temporaryFile = new File(tempDirFile.getAbsolutePath() + File.separator + randomFileName);\r\n temporaryFile.createNewFile();\r\n\r\n } catch (Exception e) {\r\n logger.error(\"Error checking application - temporary directory not defined or not writable: \", e);\r\n errorMessages.add(\"Error checking application - temporary directory not defined or not writable: \"\r\n + e.getMessage());\r\n }\r\n\r\n // 3. Check test document ID\r\n try {\r\n\r\n Long testDocumentID = this.getMonitorConfiguration().getTestDocumentId();\r\n if (testDocumentID == null) {\r\n throw new Exception(\"Test document ID not defined.\");\r\n }\r\n\r\n } catch (Exception e) {\r\n logger.error(\"Error checking application - test document ID not defined.\");\r\n errorMessages.add(\"Error checking application - test document ID not defined.\");\r\n }\r\n\r\n Date end = new Date();\r\n long endTime = end.getTime();\r\n duration = (endTime - startTime) / 1000.0;\r\n\r\n // Errors were detected\r\n if (errorMessages.size() > 0) {\r\n String combinedErrorMessage = \"\";\r\n for (int i = 0; i < errorMessages.size(); i++) {\r\n if (i != 0) {\r\n combinedErrorMessage = combinedErrorMessage + \", \";\r\n }\r\n combinedErrorMessage = combinedErrorMessage + errorMessages.get(i);\r\n }\r\n\r\n this.getNagiosLogger().log(ADIT_APP + \" \" + FAIL + \" \",\r\n new Exception(\"Errors found: \" + combinedErrorMessage));\r\n } else {\r\n this.getNagiosLogger().log(ADIT_APP + \" \" + OK + \" \" + df.format(duration) + \" \" + SECONDS);\r\n }\r\n\r\n }", "public void doChecking() {\n \tdoCheckingDump();\n \tdoCheckingMatl();\n }", "public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}", "public void handleStatusUpdated() {\n copyWifiStates();\n notifyListenersIfNecessary();\n }", "public WorkerStatus getStatus(){\r\n\t\ttry {\r\n\t\t\t//System.out.println(\"Place 1\");\r\n\t\t\treturn this.workerStatusHandler.getWorkerStatus(this.getPassword());\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t//System.out.println(\"Place 2\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tdead = true;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void check() {\r\n logger.info(\"ADIT monitor - Checking database and application.\");\r\n\r\n checkApplication();\r\n\r\n checkDBConnection();\r\n checkDBRead(this.getMonitorConfiguration().getTestDocumentId());\r\n }", "public boolean hasStatusChanged() {\n return typeCase_ == 5;\n }", "public void status() {\n\t\tString bName;\n\t\tSystem.out.println(\"=== Branches ===\");\n\t\tIterator iter = myBranch.entrySet().iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tbName = (String) entry.getKey();\n\n\t\t\tif (currentBranch.equals(bName)) {\n\t\t\t\tSystem.out.println(\"*\" + bName);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(bName);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Staged Files ===\");\n\t\tfor (int i = 0; i < stagedFiles.size(); i++) {\n\t\t\tSystem.out.println(stagedFiles.get(i));\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Files Marked for Untracking ===\");\n\t\tfor (int i = 0; i < untrackedFiles.size(); i++) {\n\t\t\tSystem.out.println(untrackedFiles.get(i));\n\t\t}\n\t}", "public void validateoLPNStatus(String strLPNStatus){ \t\t\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"oLPNsTab\"), \"oLPNsTab\");\n\t\tif(libManhattanCommonFunctions.verifyElementPresent(\"//span[@id='dataForm:dataLstTbl:_colhdr_id1']\", \"XPATH\")){\n\t\t\ttry{\n\t\t\t\tString actualLPNStatus = libManhattanCommonFunctions.getElementByProperty(\"//span[@id='dataForm:dataLstTbl:_colhdr_id1']\", \"XPATH\").getText();\n\n\t\t\t\tif(actualLPNStatus.trim().equals(strLPNStatus))\n\t\t\t\t{\n\t\t\t\t\treport.updateTestLog(\"oLPN Status verification\", \"Actual oLPn status : \"+actualLPNStatus+ \" is verified\", Status.PASS);\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\treport.updateTestLog(\"oLPN Status verification\", \"Expected oLPN status :\"+strLPNStatus+\" || Actual oLPN status : \"+actualLPNStatus, Status.FAIL);\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\treport.updateTestLog(\"Element\", \"Element Not Found\", Status.FAIL);\n\t\t\t}\n\t\t}else{\n\t\t\treport.updateTestLog(\"oLPN Status\", \"oLPN is not created\", Status.FAIL);\n\t\t}\n\n\t}", "private void updateValidationMessages()\r\n {\r\n String errorMessage = myModel.getErrorMessage();\r\n String warningMessage = myModel.getWarningMessage();\r\n\r\n if (StringUtils.isNotEmpty(errorMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.ERROR, errorMessage);\r\n }\r\n else if (StringUtils.isNotEmpty(warningMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.WARNING, warningMessage);\r\n }\r\n else\r\n {\r\n myValidator.setValidationResult(ValidationStatus.VALID, null);\r\n }\r\n }", "public void checkProgress(){\n while(this.progress.getValue().compareTo(this.expToLevelUp.getValue()) >= 0){\n if(this.level < Constant.MAX_LEVEL) {\n this.level++;\n this.progress.subtract(this.expToLevelUp);\n this.expToLevelUp = this.expValues[this.level];\n }\n }\n }", "private void updateMetrics(ContainerStatus status) {\n if (status != null) {\n switch (status.getExitStatus()) {\n case SUCCESS:\n componentMetrics.containersSucceeded.incr();\n scheduler.getServiceMetrics().containersSucceeded.incr();\n return;\n case PREEMPTED:\n componentMetrics.containersPreempted.incr();\n scheduler.getServiceMetrics().containersPreempted.incr();\n break;\n case DISKS_FAILED:\n componentMetrics.containersDiskFailure.incr();\n scheduler.getServiceMetrics().containersDiskFailure.incr();\n break;\n default:\n break;\n }\n }\n\n // containersFailed include preempted, disks_failed etc.\n componentMetrics.containersFailed.incr();\n scheduler.getServiceMetrics().containersFailed.incr();\n\n if (status != null && Apps.shouldCountTowardsNodeBlacklisting(\n status.getExitStatus())) {\n String host = scheduler.getLiveInstances().get(status.getContainerId())\n .getNodeId().getHost();\n failureTracker.incNodeFailure(host);\n currentContainerFailure.getAndIncrement();\n }\n }", "protected void updateStatus() {\n super.updateStatus();\n if (!getHaveData()) {\n if (getAllowMultiple()) {\n setStatus(\"Select one or more files\");\n } else {\n setStatus(\"Select a file\");\n }\n }\n }", "@Override\n protected Result check()\n {\n return this.gitLabModeInfos.isEmpty() ? Result.unhealthy(\"No GitLab modes available\") : Result.healthy();\n }", "void onStatusChanged(Status newStatus);", "private String calculateProjectHealth(String progressStatus, String costStatus, String efficiencyStatus) {\r\n log.debug(\"calculateProjectHealth.START\");\r\n if (costStatus.equals(Constant.BAD_STATUS) || efficiencyStatus.equals(Constant.BAD_STATUS)\r\n || progressStatus.equals(Constant.BAD_STATUS))\r\n return Constant.BAD_STATUS;\r\n else if (costStatus.equals(Constant.NORMAL_STATUS) || efficiencyStatus.equals(Constant.NORMAL_STATUS)\r\n || progressStatus.equals(Constant.NORMAL_STATUS))\r\n return Constant.NORMAL_STATUS;\r\n else\r\n return Constant.GOOD_STATUS;\r\n }", "public void updateContestStatus(ContestStatus arg0) throws ContestManagementException {\r\n }", "protected boolean check(CrawlDatum datum) {\n if (datum.getStatus() != expectedDbStatus)\n return false;\n return true;\n }" ]
[ "0.7107839", "0.6595987", "0.64398557", "0.6134198", "0.6051725", "0.595811", "0.59422576", "0.59053016", "0.58878976", "0.5881093", "0.5826945", "0.57169354", "0.5693312", "0.5674825", "0.5664757", "0.5644801", "0.5641061", "0.562658", "0.5620156", "0.56096435", "0.5603488", "0.5598242", "0.55684704", "0.5542629", "0.54493386", "0.54490787", "0.541925", "0.5410229", "0.53820866", "0.53661364", "0.53539944", "0.5348979", "0.53361917", "0.53155446", "0.5315149", "0.53048253", "0.5303257", "0.53006154", "0.52666163", "0.5261518", "0.5240445", "0.523146", "0.5215739", "0.52136886", "0.5209145", "0.5203763", "0.519858", "0.5197267", "0.51945853", "0.51936966", "0.5188104", "0.51804936", "0.5172487", "0.51705974", "0.517041", "0.5163791", "0.516369", "0.51609874", "0.5147367", "0.51465577", "0.51456195", "0.514341", "0.5138293", "0.51295364", "0.51270926", "0.5125004", "0.5121675", "0.5107817", "0.5105899", "0.510348", "0.5093215", "0.5091028", "0.50904584", "0.50904256", "0.50766194", "0.5076039", "0.5072652", "0.5064845", "0.5056229", "0.5055161", "0.5055161", "0.504546", "0.50415313", "0.5040774", "0.503816", "0.50352144", "0.5028697", "0.50188196", "0.5018414", "0.50150764", "0.50121135", "0.5011516", "0.5006756", "0.49958515", "0.4993373", "0.4988716", "0.4985882", "0.49848327", "0.498302", "0.49823174", "0.49803054" ]
0.0
-1
get CurrentHealth Check Details from DB.
private static HealthCheckVO getCurrentHealthCheckDetails(final int componentId, final int environmentId, final long regionID) { return getCurrentHealthCheckDetails(componentId, environmentId, regionID, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Health getHealthInfo(String id) {\n\t\t RestTemplate restTemplate = new RestTemplate();\n\t\t \n\t\t Health healthInfo = restTemplate.getForObject(BASE_URL + HEALTH_STATUS_URL, Health.class, id);\n\t\t logger.debug(\"Employee Info :\" + healthInfo);\n\t\treturn healthInfo;\n\t}", "private static HealthCheckVO getCurrentHealthCheckDetails(final int componentId, final int environmentId,\n\t\t\tfinal long regionID,final HealthCheckType healthCheckType) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria hcCrit = session.createCriteria(HealthCheckEntity.class,\"hc\");\n\t\thcCrit.add(Restrictions.eq(\"hc.component.componentId\", componentId));\n\t\thcCrit.add(Restrictions.eq(\"hc.environment.environmentId\", environmentId));\n\t\thcCrit.add(Restrictions.eq(\"hc.region.regionId\", regionID));\n\t\tif(healthCheckType != null) {\n\t\t\thcCrit.add(Restrictions.eq(\"hc.healthCheckType.healthCheckTypeId\", healthCheckType.getHealthCheckTypeId()));\n\t\t}\n\t\thcCrit.setMaxResults(1);\n\t\tHealthCheckEntity hcEnt = (HealthCheckEntity) hcCrit.uniqueResult();\n\t\ttxn.commit();\n\t\tif(hcEnt == null){\n\t\t\treturn null;\n\t\t}\n\t\tHealthCheckVO hcVO = new HealthCheckVO();\n\t\thcVO.setHealthCheckId(hcEnt.getHealthCheckId());\n\t\tif(hcEnt.getCurrentStatus() != null){\n\t\t\thcVO.setCurrentStatus(hcEnt.getCurrentStatus().getStatusId());\n\t\t}\n\t\treturn hcVO;\n\t}", "public static List<HealthCheckVO> getSurveillerDetailsOfComponent(boolean isDummyHealth) {\n\t\tHashMap<Long,HealthCheckVO> healthCheckVOMap = new HashMap<Long,HealthCheckVO>();\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\t\t\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria healthCheckCriteria = session.createCriteria(HealthCheckEntity.class);\n\t\thealthCheckCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tif(isDummyHealth){\n\t\t\thealthCheckCriteria.add(Restrictions.eq(\"healthCheckType.healthCheckTypeId\", HealthCheckType.DUMMY.getHealthCheckTypeId()));\n\t\t}else{\n\t\t\thealthCheckCriteria.add(Restrictions.ne(\"healthCheckType.healthCheckTypeId\", HealthCheckType.DUMMY.getHealthCheckTypeId()));\n\t\t}\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<HealthCheckEntity> checkEntities = healthCheckCriteria.list();\n\t\tfor(HealthCheckEntity entity : checkEntities) {\n\t\t\tHealthCheckVO hcVO = new HealthCheckVO();\n\t\t\thcVO.setHealthCheckId(entity.getHealthCheckId());\n\t\t\thcVO.setHealthCheckComponentId((long) entity.getComponent().getComponentId());\n\t\t\thcVO.setHealthCheckRegionId(entity.getRegion().getRegionId());\n\t\t\thcVO.setHealthCheckTypeClassName(entity.getHealthCheckType().getHealthCheckTypeClass());\n\t\t\thcVO.setHealthCheckTypeName(entity.getHealthCheckType().getHealthCheckTypeName());\n\t\t\thcVO.setHealthCheckRetryCurrentCount(entity.getFailedCount());\n\t\t\thcVO.setHealthCheckRetryMaxCount(entity.getMaxRetryCount());\n\t\t\tif(entity.getCurrentStatus() != null){\n\t\t\t\thcVO.setCurrentStatus(entity.getCurrentStatus().getStatusId());\n\t\t\t}\n\t\t\thcVO.setEnvironmentId(entity.getEnvironment().getEnvironmentId());\n\t\t\thcVO.setEnvironmentName(entity.getEnvironment().getEnvironmentName());\n\t\t\thcVO.setRegionName(entity.getRegion().getRegionName());\n\t\t\tComponentEntity component = entity.getComponent();\n\t\t\tint compTypeId = component.getComponentType().getComponentTypeId();\n\t\t\thcVO.setComponentType(ComponentType.INFRA.getComponentTypeId() == compTypeId ? ComponentType.INFRA: ComponentType.APP);\n\t\t\tComponentVO cVo = new ComponentVO();\n\t\t\tcVo.setComponentId(component.getComponentId());\n\t\t\tcVo.setComponentName(component.getComponentName());\n\t\t\tif(component.getParentComponent() != null) {\n\t\t\t\tcVo.setParentComponentId(component.getParentComponent().getComponentId());\n\t\t\t\tcVo.setParentComponentName(component.getParentComponent().getComponentName());\n\t\t\t}\n\t\t\thcVO.setComponent(cVo);\n\t\t\t\n if(entity.getHealthCheckParams() !=null && entity.getHealthCheckParams().size() > 0) {\n Map<String,String> paramDetails = new HashMap<String,String>();\n for(HealthCheckParamEntity hcp: entity.getHealthCheckParams()){\n paramDetails.put(hcp.getHealthCheckParamKey(), hcp.getHealthCheckParamVal());\n }\n hcVO.setParamDetails(paramDetails);\n\t\t\t}\n\t\t\thealthCheckVOMap.put(hcVO.getHealthCheckId(), hcVO);\n\t\t}\n\t\ttxn.commit();\n\t\treturn new ArrayList<HealthCheckVO>(healthCheckVOMap.values());\n\t}", "public String getHealthinfo() {\n return healthinfo;\n }", "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "List<CacheHealth> getCacheHealth();", "public String getHealthrecord() {\r\n return healthrecord;\r\n }", "public Health getHealthObj() {\n return health;\n }", "@RequestMapping(value = \"/health\", method = RequestMethod.GET)\n public ResponseEntity<String> healthCheck() {\n\n return new ResponseEntity<String>(\"Up and Running\", HttpStatus.OK);\n }", "@Override\n protected Result check() throws Exception {\n\n try {\n mongoClient.getDB(\"system\").getStats();\n }catch(MongoClientException ex) {\n return Result.unhealthy(ex.getMessage());\n }\n\n\n return Result.healthy();\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void getHealthStatus() {\n getHealthStatusAsync().block();\n }", "@Override\r\n public List<ActiveStatusModel> listActiveStatus() {\r\n return jdbcTemplate.query(SQL_SELECT, new ActiveStatusHelper());\r\n }", "public ReturnData queryEncounterForinfo(){\n ReturnData returnData = new ReturnData();\n String [] jsids = {\"03034a63-e8d6-49a4-8e71-58a544b8fca3\",\n \"1ae3709f-d8c2-4db8-9f38-1a60fb0d2e61\",\n \"7340479a-28fc-44b6-bf18-374f037d5f03\",\n \"e1e5f378-b16f-441e-b673-0f0d2544d108\"};\n try {\n returnData.setData(jueseMapper.selectByPrimaryKey(jsids[MyUuid.getRandomInt(jsids.length)-1]));\n }catch (Exception e){\n returnData.setCode(-1);\n returnData.setData(e.getMessage());\n }finally {\n return returnData;\n }\n }", "@GetMapping(PRODUCT_HEALTH_CHECK)\n public String index() {\n return serviceName + \", system time: \" + System.currentTimeMillis();\n }", "public String getStatusDetails() { return statusDetails; }", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "public List<CheckingAcc> showAll(){\n if (checkingAccRepository.findAll().size()==0){\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"No checking accounts found\");\n }\n return checkingAccRepository.findAll();\n }", "private boolean getDetails(){\n ResultSet rs = this.SQL.PreparedSelect(\"btcwallet\", new String[]{\"guid\",\"rnd\",\"time\",\"session\"}, \"`session`=\"+this.Session, \"1\", \"\");\n try {\n if(rs.first()){\n this.GUID=rs.getString(\"guid\");\n this.Time=rs.getString(\"time\");\n this.Creator=rs.getString(\"rnd\");\n return true;\n }\n } catch (SQLException ex) {\n Logger.getLogger(openBTCWallet.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public List<Contract> getHealthContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\"SELECT * FROM CONTRACT WHERE SERVICETYPE=1 AND \"\n\t\t\t\t\t+ \"(DATEENDING >= NOW() OR DATEENDING IS NULL)\", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\n\t}", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "public User getUserHealthInfo(String userId){\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t/*\n\t\t * This API collect data from more than one web services, so, it applies the services composition\n\t\t */\n\t\t\n\t\t// Get user Recipe\n\t\tResponseEntity<Recipe> rateResponse =\n\t\t restTemplate.exchange(BASE_URL + RECIPE_URL + \"/\" + userId, HttpMethod.GET, \n\t\t \t\tnull, new ParameterizedTypeReference<Recipe>() {\n\t\t });\n\t\tRecipe recipe = rateResponse.getBody();\n\t\tlogger.debug(\"RECIPE Info :\" + recipe);\n\t\t\n\t\t// Get user info\n\t\tResponseEntity<User> userInfoResponse =\n\t\t restTemplate.exchange(BASE_URL + USER_URL + \"/\" + userId, HttpMethod.GET, \n\t\t \t\tnull, new ParameterizedTypeReference<User>() {\n\t\t });\n\t\tUser user = userInfoResponse.getBody();\n\t\tlogger.debug(\"User Info :\" + user);\n\t\t\n\t\tuser.setRecipe(recipe);\n\t\t\n\t\t\n\t\t// Get User health status info\n\t\tHealth healthInfo = restTemplate.getForObject(BASE_URL + HEALTH_STATUS_URL, Health.class, userId);\n\t\tuser.setHealth(healthInfo);\n\t\tlogger.debug(\"User Info :\" + healthInfo);\n\t\t\n\t\treturn user;\n\t}", "public static List<CounterDetailVO> getCounterDetails() {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCriteria = session.createCriteria(EnvCounterEntity.class);\n\t\tenvCriteria.addOrder(Order.desc(\"environmentId\"));\n\t\tenvCriteria.addOrder(Order.asc(\"counterId\"));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvCounterEntity> envCounterEntities = envCriteria.list();\n\t\tArrayList<CounterDetailVO> returnList = new ArrayList<CounterDetailVO>();\n\t\tfor(EnvCounterEntity entity : envCounterEntities) {\n\t\t\tCounterDetailVO cVO = new CounterDetailVO();\n\t\t\tif(entity.getEnvironment() != null){\n\t\t\t\tcVO.setEnvironmentId(entity.getEnvironmentId());\n\t\t\t}\t\t\t\n\t\t\tcVO.setEnvironmentCounterId(entity.getEnvCounterId());\n\t\t\tcVO.setCounterId(entity.getCounterId());\n\t\t\tcVO.setCounterMetricTypeId(entity.getMetricTypeId());\n\t\t\tcVO.setParameter1(entity.getParameter1());\n\t\t\tcVO.setParameter2(entity.getParameter2());\n\t\t\tcVO.setCounterMetricTypeClassName(entity.getCountMetricType().getCounterMetricTypeClassName());\n\t\t\tcVO.setPlatform(entity.getPlatform());\n\t\t\treturnList.add(cVO);\n\t\t}\n\t\ttxn.commit();\n\t\treturn returnList;\n\t}", "public ArrayList<PatientHealthContract> getHealthList(String email) {\n SQLiteDatabase db = helper.getReadableDatabase();\n String selectQuery = \"SELECT \" +\n PatientHealthEntry.COLUMN_AGE + \",\" +\n PatientHealthEntry.COLUMN_BLOOD_GROUP + \",\" +\n PatientHealthEntry.COLUMN_MEDICATION + \",\" +\n PatientHealthEntry.COLUMN_CONDITION + \",\" +\n PatientHealthEntry.COLUMN_NOTES + \",\" +\n PatientHealthEntry.COLUMN_DATE_OF_VISIT +\n \" FROM \" + PatientHealthEntry.TABLE_NAME +\n \" WHERE \" + PatientHealthEntry.COLUMN_EMAIL + \" = \" + \"'\" + email + \"'\" +\n \" ORDER BY date\" + \"(\" + PatientHealthEntry.COLUMN_DATE_OF_VISIT + \")\" +\n \" DESC\" + \";\";\n\n //PatientHealthEntry patient = new PatientHealthEntry();\n ArrayList<PatientHealthContract> healthList = new ArrayList<>();\n\n Cursor cursor = db.rawQuery(selectQuery, null);\n // looping through all rows and adding to list\n\n if (cursor.moveToFirst()) {\n do {\n PatientHealthContract patient = new PatientHealthContract();\n patient.setAge(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_AGE)));\n patient.setBloodGroup(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_BLOOD_GROUP)));\n patient.setCondition(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_CONDITION)));\n patient.setMedication(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_MEDICATION)));\n patient.setNotes(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_NOTES)));\n patient.setDateVisit(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_DATE_OF_VISIT)));\n healthList.add(patient);\n\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n db.close();\n return healthList;\n\n }", "Future<GetHealthCheckerResponse> getHealthChecker(\n GetHealthCheckerRequest request,\n AsyncHandler<GetHealthCheckerRequest, GetHealthCheckerResponse> handler);", "public int getCurrentHealth() {\n return currentHealth;\n }", "String getHealthString() {\n return Integer.toString(health);\n }", "public Response rerouteHealthMonitorData() {\n Response response;\n try {\n response = this.createRequest(\n ProteusEndpointConstants.HEALTH_STATUS_REPORT).getResponse(\n HttpMethod.GET);\n } catch (Exception e) {\n response = Response.serverError().build();\n // if response has an exception, let's assume that OODT cannot be accessed\n // (aka it's been stopped/not started)\n }\n return response;\n }", "public static Map<String, Integer> getCurrentApiDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(ApiStatusEntity.class, \"apiSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.statusDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ApiStatusEntity> apiEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(ApiStatusEntity apiStsEntity : apiEntityList){\n\t\t\tif(apiStsEntity.getComponent() != null){\n\t\t\t\tmapApiSts.put(apiStsEntity.getComponent().getComponentName(), apiStsEntity.getTotalApi());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "public int getCurrentHealth() {\r\n return currentHealth;\r\n }", "public Integer getHealth();", "private void fetchBusinessGoalFromDB() \r\n\t{\r\n\t\tthis.showLoadingStatusBar();\r\n\t\tServiceDefTarget endpoint = (ServiceDefTarget) service; \t\t// get the business goal and associated subgoals and assets\r\n\t\tendpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + \"identifyGoalAssetService.rpc\");\r\n\t\tservice.loadBusinessGoalInfo(getCurrentState().getProjectID(), new AsyncCallback<GwtBusinessGoal>()\r\n\t\t{\r\n\t\t\tpublic void onFailure(Throwable caught)\r\n\t\t\t{\r\n\t\t\t\tWindow.alert(caught.getMessage());\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onSuccess(GwtBusinessGoal result)\r\n\t\t\t{\t\t\r\n\t\t\t\t\tbusinessGoal = result;\r\n\t\t\t\t\tsummaryPageCommand.execute();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public ArrayList<PatientHealthCareFirmMap> getAllPatientHealthcareFirmMap() {\n\n ArrayList<PatientHealthCareFirmMap> userHealthcareFirmMapList = new ArrayList<>();\n String query = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \" + RECORD_STATUS + \"=?\";\n String[] whereParams = new String[] {AppConstants.ACTIVE_RECORD_STATUS};\n Cursor cursor = this.db.rawQuery(query, whereParams);\n if (cursor != null && (cursor.moveToFirst())){\n\n do {\n PatientHealthCareFirmMap userHealthcareFirmMap = getPatientHealthCareFirmMapModelFromCursor(cursor);\n if (userHealthcareFirmMap != null){\n userHealthcareFirmMapList.add(userHealthcareFirmMap);\n }\n\n } while ((cursor.moveToNext()));\n\n cursor.close();\n }\n\n return userHealthcareFirmMapList;\n }", "@Override\n\tpublic Collection<Tmly> getTmlyInfo() {\n\t\tString sql = \"select ID_,TITLE,CONTENT,state from tmly\";\n\t\tList<Tmly> list = this.jdbcTemplate.query(sql, new RowMapper<Tmly>() {\n\n\t\t\t@Override\n\t\t\tpublic Tmly mapRow(ResultSet result, int i) throws SQLException {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tTmly tmly = new Tmly();\n\t\t\t\ttmly.setId(result.getInt(\"id_\"));\n\t\t\t\ttmly.setTitle(result.getString(\"title\"));\n\t\t\t\ttmly.setContent(result.getString(\"content\"));\n\t\t\t\treturn tmly;\n\t\t\t}\n\n\t\t});\n\t\treturn list;\n\t}", "public static List getStatusList() \n {\n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"select status from Alumni_data group by status\").list();\n session.close();\n return li;\n }", "public int getStatus(String name){\n Log.d(TAG, \"get Status : gettng status - \" + name);\n SQLiteDatabase db =new DBHelper(context).getReadableDatabase();\n\n Cursor cursor = db.query(DBContract.Switch.TABLE_NAME,\n null,DBContract.Switch.COLUMN_NAME_NAME+\" = ?\",\n new String[]{String.valueOf(name)},\n null, //groupby\n null, //having\n null //orderby\n );\n if(cursor.moveToFirst()){\n int status = cursor.getInt(cursor.getColumnIndex(DBContract.Switch.COLUMN_NAME_STATUS));\n cursor.close();\n db.close();\n\n Log.d(TAG, \"have switch so return status : switch - \" + name + \" status - \" + status);\n return status;\n }\n else {\n this.createSwitch(name);\n int status=this.getStatus(name);\n Log.d(TAG, \"havent switch : so create - \" + name+ \" status - \"+status);\n return status;\n }\n }", "private void GetConfigDetails() {\n\t\tCursor c = database.rawQuery(\"select * from config\", null);\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\r\n\t\t\t\t\tmuUid = c.getString(c.getColumnIndex(\"id\"));\r\n\t\t\t\t\tmuUsername = c.getString(c.getColumnIndex(\"username\"));\r\n\t\t\t\t\tmuPassword = c.getString(c.getColumnIndex(\"password\"));\r\n\t\t\t\t\tmuFname = c.getString(c.getColumnIndex(\"fname\"));\r\n\t\t\t\t\tmuLname = c.getString(c.getColumnIndex(\"lname\"));\r\n\t\t\t\t\tmuEmail = c.getString(c.getColumnIndex(\"email\"));\r\n\t\t\t\t\tmuMobile = c.getString(c.getColumnIndex(\"mobile\"));\r\n\t\t\t\t\tmuUrl = c.getString(c.getColumnIndex(\"url\"));\r\n\t\t\t\t\tmuRole = c.getString(c.getColumnIndex(\"role\"));\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t}\r\n\t\tc.close();\r\n\t}", "@Override\n public List<ModuleHealth> getSystemHealth() {\n return storage.getSystemHealth();\n }", "public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }", "@GetMapping(\"/health\")\n\t@ApiOperation(value = \"Checks the health of Authentication microservice\")\n\tpublic ResponseEntity<String> healthCheckup() {\n\t\tlog.info(\"Health Check for Authentication Microservice\");\n\t\tlog.info(\"health checkup ----->{}\", \"up\");\n\t\treturn new ResponseEntity<>(\"Up and running...\", HttpStatus.OK);\n\t}", "@Test\n\tpublic void testGetDatabaseStatus_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder(new DatabaseComponent[] {});\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder(DatabaseStatus.fromString(\"\"));\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "public Map<String, Object> getCurrentData() throws Exception;", "public StatusCheckDataObject getJob_StatusCheck() {\r\n return job_StatusCheck;\r\n }", "private Home getMsisdnHistoryHome(final Context ctx)\r\n {\r\n return (Home) ctx.get(MsisdnMgmtHistoryHome.class);\r\n }", "public List<Highscore> getHighscore(Context context){\n highscore = db.getHighscore();\n return highscore;\n }", "java.lang.String getDetails();", "public Employee getEmployeeDetails() throws SQLException {\n Cursor cursor = db.query(true, Constants.EMPLOYEE_TABLE, new String[]{Constants.EMPLOYEE_PHOTO,\r\n Constants.EMPLOYEE_NAME, Constants.EMPLOYEE_AGE}, null, null, null, null, null, null);\r\n\r\n if (cursor.moveToLast()) { //if statement executes from top to down and decides whether a certain statement will executes or not\r\n String employeeName = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_NAME));\r\n String employeeAge = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_AGE));\r\n byte[] blob = cursor.getBlob(cursor.getColumnIndex(Constants.EMPLOYEE_PHOTO));\r\n cursor.close();\r\n return new Employee(employeeName, employeeAge, CommonUtilities.getPhoto(blob));\r\n }\r\n cursor.close();\r\n return null; // Return statement\r\n }", "public List<?> queryCheckData(String branchId, MultiQueryCheck multiquerycheck,Pagination pagination){\n\t\t\n\t\tString sql = \"select c.check_id checkid,c.branch_id branchid, c.room_id roomid, c.room_type roomtype,c.rp_id rpid, c.room_price roomprice,\" +\n\t\t\t\t\t \" c.check_user checkuser,transtitles(c.check_user, 'tb_c_member', 'member_id', 'member_name') checkusername,\" +\n\t\t\t\t\t \" substr(c.check_user, 0,decode(instr(c.check_user, ',') - 1, '-1', length(c.check_user), instr(c.check_user, ',') - 1)) firstcheckuser,\" +\n\t\t\t\t\t \"transtitles(substr(c.check_user,0,decode(instr(c.check_user, ',') - 1, '-1',length(c.check_user), instr(c.check_user, ',') - 1)), 'tb_c_member', 'member_id','member_name') firstcheckusername,\" +\n\t\t\t\t\t \" transtitles(substr(c.check_user,0, decode(instr(c.check_user, ',') - 1, '-1',length(c.check_user),instr(c.check_user, ',') - 1)),'tb_c_member','member_id','mobile') firstcheckuserphone, to_char(c.checkin_time, 'YYYY/MM/DD HH24:MI') checkintime,\" +\n\t\t\t\t\t \" to_char(c.checkout_time, 'YYYY/MM/DD HH24:MI') checkouttime, c.deposit deposit, c.ttv ttv, c.cost cost,c.pay pay,c.account_fee accountfee,\" +\n\t\t\t\t\t \" c.total_fee totalfee, c.pay_type paytype,c.pay_info payinfo,c.payer payer,c.switch_id switchid,\" +\n\t\t\t\t\t \" c.status status, decode(c.status, 1,'在住', 2, '离店', '已退未结') statusname, c.record_time recordtime,\" +\n\t\t\t\t\t \" c.record_user recorduser, c.remark remark, r.room_name roomname,o.order_user orderuser,\" +\n\t\t\t\t\t \"transtitles(o.order_user, 'tb_c_member', 'member_id', 'member_name') orderusername,\" +\n\t\t\t\t\t \"(select t2.rank_name from tb_c_member t1,tp_c_memberrank t2 where t1.member_rank=t2.member_rank and t1.member_id=o.order_user) rankname,o.m_phone mphone,\" +\n\t\t\t\t\t \" o.source source,decode(o.source, '1','app', '2','网站', '3','分店', '4','wap', '5','合作渠道','其他') decodesource, o.guarantee guarantee,decode(o.guarantee,'1','无','2','担保') decodeguarantee, o.limited limited from tb_p_check c, tp_p_roomtype r, tb_p_order o\" +\n\t\t\t\t\t \" where c.room_type = r.room_type(+) and c.check_id = o.order_id {and c.status like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and c.branch_id like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and c.check_id like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and c.room_id like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and r.room_name like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and to_char(c.checkin_time, 'yyyy/MM/dd') like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and to_char(c.checkout_time, 'yyyy/MM/dd') like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and transtitles(substr(c.check_user,0,decode(instr(c.check_user, ',') - 1, '-1',length(c.check_user), instr(c.check_user, ',') - 1)), 'tb_c_member', 'member_id','member_name') like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and o.guarantee like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and transtitles(o.order_user, 'tb_c_member', 'member_id', 'member_name') like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and o.m_phone like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and o.record_time >= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" {and o.record_time <= to_date(?, 'yyyy/MM/dd')}\" +\n\t\t\t\t\t \" {and c.checkin_time >= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" {and c.checkin_time <= to_date(?, 'yyyy/MM/dd')}\" +\n\t\t\t\t\t \" {and c.checkout_time >= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" {and c.checkout_time <= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" order by c.check_id desc\";\n\t\treturn findBySQLWithPagination(sql,new String[]{multiquerycheck.getStatus(),branchId, multiquerycheck.getCheckid(), multiquerycheck.getRoomid(),\n\t\t\t\tmultiquerycheck.getRoomtype(), multiquerycheck.getCheckintime(), multiquerycheck.getCheckouttime(), multiquerycheck.getCheckuser(),multiquerycheck.getGuarantee(),\n\t\t\t\tmultiquerycheck.getOrderuser(), multiquerycheck.getMphone(),multiquerycheck.getOrdertimebegin(),multiquerycheck.getOrdertimeend(),\n\t\t\t\tmultiquerycheck.getArrivaltimebegin(),multiquerycheck.getArrivaltimeend(),multiquerycheck.getLeavetimebegin(),multiquerycheck.getLeavetimeend()},pagination);\n\t}", "public static boolean getHealthCheckStatus(Map<String, Object> map) {\n\n\t\tString status = UtilitaireDao.get(0).isConnectionOk() ? HEALTHCHECK_RESULT_UP : HEALTHCHECK_RESULT_DOWN;\n\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_STATUS, status);\n\n\t\tMap<String, Object> details = new HashMap<>();\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_DETAILS, details);\n\n\t\tHashMap<String, String> dbHealthCheck = new HashMap<>();\n\t\tdetails.put(HEALTHCHECK_ATTRIBUTE_DATABASEHEALTHCHECK, dbHealthCheck);\n\t\tdbHealthCheck.put(HEALTHCHECK_ATTRIBUTE_STATUS, status);\n\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_VERSION, properties.getVersion());\n\n\t\treturn map.getOrDefault(HEALTHCHECK_ATTRIBUTE_STATUS, \"\").equals(HEALTHCHECK_RESULT_UP);\n\t}", "ChronicCheck selectByPrimaryKey(Integer chroniccheckId);", "@Test\n\tpublic void testGet() {\n\t\tWellRegistryKey well = new WellRegistryKey(\"USGS\", \"402734087033401\"); // was 007\n\t\tWellDataType type = WellDataType.WATERLEVEL;\n\t\tCacheMetaData cmd = dao.get(well, type);\n\t\t\n\t\tassertNotNull(\"expected some meta data\",cmd);\n\t\tSystem.out.printf(\"Got successCt=%d, failCt=%d, last attempt=%s\\n\", cmd.getSuccessCt(), cmd.getFailCt(), cmd.getMostRecentAttemptDt());\n\t\tassertEquals(\"Agency code\", \"USGS\", cmd.getAgencyCd());\n\t\tassertEquals(\"Site no\", \"402734087033401\", cmd.getSiteNo());\n\t\tassertTrue(\"non-negative fail count\", cmd.getFailCt() >= 0);\n\t\tassertTrue(\"non-negative success count\", cmd.getSuccessCt() >= 0);\n\t\t\n\t}", "public String getCheckStatus() {\r\n return checkStatus;\r\n }", "public java.lang.String getTestDBStatusResult() {\r\n return localTestDBStatusResult;\r\n }", "public String getStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\treturn background.getStatus();\n\t}", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "public String getStatusInfoDetails() {\r\n return statusInfoDetails;\r\n }", "String getDataStatus();", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "public static Map<String, Integer> getCurrentContainerDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(ContainerStatsEntity.class, \"contSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.statsDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ContainerStatsEntity> contEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(ContainerStatsEntity contStsEntity : contEntityList){\n\t\t\tif(contStsEntity.getComponent() != null && contStsEntity.getComponent().getParentComponent() != null){\n\t\t\t\tString fullAppName = contStsEntity.getComponent().getParentComponent().getComponentName() + \"/\" + contStsEntity.getComponent().getComponentName();\n\t\t\t\tmapApiSts.put(fullAppName, contStsEntity.getTotalContainer());\n\t\t }else if(contStsEntity.getComponent() != null){\n\t\t \tmapApiSts.put(contStsEntity.getComponent().getComponentName(), contStsEntity.getTotalContainer());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "private void getthedayactive() {\n\t\t Cursor c=mydb.rawQuery(\"SELECT * FROM day where days='\"+today+\"' \", null);\n\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata after retriving completed @@@@@@@@@@@@@@@@@@@@@\");\n\t\t c.moveToFirst();\n\t\t \n\t\t if(c!=null)\n\t\t {\n\t\t\t do{\n\t\t\t\t \n\t\t\t\t int c1=c.getColumnIndex(\"isActive\");\n\t\t\t\t if(c.getCount()>0)\n\t\t\t\t active=c.getInt(c1);\n\t\t\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata \"+active);\n\t\t\t\t \n\t\t\t }while(c.moveToNext());\n\t\t\t \n\t\t }\n\t}", "public static List<HealthCheckVO> updateHealthCheckStatusInDB(List<HealthCheckVO> healthCheckVOs) throws SQLException {\n\t\t\n\t\tList<HealthCheckVO> returnStatusChangedList = new ArrayList<HealthCheckVO>();\n\t\tfor (HealthCheckVO healthCheckVO : healthCheckVOs) {\n\t\t\tif(healthCheckVO.getStatus() == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tStatus status = healthCheckVO.getStatus().getStatus();\n\t\t\tif (status == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!status.equals(Status.UP)){\n\t\t\t\tlogger.info(\"STATUS CHECK SUCCESS>> HealthCheckId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId()\n\t\t\t\t\t\t+ \"; isSuccess : \" + status.getStatusName()\n\t\t\t\t\t\t+ \"; Message : \" + status.getStatusDesc());\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tboolean isStatusChanged = updateStatus(healthCheckVO);\n\t\t\t\tif(isStatusChanged){\n\t\t\t\t\treturnStatusChangedList.add(healthCheckVO);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlogger.error(\"Exception in DB Update Doing Rollback\", ex);\n\t\t\t\tthrow ex;\n\t\t\t}\n\t\t}\n\t\tlogger.debug(\"DB Update Success - Doing commit\");\n\t\treturn returnStatusChangedList;\n\t}", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "public List<IkrInstanceData> fetchDBMS_SYBASE_LOG_SEVERITY()\r\n\tthrows ConnectorException, FetchException, PersistenceException {\t \r\n\t\tList<IkrInstanceData> res = new ArrayList<IkrInstanceData>();\r\n\t\t\r\n\t\tSybaseLogMeasurement measurement = (SybaseLogMeasurement)client.getMeasurement(\"DBMS_SYBASE_LOG_SEVERITY\");\r\n\r\n\t\tMap<String, Integer> severities = measurement.getLogSeverityResult();\t\t\r\n\t\tfor(String key : severities.keySet())\r\n\t\t\tres.add(new SybaseLogsSeverityIkrInstanceData(key + \"@\" + client.getDatabaseInstance(), severities.get(key), fetchDate));\r\n\t\t\r\n\t\treturn res;\r\n\t}", "public HealthModel() {\n healthMetrics = new ArrayList<HealthMetric>();\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n this.fetchHealthMetrics();\n }", "public static MyPdStore getMyCurrentDetails() {\n\t\treturn myCurrentDetails;\n\t}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "java.util.List<io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin> \n getActionLogList();", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testGetDatabaseStatus_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder();\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder();\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "public String displayNameTickets(){\n String p = \" \";\n try {\n \n rs = stmt.executeQuery \n (\"select * from JEREMY.TICKET ORDER BY NAME\");\n p = loopDBInfo(rs);\n \n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n } \n return p;\n \n }", "public StockDetails viewStock() {\n\t\tint availableStock = 0;\n\t\tStockDetails stockDetails = new StockDetails(); \n\t\t \n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"select * from stock_details\";\n\t\t\tPreparedStatement pst = con.prepareStatement(sql);\n\t\t\tResultSet rs = pst.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\t stockDetails.setStockAvailability(rs.getInt(\"stock_availability\"));\n\t\t\t\t Date date = rs.getDate(\"inserted_date\");\n\t\t\t\t stockDetails.setStockAddedDate(date.toLocalDate());\n\t \n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t\treturn stockDetails;\n\t}", "@Override\n\tpublic List<HeadUnit> getallHeadUnitDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tString sql = \"SELECT * FROM headunit\";\n\t\tList<HeadUnit> listHeadunit = jdbcTemplate.query(sql, new RowMapper<HeadUnit>() {\n\t\t\t@Override\n\t\t\tpublic HeadUnit mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\t// set parameters\n\t\t\t\tHeadUnit headunit = new HeadUnit();\n\t\t\t\theadunit.setHeadunitid(rs.getLong(\"headunit_id\"));\n\t\t\t\theadunit.setUserid(rs.getInt(\"user_id\"));\n\t\t\t\theadunit.setCarname(rs.getString(\"carname\"));\n\t\t\t\theadunit.setHduuid(rs.getString(\"hduuid\"));\n\t\t\t\theadunit.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\theadunit.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\theadunit.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn headunit;\n\t\t\t}\n\t\t});\n\t\treturn listHeadunit;\n\t}", "protected static void get() {\n\t\tstepsTable.get();\n\t\tstepsTable.getWeek();\n\t\tactive.get();\n\t\tmeals.get();\n\t\taccountInfo.get();\n\t\t\n\t}", "public int getCurHealth() {\n return this.curHealth;\n }", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testGetDatabaseStatus_3()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder();\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder();\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "public int getHealth();", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "public String getUserActivePurchaseLog(int conversationId){\n\t String UserActivePurchaseLogId=null;\n\t try{\n\t\t //STEP 2: Register JDBC driver\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t //STEP 3: Open a connection\n\t\t ////System.out.println(\"Connecting to database...\");\n\t\t conn = DriverManager.getConnection(DB_URL,USER,PASS);\n\n\t\t //STEP 4: Execute a query\n\t\t ////System.out.println(\"Creating statement...\");\n\t\t stmt = conn.createStatement();\n\t\t \n\t\t //Dapetin jarak setiap narik data\n\t\t String statement = \"SELECT * FROM `purchase_logs` INNER JOIN `conversations` ON `purchase_logs`.`user_id` = `conversations`.`user_id` WHERE `conversations`.`id` = \"+conversationId+\" AND `purchase_logs`.`status` = 0\";\n\t\t \n\t\t ////System.out.println(statement);\n\t\t ResultSet rs = stmt.executeQuery(statement);\n\t\t while(rs.next()){\n\t \t\t\t//////System.out.println(\"test III\");\n\t\t //Retrieve by column name\n\t\t String id = rs.getString(\"id\");\n\t\t //Display values\n\t\t ////System.out.println(\", Purchase Log Id : \" + id);\n\t\t UserActivePurchaseLogId = id;\n\t\t }\n\t\t //STEP 6: Clean-up environment\n\t\t rs.close();\n\t\t stmt.close();\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t //Handle errors for JDBC\n\t\t se.printStackTrace();\n\t\t }catch(Exception e){\n\t\t //Handle errors for Class.forName\n\t\t e.printStackTrace();\n\t\t }finally{\n\t\t //finally block used to close resources\n\t\t try{\n\t\t if(stmt!=null)\n\t\t stmt.close();\n\t\t }catch(SQLException se2){\n\t\t }// nothing we can do\n\t\t try{\n\t\t if(conn!=null)\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t se.printStackTrace();\n\t\t }//end finally try\n\t\t }//end try\n\t \t ////System.out.println(\"Goodbye!\");\t \n\t return UserActivePurchaseLogId;\n }", "public List<StatusDemande> getStatusDemandes(){\n return statusDemandeRepository.findAll();\n }", "public static String getTestTableStatus() {\n\n try {\n AmazonDynamoDBClient ddb = SplashActivity.clientManager\n .ddb();\n\n DescribeTableRequest request = new DescribeTableRequest()\n .withTableName(SplashActivity.\n clientManager.getContext().getString(R.string.raw_menu_items_table));\n DescribeTableResult result = ddb.describeTable(request);\n\n String status = result.getTable().getTableStatus();\n return status == null ? \"\" : status;\n\n } catch (ResourceNotFoundException e) {\n } catch (AmazonServiceException ex) {\n SplashActivity.clientManager\n .wipeCredentialsOnAuthError(ex);\n }\n\n return \"\";\n }", "List<SrInwardTruckQualityCheck> getAll();", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "int getHealth();", "public static String getBills(){\n return \"select * from current_bills\";\n }", "public MyInfo getMyInfo() {\n\t\t\n\t\tMyInfo myInfo = null;\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getMyInfo);\n\t\t\tResultSet rs = ps.executeQuery();\n\n\t\t\tString query = \"SELECT IdGlobal, MYTCELLIP, MYTCELLPORT, MYPUBLICKEY, MYPRIVATEKEY FROM MyInfo\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tint myGid = rs.getInt(1);\n\t\t\t\tString myTcellIp = rs.getString(2);\n\t\t\t\tint myTcellPort = rs.getInt(3);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPubKeyBlob = rs.getBlob(4);\n\t\t\t\tbyte[] bPubKey = myPubKeyBlob.getBytes(1, (int) myPubKeyBlob.length());\n\t\t\t\tString myPubKey = new String(bPubKey);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPrivKeyBlob = rs.getBlob(5);\n\t\t\t\tbyte[] bPrivKey = myPrivKeyBlob.getBytes(1, (int) myPrivKeyBlob.length());\n\t\t\t\tString myPrivKey = new String(bPrivKey);\n\t\t\t\t\n\t\t\t\tmyInfo = new MyInfo(myGid, myTcellIp, myTcellPort, myPubKey, myPrivKey);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t}\n\n\t\treturn myInfo;\n\t}", "Object getCurrentData();", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "public int getCurHealth() {\n\t\treturn curHealth;\n\t}", "public void consultaTest() throws Exception{\n\t\t\n\t ResultSet rs = statement.executeQuery(\"select * from statistics\");\n\t \n\t \n\t while(rs.next())\n\t {\n\t\t \n\t\t DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss.SSS\");\n\t\t Date date = df.parse(rs.getString(\"timeActual\"));\n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(date);\n\t\t \n\t\t String completoDay = cal.get(Calendar.YEAR)+\"-\"+(cal.get(Calendar.MONTH) + 1)+\"-\"+ cal.get(Calendar.DAY_OF_MONTH);\n\t\t \n\t System.out.println(\"id= \" + rs.getInt(\"id\") + \" memory= \" + rs.getInt(\"memory\") + \" cpu= \" \n\t \t+ rs.getInt(\"cpu\") + \" timeActual= \" + completoDay);\n\t }\n\t \n\t if(rs != null)\n\t\t rs.close();\n\t \n\t if(connection != null)\n\t connection.close();\n\t \n\t}", "public ResultSet getItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tStatement stmt = con.createStatement();\n\t\t/** Proceeds if user is logged in */\n\t\tString queryString = \"Select * From team1.GABES_ITEM i Where i.ITEM_ID='\"\n\t\t\t\t+ this.item_id + \"'\";\n\t\tResultSet result = stmt.executeQuery(queryString);\n\t\treturn result;\n\t}", "public void pullDetails() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select * from PersonalDetails where id='\"+userId+\"'\";\n\t\t\n\t\tconnectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\t\n\t\t\t\tint foundId = rs.getInt(\"id\");\n\t\t\t\tif(foundId == userId) {\n\t\t\t\t\t// Get new details from database\n\t\t\t\t\tString firstName = rs.getString(\"fName\");\n\t\t\t\t\tString lastName = rs.getString(\"sName\");\n\t\t\t\t\tString dob = rs.getString(\"dob\");\n\t\t\t\t\tString address1 = rs.getString(\"address1\");\n\t\t\t\t\tString address2 = rs.getString(\"address2\");\n\t\t\t\t\tString city = rs.getString(\"city\");\n\t\t\t\t\tString county = rs.getString(\"county\");\n\t\t\t\t\tString postCode = rs.getString(\"postcode\");\n\t\t\t\t\tString mobileNum = rs.getString(\"mobileNum\");\n\t\t\t\t\tString telephoneNum = rs.getString(\"telephoneNum\");\n\t\t\t\t\tString emergencyContact = rs.getString(\"emergencyContact\");\n\t\t\t\t\tString emergencyNum = rs.getString(\"emergencyContactNum\");\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t// Set new Details\n\t\t\t\t\tmyCurrentDetails.setFirstName(firstName);\n\t\t\t\t\tmyCurrentDetails.setLastName(lastName);\n\t\t\t\t\tmyCurrentDetails.setDoB(dob);\n\t\t\t\t\tmyCurrentDetails.setAddress1(address1);\n\t\t\t\t\tmyCurrentDetails.setAddress2(address2);\n\t\t\t\t\tmyCurrentDetails.setCity(city);\n\t\t\t\t\tmyCurrentDetails.setCounty(county);\n\t\t\t\t\tmyCurrentDetails.setPostcode(postCode);\n\t\t\t\t\tmyCurrentDetails.setMobile(mobileNum);\n\t\t\t\t\tmyCurrentDetails.setTelenum(telephoneNum);\n\t\t\t\t\tmyCurrentDetails.setEmergencyContact(emergencyContact);\n\t\t\t\t\tmyCurrentDetails.setEmergencyNum(emergencyNum);\n\t\t\t}else {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t \t\t \"Connection Made but User not found!\",\n\t\t \t\t \"Error-User Not Found\",\n\t\t \t\t JOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\t\t}catch(SQLException e){\n\t\t\tJOptionPane.showMessageDialog(null,\n\t \t\t \"Cannot Fetch Your Details!\",\n\t \t\t \"Error\",\n\t \t\t JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "@Override\r\n protected JSONObject doInBackground(Void... params) {\n JSONObject obj = new JSONObject();\r\n try {\r\n HttpConnections httpConnections = new HttpConnections(getContext());\r\n\r\n obj = httpConnections.httpsGet(Constants.URL_PREFIX + Constants.CHECK_FLOW_BY_ID + \"/\" + appGlobals.getCurrentFlowId(), mToken);\r\n if (obj != null) {\r\n obj = obj.getJSONObject(\"detail\");\r\n\r\n }\r\n\r\n } catch (CertificateException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (KeyStoreException e) {\r\n e.printStackTrace();\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n } catch (KeyManagementException e) {\r\n e.printStackTrace();\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return obj;\r\n }", "public int getHealth() {\n return getStat(health);\n }", "@Override\n\tpublic CheckBean getSpecificCheck(long checkId) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "public double getHealth() {\n return classData.getHealth(level);\n }", "io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin getActionLog(int index);", "private String CheckRecordExistInAlarmDB(String alarmCount) {\n DataHolder mDataHolder;\n String url = \"select * from \" + mDbHelper.mTableAlarm + \" where \" + mDbHelper.mFieldAlarmUserId + \"= '\" + mPreferenceHelper.getUserId() + \"'\" + \" and \" + mDbHelper.mFieldAlarmCountNo + \"= '\" + alarmCount + \"'\";\n System.out.println(\" URL : \" + url);\n mDataHolder = mDbHelper.read(url);\n if (mDataHolder != null) {\n System.out.println(\" AlarmList : \" + url + \" : \" + mDataHolder.get_Listholder().size());\n if (mDataHolder != null && mDataHolder.get_Listholder().size() != 0) {\n return mDataHolder.get_Listholder().get(0).get(mDbHelper.mFieldAlarmLocalID);\n } else {\n return \"-1\";\n }\n }\n return \"-1\";\n }", "public JSONArray getResultsForHealthAndLifeStyle() {\n\n SQLiteDatabase db1 = this.getReadableDatabase();\n Cursor cursor = null;\n JSONArray resultSet = new JSONArray();\n\n try {\n String searchQuery = \"SELECT * FROM health_and_lifestyle where flag = 0 \";\n cursor = db1.rawQuery(searchQuery, null);\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n\n int totalColumn = cursor.getColumnCount();\n JSONObject rowObject = new JSONObject();\n\n for (int i = 0; i < totalColumn; i++) {\n if (cursor.getColumnName(i) != null) {\n try {\n if (cursor.getString(i) != null) {\n\n rowObject.put(cursor.getColumnName(i), cursor.getString(i));\n } else {\n rowObject.put(cursor.getColumnName(i), \"\");\n }\n } catch (Exception e) {\n // Log.d(\"TAG_NAME\", e.getMessage());\n }\n\n }\n }\n resultSet.put(rowObject);\n cursor.moveToNext();\n }\n return resultSet;\n } catch (Exception e) {\n Crashlytics.logException(e);\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n /*if (db1 != null) {\n db1.close();\n }*/\n }\n return resultSet;\n }", "public String[] getDetailsAboutThisMachine() throws StoreFactoryException;", "public ArrayList<CheckPaperTO> getBankCheckReport(String loggedInCode, long bankCheckId) throws Exception {//Return a list of CheckPaperTO\r\n if (getLoggedInCustomerID(loggedInCode) == null) {\r\n return null;\r\n }\r\n CheckPaperDAO checkPaperDAO = new CheckPaperDAO();\r\n ArrayList<CheckPaperTO> arrayList = checkPaperDAO.selectByBankCheckId(bankCheckId);\r\n checkPaperDAO.close();\r\n return arrayList;\r\n }", "@Test(expected = org.apache.axis.NoEndPointException.class)\n\tpublic void testGetDatabaseStatus_5()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub((URL) null, new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder();\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder();\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "public List<HrCStatitem> findAll();" ]
[ "0.625196", "0.6083103", "0.6045668", "0.57399166", "0.57312745", "0.5695957", "0.5502014", "0.5428177", "0.5377691", "0.52975416", "0.52961665", "0.5235494", "0.5224282", "0.5197403", "0.518053", "0.5132678", "0.50796986", "0.5061665", "0.5060643", "0.50543237", "0.5044443", "0.50346786", "0.503387", "0.5033179", "0.5015063", "0.5013232", "0.50021195", "0.49980238", "0.49920002", "0.49851662", "0.49604952", "0.4959934", "0.4951313", "0.4950538", "0.4950444", "0.49490017", "0.4943249", "0.4923391", "0.49192306", "0.49116588", "0.48994422", "0.48938778", "0.48844546", "0.48758814", "0.48663583", "0.48647863", "0.48636773", "0.48634714", "0.48631322", "0.4859871", "0.4856005", "0.4848197", "0.48443416", "0.48430848", "0.48289335", "0.48189202", "0.4817661", "0.4814665", "0.48131514", "0.48110324", "0.48084033", "0.48081014", "0.4797878", "0.4796399", "0.47960538", "0.47837472", "0.47770873", "0.47729462", "0.47674263", "0.47592318", "0.47560322", "0.4753169", "0.47506487", "0.4750082", "0.474867", "0.47427958", "0.47405115", "0.47378412", "0.47349426", "0.47299716", "0.4727851", "0.47239628", "0.4721157", "0.47133625", "0.4712941", "0.47128072", "0.47049627", "0.47038287", "0.47005627", "0.4699745", "0.46974963", "0.46958697", "0.46915722", "0.46838304", "0.46799493", "0.46794364", "0.4678494", "0.46731836", "0.46728554", "0.4672845" ]
0.54317415
7
get CurrentHealth Check Details from DB.
private static HealthCheckVO getCurrentHealthCheckDetails(final int componentId, final int environmentId, final long regionID,final HealthCheckType healthCheckType) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria hcCrit = session.createCriteria(HealthCheckEntity.class,"hc"); hcCrit.add(Restrictions.eq("hc.component.componentId", componentId)); hcCrit.add(Restrictions.eq("hc.environment.environmentId", environmentId)); hcCrit.add(Restrictions.eq("hc.region.regionId", regionID)); if(healthCheckType != null) { hcCrit.add(Restrictions.eq("hc.healthCheckType.healthCheckTypeId", healthCheckType.getHealthCheckTypeId())); } hcCrit.setMaxResults(1); HealthCheckEntity hcEnt = (HealthCheckEntity) hcCrit.uniqueResult(); txn.commit(); if(hcEnt == null){ return null; } HealthCheckVO hcVO = new HealthCheckVO(); hcVO.setHealthCheckId(hcEnt.getHealthCheckId()); if(hcEnt.getCurrentStatus() != null){ hcVO.setCurrentStatus(hcEnt.getCurrentStatus().getStatusId()); } return hcVO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Health getHealthInfo(String id) {\n\t\t RestTemplate restTemplate = new RestTemplate();\n\t\t \n\t\t Health healthInfo = restTemplate.getForObject(BASE_URL + HEALTH_STATUS_URL, Health.class, id);\n\t\t logger.debug(\"Employee Info :\" + healthInfo);\n\t\treturn healthInfo;\n\t}", "public static List<HealthCheckVO> getSurveillerDetailsOfComponent(boolean isDummyHealth) {\n\t\tHashMap<Long,HealthCheckVO> healthCheckVOMap = new HashMap<Long,HealthCheckVO>();\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\t\t\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria healthCheckCriteria = session.createCriteria(HealthCheckEntity.class);\n\t\thealthCheckCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tif(isDummyHealth){\n\t\t\thealthCheckCriteria.add(Restrictions.eq(\"healthCheckType.healthCheckTypeId\", HealthCheckType.DUMMY.getHealthCheckTypeId()));\n\t\t}else{\n\t\t\thealthCheckCriteria.add(Restrictions.ne(\"healthCheckType.healthCheckTypeId\", HealthCheckType.DUMMY.getHealthCheckTypeId()));\n\t\t}\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<HealthCheckEntity> checkEntities = healthCheckCriteria.list();\n\t\tfor(HealthCheckEntity entity : checkEntities) {\n\t\t\tHealthCheckVO hcVO = new HealthCheckVO();\n\t\t\thcVO.setHealthCheckId(entity.getHealthCheckId());\n\t\t\thcVO.setHealthCheckComponentId((long) entity.getComponent().getComponentId());\n\t\t\thcVO.setHealthCheckRegionId(entity.getRegion().getRegionId());\n\t\t\thcVO.setHealthCheckTypeClassName(entity.getHealthCheckType().getHealthCheckTypeClass());\n\t\t\thcVO.setHealthCheckTypeName(entity.getHealthCheckType().getHealthCheckTypeName());\n\t\t\thcVO.setHealthCheckRetryCurrentCount(entity.getFailedCount());\n\t\t\thcVO.setHealthCheckRetryMaxCount(entity.getMaxRetryCount());\n\t\t\tif(entity.getCurrentStatus() != null){\n\t\t\t\thcVO.setCurrentStatus(entity.getCurrentStatus().getStatusId());\n\t\t\t}\n\t\t\thcVO.setEnvironmentId(entity.getEnvironment().getEnvironmentId());\n\t\t\thcVO.setEnvironmentName(entity.getEnvironment().getEnvironmentName());\n\t\t\thcVO.setRegionName(entity.getRegion().getRegionName());\n\t\t\tComponentEntity component = entity.getComponent();\n\t\t\tint compTypeId = component.getComponentType().getComponentTypeId();\n\t\t\thcVO.setComponentType(ComponentType.INFRA.getComponentTypeId() == compTypeId ? ComponentType.INFRA: ComponentType.APP);\n\t\t\tComponentVO cVo = new ComponentVO();\n\t\t\tcVo.setComponentId(component.getComponentId());\n\t\t\tcVo.setComponentName(component.getComponentName());\n\t\t\tif(component.getParentComponent() != null) {\n\t\t\t\tcVo.setParentComponentId(component.getParentComponent().getComponentId());\n\t\t\t\tcVo.setParentComponentName(component.getParentComponent().getComponentName());\n\t\t\t}\n\t\t\thcVO.setComponent(cVo);\n\t\t\t\n if(entity.getHealthCheckParams() !=null && entity.getHealthCheckParams().size() > 0) {\n Map<String,String> paramDetails = new HashMap<String,String>();\n for(HealthCheckParamEntity hcp: entity.getHealthCheckParams()){\n paramDetails.put(hcp.getHealthCheckParamKey(), hcp.getHealthCheckParamVal());\n }\n hcVO.setParamDetails(paramDetails);\n\t\t\t}\n\t\t\thealthCheckVOMap.put(hcVO.getHealthCheckId(), hcVO);\n\t\t}\n\t\ttxn.commit();\n\t\treturn new ArrayList<HealthCheckVO>(healthCheckVOMap.values());\n\t}", "public String getHealthinfo() {\n return healthinfo;\n }", "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "List<CacheHealth> getCacheHealth();", "public String getHealthrecord() {\r\n return healthrecord;\r\n }", "private static HealthCheckVO getCurrentHealthCheckDetails(final int componentId, final int environmentId, final long regionID) {\n\t\treturn getCurrentHealthCheckDetails(componentId, environmentId, regionID, null);\n\t}", "public Health getHealthObj() {\n return health;\n }", "@RequestMapping(value = \"/health\", method = RequestMethod.GET)\n public ResponseEntity<String> healthCheck() {\n\n return new ResponseEntity<String>(\"Up and Running\", HttpStatus.OK);\n }", "@Override\n protected Result check() throws Exception {\n\n try {\n mongoClient.getDB(\"system\").getStats();\n }catch(MongoClientException ex) {\n return Result.unhealthy(ex.getMessage());\n }\n\n\n return Result.healthy();\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void getHealthStatus() {\n getHealthStatusAsync().block();\n }", "@Override\r\n public List<ActiveStatusModel> listActiveStatus() {\r\n return jdbcTemplate.query(SQL_SELECT, new ActiveStatusHelper());\r\n }", "public ReturnData queryEncounterForinfo(){\n ReturnData returnData = new ReturnData();\n String [] jsids = {\"03034a63-e8d6-49a4-8e71-58a544b8fca3\",\n \"1ae3709f-d8c2-4db8-9f38-1a60fb0d2e61\",\n \"7340479a-28fc-44b6-bf18-374f037d5f03\",\n \"e1e5f378-b16f-441e-b673-0f0d2544d108\"};\n try {\n returnData.setData(jueseMapper.selectByPrimaryKey(jsids[MyUuid.getRandomInt(jsids.length)-1]));\n }catch (Exception e){\n returnData.setCode(-1);\n returnData.setData(e.getMessage());\n }finally {\n return returnData;\n }\n }", "@GetMapping(PRODUCT_HEALTH_CHECK)\n public String index() {\n return serviceName + \", system time: \" + System.currentTimeMillis();\n }", "public String getStatusDetails() { return statusDetails; }", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "public List<CheckingAcc> showAll(){\n if (checkingAccRepository.findAll().size()==0){\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"No checking accounts found\");\n }\n return checkingAccRepository.findAll();\n }", "public List<Contract> getHealthContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\"SELECT * FROM CONTRACT WHERE SERVICETYPE=1 AND \"\n\t\t\t\t\t+ \"(DATEENDING >= NOW() OR DATEENDING IS NULL)\", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\n\t}", "private boolean getDetails(){\n ResultSet rs = this.SQL.PreparedSelect(\"btcwallet\", new String[]{\"guid\",\"rnd\",\"time\",\"session\"}, \"`session`=\"+this.Session, \"1\", \"\");\n try {\n if(rs.first()){\n this.GUID=rs.getString(\"guid\");\n this.Time=rs.getString(\"time\");\n this.Creator=rs.getString(\"rnd\");\n return true;\n }\n } catch (SQLException ex) {\n Logger.getLogger(openBTCWallet.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "public User getUserHealthInfo(String userId){\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t/*\n\t\t * This API collect data from more than one web services, so, it applies the services composition\n\t\t */\n\t\t\n\t\t// Get user Recipe\n\t\tResponseEntity<Recipe> rateResponse =\n\t\t restTemplate.exchange(BASE_URL + RECIPE_URL + \"/\" + userId, HttpMethod.GET, \n\t\t \t\tnull, new ParameterizedTypeReference<Recipe>() {\n\t\t });\n\t\tRecipe recipe = rateResponse.getBody();\n\t\tlogger.debug(\"RECIPE Info :\" + recipe);\n\t\t\n\t\t// Get user info\n\t\tResponseEntity<User> userInfoResponse =\n\t\t restTemplate.exchange(BASE_URL + USER_URL + \"/\" + userId, HttpMethod.GET, \n\t\t \t\tnull, new ParameterizedTypeReference<User>() {\n\t\t });\n\t\tUser user = userInfoResponse.getBody();\n\t\tlogger.debug(\"User Info :\" + user);\n\t\t\n\t\tuser.setRecipe(recipe);\n\t\t\n\t\t\n\t\t// Get User health status info\n\t\tHealth healthInfo = restTemplate.getForObject(BASE_URL + HEALTH_STATUS_URL, Health.class, userId);\n\t\tuser.setHealth(healthInfo);\n\t\tlogger.debug(\"User Info :\" + healthInfo);\n\t\t\n\t\treturn user;\n\t}", "public ArrayList<PatientHealthContract> getHealthList(String email) {\n SQLiteDatabase db = helper.getReadableDatabase();\n String selectQuery = \"SELECT \" +\n PatientHealthEntry.COLUMN_AGE + \",\" +\n PatientHealthEntry.COLUMN_BLOOD_GROUP + \",\" +\n PatientHealthEntry.COLUMN_MEDICATION + \",\" +\n PatientHealthEntry.COLUMN_CONDITION + \",\" +\n PatientHealthEntry.COLUMN_NOTES + \",\" +\n PatientHealthEntry.COLUMN_DATE_OF_VISIT +\n \" FROM \" + PatientHealthEntry.TABLE_NAME +\n \" WHERE \" + PatientHealthEntry.COLUMN_EMAIL + \" = \" + \"'\" + email + \"'\" +\n \" ORDER BY date\" + \"(\" + PatientHealthEntry.COLUMN_DATE_OF_VISIT + \")\" +\n \" DESC\" + \";\";\n\n //PatientHealthEntry patient = new PatientHealthEntry();\n ArrayList<PatientHealthContract> healthList = new ArrayList<>();\n\n Cursor cursor = db.rawQuery(selectQuery, null);\n // looping through all rows and adding to list\n\n if (cursor.moveToFirst()) {\n do {\n PatientHealthContract patient = new PatientHealthContract();\n patient.setAge(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_AGE)));\n patient.setBloodGroup(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_BLOOD_GROUP)));\n patient.setCondition(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_CONDITION)));\n patient.setMedication(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_MEDICATION)));\n patient.setNotes(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_NOTES)));\n patient.setDateVisit(cursor.getString(cursor.getColumnIndex(PatientHealthEntry.COLUMN_DATE_OF_VISIT)));\n healthList.add(patient);\n\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n db.close();\n return healthList;\n\n }", "public static List<CounterDetailVO> getCounterDetails() {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCriteria = session.createCriteria(EnvCounterEntity.class);\n\t\tenvCriteria.addOrder(Order.desc(\"environmentId\"));\n\t\tenvCriteria.addOrder(Order.asc(\"counterId\"));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvCounterEntity> envCounterEntities = envCriteria.list();\n\t\tArrayList<CounterDetailVO> returnList = new ArrayList<CounterDetailVO>();\n\t\tfor(EnvCounterEntity entity : envCounterEntities) {\n\t\t\tCounterDetailVO cVO = new CounterDetailVO();\n\t\t\tif(entity.getEnvironment() != null){\n\t\t\t\tcVO.setEnvironmentId(entity.getEnvironmentId());\n\t\t\t}\t\t\t\n\t\t\tcVO.setEnvironmentCounterId(entity.getEnvCounterId());\n\t\t\tcVO.setCounterId(entity.getCounterId());\n\t\t\tcVO.setCounterMetricTypeId(entity.getMetricTypeId());\n\t\t\tcVO.setParameter1(entity.getParameter1());\n\t\t\tcVO.setParameter2(entity.getParameter2());\n\t\t\tcVO.setCounterMetricTypeClassName(entity.getCountMetricType().getCounterMetricTypeClassName());\n\t\t\tcVO.setPlatform(entity.getPlatform());\n\t\t\treturnList.add(cVO);\n\t\t}\n\t\ttxn.commit();\n\t\treturn returnList;\n\t}", "Future<GetHealthCheckerResponse> getHealthChecker(\n GetHealthCheckerRequest request,\n AsyncHandler<GetHealthCheckerRequest, GetHealthCheckerResponse> handler);", "public int getCurrentHealth() {\n return currentHealth;\n }", "String getHealthString() {\n return Integer.toString(health);\n }", "public Response rerouteHealthMonitorData() {\n Response response;\n try {\n response = this.createRequest(\n ProteusEndpointConstants.HEALTH_STATUS_REPORT).getResponse(\n HttpMethod.GET);\n } catch (Exception e) {\n response = Response.serverError().build();\n // if response has an exception, let's assume that OODT cannot be accessed\n // (aka it's been stopped/not started)\n }\n return response;\n }", "public static Map<String, Integer> getCurrentApiDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(ApiStatusEntity.class, \"apiSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.statusDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ApiStatusEntity> apiEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(ApiStatusEntity apiStsEntity : apiEntityList){\n\t\t\tif(apiStsEntity.getComponent() != null){\n\t\t\t\tmapApiSts.put(apiStsEntity.getComponent().getComponentName(), apiStsEntity.getTotalApi());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "public int getCurrentHealth() {\r\n return currentHealth;\r\n }", "public Integer getHealth();", "public ArrayList<PatientHealthCareFirmMap> getAllPatientHealthcareFirmMap() {\n\n ArrayList<PatientHealthCareFirmMap> userHealthcareFirmMapList = new ArrayList<>();\n String query = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \" + RECORD_STATUS + \"=?\";\n String[] whereParams = new String[] {AppConstants.ACTIVE_RECORD_STATUS};\n Cursor cursor = this.db.rawQuery(query, whereParams);\n if (cursor != null && (cursor.moveToFirst())){\n\n do {\n PatientHealthCareFirmMap userHealthcareFirmMap = getPatientHealthCareFirmMapModelFromCursor(cursor);\n if (userHealthcareFirmMap != null){\n userHealthcareFirmMapList.add(userHealthcareFirmMap);\n }\n\n } while ((cursor.moveToNext()));\n\n cursor.close();\n }\n\n return userHealthcareFirmMapList;\n }", "private void fetchBusinessGoalFromDB() \r\n\t{\r\n\t\tthis.showLoadingStatusBar();\r\n\t\tServiceDefTarget endpoint = (ServiceDefTarget) service; \t\t// get the business goal and associated subgoals and assets\r\n\t\tendpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + \"identifyGoalAssetService.rpc\");\r\n\t\tservice.loadBusinessGoalInfo(getCurrentState().getProjectID(), new AsyncCallback<GwtBusinessGoal>()\r\n\t\t{\r\n\t\t\tpublic void onFailure(Throwable caught)\r\n\t\t\t{\r\n\t\t\t\tWindow.alert(caught.getMessage());\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onSuccess(GwtBusinessGoal result)\r\n\t\t\t{\t\t\r\n\t\t\t\t\tbusinessGoal = result;\r\n\t\t\t\t\tsummaryPageCommand.execute();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n\tpublic Collection<Tmly> getTmlyInfo() {\n\t\tString sql = \"select ID_,TITLE,CONTENT,state from tmly\";\n\t\tList<Tmly> list = this.jdbcTemplate.query(sql, new RowMapper<Tmly>() {\n\n\t\t\t@Override\n\t\t\tpublic Tmly mapRow(ResultSet result, int i) throws SQLException {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tTmly tmly = new Tmly();\n\t\t\t\ttmly.setId(result.getInt(\"id_\"));\n\t\t\t\ttmly.setTitle(result.getString(\"title\"));\n\t\t\t\ttmly.setContent(result.getString(\"content\"));\n\t\t\t\treturn tmly;\n\t\t\t}\n\n\t\t});\n\t\treturn list;\n\t}", "public static List getStatusList() \n {\n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"select status from Alumni_data group by status\").list();\n session.close();\n return li;\n }", "public int getStatus(String name){\n Log.d(TAG, \"get Status : gettng status - \" + name);\n SQLiteDatabase db =new DBHelper(context).getReadableDatabase();\n\n Cursor cursor = db.query(DBContract.Switch.TABLE_NAME,\n null,DBContract.Switch.COLUMN_NAME_NAME+\" = ?\",\n new String[]{String.valueOf(name)},\n null, //groupby\n null, //having\n null //orderby\n );\n if(cursor.moveToFirst()){\n int status = cursor.getInt(cursor.getColumnIndex(DBContract.Switch.COLUMN_NAME_STATUS));\n cursor.close();\n db.close();\n\n Log.d(TAG, \"have switch so return status : switch - \" + name + \" status - \" + status);\n return status;\n }\n else {\n this.createSwitch(name);\n int status=this.getStatus(name);\n Log.d(TAG, \"havent switch : so create - \" + name+ \" status - \"+status);\n return status;\n }\n }", "private void GetConfigDetails() {\n\t\tCursor c = database.rawQuery(\"select * from config\", null);\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\r\n\t\t\t\t\tmuUid = c.getString(c.getColumnIndex(\"id\"));\r\n\t\t\t\t\tmuUsername = c.getString(c.getColumnIndex(\"username\"));\r\n\t\t\t\t\tmuPassword = c.getString(c.getColumnIndex(\"password\"));\r\n\t\t\t\t\tmuFname = c.getString(c.getColumnIndex(\"fname\"));\r\n\t\t\t\t\tmuLname = c.getString(c.getColumnIndex(\"lname\"));\r\n\t\t\t\t\tmuEmail = c.getString(c.getColumnIndex(\"email\"));\r\n\t\t\t\t\tmuMobile = c.getString(c.getColumnIndex(\"mobile\"));\r\n\t\t\t\t\tmuUrl = c.getString(c.getColumnIndex(\"url\"));\r\n\t\t\t\t\tmuRole = c.getString(c.getColumnIndex(\"role\"));\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t}\r\n\t\tc.close();\r\n\t}", "@Override\n public List<ModuleHealth> getSystemHealth() {\n return storage.getSystemHealth();\n }", "public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }", "@GetMapping(\"/health\")\n\t@ApiOperation(value = \"Checks the health of Authentication microservice\")\n\tpublic ResponseEntity<String> healthCheckup() {\n\t\tlog.info(\"Health Check for Authentication Microservice\");\n\t\tlog.info(\"health checkup ----->{}\", \"up\");\n\t\treturn new ResponseEntity<>(\"Up and running...\", HttpStatus.OK);\n\t}", "@Test\n\tpublic void testGetDatabaseStatus_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder(new DatabaseComponent[] {});\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder(DatabaseStatus.fromString(\"\"));\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "public Map<String, Object> getCurrentData() throws Exception;", "public StatusCheckDataObject getJob_StatusCheck() {\r\n return job_StatusCheck;\r\n }", "private Home getMsisdnHistoryHome(final Context ctx)\r\n {\r\n return (Home) ctx.get(MsisdnMgmtHistoryHome.class);\r\n }", "public List<Highscore> getHighscore(Context context){\n highscore = db.getHighscore();\n return highscore;\n }", "public Employee getEmployeeDetails() throws SQLException {\n Cursor cursor = db.query(true, Constants.EMPLOYEE_TABLE, new String[]{Constants.EMPLOYEE_PHOTO,\r\n Constants.EMPLOYEE_NAME, Constants.EMPLOYEE_AGE}, null, null, null, null, null, null);\r\n\r\n if (cursor.moveToLast()) { //if statement executes from top to down and decides whether a certain statement will executes or not\r\n String employeeName = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_NAME));\r\n String employeeAge = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_AGE));\r\n byte[] blob = cursor.getBlob(cursor.getColumnIndex(Constants.EMPLOYEE_PHOTO));\r\n cursor.close();\r\n return new Employee(employeeName, employeeAge, CommonUtilities.getPhoto(blob));\r\n }\r\n cursor.close();\r\n return null; // Return statement\r\n }", "public List<?> queryCheckData(String branchId, MultiQueryCheck multiquerycheck,Pagination pagination){\n\t\t\n\t\tString sql = \"select c.check_id checkid,c.branch_id branchid, c.room_id roomid, c.room_type roomtype,c.rp_id rpid, c.room_price roomprice,\" +\n\t\t\t\t\t \" c.check_user checkuser,transtitles(c.check_user, 'tb_c_member', 'member_id', 'member_name') checkusername,\" +\n\t\t\t\t\t \" substr(c.check_user, 0,decode(instr(c.check_user, ',') - 1, '-1', length(c.check_user), instr(c.check_user, ',') - 1)) firstcheckuser,\" +\n\t\t\t\t\t \"transtitles(substr(c.check_user,0,decode(instr(c.check_user, ',') - 1, '-1',length(c.check_user), instr(c.check_user, ',') - 1)), 'tb_c_member', 'member_id','member_name') firstcheckusername,\" +\n\t\t\t\t\t \" transtitles(substr(c.check_user,0, decode(instr(c.check_user, ',') - 1, '-1',length(c.check_user),instr(c.check_user, ',') - 1)),'tb_c_member','member_id','mobile') firstcheckuserphone, to_char(c.checkin_time, 'YYYY/MM/DD HH24:MI') checkintime,\" +\n\t\t\t\t\t \" to_char(c.checkout_time, 'YYYY/MM/DD HH24:MI') checkouttime, c.deposit deposit, c.ttv ttv, c.cost cost,c.pay pay,c.account_fee accountfee,\" +\n\t\t\t\t\t \" c.total_fee totalfee, c.pay_type paytype,c.pay_info payinfo,c.payer payer,c.switch_id switchid,\" +\n\t\t\t\t\t \" c.status status, decode(c.status, 1,'在住', 2, '离店', '已退未结') statusname, c.record_time recordtime,\" +\n\t\t\t\t\t \" c.record_user recorduser, c.remark remark, r.room_name roomname,o.order_user orderuser,\" +\n\t\t\t\t\t \"transtitles(o.order_user, 'tb_c_member', 'member_id', 'member_name') orderusername,\" +\n\t\t\t\t\t \"(select t2.rank_name from tb_c_member t1,tp_c_memberrank t2 where t1.member_rank=t2.member_rank and t1.member_id=o.order_user) rankname,o.m_phone mphone,\" +\n\t\t\t\t\t \" o.source source,decode(o.source, '1','app', '2','网站', '3','分店', '4','wap', '5','合作渠道','其他') decodesource, o.guarantee guarantee,decode(o.guarantee,'1','无','2','担保') decodeguarantee, o.limited limited from tb_p_check c, tp_p_roomtype r, tb_p_order o\" +\n\t\t\t\t\t \" where c.room_type = r.room_type(+) and c.check_id = o.order_id {and c.status like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and c.branch_id like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and c.check_id like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and c.room_id like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and r.room_name like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and to_char(c.checkin_time, 'yyyy/MM/dd') like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and to_char(c.checkout_time, 'yyyy/MM/dd') like '%' || ? || '%'}\" +\n\t\t\t\t\t \" {and transtitles(substr(c.check_user,0,decode(instr(c.check_user, ',') - 1, '-1',length(c.check_user), instr(c.check_user, ',') - 1)), 'tb_c_member', 'member_id','member_name') like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and o.guarantee like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and transtitles(o.order_user, 'tb_c_member', 'member_id', 'member_name') like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and o.m_phone like '%' || ? || '%'} \" +\n\t\t\t\t\t \" {and o.record_time >= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" {and o.record_time <= to_date(?, 'yyyy/MM/dd')}\" +\n\t\t\t\t\t \" {and c.checkin_time >= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" {and c.checkin_time <= to_date(?, 'yyyy/MM/dd')}\" +\n\t\t\t\t\t \" {and c.checkout_time >= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" {and c.checkout_time <= to_date(?, 'yyyy/MM/dd')}\" + \n\t\t\t\t\t \" order by c.check_id desc\";\n\t\treturn findBySQLWithPagination(sql,new String[]{multiquerycheck.getStatus(),branchId, multiquerycheck.getCheckid(), multiquerycheck.getRoomid(),\n\t\t\t\tmultiquerycheck.getRoomtype(), multiquerycheck.getCheckintime(), multiquerycheck.getCheckouttime(), multiquerycheck.getCheckuser(),multiquerycheck.getGuarantee(),\n\t\t\t\tmultiquerycheck.getOrderuser(), multiquerycheck.getMphone(),multiquerycheck.getOrdertimebegin(),multiquerycheck.getOrdertimeend(),\n\t\t\t\tmultiquerycheck.getArrivaltimebegin(),multiquerycheck.getArrivaltimeend(),multiquerycheck.getLeavetimebegin(),multiquerycheck.getLeavetimeend()},pagination);\n\t}", "java.lang.String getDetails();", "public static boolean getHealthCheckStatus(Map<String, Object> map) {\n\n\t\tString status = UtilitaireDao.get(0).isConnectionOk() ? HEALTHCHECK_RESULT_UP : HEALTHCHECK_RESULT_DOWN;\n\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_STATUS, status);\n\n\t\tMap<String, Object> details = new HashMap<>();\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_DETAILS, details);\n\n\t\tHashMap<String, String> dbHealthCheck = new HashMap<>();\n\t\tdetails.put(HEALTHCHECK_ATTRIBUTE_DATABASEHEALTHCHECK, dbHealthCheck);\n\t\tdbHealthCheck.put(HEALTHCHECK_ATTRIBUTE_STATUS, status);\n\n\t\tmap.put(HEALTHCHECK_ATTRIBUTE_VERSION, properties.getVersion());\n\n\t\treturn map.getOrDefault(HEALTHCHECK_ATTRIBUTE_STATUS, \"\").equals(HEALTHCHECK_RESULT_UP);\n\t}", "ChronicCheck selectByPrimaryKey(Integer chroniccheckId);", "@Test\n\tpublic void testGet() {\n\t\tWellRegistryKey well = new WellRegistryKey(\"USGS\", \"402734087033401\"); // was 007\n\t\tWellDataType type = WellDataType.WATERLEVEL;\n\t\tCacheMetaData cmd = dao.get(well, type);\n\t\t\n\t\tassertNotNull(\"expected some meta data\",cmd);\n\t\tSystem.out.printf(\"Got successCt=%d, failCt=%d, last attempt=%s\\n\", cmd.getSuccessCt(), cmd.getFailCt(), cmd.getMostRecentAttemptDt());\n\t\tassertEquals(\"Agency code\", \"USGS\", cmd.getAgencyCd());\n\t\tassertEquals(\"Site no\", \"402734087033401\", cmd.getSiteNo());\n\t\tassertTrue(\"non-negative fail count\", cmd.getFailCt() >= 0);\n\t\tassertTrue(\"non-negative success count\", cmd.getSuccessCt() >= 0);\n\t\t\n\t}", "public String getCheckStatus() {\r\n return checkStatus;\r\n }", "public java.lang.String getTestDBStatusResult() {\r\n return localTestDBStatusResult;\r\n }", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "public String getStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\treturn background.getStatus();\n\t}", "public String getStatusInfoDetails() {\r\n return statusInfoDetails;\r\n }", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "String getDataStatus();", "public static Map<String, Integer> getCurrentContainerDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(ContainerStatsEntity.class, \"contSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.statsDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ContainerStatsEntity> contEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(ContainerStatsEntity contStsEntity : contEntityList){\n\t\t\tif(contStsEntity.getComponent() != null && contStsEntity.getComponent().getParentComponent() != null){\n\t\t\t\tString fullAppName = contStsEntity.getComponent().getParentComponent().getComponentName() + \"/\" + contStsEntity.getComponent().getComponentName();\n\t\t\t\tmapApiSts.put(fullAppName, contStsEntity.getTotalContainer());\n\t\t }else if(contStsEntity.getComponent() != null){\n\t\t \tmapApiSts.put(contStsEntity.getComponent().getComponentName(), contStsEntity.getTotalContainer());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "public static List<HealthCheckVO> updateHealthCheckStatusInDB(List<HealthCheckVO> healthCheckVOs) throws SQLException {\n\t\t\n\t\tList<HealthCheckVO> returnStatusChangedList = new ArrayList<HealthCheckVO>();\n\t\tfor (HealthCheckVO healthCheckVO : healthCheckVOs) {\n\t\t\tif(healthCheckVO.getStatus() == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tStatus status = healthCheckVO.getStatus().getStatus();\n\t\t\tif (status == null) {\n\t\t\t\tlogger.error(\"STATUS CHECK FAILED>> ComponentId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!status.equals(Status.UP)){\n\t\t\t\tlogger.info(\"STATUS CHECK SUCCESS>> HealthCheckId : \" + healthCheckVO.getHealthCheckId()\n\t\t\t\t\t\t+ \"; RegionId : \" + healthCheckVO.getHealthCheckRegionId()\n\t\t\t\t\t\t+ \"; isSuccess : \" + status.getStatusName()\n\t\t\t\t\t\t+ \"; Message : \" + status.getStatusDesc());\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tboolean isStatusChanged = updateStatus(healthCheckVO);\n\t\t\t\tif(isStatusChanged){\n\t\t\t\t\treturnStatusChangedList.add(healthCheckVO);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlogger.error(\"Exception in DB Update Doing Rollback\", ex);\n\t\t\t\tthrow ex;\n\t\t\t}\n\t\t}\n\t\tlogger.debug(\"DB Update Success - Doing commit\");\n\t\treturn returnStatusChangedList;\n\t}", "private void getthedayactive() {\n\t\t Cursor c=mydb.rawQuery(\"SELECT * FROM day where days='\"+today+\"' \", null);\n\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata after retriving completed @@@@@@@@@@@@@@@@@@@@@\");\n\t\t c.moveToFirst();\n\t\t \n\t\t if(c!=null)\n\t\t {\n\t\t\t do{\n\t\t\t\t \n\t\t\t\t int c1=c.getColumnIndex(\"isActive\");\n\t\t\t\t if(c.getCount()>0)\n\t\t\t\t active=c.getInt(c1);\n\t\t\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata \"+active);\n\t\t\t\t \n\t\t\t }while(c.moveToNext());\n\t\t\t \n\t\t }\n\t}", "public List<IkrInstanceData> fetchDBMS_SYBASE_LOG_SEVERITY()\r\n\tthrows ConnectorException, FetchException, PersistenceException {\t \r\n\t\tList<IkrInstanceData> res = new ArrayList<IkrInstanceData>();\r\n\t\t\r\n\t\tSybaseLogMeasurement measurement = (SybaseLogMeasurement)client.getMeasurement(\"DBMS_SYBASE_LOG_SEVERITY\");\r\n\r\n\t\tMap<String, Integer> severities = measurement.getLogSeverityResult();\t\t\r\n\t\tfor(String key : severities.keySet())\r\n\t\t\tres.add(new SybaseLogsSeverityIkrInstanceData(key + \"@\" + client.getDatabaseInstance(), severities.get(key), fetchDate));\r\n\t\t\r\n\t\treturn res;\r\n\t}", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "public HealthModel() {\n healthMetrics = new ArrayList<HealthMetric>();\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n this.fetchHealthMetrics();\n }", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "public static MyPdStore getMyCurrentDetails() {\n\t\treturn myCurrentDetails;\n\t}", "java.util.List<io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin> \n getActionLogList();", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testGetDatabaseStatus_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder();\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder();\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "public String displayNameTickets(){\n String p = \" \";\n try {\n \n rs = stmt.executeQuery \n (\"select * from JEREMY.TICKET ORDER BY NAME\");\n p = loopDBInfo(rs);\n \n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n } \n return p;\n \n }", "public StockDetails viewStock() {\n\t\tint availableStock = 0;\n\t\tStockDetails stockDetails = new StockDetails(); \n\t\t \n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"select * from stock_details\";\n\t\t\tPreparedStatement pst = con.prepareStatement(sql);\n\t\t\tResultSet rs = pst.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\t stockDetails.setStockAvailability(rs.getInt(\"stock_availability\"));\n\t\t\t\t Date date = rs.getDate(\"inserted_date\");\n\t\t\t\t stockDetails.setStockAddedDate(date.toLocalDate());\n\t \n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t\treturn stockDetails;\n\t}", "@Override\n\tpublic List<HeadUnit> getallHeadUnitDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tString sql = \"SELECT * FROM headunit\";\n\t\tList<HeadUnit> listHeadunit = jdbcTemplate.query(sql, new RowMapper<HeadUnit>() {\n\t\t\t@Override\n\t\t\tpublic HeadUnit mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\t// set parameters\n\t\t\t\tHeadUnit headunit = new HeadUnit();\n\t\t\t\theadunit.setHeadunitid(rs.getLong(\"headunit_id\"));\n\t\t\t\theadunit.setUserid(rs.getInt(\"user_id\"));\n\t\t\t\theadunit.setCarname(rs.getString(\"carname\"));\n\t\t\t\theadunit.setHduuid(rs.getString(\"hduuid\"));\n\t\t\t\theadunit.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\theadunit.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\theadunit.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn headunit;\n\t\t\t}\n\t\t});\n\t\treturn listHeadunit;\n\t}", "protected static void get() {\n\t\tstepsTable.get();\n\t\tstepsTable.getWeek();\n\t\tactive.get();\n\t\tmeals.get();\n\t\taccountInfo.get();\n\t\t\n\t}", "public int getCurHealth() {\n return this.curHealth;\n }", "public int getHealth();", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testGetDatabaseStatus_3()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tArrayOfDatabaseComponentHolder result = new ArrayOfDatabaseComponentHolder();\n\t\tDatabaseStatusHolder status = new DatabaseStatusHolder();\n\n\t\tfixture.getDatabaseStatus(aArguments, result, status);\n\n\t\t// add additional test code here\n\t}", "public String getUserActivePurchaseLog(int conversationId){\n\t String UserActivePurchaseLogId=null;\n\t try{\n\t\t //STEP 2: Register JDBC driver\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t //STEP 3: Open a connection\n\t\t ////System.out.println(\"Connecting to database...\");\n\t\t conn = DriverManager.getConnection(DB_URL,USER,PASS);\n\n\t\t //STEP 4: Execute a query\n\t\t ////System.out.println(\"Creating statement...\");\n\t\t stmt = conn.createStatement();\n\t\t \n\t\t //Dapetin jarak setiap narik data\n\t\t String statement = \"SELECT * FROM `purchase_logs` INNER JOIN `conversations` ON `purchase_logs`.`user_id` = `conversations`.`user_id` WHERE `conversations`.`id` = \"+conversationId+\" AND `purchase_logs`.`status` = 0\";\n\t\t \n\t\t ////System.out.println(statement);\n\t\t ResultSet rs = stmt.executeQuery(statement);\n\t\t while(rs.next()){\n\t \t\t\t//////System.out.println(\"test III\");\n\t\t //Retrieve by column name\n\t\t String id = rs.getString(\"id\");\n\t\t //Display values\n\t\t ////System.out.println(\", Purchase Log Id : \" + id);\n\t\t UserActivePurchaseLogId = id;\n\t\t }\n\t\t //STEP 6: Clean-up environment\n\t\t rs.close();\n\t\t stmt.close();\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t //Handle errors for JDBC\n\t\t se.printStackTrace();\n\t\t }catch(Exception e){\n\t\t //Handle errors for Class.forName\n\t\t e.printStackTrace();\n\t\t }finally{\n\t\t //finally block used to close resources\n\t\t try{\n\t\t if(stmt!=null)\n\t\t stmt.close();\n\t\t }catch(SQLException se2){\n\t\t }// nothing we can do\n\t\t try{\n\t\t if(conn!=null)\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t se.printStackTrace();\n\t\t }//end finally try\n\t\t }//end try\n\t \t ////System.out.println(\"Goodbye!\");\t \n\t return UserActivePurchaseLogId;\n }", "public List<StatusDemande> getStatusDemandes(){\n return statusDemandeRepository.findAll();\n }", "public static String getTestTableStatus() {\n\n try {\n AmazonDynamoDBClient ddb = SplashActivity.clientManager\n .ddb();\n\n DescribeTableRequest request = new DescribeTableRequest()\n .withTableName(SplashActivity.\n clientManager.getContext().getString(R.string.raw_menu_items_table));\n DescribeTableResult result = ddb.describeTable(request);\n\n String status = result.getTable().getTableStatus();\n return status == null ? \"\" : status;\n\n } catch (ResourceNotFoundException e) {\n } catch (AmazonServiceException ex) {\n SplashActivity.clientManager\n .wipeCredentialsOnAuthError(ex);\n }\n\n return \"\";\n }", "List<SrInwardTruckQualityCheck> getAll();", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "int getHealth();", "public static String getBills(){\n return \"select * from current_bills\";\n }", "public MyInfo getMyInfo() {\n\t\t\n\t\tMyInfo myInfo = null;\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getMyInfo);\n\t\t\tResultSet rs = ps.executeQuery();\n\n\t\t\tString query = \"SELECT IdGlobal, MYTCELLIP, MYTCELLPORT, MYPUBLICKEY, MYPRIVATEKEY FROM MyInfo\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tint myGid = rs.getInt(1);\n\t\t\t\tString myTcellIp = rs.getString(2);\n\t\t\t\tint myTcellPort = rs.getInt(3);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPubKeyBlob = rs.getBlob(4);\n\t\t\t\tbyte[] bPubKey = myPubKeyBlob.getBytes(1, (int) myPubKeyBlob.length());\n\t\t\t\tString myPubKey = new String(bPubKey);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPrivKeyBlob = rs.getBlob(5);\n\t\t\t\tbyte[] bPrivKey = myPrivKeyBlob.getBytes(1, (int) myPrivKeyBlob.length());\n\t\t\t\tString myPrivKey = new String(bPrivKey);\n\t\t\t\t\n\t\t\t\tmyInfo = new MyInfo(myGid, myTcellIp, myTcellPort, myPubKey, myPrivKey);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t}\n\n\t\treturn myInfo;\n\t}", "public ResultSet getPatientHistory(int patientId) {\n\t\treturn dbObject.select(\"SELECT `time` as Time, `bglValue` as BGL, injectedUnits FROM `patientHistory` \"); //WHERE patientId=\"+patientId);\n\t}", "public int getCurHealth() {\n\t\treturn curHealth;\n\t}", "Object getCurrentData();", "public void consultaTest() throws Exception{\n\t\t\n\t ResultSet rs = statement.executeQuery(\"select * from statistics\");\n\t \n\t \n\t while(rs.next())\n\t {\n\t\t \n\t\t DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss.SSS\");\n\t\t Date date = df.parse(rs.getString(\"timeActual\"));\n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(date);\n\t\t \n\t\t String completoDay = cal.get(Calendar.YEAR)+\"-\"+(cal.get(Calendar.MONTH) + 1)+\"-\"+ cal.get(Calendar.DAY_OF_MONTH);\n\t\t \n\t System.out.println(\"id= \" + rs.getInt(\"id\") + \" memory= \" + rs.getInt(\"memory\") + \" cpu= \" \n\t \t+ rs.getInt(\"cpu\") + \" timeActual= \" + completoDay);\n\t }\n\t \n\t if(rs != null)\n\t\t rs.close();\n\t \n\t if(connection != null)\n\t connection.close();\n\t \n\t}", "public ResultSet getItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tStatement stmt = con.createStatement();\n\t\t/** Proceeds if user is logged in */\n\t\tString queryString = \"Select * From team1.GABES_ITEM i Where i.ITEM_ID='\"\n\t\t\t\t+ this.item_id + \"'\";\n\t\tResultSet result = stmt.executeQuery(queryString);\n\t\treturn result;\n\t}", "public void pullDetails() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select * from PersonalDetails where id='\"+userId+\"'\";\n\t\t\n\t\tconnectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\t\n\t\t\t\tint foundId = rs.getInt(\"id\");\n\t\t\t\tif(foundId == userId) {\n\t\t\t\t\t// Get new details from database\n\t\t\t\t\tString firstName = rs.getString(\"fName\");\n\t\t\t\t\tString lastName = rs.getString(\"sName\");\n\t\t\t\t\tString dob = rs.getString(\"dob\");\n\t\t\t\t\tString address1 = rs.getString(\"address1\");\n\t\t\t\t\tString address2 = rs.getString(\"address2\");\n\t\t\t\t\tString city = rs.getString(\"city\");\n\t\t\t\t\tString county = rs.getString(\"county\");\n\t\t\t\t\tString postCode = rs.getString(\"postcode\");\n\t\t\t\t\tString mobileNum = rs.getString(\"mobileNum\");\n\t\t\t\t\tString telephoneNum = rs.getString(\"telephoneNum\");\n\t\t\t\t\tString emergencyContact = rs.getString(\"emergencyContact\");\n\t\t\t\t\tString emergencyNum = rs.getString(\"emergencyContactNum\");\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t// Set new Details\n\t\t\t\t\tmyCurrentDetails.setFirstName(firstName);\n\t\t\t\t\tmyCurrentDetails.setLastName(lastName);\n\t\t\t\t\tmyCurrentDetails.setDoB(dob);\n\t\t\t\t\tmyCurrentDetails.setAddress1(address1);\n\t\t\t\t\tmyCurrentDetails.setAddress2(address2);\n\t\t\t\t\tmyCurrentDetails.setCity(city);\n\t\t\t\t\tmyCurrentDetails.setCounty(county);\n\t\t\t\t\tmyCurrentDetails.setPostcode(postCode);\n\t\t\t\t\tmyCurrentDetails.setMobile(mobileNum);\n\t\t\t\t\tmyCurrentDetails.setTelenum(telephoneNum);\n\t\t\t\t\tmyCurrentDetails.setEmergencyContact(emergencyContact);\n\t\t\t\t\tmyCurrentDetails.setEmergencyNum(emergencyNum);\n\t\t\t}else {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t \t\t \"Connection Made but User not found!\",\n\t\t \t\t \"Error-User Not Found\",\n\t\t \t\t JOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\t\t}catch(SQLException e){\n\t\t\tJOptionPane.showMessageDialog(null,\n\t \t\t \"Cannot Fetch Your Details!\",\n\t \t\t \"Error\",\n\t \t\t JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "@Override\r\n protected JSONObject doInBackground(Void... params) {\n JSONObject obj = new JSONObject();\r\n try {\r\n HttpConnections httpConnections = new HttpConnections(getContext());\r\n\r\n obj = httpConnections.httpsGet(Constants.URL_PREFIX + Constants.CHECK_FLOW_BY_ID + \"/\" + appGlobals.getCurrentFlowId(), mToken);\r\n if (obj != null) {\r\n obj = obj.getJSONObject(\"detail\");\r\n\r\n }\r\n\r\n } catch (CertificateException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (KeyStoreException e) {\r\n e.printStackTrace();\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n } catch (KeyManagementException e) {\r\n e.printStackTrace();\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return obj;\r\n }", "public int getHealth() {\n return getStat(health);\n }", "@Override\n\tpublic CheckBean getSpecificCheck(long checkId) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "public double getHealth() {\n return classData.getHealth(level);\n }", "io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin getActionLog(int index);", "public JSONArray getResultsForHealthAndLifeStyle() {\n\n SQLiteDatabase db1 = this.getReadableDatabase();\n Cursor cursor = null;\n JSONArray resultSet = new JSONArray();\n\n try {\n String searchQuery = \"SELECT * FROM health_and_lifestyle where flag = 0 \";\n cursor = db1.rawQuery(searchQuery, null);\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n\n int totalColumn = cursor.getColumnCount();\n JSONObject rowObject = new JSONObject();\n\n for (int i = 0; i < totalColumn; i++) {\n if (cursor.getColumnName(i) != null) {\n try {\n if (cursor.getString(i) != null) {\n\n rowObject.put(cursor.getColumnName(i), cursor.getString(i));\n } else {\n rowObject.put(cursor.getColumnName(i), \"\");\n }\n } catch (Exception e) {\n // Log.d(\"TAG_NAME\", e.getMessage());\n }\n\n }\n }\n resultSet.put(rowObject);\n cursor.moveToNext();\n }\n return resultSet;\n } catch (Exception e) {\n Crashlytics.logException(e);\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n /*if (db1 != null) {\n db1.close();\n }*/\n }\n return resultSet;\n }", "private String CheckRecordExistInAlarmDB(String alarmCount) {\n DataHolder mDataHolder;\n String url = \"select * from \" + mDbHelper.mTableAlarm + \" where \" + mDbHelper.mFieldAlarmUserId + \"= '\" + mPreferenceHelper.getUserId() + \"'\" + \" and \" + mDbHelper.mFieldAlarmCountNo + \"= '\" + alarmCount + \"'\";\n System.out.println(\" URL : \" + url);\n mDataHolder = mDbHelper.read(url);\n if (mDataHolder != null) {\n System.out.println(\" AlarmList : \" + url + \" : \" + mDataHolder.get_Listholder().size());\n if (mDataHolder != null && mDataHolder.get_Listholder().size() != 0) {\n return mDataHolder.get_Listholder().get(0).get(mDbHelper.mFieldAlarmLocalID);\n } else {\n return \"-1\";\n }\n }\n return \"-1\";\n }", "public String[] getDetailsAboutThisMachine() throws StoreFactoryException;", "public List<HrCStatitem> findAll();", "public ArrayList<CheckPaperTO> getBankCheckReport(String loggedInCode, long bankCheckId) throws Exception {//Return a list of CheckPaperTO\r\n if (getLoggedInCustomerID(loggedInCode) == null) {\r\n return null;\r\n }\r\n CheckPaperDAO checkPaperDAO = new CheckPaperDAO();\r\n ArrayList<CheckPaperTO> arrayList = checkPaperDAO.selectByBankCheckId(bankCheckId);\r\n checkPaperDAO.close();\r\n return arrayList;\r\n }", "public static ArrayList<CustomerInfoBean> getHighAlerts() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> list = new ArrayList<>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, soldId, customerId, salesmanId, size, status, alertID;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, createdOn, handoverAt;\r\n\t\tboolean state;\r\n\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT distinct(cs.customer_name), cs.customer_cnic ,cs.customer_phone, d.district_name, cs.customer_monthly_income, a.appliance_GSMno, \"\r\n\t\t\t\t\t+ \" a.appliance_status, s.salesman_name, sold.payement_option, sold.sold_to_id, a.appliance_id, sold.customer_id, sold.salesman_id, cs.customer_family_size,cs.created_on, sold.product_handover,al.status,al.alerts_id FROM sold_to sold INNER JOIN customer cs ON cs.customer_id=sold.customer_id \"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON a.appliance_id=sold.appliance_id INNER JOIN salesman s ON s.salesman_id = sold.salesman_id inner join city c on cs.customer_city=c.city_id inner join city_district dc on c.city_id=dc.city_id inner join district d on dc.district_id=d.district_id INNER JOIN alerts al ON al.appliance_id=sold.appliance_id \"\r\n\t\t\t\t\t+ \"WHERE al.pannel_lost IS TRUE AND al.battery_low IS FALSE;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerName = rs.getString(1);\r\n\t\t\t\tcnicNo = rs.getString(2);\r\n\t\t\t\tphoneNo = rs.getString(3);\r\n\t\t\t\tdistrict = rs.getString(4);\r\n\t\t\t\tmonthlyIncome = rs.getString(5);\r\n\t\t\t\tgsmNumber = rs.getString(6);\r\n\t\t\t\tstate = rs.getBoolean(7);\r\n\t\t\t\tsalesmanName = rs.getString(8);\r\n\t\t\t\trs.getBoolean(9);\r\n\t\t\t\tsoldId = rs.getInt(10);\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tcustomerId = rs.getInt(12);\r\n\t\t\t\tsalesmanId = rs.getInt(13);\r\n\t\t\t\tsize = rs.getInt(14);\r\n\t\t\t\tcreatedOn = rs.getString(15);\r\n\t\t\t\thandoverAt = rs.getString(16);\r\n\t\t\t\tstatus = rs.getInt(17);\r\n\t\t\t\talertID = rs.getInt(18);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSoldId(soldId);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setHandoverAt(handoverAt);\r\n\t\t\t\tbean.setCreatedOn(createdOn);\r\n\t\t\t\tbean.setFamilySize(size);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tbean.setAlertId(alertID);\r\n\t\t\t\tlist.add(bean);\r\n\t\t\t}\r\n\r\n\t\t\trs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}" ]
[ "0.62530744", "0.6048262", "0.5739983", "0.57326686", "0.56992406", "0.5502863", "0.5430135", "0.54292816", "0.53775936", "0.5297868", "0.5297517", "0.5235873", "0.52259386", "0.5197938", "0.5178477", "0.5132066", "0.5083122", "0.50641835", "0.5061519", "0.50569415", "0.5045842", "0.50373137", "0.5036286", "0.5035218", "0.5014297", "0.5013716", "0.50043577", "0.49975535", "0.49913877", "0.49873054", "0.4962623", "0.4961931", "0.4952469", "0.49517372", "0.49499485", "0.49497876", "0.49446678", "0.49251485", "0.49196213", "0.49114555", "0.4899282", "0.4891844", "0.48837847", "0.48781928", "0.48665392", "0.48658672", "0.4865298", "0.48636362", "0.48631582", "0.48597983", "0.48531663", "0.48443374", "0.48439294", "0.48423773", "0.48260114", "0.48196256", "0.48188657", "0.48141116", "0.4813484", "0.48132864", "0.48102182", "0.48097324", "0.48010767", "0.47963548", "0.4792085", "0.4785318", "0.4776976", "0.4773402", "0.4767795", "0.47612843", "0.47580972", "0.47531033", "0.47522655", "0.47511962", "0.47508985", "0.4744141", "0.4741679", "0.4736829", "0.4736546", "0.47299752", "0.4729854", "0.4723744", "0.4720853", "0.4714594", "0.47126836", "0.4712631", "0.47056392", "0.47037548", "0.47004417", "0.47000486", "0.46987095", "0.46950835", "0.46933693", "0.46836662", "0.468324", "0.46811205", "0.46793878", "0.4674884", "0.4674677", "0.46741784" ]
0.60822177
1
Updates the initial status for DUMMY Health Check Handler.
public static void updateMarathonHealthCheckStatus(final int componentId, final int environmentId, final long regionID,final HealthCheckType healthCheckType, final Status status, boolean isStatusChanged) { String queryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_NO_CHG; if(isStatusChanged){ queryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_CHG; } Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(queryString); query.setLong("statusId", status.getStatusId()); query.setTimestamp("statusUpdateTime", new java.sql.Timestamp(System.currentTimeMillis())); query.setLong("healthCheckTypeId", healthCheckType.getHealthCheckTypeId()); query.setLong("environmentId", environmentId); query.setLong("componentId", componentId); query.setLong("regionId", regionID); int rowCount = query.executeUpdate(); logger.info("Number of Updated Kubernetes row - "+ rowCount); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HwStatus() {\n \t\tsuper();\n \t\tthis.hwSig = 0;\n \t\tthis.microtickPeriod = 10000;\t// default\n \t\tthis.cf_version = \"\";\n \t}", "public void setInitialStatus(InstanceStatus initialStatus)\n {\n this.initialStatus = initialStatus;\n }", "protected void init_status(String id) {\n\t\tstatus.put(id, 1);\n\t\t\n\t}", "public void onboard_control_sensors_health_SET(@MAV_SYS_STATUS_SENSOR int src)\n { set_bits(- 1 + src, 26, data, 204); }", "Future<UpdateHealthCheckerResponse> updateHealthChecker(\n UpdateHealthCheckerRequest request,\n AsyncHandler<UpdateHealthCheckerRequest, UpdateHealthCheckerResponse> handler);", "private void getStatus() {\n\t\t\n\t}", "public void handleStatusUpdated() {\n copyWifiStates();\n notifyListenersIfNecessary();\n }", "private void clearStatuses () {\n\tstatus = \"Reading request\";\n\tstarted = System.currentTimeMillis ();\n\trequest = null;\n\tkeepalive = true;\n\tmeta = false;\n\tchunk = true;\n\tmayUseCache = true;\n\tmayCache = true;\n\tmayFilter = true;\n\tmustRevalidate = false;\n\taddedINM = false;\n\taddedIMS = false;\n\tuserName = null;\n\tpassword = null;\n\trequestLine = \"?\";\n\tstatusCode = \"200\";\n\textraInfo = null;\n\tcontentLength = \"-\";\n\tclientResourceHandler = null;\n }", "public static void reset() {\n HealthCheck.failed = false;\n HealthCheck.checks.clear();\n }", "@Override\n public synchronized void inspectBin(Empty request, StreamObserver<BinStatusUpdate> responseObserver) {\n responseObserver.onNext(buildNewStatus());\n responseObserver.onCompleted();\n }", "void resetStatus();", "@Override\r\n\tpublic void onInit(int status) {\n\t\t\r\n\t}", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "@Override\n\t\tpublic void setStatus(int status) {\n\t\t\t\n\t\t}", "public void setgetStatus()\r\n\t{\r\n\t\tthis.status = 'S';\r\n\t}", "@Override\n public void onStatusChange(int status) {\n }", "@Override\npublic void onInit(int status) {\n\t\n\t\t\t\t\t\t\t\t}", "private void clearStatus() {\n \n status_ = getDefaultInstance().getStatus();\n }", "protected Status() {\r\n\t\t;\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void getHealthStatus() {\n getHealthStatusAsync().block();\n }", "public abstract void handlerCheckState(int status, Object attach);", "public static void initHealthBar(EntityLiving entity) {\n if (hasHealthBar(entity) || canGetHealthBar(entity)) {\n updateHealthBar(entity);\n HealthBarHandler.track(entity);\n }\n }", "void onStatusUpdate(int status);", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "@Override\r\n\t\tpublic void onStatus(Map<String, Object> arg0) {\n\t\t\tSystem.out.println(\"Method createMeetiong status: \" + arg0);\r\n\t\t}", "@Override\n\t\tpublic int getStatus() {\n\t\t\treturn 0;\n\t\t}", "private void setStatus() {\n\t\t// adjust the status of the rest\n\t\tif (rest.getState().equals(RestState.INACTIVE)) {\n\t\t\t// set status to heating\n\t\t\trest.setState(RestState.HEATING);\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t} else if (rest.getState().equals(RestState.HEATING) && temperatureSensor.getTemperature() >= (rest.getTemperature() - tolerance)) {\n\t\t\t// set status to active\n\t\t\trest.setState(RestState.ACTIVE);\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t} else if (rest.getState().equals(RestState.ACTIVE)\n\t\t\t\t&& (new GregorianCalendar().getTimeInMillis() - rest.getActive().getTimeInMillis()) / 1000 / 60 > rest.getDuration()) {\n\t\t\t// time is up :)\n\t\t\tif (rest.isContinueAutomatically()) {\n\t\t\t\trest.setState(RestState.COMPLETED);\n\t\t\t} else {\n\t\t\t\trest.setState(RestState.WAITING_COMPLETE);\n\t\t\t}\n\t\t\tlog.info(rest.getName() + \" is now in state \" + rest.getState());\n\t\t}\n\t}", "public void setAsSuccessful_OK(){\n setStatus(200);\n }", "@Override\n public void setStatus(int arg0) {\n\n }", "public void setStatus(String status) { this.status = status; }", "@Override\n\tpublic void setStatus(int status);", "private void setStatus(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n status_ = value;\n }", "private void applicationHealthHandler(RoutingContext routingContext) {\n HttpServerResponse httpServerResponse = routingContext.response();\n httpServerResponse.setStatusCode(SUCCESS_CODE);\n httpServerResponse.end(\"myRetailApplication is up and running\");\n }", "public void setStatus(Integer status) {\r\n this.status = status;\r\n }", "public void setStatus(Integer status) {\r\n this.status = status;\r\n }", "void setStatus(STATUS status);", "void resetExcStatuses()\n\t\t{\n\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void appUpdateFaild() {\n\t\t\t\t\t\t\t\thandler.sendEmptyMessage(1);\n\t\t\t\t\t\t\t}", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "protected void clearStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\tbackground.clearStatus();\n\t}", "public synchronized void startUpdates(){\n mStatusChecker.run();\n }", "void setStatus(int status);", "private static void setFailed() {\n HealthCheck.failed = true;\n }", "public void setStatus(long status) {\r\n this.status = status;\r\n }", "public void setStatus(Status newStatus){\n status = newStatus;\n }", "public void setStatus(String stat)\n {\n status = stat;\n }", "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "@Override\n public void updateStatus(Status status) {\n this.status = status;\n }", "public void loadStatus (){\n\t}", "public void setStatus(int status){\r\n\t\tthis.status=status;\r\n\t}", "public StatusResource() {\n this.statusService = DeathStar.getStatusService();\n logger.log(Level.FINE, \"Status resource instantiated: {0}\", this);\n }", "public void setStatus(int status);", "public void setStatus(int status);", "public RegisterStatus() {\n registerStatus=NOT_REGISTERED;\n }", "public void setStatus(int status) {\n this.status = status;\n }", "public void setStatus(int status) {\n this.status = status;\n }", "public void setStatus(int status) {\n STATUS = status;\n }", "public void handleSimStatusCompleted() {\n }", "public void setStatus(Status status) {\r\n\t this.status = status;\r\n\t }", "public void setStatus(String Status) {\n this.Status = Status;\n }", "public void setStatus(String Status) {\n this.Status = Status;\n }", "private ServiceMonitoringStatusInterpreter() { /* do nothing */ }", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}", "public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}", "public void setSOHStatus(SOHStatusType SOHStatus) {\r\n/* 472 */ this._SOHStatus = SOHStatus;\r\n/* */ }", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void setStatus(String status) {\r\n this.status = status;\r\n }", "public void initialState() {\n\t\t//empty\n\t}", "void statusUpdate(boolean invalid);", "public void setStatus(String status) {\n this.status = status;\n }", "public void setStatus(String status) {\n this.status = status;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> getHealthStatusAsync(Context context) {\n return getHealthStatusWithResponseAsync(context).flatMap((Response<Void> res) -> Mono.empty());\n }", "public void setStatus(int newStatus) {\n status = newStatus;\n }", "private void updateUnitStatus() {\r\n\t\tint b1 = Sense_NotReady;\r\n\t\tif (this.tapeIo != null) {\r\n\t\t\tb1 = Sense_Ready;\r\n\t\t\tb1 |= (this.currentBlock == this.headLimit) ? Sense_AtLoadPoint : 0;\r\n\t\t\tb1 |= (this.isReadonly) ? Sense_FileProtected : 0;\r\n\t\t}\r\n\t\tthis.senseBytes[1] = (byte)((b1 >> 16) & 0xFF);\r\n\t\t\r\n\t\tint b4 = (this.currentBlock == this.tailLimit) ? Sense_EndOfTape : 0;\r\n\t\tthis.senseBytes[4] = (byte)( ((b4 >> 8) & 0xF0) | (this.senseBytes[4] & 0x0F) );\r\n\t}", "public void setStatus(Status status) {\r\n this.status = status;\r\n }", "@Override\r\n\tprotected void dispatch(final Handler handler) {\r\n\t\thandler.onUserStatusChange(this);\r\n\r\n\t}", "@Override\n protected void onProgressUpdate(String... values) {\n labelStatus.setText(values[0]);\n }", "@Override\n\tpublic void onStatusChanged(Object arg0, STATUS status) {\n\t\tSystem.out.println(status);\n\t\tswitch (status) {\n\n\t\tcase LAYER_LOADED:\n\t\t\tif (!isPathShow && goodsMap != null && goodsMap.size() > 0) {\n\t\t\t\tshelfList.clear();\n\t\t\t\tsearchTime = 0;\n\t\t\t\tqueryLocator();\n\t\t\t\tisPathShow = true;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "@SuppressWarnings(\"static-method\")\n\tpublic IStatus createOkStatus() {\n\t\treturn Status.OK_STATUS;\n\t}", "private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }", "public void setStatus(Byte status) {\r\n this.status = status;\r\n }", "public void setStatus(Byte status) {\r\n this.status = status;\r\n }" ]
[ "0.58590114", "0.5825147", "0.5817693", "0.57679206", "0.5753623", "0.56838304", "0.5658404", "0.56200016", "0.5601648", "0.5598539", "0.55920273", "0.5542074", "0.55258685", "0.5512498", "0.5507588", "0.5498643", "0.54982144", "0.54891646", "0.54776734", "0.5460602", "0.5448034", "0.54439664", "0.5436922", "0.5420636", "0.5415554", "0.541001", "0.53672993", "0.53660196", "0.5355871", "0.5351456", "0.53379893", "0.53368", "0.53247154", "0.5324145", "0.5324145", "0.5312965", "0.5310114", "0.52845335", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52812797", "0.52811277", "0.5264522", "0.5261651", "0.5256826", "0.52508783", "0.52470785", "0.5246533", "0.5245396", "0.52445656", "0.52429754", "0.5240233", "0.5238909", "0.52275103", "0.52275103", "0.5214612", "0.5214142", "0.5214142", "0.52128744", "0.52048403", "0.5195234", "0.5194836", "0.5194836", "0.51943815", "0.5181632", "0.51720184", "0.51720184", "0.51716113", "0.5170581", "0.5170581", "0.516774", "0.5166414", "0.5160279", "0.5160279", "0.5159857", "0.5158431", "0.51567596", "0.51559156", "0.51472616", "0.51431555", "0.51425517", "0.51417065", "0.5138533", "0.51363605", "0.51363605" ]
0.0
-1
Function to check and insert components into the DB
public static int checkAndInsertComponent(final String appName, final String apiName, final ComponentType compType, final String healthCheckURL, final int environmentId, final long regionID, final HealthCheckType healthCheckType, String platform) { //Handle special case - Name change and Component type change String appNameToInsert = appName; ComponentType compTypeToInsert = compType; AppTransformConfig config = readAppTransformConfig(); if (config != null && config.getTransformName().containsKey(appName)) { appNameToInsert = config.getTransformName().get(appName); } if (config != null && config.getConvertToInfra().contains(appName)) { compTypeToInsert = ComponentType.INFRA; } int appId = insertParentComponent(appNameToInsert, compTypeToInsert, platform); int APIId = getComponentByNameAndParent(apiName, appId, compTypeToInsert.getComponentTypeId(), platform); if (APIId == 0) { insertComponent(apiName, appId, compTypeToInsert.getComponentTypeId(), true, platform); APIId = getComponentByNameAndParent(apiName, appId, compTypeToInsert.getComponentTypeId(),platform); insertHealthCheck(APIId, regionID, environmentId, healthCheckType.getHealthCheckTypeId(), 3); if (healthCheckURL != null) { HealthCheckVO hcvo = getCurrentHealthCheckDetails(APIId, environmentId, regionID, healthCheckType); if (hcvo != null) { insertHealthCheckParam(hcvo.getHealthCheckId(), "URL", healthCheckURL); } } } else { // Update existing component. Assuming single health check per Component HealthCheckVO currentDBData = getCurrentHealthCheckDetails(APIId, environmentId, regionID); if (currentDBData == null) { insertHealthCheck(APIId, regionID, environmentId, healthCheckType.getHealthCheckTypeId(), 3); if (healthCheckURL != null) { HealthCheckVO hcvo = getCurrentHealthCheckDetails(APIId, environmentId, regionID, healthCheckType); if (hcvo != null) { insertHealthCheckParam(hcvo.getHealthCheckId(), "URL", healthCheckURL); } } } else { // update existing health check updateHealthCheck(currentDBData.getHealthCheckId(), healthCheckType.getHealthCheckTypeId()); // remove all existing health check params removeHealthCheckParams(currentDBData.getHealthCheckId()); if (healthCheckURL != null) { insertHealthCheckParam(currentDBData.getHealthCheckId(), "URL", healthCheckURL); } } APIId = getComponentByNameAndParent(apiName, appId, compTypeToInsert.getComponentTypeId(), platform); } return APIId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean insert()throws Exception{\n String query = \"INSERT INTO \" + tableName + \" VALUES(?, ?, ?)\";\n PreparedStatement pstm = this.con.prepareStatement(query);\n\n pstm.setObject(1, Name.getText().trim());\n pstm.setObject(2, City.getText().trim());\n pstm.setObject(3, Phone.getText().trim());\n\n int result = pstm.executeUpdate();\n\n return (result > 0);\n }", "public boolean insertIntoDB(String name, String id,String quantity,String price){\n\n Statement statement= null;\n\n // build the string, add ' ;\n StringBuilder nameBuild= new StringBuilder(name);\n nameBuild.insert(0,\"'\");\n nameBuild.insert(nameBuild.length(),\"'\");\n\n StringBuilder idBuild= new StringBuilder(id);\n idBuild.insert(0,\"'\");\n idBuild.insert(idBuild.length(),\"'\");\n\n StringBuilder quantityBuild= new StringBuilder(quantity);\n quantityBuild.insert(0,\"'\");\n quantityBuild.insert(quantityBuild.length(),\"'\");\n\n StringBuilder priceBuild= new StringBuilder(price);\n priceBuild.insert(0,\"'\");\n priceBuild.insert(priceBuild.length(),\"'\");\n\n\n try{\n statement= connection.createStatement();\n\n statement.execute(\"INSERT into \"+TABLE_GOODS+\"(name,id,quantity,price) values(\"+nameBuild+\",\"+\n idBuild+\",\"+quantityBuild+\",\"+priceBuild+\")\");\n\n return true;\n\n }catch(SQLException e){\n System.out.println(\"Query Failed \"+e.getMessage());\n\n return false;\n }finally{\n\n if(statement!=null)\n try {\n statement.close();\n } catch (SQLException e) {\n System.out.println(\"Couldn't close Statement!\");\n e.printStackTrace();\n }\n }\n }", "@Test\n public void testInsertingValidValues() throws SQLException {\n CommitStructure commit = getSampleCommit();\n MysqlDatabase mysqlDatabase = new MysqlDatabase(connection);\n assertTrue(mysqlDatabase.insertCommitToDatabase(commit));\n }", "public static void insertarEquipo(Connection con){\n int team_id;\n String cont;\n String eq_nombre;\n String estadio;\n String poblacion;\n String provincia;\n int cod_postal;\n\n do{\n SLeer2.limpiar();\n\n do {\n team_id = SLeer2.datoInt(\"Introduce el ID del equipo: \");\n\n if(team_id <= 0){\n System.err.println(\"El ID debe ser entero positivo.\");\n }\n if(ExisteRegistro.existeEquipo(con,team_id)){\n System.err.println(\"El ID introducido existe en la base de datos.\");\n }\n\n\n SLeer2.limpiar();\n }while(team_id <=0 || ExisteRegistro.existeEquipo(con,team_id));\n\n do{\n\n eq_nombre = SLeer2.datoString(\"Introduce el nombre del equipo: \").toUpperCase();\n\n if(eq_nombre.length() < 1 || eq_nombre.length() > 40){\n System.err.println(\"Rango incorrecto\");\n }\n\n\n }while(eq_nombre.length() < 1 || eq_nombre.length() > 40);\n\n do{\n\n estadio = SLeer2.datoString(\"Introduce el nombre del estadio del equipo: \").toUpperCase();\n\n if(estadio.length() < 1 || estadio.length() > 40){\n System.err.println(\"Rango incorrecto\");\n }\n\n }while(estadio.length() < 1 || estadio.length() > 40);\n\n do{\n\n poblacion = SLeer2.datoString(\"Introduce el nombre de la población del equipo: \").toUpperCase();\n\n if(poblacion.length() < 1 || poblacion.length() > 40){\n System.err.println(\"Rango incorrecto\");\n }\n\n }while(poblacion.length() < 1 || poblacion.length() > 20);\n\n do{\n\n provincia = SLeer2.datoString(\"Introduce el nombre de la provincia del equipo: \").toUpperCase();\n\n if(provincia.length() < 1 || provincia.length() > 20){\n System.err.println(\"Rango incorrecto\");\n }\n\n }while(provincia.length() < 1 || provincia.length() > 20);\n\n do{\n\n cod_postal = SLeer2.datoInt(\"Introduce el codigo postal del equipo: \");\n\n if(Integer.toString(cod_postal).length() != 5){\n System.err.println(\"Tiene que ser 5 digitos.\");\n }\n\n SLeer2.limpiar();\n\n }while(Integer.toString(cod_postal).length() != 5);\n\n Statement stmt = null;\n String query = \"SELECT * FROM \" + EquiposBD.BASE_DATOS + \".EQUIPOS;\";\n\n try{\n stmt = con.createStatement(\n ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet rs = stmt.executeQuery(query) ;\n rs.moveToInsertRow();\n rs.updateInt(\"TEAM_ID\", team_id) ;\n rs.updateString (\"EQ_NOMBRE\", eq_nombre);\n rs.updateString (\"ESTADIO\", estadio);\n rs.updateString (\"POBLACION\", poblacion);\n rs.updateString (\"PROVINCIA\", provincia);\n rs.updateInt(\"COD_POSTAL\", cod_postal);\n rs.insertRow();\n rs.beforeFirst();\n\n System.out.println(\"\\n\\tEquipo creado con exito.\");\n Imprimir.imprimirResumen(CuantosEquipos.numeroEquipos(con),CuantosJugadores.numeroJugadores(con));\n\n stmt.close();\n }catch (SQLException e) {\n EquiposBD.printSQLException(e);\n }\n\n\n\n do{\n cont = SLeer2.datoString(\"¿Desea añadir otro equipo? [S]/[N]: \").toUpperCase();\n\n if(!cont.equals(\"S\") && !cont.equals(\"N\")){\n System.err.println(\"Elección incorrecta\");\n }\n\n\n }while(!cont.equals(\"S\") && !cont.equals(\"N\"));\n\n }while(cont.equals(\"S\"));\n }", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "private void checkDatabaseStructure(DatabaseUpdateType update) {\n }", "public void insertData() throws SQLException, URISyntaxException, FileNotFoundException {\n\t \t\t//On vide la base en premier\n\t \t\tdropDB();\n\t \t\t\n\t \t\t//Fichier contenant les jeux de test\n\t \t\tBufferedReader br = new BufferedReader(new FileReader(\"./data.txt\"));\n\t \t \n\t \t PreparedStatement pstmt = null;\n\t \t Connection conn = null;\n\t \t int id;\n\t \t String lastname, firstname, cardNumber, expirationMonth, expirationYear, cvv, query;\n\t \t try {\n\t \t conn = this.connectToBDD();\n\t \t \n\t \t String line = null;\n\t \t \n\t \t //On lit le fichier data.txt pour inserer en base\n\t \t while((line=br.readLine()) != null) {\n\t \t \t String tmp[]=line.split(\",\");\n\t \t \t id=Integer.parseInt(tmp[0]);\n\t\t\t \t lastname=tmp[1];\n\t\t\t \t firstname=tmp[2];\n\t\t\t \t cardNumber=tmp[3];\n\t\t\t \t expirationMonth=tmp[4];\n\t\t\t \t expirationYear=tmp[5];\n\t\t\t \t cvv=tmp[6];\n\t\t\t \t \n\t\t\t \t //Insertion des clients\n\t\t\t \t query = \"INSERT INTO consumer VALUES(\"+ id + \",'\" +firstname+\"','\"+lastname+\"')\";\n\t\t\t \t \n\t\t\t \t pstmt = conn.prepareStatement(query);\n\t\t\t \t pstmt.executeUpdate();\n\t\t\t \t \n\t\t\t \t \n\t\t\t \t //Insertion des comptes\n\t\t\t \t query = \"INSERT INTO account (card_number, expiration_month, expiration_year, cvv, remain_balance, consumer_id) \"\n\t\t \t\t\t\t+ \"VALUES ('\"+cardNumber+\"','\"+expirationMonth+\"','\"+expirationYear+\"','\"+cvv+\"',300,\"+id+\")\";\n\t\t\t \t\n\t\t\t \t pstmt = conn.prepareStatement(query);\n\t\t\t \t pstmt.executeUpdate();\n\t \t }\n\t \t \n\t \t \n\t \t } catch (Exception e) {\n\t \t System.err.println(\"Error: \" + e.getMessage());\n\t \t e.printStackTrace();\n\t \t }\n\t \t }", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "int insert(SupplyNeed record);", "int insert(TycCompanyCheckCrawler record);", "private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }", "int insert(DashboardGoods record);", "public boolean AddToDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t \n\t //add info to database\n\t\t\tString query = \"INSERT INTO Housing(name, address, phone_number, year_built, price, housing_uid, \"\n\t\t\t\t\t+ \"max_residents, catagory) \"\n\t\t\t\t\t+ \"VALUES('\"+name+\"', '\"+address+\"', '\"+phoneNumber+\"', '\"+yearBuilt+\"', '\"+price+\"', \"\n\t\t\t\t\t+ \"'\"+uid+\"', '\"+maxResidents+\"', '\"+catagory+\"')\"; \n\t\t\t\n\t\t\tint insertResult = con.stmt.executeUpdate(query);\n\t\t\tif(insertResult > 0)\n\t\t\t{\n\t\t\t\tSystem.out.println (\"Housing added to database.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println (\"Housing NOT added to database.\");\n\t\t\t}\n\t\t\t\n\t\t\t//get housing id\n\t\t\tquery = \"SELECT h_id FROM Housing WHERE name ='\"+name+\"' AND address ='\"+address+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\thid = rs.getInt(\"h_id\"); \n\t\t\t}\n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\t\n\t\t\t//set up keywords\n\t\t\tif (keywords.size() > 0)\n\t\t\t{\n\t\t\t\tAddKeywords(); \n\t\t\t}\n\t\t\t\n\t\t\tif(openDates.size() > 0)\n\t\t\t{\n\t\t\t\tAddAvailableDates(); \n\t\t\t}\n\t\t\t\n\t\t\treturn true; \n\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "int insertSelective(DashboardGoods record);", "public static void Binaryconnectioninsert(int id,String FQN,String name, String container,int potency,String directtype,String label ,String particpant1,\n\t\t\t \t\tString particpant2, String roleName1 ,String roleName2,String lower1, String lower2 ,\tString upper1 ,String upper2 , \n\t\t\t \t\tString navigalbeTo1, String navigableTo2,String table )\n\t\t\t { \n\t\t\t \n\t\t\t \ttry \n\t\t\t { \n\t\t\t Statement stmt=null; \n\t\t\t ResultSet res=null; \n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t\t\t stmt = (Statement)conn.createStatement(); \n\t\t\t res= stmt.executeQuery(\"SELECT * from binaryconnection\"); \n\n\n\t\t\t // 增加数据\n\t\t\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t\t\t String sql = \"select * from binaryconnection\";\n\t\t\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t\t\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t\t\t \n\t\t\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,potency,direct_type,label ,particpant1, particpant2, roleName1 ,roleName2, lower1, lower2 ,upper1 ,upper2 ,navigalbeTo1, navigableTo2) values (\"\n\t\t\t +\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+potency+\"'\"+\",\"+\"'\"+directtype+\"'\"+\",\"+\"'\"+label+\"'\"+\",\"+\"'\"+particpant1+\"'\"+\",\"+\"'\"+particpant2+\"'\"+\",\"+\"'\"+roleName1+\"'\"+\",\"+\"'\"+roleName2+\"'\"+\",\"+\"'\"+lower1+\"'\"+\",\"+\"'\"+lower2+\"'\"+\",\"+\"'\"+upper1+\"'\"+\",\"+\"'\"+upper2+\"'\"+\",\"+\"'\"+navigalbeTo1+\"'\"+\",\"+\"'\"+navigableTo2+\"'\"+\")\"); // 增加数据 \n\t\t\t if (n > 0) {\n//\t\t\t JOptionPane.showMessageDialog(null, \"成功\");\n\t\t\t \n\t\t\t \n\t\t\t } else {\n//\t\t\t JOptionPane.showMessageDialog(null, \"失败\");\n\t\t\t }\n\t\t\t //增加数据结束\n\n\t\t\t while (res.next()) \n\t\t\t { \n\t\n\t\t\t } \n\t\t\t } \n\t\t\t \n\t\t\t catch(Exception ex) \n\t\t\t { \n\t\t\t ex.printStackTrace(); \n\t\t\t } \n\t\t\t}", "public boolean InsertComand(String query,String[] fields ){\n boolean success = false;\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(query)) {\n for (int i = 1; i <=fields.length ; i++) {\n pstmt.setString(i, fields[i-1]);\n }\n pstmt.executeUpdate();\n success = true;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return success;\n }", "private boolean validaInsert(Entity e) throws SQLException {\r\n stmt = conn.createStatement();\r\n String sql = \"select * from \" + e.getTableName() + \" where \" + e.getColumnName(0) + \"= \" + e.getCell(0).getValue();\r\n if (e.getTableName().equals(\"Contato\")) {\r\n sql = \"select * from \" + e.getTableName() + \" where \" + e.getColumnName(3) + \"= '\" + String.valueOf(e.getCell(3).getValue()) + \"' and \" + e.getColumnName(1) + \"= '\" + String.valueOf(e.getCell(1).getValue()) + \"';\";\r\n\r\n }\r\n if (e.getTableName().equals(\"Telefone\")) {\r\n sql = \"select * from \" + e.getTableName() + \" where \" + e.getColumnName(2) + \"= '\" + String.valueOf(e.getCell(2).getValue()) + \"' and \" + e.getColumnName(1) + \"= '\" + String.valueOf(e.getCell(1).getValue()) + \"' and \" + e.getColumnName(3) + \"= '\" + String.valueOf(e.getCell(3).getValue()) + \"';\";\r\n\r\n }\r\n if (e.getTableName().equals(\"Solicitacoes\")) {\r\n sql = \"select * from \" + e.getTableName() + \" where \" + e.getColumnName(6) + \"= '\" + String.valueOf(e.getCell(6).getValue()) + \"' and \" + e.getColumnName(7) + \"= '\" + String.valueOf(e.getCell(7).getValue()) + \"';\";\r\n\r\n }\r\n System.out.println(sql);\r\n rs = stmt.executeQuery(sql);\r\n if (rs.next()) {\r\n stmt.close();\r\n rs.close();\r\n return false;\r\n }\r\n stmt.close();\r\n rs.close();\r\n return true;\r\n\r\n }", "int insertSelective(TycCompanyCheckCrawler record);", "int insert(Commet record);", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "public void addInschrijving(){\n if(typeField.getText().equalsIgnoreCase(\"Toernooi\")){\n try {\n Connection con = Main.getConnection();\n PreparedStatement add = con.prepareStatement(\"INSERT INTO Inschrijvingen (speler, toernooi, heeft_betaald) VALUES (?,?,?);\");\n add.setInt(1, Integer.valueOf(spelerIDField.getText()));\n add.setInt(2, Integer.valueOf(codeField.getText()));\n add.setString(3, heeftBetaaldField.getText());\n add.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);\n }}\n else if(typeField.getText().equalsIgnoreCase(\"Masterclass\")){\n try {\n Connection con = Main.getConnection();\n PreparedStatement add = con.prepareStatement(\"INSERT INTO Inschrijvingen (speler, masterclass, heeft_betaald) VALUES (?,?,?);\");\n add.setInt(1, Integer.valueOf(spelerIDField.getText()));\n add.setInt(2, Integer.valueOf(codeField.getText()));\n add.setString(3, heeftBetaaldField.getText());\n add.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);}\n }\n }", "public void insert() {\n boolean validate = true;\n code = name = \"\";\n price = quantity = saled = 0;\n System.out.print(\"Product code: \");\n while (validate) {\n code = s.nextLine();\n if (Validation.validateString(code)) {\n System.out.print(\"Product name: \");\n while (validate) {\n name = s.nextLine();\n if (Validation.validateString(name)) {\n System.out.print(\"Quantity: \");\n quantity = Validation.validateIntNumber(quantity);\n System.out.print(\"Saled: \");\n saled = Validation.validateIntNumber(saled);\n System.out.print(\"Price: \");\n price = Validation.validateDoubleNumber(price);\n validate = false;\n } else {\n System.err.println(\"Name must be required!\");\n System.err.print(\"Enter product name again: \");\n }\n }\n } else {\n System.err.println(\"Code must be required!\");\n System.err.print(\"Enter product code again: \");\n }\n }\n tree.insert(new Product(code, name, quantity, saled, price));\n }", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "public boolean checkDbStructure(){\n\t\tboolean isStructureOk = false;\n\t\t\n\t\ttry {\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Name, Description, Version from \" + mDbName + \".\" + TABLE_AREA);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\t\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select Area_ID, Route_ID from \" + mDbName + \".\" + TABLE_AREA_HAS_ROUTES);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Ticket_ID, Name, StartName, EndName from \" + mDbName + \".\" + TABLE_ROUTE);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select Route_ID, Station_ID, Position from \" + mDbName + \".\" + TABLE_ROUTE_HAS_STATIONS);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Name, Abbreviation, Latitude, Longitude from \" + mDbName + \".\" + TABLE_STATION);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Name, Icon, Is_Superior from \" + mDbName + \".\" + TABLE_TICKET);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\t\t\n\t\t\tisStructureOk = true;\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t\tisStructureOk = false;\n\t\t}\n\t\t\n\t\treturn isStructureOk;\n\t}", "public static void Enitityinsert (int id,String name,String FQN, String container,int potincy,String directtype,String table )\n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from entity \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from entity\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,potincy,direct_type) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+potincy+\"'\"+\",\"+\"'\"+directtype+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n\n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}", "public void insertPersonnelUnit(PersonnelUnit personnelUnit) throws SQLException {\n PreparedStatement preparedStatement = null;\n MysqlDbManager mysqlDb = MysqlDbManager.getInstance();\n try {\n if (personnelUnit.getClass() == Employee.class) {\n Employee employee = (Employee) personnelUnit;\n String SQL = \"INSERT INTO employees (surname, name, gender, marital_status, salary, dob) VALUES (?, ?, ?, ?, ?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, employee.getSurname());\n preparedStatement.setString(2, employee.getName());\n preparedStatement.setString(3, employee.getGender());\n preparedStatement.setString(4, employee.getMaritalStatus());\n preparedStatement.setInt(5, employee.getSalary());\n preparedStatement.setDate(6, new Date(employee.getDob().getTime()));\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new employee was added to a database!\");\n }\n\n if (personnelUnit.getClass() == Technology.class) {\n Technology technology = (Technology) personnelUnit;\n String SQL = \"INSERT INTO technologies (name, description, rate) VALUES (?, ?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, technology.getName());\n preparedStatement.setString(2, technology.getDescription());\n preparedStatement.setInt(3, technology.getRate());\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new technology was added to a database!\");\n }\n\n if (personnelUnit.getClass() == Affair.class) {\n Affair affair = (Affair) personnelUnit;\n String SQL = \"INSERT INTO affair (idEmployee, idTechnology) VALUES (?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setInt(1, affair.getEmployee().getId());\n preparedStatement.setInt(2, affair.getTechnology().getId());\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new affair was added to a database!\");\n }\n } catch (ClassCastException e) {\n LOGGER.log(Level.SEVERE, \"ClassCastException: \" + e.toString());\n } catch (NullPointerException e) {\n LOGGER.log(Level.SEVERE, \"There is no access to the mysql database: \" + e.toString());\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (preparedStatement != null) {\n preparedStatement.close();\n }\n if (!mysqlDb.getConnection().isClosed()) {\n mysqlDb.getConnection().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n }", "int insert(BasicEquipment record);", "int insert(Goods record);", "int insert(Course record);", "int insert(Course record);", "public static boolean Insert(String table, String[][] fields) throws SQLException {\r\n if (fields.length > 0) {\r\n String key, value, data;\r\n data = \"\";\r\n value = \"\";\r\n key = \"\";\r\n for (int i = 0; i < fields.length; i++) {\r\n for (int j = 0; j < fields[i].length; j++) {\r\n\r\n if (i < fields.length - 1) {\r\n\r\n key += fields[i][j];\r\n if (j < fields[i].length - 1) {\r\n key += \", \";\r\n }\r\n } else {\r\n data += fields[i][j];\r\n value += \"?\";\r\n if (j < fields[i].length - 1) {\r\n value += \", \";\r\n }\r\n }\r\n }\r\n }\r\n\r\n try {\r\n Connection con;\r\n con = Apache_Connectionpool.getInstance().getConnection();\r\n \r\n\r\n PreparedStatement ps = con.prepareStatement(\"INSERT INTO \" + table + \"(\" + key + \") VALUES(\" + value + \")\");\r\n\r\n for (int i = 0; i < fields.length; i++) {\r\n for (int j = 0; j < fields[i].length; j++) {\r\n\r\n if (i < fields.length - 1) {\r\n\r\n } else {\r\n data += fields[i][j];\r\n ps.setString(j + 1, fields[i][j]);\r\n\r\n }\r\n }\r\n }\r\n ps.executeUpdate();\r\n con.close();\r\n ps.close();\r\n return true;\r\n\r\n } catch (Exception ex) {\r\n ErrorDAO.Error_Add(new managedModal.Error(\"Insert method\", \"inserting data into table \" + table, \" Message: \" + ex.getMessage(), date));\r\n return false;\r\n }\r\n\r\n }\r\n return false;\r\n }", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "int insert(Product record);", "private boolean insertaTbrCtaTipDocUsrMod(){\n boolean blnRes=true;\n String strColVec=\"\";\n int w=0;\n String strColTbl=\"\";\n String strCodUsrGrp=\"\";\n int intCodCta=0;\n String strInsCtaUsr=\"\";\n try{\n if(con!=null){\n strInsCtaUsr=\"\";\n stm=con.createStatement();\n for(int i=0; i<objTblModPlaCta.getRowCountTrue(); i++){\n if(objTblModPlaCta.getValueAt(i, INT_TBL_PLA_CTA_LIN)==\"M\"){\n for( int j=(numColModIni); j<=numColModFinGlb; j++ ){\n strColVec=strVecDat[w][2]==null?\"\":strVecDat[w][2];\n strColTbl=\"\"+j;\n while( !(strColVec.equals(\"\")) ){\n if(strColVec.toString().equals(strColTbl)){\n if(objTblModPlaCta.isChecked(i, j)){\n strCodUsrGrp=strVecDat[w][0]==null?\"\":strVecDat[w][0];\n intCodCta=Integer.parseInt(\"\"+objTblModPlaCta.getValueAt(i, INT_TBL_PLA_CTA_COD_CTA));\n \n strSQL=\"\";\n strSQL+=\"INSERT INTO tbr_ctatipdocusr(\";\n strSQL+=\" co_emp, co_loc, co_tipdoc, co_usr, co_cta)\";\n strSQL+=\" VALUES (\";\n strSQL+=\"\" + objParSis.getCodigoEmpresa() + \",\";\n strSQL+=\" \" + objParSis.getCodigoLocal() + \",\";\n strSQL+=\" \" + txtCodTipDoc.getText() + \",\";\n strSQL+=\" \" + strCodUsrGrp + \",\";\n strSQL+=\" \" + intCodCta + \"\";\n strSQL+=\" );\";\n strInsCtaUsr+=strSQL;\n \n }\n }\n w++;\n strColVec=strVecDat[w][2]==null?\"\":strVecDat[w][2];\n }\n w=0;\n } \n }\n }\n System.out.println(\"SQL: \" + strInsCtaUsr);\n stm.executeUpdate(strInsCtaUsr);\n stm.close();\n stm=null;\n }\n }\n catch (java.sql.SQLException e){\n blnRes=false;\n objUti.mostrarMsgErr_F1(this, e);\n }\n catch (Exception e){\n blnRes=false;\n objUti.mostrarMsgErr_F1(this, e);\n }\n return blnRes;\n }", "public void insertCourse(){\n \n }", "@Test\n public void testInsertDataWSSuccess() {\n try {\n \tProviderDAO providerDAO = new ProviderDAOImpl();\n \tProvider provider = new Provider();\n \tPersonDAO personDAO = new PersonDAOImpl();\n \tPerson person = new Person();\n \tperson = personDAO.getPersonById(\"1\");\n \tprovider = providerDAO.getProviderByPerson(person);\n \tString retVal = providerDAO.insertDataWS(provider);\n \t\n \tif (retVal != null) {\n \t\tAssert.assertTrue(true);\n \t\tSystem.out.println(\"[testInsertDataWSSuccess] - \" + retVal);\n \t} else {\n \t\tAssert.assertTrue(false);\n \t}\n\n } catch (Exception e) {\n Assert.assertFalse(false);\n }\n }", "public void testInsert() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n\n // Verify insert\n // Verify\n Command select = das.createCommand(\"Select ID, NAME from COMPANY\");\n DataObject root = select.executeQuery();\n\n assertEquals(4, root.getList(\"COMPANY\").size());\n assertTrue(root.getInt(\"COMPANY[1]/ID\") > 0);\n\n }", "int insert(InspectionAgency record);", "public void addToDatabaseProduct() {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n final String sqlProductName = txtProductName.getText();\n String sqlManufName = txtManufacturer.getText();\n ItemType sqlItemType = choiceType.getValue();\n\n stmt = conn.prepareStatement(\"INSERT INTO Product(type, manufacturer, name) VALUES (?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setString(1, sqlItemType.toString());\n stmt.setString(2, sqlManufName);\n stmt.setString(3, sqlProductName);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static boolean insertCategory(productCategory product,ArrayList<String> attributes,String partNumber)\n {\n PreparedStatement stmt = null;\n\n try\n {\n String pstmt = \"INSERT INTO \" + product.categoryName.getValue() + constructValues(product,attributes,partNumber);\n\n stmt = DBConnectionManager.con.prepareStatement(pstmt);\n\n\n stmt.executeUpdate();\n\n return true;\n\n } catch (SQLException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try { if (stmt != null) stmt.close(); } catch (Exception ignored) {}\n }\n\n return false;\n }", "int insertSelective(GoodsPo record);", "public boolean Add() {\n String query = \"INSERT INTO Proveedores(nombre, idContacto, activo) \"\r\n + \"VALUES('\" + nombre + \"',\" + idContacto + \",\" + activo + \");\";\r\n return dataAccess.Execute(query) >= 1;\r\n }", "public boolean insert(String ps) {\n boolean r = false;\n try {\n getCon().createStatement().execute(ps);\n r = true;\n } catch (SQLException e) {\n System.out.println(\"Erro ao executa comando SQL \\n\"+e.getMessage());\n }\n return r;\n }", "int insert(Commodity record);", "int insert(GoodsPo record);", "public boolean \n\tstoreData_PS\n\t(String dbName, String tableName, PS ps) {\n\t\t\n\t\ttry {\n\t\t\t\n//\t\t\tgetWritableDatabase();\n\t\t\tSQLiteDatabase wdb = this.getWritableDatabase();\n\t\t\t\n\t\t\tContentValues cv = storeData_PS__getContentValues(ps);\n\t\t\t\n\t\t\t//\n\t\t\twdb.beginTransaction();\n\t\t\t\n\t\t\t// Insert data\n\t\t\tlong res = wdb.insert(tableName, null, cv);\n\n\t\t\tif (res != -1) {\n\n\t\t\t\t// Set as successful\n\t\t\t\twdb.setTransactionSuccessful();\n\n\t\t\t\t// End transaction\n\t\t\t\twdb.endTransaction();\n\n\t\t\t\twdb.close();\n\t\t\t\t\n\t\t\t\t// Log\n\t\t\t\tLog.d(\"DBUtils.java\"\n\t\t\t\t\t\t+ \"[\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getLineNumber()\n\t\t\t\t\t\t+ \":\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getMethodName() + \"]\",\n\t\t\t\t\t\t\"Data stored => \" + ps.getStoreName());\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t} else {//if (res != -1)\n\t\t\t\t\n\t\t\t\t// Log\n\t\t\t\tLog.d(\"DBUtils.java\"\n\t\t\t\t\t\t+ \"[\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getLineNumber()\n\t\t\t\t\t\t+ \":\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getMethodName() + \"]\",\n\t\t\t\t\t\t\"Insertion => Failed: \" + ps.getStoreName());\n\n\t\t\t\twdb.close();\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}//if (res != -1)\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// Log\n\t\t\tLog.e(\"DBUtils.java\" + \"[\"\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t\t+ \"]\", \"Exception => \" + e.toString());\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn false;\n\t\t}//try\n\t\t\n\t}", "public static boolean Check_if_exsists(String table, String[][] fields) throws SQLException {\r\n if (fields.length > 0) {\r\n String key, value, data;\r\n data = \"\";\r\n value = \"\";\r\n key = \"\";\r\n for (int i = 0; i < fields.length; i++) {\r\n for (int j = 0; j < fields[i].length; j++) {\r\n\r\n if (i < fields.length - 1) {\r\n\r\n key += fields[i][j] + \"=?\";\r\n if (j < fields[i].length - 1) {\r\n key += \" AND \";\r\n }\r\n } else {\r\n data += fields[i][j];\r\n value += \"?\";\r\n if (j < fields[i].length - 1) {\r\n value += \", \";\r\n }\r\n }\r\n }\r\n }\r\n\r\n try {\r\n Connection con;\r\n con = Apache_Connectionpool.getInstance().getConnection();\r\n \r\n\r\n// PreparedStatement ps = con.prepareStatement(\"INSERT INTO \" + table + \"(\" + key + \") VALUES(\" + value + \")\");\r\n PreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) as Count FROM \" + table + \" WHERE \" + key);\r\n for (int i = 0; i < fields.length; i++) {\r\n for (int j = 0; j < fields[i].length; j++) {\r\n\r\n if (i < fields.length - 1) {\r\n\r\n } else {\r\n data += fields[i][j];\r\n ps.setString(j + 1, fields[i][j]);\r\n\r\n }\r\n }\r\n }\r\n\r\n ResultSet rs = ps.executeQuery();\r\n if (rs.next()) {\r\n Integer temp = rs.getInt(\"Count\");\r\n con.close();\r\n rs.close();\r\n if (temp > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n con.close();\r\n rs.close();\r\n return false;\r\n }\r\n\r\n } catch (Exception ex) {\r\n ErrorDAO.Error_Add(new managedModal.Error(\"Check if data for multiple fields exisit method\", \"inserting data into table \" + table, \" Message: \" + ex.getMessage(), date));\r\n return false;\r\n }\r\n\r\n }\r\n return false;\r\n }", "int insert(courses record);", "int insert(Assist_table record);", "public boolean insertarItem53(Mgestion_resul dts) {\n \n Item53 = \"update item set cumple=?, justifi=?, aplica=? where idItem=53\";\n Ver84 = \"update verificacion set cumplimiento=? where idverificacion=84\";\n \n \n try {\n\n PreparedStatement pst = cn.prepareStatement(Item53);\n PreparedStatement pst2 = cn.prepareStatement(Ver84);\n \n \n\n pst.setString(1, dts.getI531());\n pst.setString(2, dts.getJ531());\n pst.setString(3, dts.getA531());\n \n pst2.setString(1, dts.getV531());\n \n \n int n = pst.executeUpdate();\n\n if (n != 0) {\n int n2 = pst2.executeUpdate();\n\n if (n2 != 0) {\n return true; \n\n } else {\n return false;\n }\n\n } else {\n return false;\n }\n\n } catch (Exception e) {\n JOptionPane.showConfirmDialog(null, e);\n return false;\n }\n \n}", "int insertSelective(Goods record);", "public boolean insertVenueInTable(int itemID, String venue) {\n\t\tString sqlCheckVenues = \"select * from Venues where VenueName = ?\";\n\t\t// insert into VenueIn \n\t\tString sqlVenues = \"insert into Venues (VenueName) values (?)\";\n\t\tString sqlVenueInCheck = \"select * from VenueIn where VenueID = ? and ItemID = ?\";\n\t\tString sqlVenueID = \"select VenueID from Venues where VenueName = ?\";\n\t\tString sqlVenueIn = \"insert into VenueIn (VenueID, ItemID) values (?,?)\";\n//\t\tString sqlGraphStore = \"insert into GraphStore(Subject, Object) values(?,?)\";\n\t\tint venueID = 0;\n\t\ttry {\n\t\t\tConnection connection = dataSource.getConnection();\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sqlCheckVenues);\n\t\t\tpreparedStatement.setString(1, venue);\n\t\t\tResultSet resultSetCheck = preparedStatement.executeQuery();\n\t\t\tint size = 0;\n\t\t\tif (resultSetCheck != null) {\n\t\t\t\tresultSetCheck.beforeFirst();\n\t\t\t\tresultSetCheck.last();\n\t\t\t\tsize = resultSetCheck.getRow();\n\t\t\t}\n\t\t\tif (size == 0) {\n\t\t\t\tpreparedStatement = connection.prepareStatement(sqlVenues);\n\t\t\t\tpreparedStatement.setString(1, venue);\n\t\t\t\tpreparedStatement.execute();\n\t\t\t\t\n\t\t\t\tString subject = \"V\" + venueID;\n\t\t\t\tEntityStoreDAO entityStoreDAO = new EntityStoreDAO();\n\t\t\t\tentityStoreDAO.insertRecord(subject, \"VenueName\", venue);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tpreparedStatement = connection.prepareStatement(sqlVenueID);\n\t\t\tpreparedStatement.setString(1, venue);\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tvenueID = resultSet.getInt(\"VenueID\");\n\t\t\t\tSystem.out.println(venueID);\n\t\t\t}\n\t\t\t\n\t\t\t// check venueIn\n\t\t\tpreparedStatement = connection.prepareStatement(sqlVenueInCheck);\n\t\t\tpreparedStatement.setInt(1, venueID);\n\t\t\tpreparedStatement.setInt(2, itemID);\n\t\t\tResultSet resultSetVenueInCheck = preparedStatement.executeQuery();\n\t\t\tsize = 0;\n\t\t\tif (resultSetVenueInCheck != null) {\n\t\t\t\tresultSetVenueInCheck.beforeFirst();\n\t\t\t\tresultSetVenueInCheck.last();\n\t\t\t\tsize = resultSetVenueInCheck.getRow();\n\t\t\t}\n\t\t\t\t\n\t\t\tif (size == 0) {\n\t\t\t\tpreparedStatement = connection.prepareStatement(sqlVenueIn);\n\t\t\t\tpreparedStatement.setInt(1, venueID);\n\t\t\t\tpreparedStatement.setInt(2, itemID);\n\t\t\t\tpreparedStatement.execute();\n\t\t\t}\n\t\t\t\n\t\t\t// insert into GraphStore\n//\t\t\tpreparedStatement = connection.prepareStatement(sqlGraphStore);\n//\t\t\tpreparedStatement.setInt(1, itemID);\n//\t\t\tpreparedStatement.setInt(2, venueID);\n//\t\t\treturn preparedStatement.execute();\n\t\t\tString subject = \"I\" + Integer.toString(itemID);\n\t\t\tString object = \"V\" + Integer.toString(venueID);\n\t\t\tGraphStoreDAO graphStoreDAO = new GraphStoreDAO();\n\t\t\tgraphStoreDAO.insertRecord(subject, object);\n\t\t\t\n\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\treturn false;\n\t}", "int insert(UserPonumberGoods record);", "public boolean insertDB(String qryExp, RequestBox rBox) throws Exception {\n\t\t\n\t\tConnection conn = null;\n\t\tconn = DBConnect.getDBConnection(\"TPI_TRIBON\");\n\t\tconn.setAutoCommit(false);\n\t\t\n PreparedStatement \tpstmt \t\t= null;\n int \t\t\t\tisOk \t\t= 0;\n int \t\t\t\tisAllOk \t= 1;\n boolean\t\t\t\trtn\t\t\t= true;\n String \t\t\t\tquery \t\t= \"\";\n try {\n \t\n \t\n \tquery = getQuery(qryExp,rBox);\n \t\t\tArrayList list = (ArrayList)rBox.getObject(\"ExcelList\");\n \t\t\tHashMap dbox = null;\n \t\t\t\n \tfor(int i = 0; i < list.size(); i++){ \t\t\n \t\tdbox = (HashMap)list.get(i); \t\t\n \t\tpstmt = conn.prepareStatement(query.toString());\n \t\t\n \t\tpstmt.setString(1, (String)dbox.get(\"test1\"));\n \t\tpstmt.setString(2, (String)dbox.get(\"test2\"));\n \t\tpstmt.setString(3, (String)dbox.get(\"test3\"));\n \t\tpstmt.setString(4, (String)dbox.get(\"test4\"));\n \t\tpstmt.setString(5, (String)dbox.get(\"test5\"));\n \t\tpstmt.setString(6, (String)dbox.get(\"test6\"));\n \t\tpstmt.setString(7, (String)dbox.get(\"test7\"));\n \t\t\n \t\t isOk = pstmt.executeUpdate();\n \t\t \n \t\t //한개라도 실패한다면 실패\n \t\t if(isOk < 0){\n \t\t \tisAllOk = 0;\n \t\t }\n \t}\n \t\n\t\t //결과 성공 여부 결정\n\t\t if(isAllOk != 1){\n\t\t \trBox.put(\"errorMsg\", \"Data Error!\");\n\t\t \trtn = false;\n\t\t \tconn.rollback();\n\t\t }else{\n\t\t \trBox.put(\"successMsg\", \"Success Data Insert!\");\n\t\t \trtn = true;\n\t\t \tconn.commit();\n\t\t\t}\n }\n catch ( Exception ex ) { \n \trtn = false;\n \tex.printStackTrace();\n }\n finally {\n if ( conn != null ) { try { conn.close(); } catch ( Exception e ) { } }\n if ( pstmt != null ) { try { pstmt.close(); } catch ( Exception e ) { } }\n }\n\t\t\n\t\treturn rtn;\n\t}", "int insertSelective(Commet record);", "int insert(CfgSearchRecommend record);", "void insert(BnesBrowsingHis record) throws SQLException;", "int insert(WfCfgModuleCatalog record);", "int insertSelective(UserPonumberGoods record);", "int insertSelective(SupplyNeed record);", "int insert(ConfigData record);", "int insert(OpeningRequirement record);", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "int insert(CmsRoomBook record);", "int insert(TrainingCourse record);", "int insert(CmIndustryConfig record);", "boolean hasInsert();", "public int insertAutrepcm(String rEpcm_Num, String rEpcm_Name, String rEpcm_Jobid, String rEpcm_Pgm,\r\n String rEpcm_Type, String rEpcm_Pgtyp, String rEpcm_Pgstl, String rEpcm_Prntp) throws ClassNotFoundException, SQLException {\r\n int results =-1;\r\n // SQL query insert\r\n String sql = \"INSERT INTO AUTREPCM VALUES (?,?,?,?,?,?,?,?,?,?)\";\r\n try {\r\n dbCon.psmt = dbCon.getConnect().prepareStatement(sql);\r\n dbCon.psmt.setString(1, rEpcm_Num);\r\n dbCon.psmt.setString(2, rEpcm_Name);\r\n dbCon.psmt.setString(3, rEpcm_Jobid);\r\n dbCon.psmt.setString(4, rEpcm_Pgm);\r\n dbCon.psmt.setString(5, rEpcm_Type);\r\n dbCon.psmt.setString(6, rEpcm_Pgtyp);\r\n dbCon.psmt.setString(7, rEpcm_Pgstl);\r\n dbCon.psmt.setString(8, rEpcm_Prntp);\r\n dbCon.psmt.setString(9, \"\");\r\n dbCon.psmt.setString(10, \"\");\r\n results = dbCon.psmt.executeUpdate();\r\n \r\n \r\n } catch (SQLException e) {\r\n // Call Log4j for logging\r\n StackTraceElement stackTraceElement[] = e.getStackTrace();\r\n for (int i = 0; i < stackTraceElement.length; i++) {\r\n lg.warn(stackTraceElement[i].getClassName());\r\n lg.warn(stackTraceElement[i].getFileName());\r\n lg.warn(stackTraceElement[i].getLineNumber());\r\n lg.warn(stackTraceElement[i].getMethodName());\r\n }\r\n \r\n throw new SQLException();\r\n \r\n } finally {\r\n if (dbCon.psmt != null && dbCon.getConnect() != null) {\r\n try {\r\n dbCon.psmt.close();\r\n dbCon.getConnect().close();\r\n\r\n } catch (SQLException e) {\r\n lg.warn(\"The PreparedStatement or Connection not close \");\r\n }\r\n } else {\r\n // do something\r\n }\r\n }\r\n if(results == -1) {\r\n lg.warn(\"method insertAutrepcm(): insert fail\");\r\n }\r\n return results;\r\n }", "int insert(SysCode record);", "private void addToDB(String CAlias, String CPwd, String CFirstName,\n String CLastName, String CStreet, String CZipCode, String CCity,\n String CEmail)\n {\n con.driverMysql();\n con.dbConnect();\n \n try \n {\n sqlStatement=con.getDbConnection().createStatement();\n sqlString=\"INSERT INTO customer (CAlias, CFirstName, CLastName, CPwd, \"\n + \"CStreetHNr, CZipCode, CCity, CEmail, CAccessLevel)\"\n + \" VALUES\"\n + \"('\" + CAlias + \"', '\" + CFirstName + \"', '\" + CLastName\n + \"', '\" + CPwd + \"', '\" + CStreet + \"', '\" \n + CZipCode + \"', '\" + CCity + \"', '\" + CEmail + \"', 1);\";\n \n sqlStatement.executeUpdate(sqlString);\n sqlString=null;\n con.getDbConnection().close();\n } \n catch (Exception ex) \n {\n error=ex.toString();\n }\n }", "int insert(Sequipment record);", "int insertSelective(PmKeyDbObj record);", "public void processInsertar() {\n }", "public void insertBooking(Booking booking) throws SQLException, Exception;", "public boolean insert(Object KV_pair,String avd) // making this also synchronized -- bad idea -- raja may 8\n {\n \t/**\n \t * lock the DB when inserting -- query also uses this -- \n \t * To keep Query section from querying \n \t */\n \t \n\t\tsynchronized (_DBWRITE_Lock)\n\t\t{\n\t\t\tlong rowID = 0l;\n\t\t\tContentValues newValues = null;\n\t\t\tif(KV_pair instanceof String[])\n\t\t\t{\n\t\t\t\tnewValues = new ContentValues();\n\t\t\t\tString[] KV = (String[])KV_pair;\n\t\t\t\tnewValues.put(KEY_FIELD,(String)KV[0]);\n\t\t\t\tnewValues.put(VALUE_FIELD,(String)KV[1]);\n\t\t\t\t// insert or replace -- handle that\n\t\t\t\trowID = sqliteDB.insert(tableName, \"\", newValues);\n\t\t\t\t/*if(rowID < 0)\n\t\t\t\t{\n\t\t\t\t\trowID = sqliteDB.replace(tableName, \"\", newValues);\n\t\t\t\t}*/\n\t\t\t\t Log.v(\"window_shopper\", \"ins:\"+KV[0]+\"::\"+KV[1]+\" --- \"+rowID); // notify user debug statement\n\t\t\t}\n\t\t\telse if(KV_pair instanceof Hashtable) // when recovery happens !! FIXME -- RAJA\n\t\t\t{\n\t\t\t\tHashtable<String, String> values = (Hashtable<String, String>)KV_pair;\n\t\t\t\tSet<String> keys = values.keySet();\n\t\t\t\tfor(String key : keys)\n\t\t\t\t{\n\t\t\t\t\tnewValues = new ContentValues();\n\t\t\t\t\tnewValues.put(KEY_FIELD,key);\n\t\t\t\t\tnewValues.put(VALUE_FIELD,values.get(key));\n\t\t\t\t\trowID = sqliteDB.insert(tableName, \"\", newValues);\n\t\t\t\t\t// replace only if from predecessor\n\t\t\t\t\t/*if(rowID < 0) \n\t\t\t\t\t{\n\t\t\t\t\t\trowID = sqliteDB.replace(tableName, \"\", newValues);\n\t\t\t\t\t}*/\n\t\t\t\t\tLog.v(\"window_shopper\", \"ins:\"+key+\"::\"+values.get(key)+\" --- \"+rowID); // notify user debug statement\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(rowID < 0)\n\t {\n\t \tLog.e(\"window_shopper\"+\" insert\",\"INSERT FAIL\");\n\t \treturn false; //FIXME-- interpretation problems\n\t }\n\t return true;\n\t\t}\n\t}", "int insertSelective(WayShopCateRoot record);", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "public boolean add(Department dept) {\n Connection connection = null; \n try {\n connection = DBConnection.getConnection();\n stmt = connection.createStatement();\n// stmt = DBConnector.openConnection();\n String query = \"INSERT INTO \" + TABLE + \"(abbreviation,title,url_moodle,token) VALUES(\" + dept.toStringQueryInsert() + \")\";\n if (stmt.executeUpdate(query) == 1) {\n connection.commit();\n return true;\n }\n \n } catch (SQLException ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Insertion Query failed!\");\n } finally {\n DBConnection.releaseConnection(connection);\n// DBConnector.closeConnection();\n }\n return false;\n }", "int insert(FctWorkguide record);", "private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }", "private void validation() {\n Pattern pattern = validationfilterStringData();\n if (pattern.matcher(txtDrug.getText().trim()).matches() && pattern.matcher(txtGenericName.getText().trim()).matches()) {\n try {\n TblTreatmentadvise treatmentadvise = new TblTreatmentadvise();\n treatmentadvise.setDrugname(txtDrug.getText());\n treatmentadvise.setGenericname(txtGenericName.getText());\n treatmentadvise.setTiming(cmbDosestiming.getSelectedItem().toString());\n cmbtiming.setSelectedItem(cmbDosestiming);\n treatmentadvise.setDoses(loadcomboDoses());\n treatmentadvise.setDuration(loadcomboDuration());\n PatientService.saveEntity(treatmentadvise);\n JOptionPane.showMessageDialog(this, \"SAVE SUCCESSFULLY\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"STARTUP THE DATABASE CONNECTION\");\n }\n } else {\n JOptionPane.showMessageDialog(this, \"WRONG DATA ENTERED.\");\n }\n }", "int insertSelective(SysCode record);", "int insertSelective(Course record);", "public void addtoDB(String plate,String date,double km,ObservableList<Service> serv){\n \n plate = convertToDBForm(plate);\n \n try {\n stmt = conn.createStatement();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n if(!checkTableExists(plate)){ \n try {\n stmt.execute(\"CREATE TABLE \" + plate + \"(DATA VARCHAR(12),QNT DOUBLE,DESC VARCHAR(50),PRICE DOUBLE,KM DOUBLE);\");\n }catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n for(int i=0;i<serv.size();i++){\n \n double qnt = serv.get(i).getQnt();\n String desc = serv.get(i).getDesc();\n double price = serv.get(i).getPrice();\n \n try {\n stmt.executeUpdate(\"INSERT INTO \" + plate + \" VALUES('\" + date + \"',\" + Double.toString(qnt) + \",'\" + desc + \"',\" + Double.toString(price) + \",\" + Double.toString(km) + \");\");\n }catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n try {\n stmt.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\n }", "@PostConstruct\n void insertData() {\n\t\ttry {\n\t\t\tinsertDataFromJsonToDb.insertIntoDatabase();\n\t\t\tlogger.info(\"The database is filled by data\");\n\n\t\t} catch (Throwable throwable) {\n\t\t\tthrowable.printStackTrace();\n\t\t}\n\t}", "int insert(WayShopCateRoot record);", "int insert (EmpBean emp) throws ClassNotFoundException, SQLException {\n\t\t\n\tConnection con = DBUtil.getConnection();\n\tString sql= \"insert into empTab values(?,?,?)\";\n\tPreparedStatement ps = con.prepareStatement(sql);\n\tps.setString(1, emp.getEmpName());\n\tps.setString(2, emp.getEmpemailid());\n\tps.setInt(3, emp.getEmpphoneno());\n\t\n\n\treturn ps.executeUpdate(); //1 row inserted\n\t\n\t\n\t\n}", "int insert(PmKeyDbObj record);", "public void insertDB() {\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to insert values of a User object into the database\n String query = \"INSERT INTO User VALUES ('\" + userID + \"','\" + password + \"','\" + firstName + \"','\" +\n lastName + \"');\";\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n //shows a message that a new user has been added successfully\n System.out.println(\"new user has been added into the data base successfully\");\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n Message errorMessage = new Message(\"Error\", \"Something wrong happened, when there was a attempt to add user into the database. Try again later.\");\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n }", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "int insertSelective(InspectionAgency record);", "public static boolean insert_prod(String ProdName, String catg,int cost,String owner,String Description) {\n\n String sql = \"INSERT INTO Product(ProdName,Category,Cost,Owner,Description,PackageID,Status) VALUES(?,?,?,?,?,?,?)\";\n try (\n PreparedStatement pstmt = conn.prepareStatement(sql)){\n pstmt.setString(1, ProdName);\n pstmt.setString(2, catg);\n pstmt.setInt(3, cost);\n pstmt.setString(4, owner);\n pstmt.setString(5, Description);\n pstmt.setString(6,\"\");\n pstmt.setString(7,\"0\");\n pstmt.executeUpdate();\n return true;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return false;\n }", "@Override\n\tprotected boolean checkDataStructure(Data data) throws ImportitException {\n\t\tdata.setDatabase(39);\n\t\tdata.setGroup(3);\n\t\tboolean validDb = checkDatabaseName(data);\n\t\tboolean validHead = false;\n\t\tboolean validTable = false;\n\t\tboolean existImportantFields = false;\n\t\tif (validDb) {\n\t\t\tList<Field> headerFields = data.getHeaderFields();\n\t\t\tList<Field> tableFields = data.getTableFields();\n\t\t\tvalidHead = false;\n\t\t\tvalidTable = false;\n\t\t\ttry {\n\n\t\t\t\tvalidHead = checkWarehouseGroupProperties(headerFields, data.getOptionCode().useEnglishVariables());\n\t\t\t\tvalidTable = checkFieldList(tableFields, 39, 3, false, data.getOptionCode().useEnglishVariables());\n\t\t\t\tString[] checkDataCustomerPartProperties = checkDataWarehouseGroupProperties(data);\n\t\t\t\texistImportantFields = checkDataCustomerPartProperties.length == 2;\n\n\t\t\t} catch (ImportitException e) {\n\t\t\t\tlogger.error(e);\n\t\t\t\tdata.appendError(Util.getMessage(\"err.structure.check\", e.getMessage()));\n\t\t\t}\n\t\t}\n\t\tif (validTable && validHead && validDb & existImportantFields) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean insertDB(String qryExp, RequestBox rBox) throws Exception {\n\t\treturn false;\n\t}", "int insert(ToolsOutIn record);", "int insert(WizardValuationHistoryEntity record);", "int insert(Computer record);", "public String insert() {\n \n //loading the driver\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (Exception e) {\n e.printStackTrace();\n return \"Internal Error\";\n }\n\n //database variables\n final String db = \"jdbc:mysql://mis-sql.uhcl.edu/dingorkarj2620\";\n Connection con = null;\n Statement st = null;\n ResultSet rs = null;\n try {\n\n //connecting database\n con = DriverManager.getConnection(db, \"dingorkarj2620\", \"1289968\");\n st = con.createStatement();\n\n rs = st.executeQuery(\"select * from nextitemnumber\");\n if (rs.next()) {\n i.setI_id(rs.getInt(1));\n }\n\n //calling method to update status of the item\n updateStatus();\n\n //insert data into item\n st.executeUpdate(\"insert into item values (\" + i.getI_id() + \",\" + super.id + \", '\" + i.getI_type() + \"','\" + i.getI_title() + \"','\" + i.getI_description() + \"',\" + i.getI_price() + \",\" + i.getI_min() + \",\" + i.getI_max() + \",0,'\" + i.getI_status() + \"',\" + i.isI_featured() + \", '\" + i.getI_category() + \"', '\" + i.getI_img() + \"')\");\n st.executeUpdate(\"update nextitemnumber set next_i_id = \" + (i.getI_id() + 1));\n\n return \"insert_successful.xhtml\";\n\n } catch (SQLException e) {\n e.printStackTrace();\n return \"insert_fail.xhtml\";\n\n } finally {\n\n try {\n con.close();\n st.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n return \"insert_fail.xhtml\";\n }\n }\n }", "private void validate() {\n for (DBRow row : rows) {\n for (DBColumn column : columns) {\n Cell cell = Cell.at(row, column);\n DBValue value = values.get(cell);\n notNull(value,\"Cell \" + cell);\n }\n }\n }", "int insert(Cargo record);" ]
[ "0.6581126", "0.62436026", "0.6158328", "0.6104002", "0.60802066", "0.59623724", "0.59616166", "0.592088", "0.59177375", "0.59163755", "0.59033215", "0.58955693", "0.5856643", "0.58546895", "0.5840508", "0.5835445", "0.5834832", "0.5827406", "0.58186173", "0.58139354", "0.58056325", "0.57980084", "0.578728", "0.5769411", "0.5755488", "0.574985", "0.57486856", "0.5747625", "0.5741346", "0.5739067", "0.5739067", "0.57304484", "0.57181096", "0.57117707", "0.57034665", "0.57022715", "0.5693754", "0.56937003", "0.56920236", "0.5690509", "0.5688183", "0.56731236", "0.56731045", "0.5670794", "0.566972", "0.56675696", "0.56666404", "0.56659794", "0.5661474", "0.5659776", "0.56596", "0.5657437", "0.5644478", "0.56418073", "0.56345624", "0.5631077", "0.5627844", "0.5627197", "0.5626162", "0.56223035", "0.5613902", "0.5613621", "0.5602811", "0.56016314", "0.5596417", "0.5595103", "0.5591482", "0.55868137", "0.5586398", "0.55764335", "0.5573117", "0.55661684", "0.5563929", "0.55630666", "0.55623466", "0.5561912", "0.5561357", "0.555906", "0.55585486", "0.5557687", "0.55547035", "0.5552801", "0.55507433", "0.5548612", "0.5544635", "0.5542273", "0.5539989", "0.55392766", "0.553553", "0.5530998", "0.5528021", "0.5526107", "0.5524492", "0.55180585", "0.55159813", "0.55102307", "0.5510115", "0.55086434", "0.55075556", "0.5507384", "0.5506658" ]
0.0
-1
Read the application config for Marathon refresh transformation.
public static AppTransformConfig readAppTransformConfig() { if(triedLoadingTransformConfig){ return config; } triedLoadingTransformConfig = true; try { ObjectMapper mapper = new ObjectMapper(); InputStream in = new FileInputStream("transform.json"); config = mapper.readValue(in, AppTransformConfig.class); return config; } catch (FileNotFoundException e) { logger.error("Error in reading transform.json", e); } catch (JsonParseException e) { logger.error("Error in parsing transform.json", e); } catch (JsonMappingException e) { logger.error("Error in parsing transform.json", e); } catch (IOException e) { logger.error("Error in reading transform.json", e); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Map<String, Object> getAppConfig() throws IOException {\n Properties properties = PropertiesReader.loadProperties(new FileInputStream(\"src/main/resources/app.properties\"));\n\n String appPathValue = properties.getProperty(\"app.path\");\n appPathValue = System.getProperty(\"user.dir\")+\"/\"+appPathValue;\n\n String appWaitActivityValue = properties.getProperty(\"app.wait.activity\");\n\n appConfigMap.put(APP_PATH, appPathValue);\n appConfigMap.put(APP_WAIT_ACTIVITY, appWaitActivityValue);\n\n return appConfigMap;\n }", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "Collection<String> readConfigs();", "public String readConfiguration(String path);", "private static void readConfigFile() {\n\n BufferedReader input = null;\n try {\n input = new BufferedReader(new FileReader(getConfigFile()));\n String sLine = null;\n while ((sLine = input.readLine()) != null) {\n final String[] sTokens = sLine.split(\"=\");\n if (sTokens.length == 2) {\n m_Settings.put(sTokens[0], sTokens[1]);\n }\n }\n }\n catch (final FileNotFoundException e) {\n }\n catch (final IOException e) {\n }\n finally {\n try {\n if (input != null) {\n input.close();\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n\n }", "public static void ReadConfig() throws IOException\r\n {\r\n ReadConfiguration read= new ReadConfiguration(\"settings/FabulousIngest.properties\");\r\n \t \r\n fedoraStub =read.getvalue(\"fedoraStub\");\r\n \t username = read.getvalue(\"fedoraUsername\");\r\n \t password =read.getvalue(\"fedoraPassword\");\r\n \t pidNamespace =read.getvalue(\"pidNamespace\");\r\n \t contentAltID=read.getvalue(\"contentAltID\");\r\n \t \r\n \t \r\n \t ingestFolderActive =read.getvalue(\"ingestFolderActive\");\r\n \t ingestFolderInActive =read.getvalue(\"ingestFolderInActive\");\r\n \t\r\n logFileNameInitial=read.getvalue(\"logFileNameInitial\");\r\n \r\n DataStreamID=read.getvalue(\"DataStreamID\");\r\n \t DataStreamLabel=read.getvalue(\"DataStreamLabel\");\r\n \r\n \r\n \r\n }", "private AppConfigLoader() {\r\n\r\n\t\tProperties appConfigPropertySet = new Properties();\r\n\t\tProperties envConfigPropertySet = new Properties();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// read properties file\r\n\t\t\tInputStream appConfigPropertyStream = AppConfigLoader.class\r\n\t\t\t\t\t.getResourceAsStream(\"/config/baseAppConfig.properties\");\r\n\t\t\tappConfigPropertySet.load(appConfigPropertyStream);\r\n\r\n\t\t\tInputStream envConfigPropertyStream = null;\r\n\r\n\t\t\t// check if current environment is defined (QA, Integration or Staging)\r\n\t\t\tif (System.getProperty(\"environment\") != null) {\r\n\t\t\t\tenvConfigPropertyStream = AppConfigLoader.class\r\n\t\t\t\t\t\t.getResourceAsStream(\"/config/\" + System.getProperty(\"environment\") + \"/appConfig.properties\");\r\n\t\t\t\tSystem.out.println(\"********'ENVIRONMENT Details taken from Runtime'********\");\r\n\t\t\t\tSystem.out.println(\"********'\" + System.getProperty(\"environment\") + \" ENVIRONMENT'********\");\r\n\t\t\t\tenvironment = System.getProperty(\"environment\");\r\n\t\t\t} else {\r\n\t\t\t\tenvConfigPropertyStream = AppConfigLoader.class.getResourceAsStream(\r\n\t\t\t\t\t\t\"/config/\" + appConfigPropertySet.getProperty(\"CurrentEnvironment\") + \"/appConfig.properties\");\r\n\t\t\t\tSystem.out.println(\"********'ENVIRONMENT Details taken from Baseapp config property file'********\");\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"********'\" + appConfigPropertySet.getProperty(\"CurrentEnvironment\") + \" ENVIRONMENT'********\");\r\n\t\t\t\tenvironment = appConfigPropertySet.getProperty(\"CurrentEnvironment\");\r\n\t\t\t}\r\n\r\n\t\t\tenvConfigPropertySet.load(envConfigPropertyStream);\r\n\r\n\t\t\tthis.sampleURL = envConfigPropertySet.getProperty(\"SampleUrl\");\r\n\t\t\tthis.sampleAPIURL = envConfigPropertySet.getProperty(\"SampleAPIUrl\");\r\n\r\n\t\t\tthis.sampleDbConnectionString = envConfigPropertySet.getProperty(\"SampleConnectionString\");\r\n\r\n\t\t\tenvConfigPropertyStream.close();\r\n\t\t\tappConfigPropertyStream.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "Map<String, Object> readConfig(Request request, String id);", "public void loadConfig() {\n\t}", "public void readConfigXml() throws SerializationException {\n\n IPathManager pm = PathManagerFactory.getPathManager();\n LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,\n LocalizationLevel.SITE);\n\n lf = pm.getLocalizationFile(lc, CONFIG_FILE_NAME);\n lf.addFileUpdatedObserver(this);\n File file = lf.getFile();\n // System.out.println(\"Reading -- \" + file.getAbsolutePath());\n if (!file.exists()) {\n System.out.println(\"WARNING [FFMP] FFMPRunConfigurationManager: \"\n + file.getAbsolutePath() + \" does not exist.\");\n return;\n }\n\n FFMPRunConfigXML configXmltmp = null;\n\n configXmltmp = jaxb.unmarshalFromXmlFile(file.getAbsolutePath());\n\n configXml = configXmltmp;\n isPopulated = true;\n applySourceConfigOverrides();\n }", "public void reload() {\n try {\n this.configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(this.getConfigurationFile());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "ArrayList<ArrayList<String>> get_config(){\n return config_file.r_wartosci();\n }", "private static void loadConfig()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal Properties props = ManagerServer.loadProperties(ManagerServer.class, \"/resources/conf.properties\");\n\t\t\tasteriskIP = props.getProperty(\"asteriskIP\");\n\t\t\tloginName = props.getProperty(\"userName\");\n\t\t\tloginPwd = props.getProperty(\"password\");\n\t\t\toutboundproxy = props.getProperty(\"outBoundProxy\");\n\t\t\tasteriskPort = Integer.parseInt(props.getProperty(\"asteriskPort\"));\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tLOG.error(\"IO Exception while reading the configuration file.\", ex);\n\t\t}\n\t}", "public static AppConfig getAppConfig() {\n\n\t\t//LOGGER.info(\"Configurator:getAppConfig(): Configuring the Application credentials .........................\");\n\t\t\n\t\tProperties props = new Properties();\n\t\tAppConfig appConfig = new AppConfig();\n\n\t\ttry {\n\t\t\tprops.load(new FileInputStream(\"Resilient.properties\"));\n\n\t\t\t// SFDC\n\t\t\tappConfig.setSfdcEndpoint(props.getProperty(\"sfdc.sfdcEndpoint\"));\n\t\t\tappConfig.setSfdcUsername(props.getProperty(\"sfdc.sfdcUsername\"));\n\t\t\tappConfig.setSfdcPassword(props.getProperty(\"sfdc.sfdcPassword\"));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tappConfig.setSfdcBillToItemQueryFields(props.getProperty(\"resilient.launchReport.sfdcBillToItemQueryFields\"));\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Exception while configuring the Application credentials ...\" + e);\n\t\t}\n\t\treturn appConfig;\n\t}", "private static Config loadConfig(String name) {\n\n\t\tString path;\n\t\tif (name == null) {\n\t\t\tpath = \"application.json\";\n\t\t} else {\n\t\t\tpath = \"src/\"+extensionsPackage+\"/\" + name + \"/config.json\";\n\t\t}\n\n\t\tGson gson = new Gson();\n\t\tConfig config = null;\n\n\t\ttry {\n\t\t\tconfig = gson.fromJson(new FileReader(path), Config.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn config;\n\t}", "private ApolloConfig loadApolloConfig() {\n if (!m_loadConfigRateLimiter.tryAcquire(5, TimeUnit.SECONDS)) {\n //wait at most 5 seconds\n try {\n TimeUnit.SECONDS.sleep(5);\n } catch (InterruptedException e) {\n }\n }\n String appId = m_configUtil.getAppId();\n String cluster = m_configUtil.getCluster();\n String dataCenter = m_configUtil.getDataCenter();\n Tracer.logEvent(\"Apollo.Client.ConfigMeta\", STRING_JOINER.join(appId, cluster, m_namespace));\n int maxRetries = m_configNeedForceRefresh.get() ? 2 : 1;\n long onErrorSleepTime = 0; // 0 means no sleep\n Throwable exception = null;\n\n List<ServiceDTO> configServices = getConfigServices();\n String url = null;\n for (int i = 0; i < maxRetries; i++) {\n List<ServiceDTO> randomConfigServices = Lists.newLinkedList(configServices);\n Collections.shuffle(randomConfigServices);\n //Access the server which notifies the client first\n if (m_longPollServiceDto.get() != null) {\n randomConfigServices.add(0, m_longPollServiceDto.getAndSet(null));\n }\n\n for (ServiceDTO configService : randomConfigServices) {\n if (onErrorSleepTime > 0) {\n logger.warn(\n \"Load config failed, will retry in {} {}. appId: {}, cluster: {}, namespaces: {}\",\n onErrorSleepTime, m_configUtil.getOnErrorRetryIntervalTimeUnit(), appId, cluster, m_namespace);\n\n try {\n m_configUtil.getOnErrorRetryIntervalTimeUnit().sleep(onErrorSleepTime);\n } catch (InterruptedException e) {\n //ignore\n }\n }\n\n url = assembleQueryConfigUrl(configService.getHomepageUrl(), appId, cluster, m_namespace,\n dataCenter, m_remoteMessages.get(), m_configCache.get());\n\n logger.debug(\"Loading config from {}\", url);\n HttpRequest request = new HttpRequest(url);\n\n\n HttpResponse<ApolloConfig> response = m_httpUtil.doGet(request, ApolloConfig.class);\n m_configNeedForceRefresh.set(false);\n m_loadConfigFailSchedulePolicy.success();\n\n\n if (response.getStatusCode() == 304) {\n logger.debug(\"Config server responds with 304 HTTP status code.\");\n return m_configCache.get();\n }\n\n ApolloConfig result = response.getBody();\n\n logger.debug(\"Loaded config for {}: {}\", m_namespace, result);\n\n return result;\n\n // if force refresh, do normal sleep, if normal config load, do exponential sleep\n// onErrorSleepTime = m_configNeedForceRefresh.get() ? m_configUtil.getOnErrorRetryInterval() :\n// m_loadConfigFailSchedulePolicy.fail();\n }\n\n }\n String message = String.format(\n \"Load Apollo Config failed - appId: %s, cluster: %s, namespace: %s, url: %s\",\n appId, cluster, m_namespace, url);\n throw new ApolloConfigException(message, exception);\n }", "public static void loadConfig() throws IOException {\n\t\t// initialize hash map\n\t\tserverOptions = new HashMap<>();\n\t\t// Get config from file system\n\t\tClass<ConfigurationHandler> configurationHandler = ConfigurationHandler.class;\n\t\tInputStream inputStream = configurationHandler.getResourceAsStream(\"/Config/app.properties\");\n\t\tInputStreamReader isReader = new InputStreamReader(inputStream);\n\t //Creating a BufferedReader object\n\t BufferedReader reader = new BufferedReader(isReader);\n\t String str;\n\t while((str = reader.readLine())!= null){\n\t \t if (str.contains(\"=\")) {\n\t \t\t String[] config = str.split(\" = \", 2);\n\t \t serverOptions.put(config[0], config[1]);\n\t \t }\n\t }\n\t}", "public Properties loadConfig(){\n\t\tprintln(\"Begin loadConfig \");\n\t\tProperties prop = null;\n\t\t prop = new Properties();\n\t\ttry {\n\t\t\t\n\t\t\tprop.load(new FileInputStream(APIConstant.configFullPath));\n\n\t } catch (Exception ex) {\n\t ex.printStackTrace();\n\t println(\"Exception \"+ex.toString());\n\t \n\t }\n\t\tprintln(\"End loadConfig \");\n\t\treturn prop;\n\t\t\n\t}", "private void LoadConfigFromClasspath() throws IOException \n {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(\"lrs.properties\");\n config.load(is);\n is.close();\n\t}", "public static boolean loadConfig() throws IOException, ConfigurationNotFoundException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n File file = new File(Objects.requireNonNull(classLoader.getResource(\"application.yaml\")).getFile());\n\n // Instantiating a new ObjectMapper as a YAMLFactory\n ObjectMapper om = new ObjectMapper(new YAMLFactory());\n\n if (file.exists()) {\n AppConfig appConfig = om.readValue(file, AppConfig.class);\n\n if (Objects.nonNull(appConfig)\n && Objects.nonNull(appConfig.getApi())\n && Objects.nonNull(appConfig.getSmtp())) {\n\n AppConfig.apiConfig = appConfig.getApi();\n AppConfig.smtpConfig = appConfig.getSmtp();\n\n return true;\n } else {\n throw new ConfigurationNotFoundException(\"Configuration parameter are incorrect\");\n }\n } else {\n throw new ConfigurationNotFoundException();\n }\n }", "public void updateConfig() {\n String[] config = getConfiguration();\n Config.MEASUREMENT_INTERVAL = (int)Double.parseDouble(config[2]);\n Config.MAX_INJECTION = Double.parseDouble(config[3]);\n Config.MIN_INJECTION = Double.parseDouble(config[4]);\n Config.MAX_CUMULATIVE_DOSE = Double.parseDouble(config[5]);\n }", "@PostConstruct\n\tprivate void init() {\n\t\ttry {\n\t\t\tif (environment.getProperty(\"marathon.uri\") != null)\n\t\t\t\tmarathonUrl = environment.getProperty(\"marathon.uri\");\n\t\t\tif (environment.getProperty(\"quay.url\") != null)\n\t\t\t\tquayHost = environment.getProperty(\"quay.url\");\n\t\t\t{\n\t\t\t\tint slashslash = quayHost.indexOf(\"//\") + 2;\n\t\t\t\tquayHost = quayHost.substring(slashslash, quayHost.indexOf('/', slashslash));\n\t\t\t\t/*\n\t\t\t\t * URL aURL = new URL(\"quayhost\"); quayhost = aURL.getHost();\n\t\t\t\t */\n\t\t\t}\n\t\t\tif (environment.getProperty(\"chronos.uri.prefix\") != null) {\n\t\t\t\tchronosUrlPrefix = environment.getProperty(\"chronos.uri.prefix\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"docker.uri.prefix\") != null) {\n\t\t\t\tdockerUri = environment.getProperty(\"docker.uri.prefix\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"websocket.retsapi.server.url\") != null) {\n\t\t\t\twebsocketServerUrl = environment.getProperty(\"websocket.retsapi.server.url\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"tomcat.url\") != null) {\n\t\t\t\ttomcatUri = environment.getProperty(\"tomcat.url\");\n\t\t\t\t// String myString = tomcatUri;\n\t\t\t\t// tomcatUri = myString.replace(\"http://\",\"\").replace(\"http://\n\t\t\t\t// www.\",\"\").replace(\"www.\",\"\");\n\t\t\t\t// int slashslash = tomcatUri.indexOf(\"//\") + 2;\n\t\t\t\t// tomcatUri = tomcatUri.substring(slashslash,\n\t\t\t\t// tomcatUri.indexOf('/', slashslash));\n\t\t\t\t// System.out.println(a);\n\t\t\t}\n\t\t\tif (environment.getProperty(\"nvidia.host\") != null) {\n\t\t\t\tnvidiaHost = environment.getProperty(\"nvidia.host\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"mesos.slave.prefix\") != null) {\n\t\t\t\tmesosSlvaePrefix = environment.getProperty(\"mesos.slave.prefix\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error while reading properties for Marathon\", e);\n\n\t\t}\n\t}", "public String readConfig(Context context) {\n\n String ret = \"\";\n\n try {\n InputStream inputStream = context.openFileInput(\"config.txt\");\n\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receiveString = \"\";\n StringBuilder stringBuilder = new StringBuilder();\n\n while ((receiveString = bufferedReader.readLine()) != null) {\n stringBuilder.append(receiveString);\n }\n\n inputStream.close();\n ret = stringBuilder.toString();\n }\n } catch (FileNotFoundException e) {\n Log.e(\"Config\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"Config\", \"Can not read file: \" + e.toString());\n }\n\n return ret;\n }", "public static void readConfiguration() throws IOException {\n synchronized (Configuration.class) {\n Properties props = new Properties();\n InputStream is = new FileInputStream(Constants.ROOT_PATH + \"/opencraft.properties\");\n try {\n props.load(is);\n configuration = new Configuration(props);\n } finally {\n is.close();\n }\n }\n }", "private void ReadConfig()\n {\n try\n {\n Yaml yaml = new Yaml();\n\n BufferedReader reader = new BufferedReader(new FileReader(confFileName));\n\n yamlConfig = yaml.loadAll(reader);\n\n for (Object confEntry : yamlConfig)\n {\n //System.out.println(\"Configuration object type: \" + confEntry.getClass());\n\n Map<String, Object> confMap = (Map<String, Object>) confEntry;\n //System.out.println(\"conf contents: \" + confMap);\n\n\n for (String keyName : confMap.keySet())\n {\n //System.out.println(keyName + \" = \" + confMap.get(keyName).toString());\n\n switch (keyName)\n {\n case \"lineInclude\":\n\n for ( String key : ((Map<String, String>) confMap.get(keyName)).keySet())\n {\n lineFindReplace.put(key, ((Map<String, String>) confMap.get(keyName)).get(key).toString());\n }\n\n lineIncludePattern = ConvertToPattern(lineFindReplace.keySet().toString());\n\n break;\n case \"lineExclude\":\n lineExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileExclude\":\n fileExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileInclude\":\n fileIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirExclude\":\n dirExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirInclude\":\n dirIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"urlPattern\":\n urlPattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n }\n }\n }\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", confFileName);\n e.printStackTrace();\n }\n }", "public static Config config() {\n return LiveEventBusCore.get().config();\n }", "public String readConfig(String path) throws Exception {\n\t\treturn getObject(path + CONFIG);\n\t}", "private void setConfiguration() throws IOException{\n\t\tString confPath = \"mapreduce.conf\";\n\t\tFileInputStream fis = new FileInputStream(confPath);\n\t\tthis.load(fis);\n\t\tfis.close();\n\t}", "public void read() {\n\t\tconfigfic = new Properties();\n\t\tInputStream input = ConfigReader.class.getClassLoader().getResourceAsStream(\"source/config.properties\");\n\t\t// on peut remplacer ConfigReader.class par getClass()\n\t\ttry {\n\t\t\tconfigfic.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "public Config getConfig();", "public void reloadConfig () {\n if (config == null) {\n if (datafolder == null)\n throw new IllegalStateException();\n config = new File(datafolder, configName);\n }\n this.fileConfiguration = YamlConfiguration.loadConfiguration(config);\n }", "private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "private static void processIncludedConfig() {\n String configName = \"config.\" + getRunMode() + \".properties\";\n\n //relative path cannot be recognized and not figure out the reason, so here use absolute path instead\n InputStream configStream = Configuration.class.getResourceAsStream(\"/\" + configName);\n if (configStream == null) {\n log.log(Level.WARNING, \"configuration resource {0} is missing\", configName);\n return;\n }\n\n try (InputStreamReader reader = new InputStreamReader(configStream, StandardCharsets.UTF_8)) {\n Properties props = new Properties();\n props.load(reader);\n CONFIG_VALUES.putAll(props);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Unable to process configuration {0}\", configName);\n }\n\n }", "private void readComponentConfiguration(ComponentContext context) {\n Dictionary<?, ?> properties = context.getProperties();\n\n String addressStr = Tools.get(properties, \"address\");\n address = addressStr != null ? addressStr : DEFAULT_ADDRESS;\n log.info(\"Configured. Ganglia server address is {}\", address);\n\n String metricNameStr = Tools.get(properties, \"metricNames\");\n metricNames = metricNameStr != null ? metricNameStr : DEFAULT_METRIC_NAMES;\n log.info(\"Configured. Metric name is {}\", metricNames);\n\n Integer portConfigured = Tools.getIntegerProperty(properties, \"port\");\n if (portConfigured == null) {\n port = DEFAULT_PORT;\n log.info(\"Ganglia port is not configured, default value is {}\", port);\n } else {\n port = portConfigured;\n log.info(\"Configured. Ganglia port is configured to {}\", port);\n }\n\n Integer ttlConfigured = Tools.getIntegerProperty(properties, \"ttl\");\n if (ttlConfigured == null) {\n ttl = DEFAULT_TTL;\n log.info(\"Ganglia TTL is not configured, default value is {}\", ttl);\n } else {\n ttl = ttlConfigured;\n log.info(\"Configured. Ganglia TTL is configured to {}\", ttl);\n }\n\n Boolean monitorAllEnabled = Tools.isPropertyEnabled(properties, \"monitorAll\");\n if (monitorAllEnabled == null) {\n log.info(\"Monitor all metrics is not configured, \" +\n \"using current value of {}\", monitorAll);\n } else {\n monitorAll = monitorAllEnabled;\n log.info(\"Configured. Monitor all metrics is {}\",\n monitorAll ? \"enabled\" : \"disabled\");\n }\n }", "@Override\n public GwtApplicationConfiguration getConfig() {\n if (config == null) {\n config = new GwtApplicationConfiguration(true);\n }\n return config;\n // Fixed size application:\n //return new GwtApplicationConfiguration(480, 320);\n }", "public AppResourceData retrieveConfigResource(String url) {\n\n return this.retrieveResource(File.separator + \"..\" + File.separator + \"config\" + File.separator + url);\n }", "@Bean(name = {\"actorSystemConfiguration\"})\n public InternalActorSystemConfiguration getConfiguration(\n ResourceLoader resourceLoader,\n Environment env) throws IOException\n {\n Resource configResource = resourceLoader.getResource(env.getProperty(\"ea.node.config.location\",\"classpath:ea-test.yaml\"));\n // yaml mapper\n ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());\n return objectMapper.readValue(configResource.getInputStream(), DefaultConfiguration.class);\n }", "public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }", "public void loadConfigs() {\n\t configYML = new ConfigYML();\n\t configYML.setup();\n }", "public void initRootAppVars(){\n\t \ttry{\n\t \t\tInputStream is = this.getResources().openRawResource(R.raw.config);\n\t\t\t\tbyte [] buffer = new byte[is.available()];\n\t\t\t\twhile (is.read(buffer) != -1);\n\t\t\t\tString json = new String(buffer);\n\t JSONObject obj = new JSONObject(json);\n\t \n\t //appData..\n\t JSONObject rootObj = obj.getJSONObject(\"appData\");\n \t\n \t//init current app\n\t \t currentApp = new Obj_App(rootObj.getString(\"appGuid\"));\n \tcurrentApp.setApiKey(rootObj.getString(\"appApiKey\"));\n\t \t currentApp.setDataUrl(rootObj.getString(\"appDataURL\"));\n \t\n \t }catch (Exception je){\n \t \tLog.i(\"ZZ\", \"AppDelegate:initAppVars: ERROR: \" + je.getMessage()); \n\t }\n\t\t}", "EventWriterConfig getConfig();", "public void getConfiguration(final long lastupdate) {\n Logger.log(Logger.Level.DEBUG, TAG, \"getConfiguration\");\n\n configurationApi.getConfiguration(lastupdate)\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n p -> onConfigurationRequestSucess(p),\n this::onConfigurationRequestFailed\n );\n }", "public String getConfig();", "RootConfig getConfig();", "@Override\n\tpublic void onApplicationEvent(ApplicationReadyEvent event) \n\t{\n\n\t\tHystrixCommandProperties.Setter().withExecutionTimeoutInMilliseconds(20000);\n\t\tConfigurationManager.getConfigInstance().setProperty(\"execution.isolation.thread.timeoutInMilliseconds\", \"20000\");\n\n\t\tSystem.out.println(\"1 value>>>>>>>>>>>>>>>>>>>>>>>>>>>> \");\n\t\t/*\t\tAbstractConfiguration manager = ConfigurationManager.getConfigInstance();\n\t\tfor (String key : event.getKeys())\n\t\t{\n\t\t\tfor (ConfigurationListener listener : manager.getConfigurationListeners()) \n\t\t\t{\n\t\t\t\tObject source = event.getSource();\n\t\t\t\t// TODO: Handle add vs set vs delete?\n\t\t\t\tint type = AbstractConfiguration.EVENT_SET_PROPERTY;\n\t\t\t\tString value = env.getProperty(key);\n\n\t\t\t\tSystem.out.println(\"value>>>>>>>>>>>>>>>>>>>>>>>>>>>> \"+value);\n\n\t\t\t\tboolean beforeUpdate = false;\n\t\t\t\tlistener.configurationChanged(new ConfigurationEvent(source, type, key, value, beforeUpdate));\n\t\t\t}\n\t\t}*/\n\t}", "public ReadConfig() \n\t{\n\t\tFile scr = new File(\"./Configuration/config.properties\"); //property file\n\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(scr); // READ the DATA (read mode)\n\t\t\tpro = new Properties(); // pro object\n\t\t\tpro.load(fis); // Load method -load at the \n\n\t\t} catch (final Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Except is \" + e.getMessage());\n\t\t} \n\t}", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "GradoopFlinkConfig getConfig();", "public void initialConfig() {\n }", "public void loadConfiguration(){\n\t\t\n\t\tString jarLoc = this.getJarLocation();\n\t\tTicklerVars.jarPath = jarLoc;\n\t\tTicklerVars.configPath=TicklerVars.jarPath+TicklerConst.configFileName;\n\t\t\n\t\t//Read configs from conf file\n\t\tif (new File(TicklerVars.configPath).exists()){\n\t\t\ttry {\n\t\t\t\tString line;\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(TicklerVars.configPath));\n\t\t\t\twhile ((line =reader.readLine())!= null) {\n\t\t\t\t\tif (line.contains(\"Tickler_local_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.ticklerDir = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Tickler_sdcard_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length()-1);\n\t\t\t\t\t\tTicklerVars.sdCardPath = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Frida_server_path\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.fridaServerLoc = loc;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//Config path does not exist\n\t\t\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"WARNING...... Configuration file does not exist!!!!\\nThe following default configurations are set:\\n\");\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n\t\t\tSystem.out.println(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t\tSystem.out.println(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\n\t\tString x = TicklerVars.ticklerDir;\n\t\tif (TicklerVars.ticklerDir == null || TicklerVars.ticklerDir.matches(\"\\\\s*/\") ){\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler_local_directory. Workspace is set at \"+ TicklerVars.ticklerDir);\n\t\t\tOutBut.printStep(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t}\n\t\t\n\t\tif (TicklerVars.sdCardPath == null || TicklerVars.sdCardPath.matches(\"\\\\s*/\")) {\n\t\t\tTicklerVars.sdCardPath = TicklerConst.sdCardPathDefault;\t\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler's temp directory on the device. It is set to \"+ TicklerVars.sdCardPath);\n\t\t\tOutBut.printStep(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\t\n\t}", "private void processConfigurationFile() throws RuntimeException {\n try {\n // Read all the lines and join them in a single string\n List<String> lines = Files.readAllLines(Paths.get(this.confFile));\n String content = lines.stream().reduce(\"\", (a, b) -> a + b);\n\n // Use the bson document parser to extract the info\n Document doc = Document.parse(content);\n this.mongoDBHostname = doc.getString(\"CLARUS_keystore_db_hostname\");\n this.mongoDBPort = doc.getInteger(\"CLARUS_keystore_db_port\");\n this.clarusDBName = doc.getString(\"CLARUS_keystore_db_name\");\n } catch (IOException e) {\n throw new RuntimeException(\"CLARUS configuration file could not be processed\", e);\n }\n }", "@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}", "public String getApplicationContext()\n {\n return configfile.getApplicationPath(getASPManager().getCurrentHostIndex());\n }", "public static void loadGameConfiguration() {\n File configFile = new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME);\n manageGameConfigFile(configFile);\n }", "private void readPreferences() {\n configAutonomousCommand();\n }", "Properties readConfigurationAsProperties(String moduleName) throws Exception;", "public abstract String getConfig();", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "public static void processConfig() {\r\n\t\tLOG.info(\"Loading Properties from {} \", propertiesPath);\r\n\t\tLOG.info(\"Opening configuration file ({})\", propertiesPath);\r\n\t\ttry {\r\n\t\t\treadPropertiesFile();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOG.error(\r\n\t\t\t\t\t\"Monitoring system encountered an error while processing config file, Exiting\",\r\n\t\t\t\t\te);\r\n\t\t}\r\n\t}", "public T getConfig() throws InvalidConfigFormatException {\n try {\n Reader settingsFile = new FileReader( getSettingsFileName() );\n T result = gsonObject.fromJson(settingsFile, settingsClass);\n settingsFile.close();\n\n return result;\n } catch (Exception e) {\n throw new InvalidConfigFormatException(\"Can't read config file: \" + e.getMessage() );\n }\n\n }", "@Override\n\t\tprotected GetConfigRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getConfigInfo(\"all\");\n\t\t}", "String readConfig(String parameter, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "public static Result appConfig() {\n ObjectNode response = Json.newObject();\n ObjectNode config = Json.newObject();\n\n config.put(\"appVersion\", APP_VERSION);\n config.put(\"isInternal\", IS_INTERNAL);\n config.put(\"shouldShowDatasetLineage\", WHZ_SHOW_LINEAGE);\n config.put(\"shouldShowDatasetHealth\", WHZ_SHOW_DS_HEALTH);\n config.put(\"suggestionConfidenceThreshold\", Integer.parseInt(WHZ_SUGGESTION_CONFIDENCE_THRESHOLD));\n config.set(\"wikiLinks\", wikiLinks());\n config.set(\"JitAclAccessWhitelist\", Json.toJson(StringUtils.split(JIT_ACL_WHITELIST, ',')));\n config.put(\"jitAclContact\", WHZ_LINKS__JIT_ACL_CONTACT);\n config.set(\"tracking\", trackingInfo());\n // In a staging environment, we can trigger this flag to be true so that the UI can handle based on\n // such config and alert users that their changes will not affect production data\n config.put(\"isStagingBanner\", WHZ_STG_BANNER);\n config.put(\"isLiveDataWarning\", WHZ_LIVE_DATA_BANNER);\n // Flag set in order to warn users that search is experiencing issues\n config.put(\"isStaleSearch\", WHZ_STALE_SEARCH_ALERT);\n\n // Insert properties for user profile operations\n config.set(\"userEntityProps\", userEntityProps());\n\n response.put(\"status\", \"ok\");\n response.set(\"config\", config);\n\n return ok(response);\n }", "public ArrayList<Integer[]> getConfigs() throws IOException {\r\n BufferedReader reader = new BufferedReader(new FileReader(config));\r\n ArrayList<Integer[]> configs = new ArrayList<>();\r\n String line = reader.readLine();\r\n line = reader.readLine();\r\n while(line != null) {\r\n String[] parsedLine = line.split(\",\");\r\n Integer[] item = new Integer[5];\r\n for(int i=0; i<5; i++) {\r\n item[i] = Integer.parseInt(parsedLine[i]);\r\n }\r\n configs.add(item);\r\n line = reader.readLine();\r\n }\r\n reader.close();\r\n return configs;\r\n\r\n }", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelper.exit(\"Cannot load the configuations from the configuration file please check the channelConfig.xml\");\r\n }\r\n }", "@BeforeClass\n\tpublic void readConfig() {\n\t\t// object creation of properties file\n\n\t\tProperties prop = new Properties();\n\n\t\t// read the file: inputstream\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(\"\\\\src\\\\main\\\\java\\\\config\\\\config.properties\");\n\t\t\tprop.load(input);\n\t\t\tbrowser = prop.getProperty(\"browser\");\n\t\t//\turl = prop.getProperty(\"url\");\n\t\t\t\n\t\t}\n\n\t\tcatch (IOException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "public AdminEventBuilder refreshRealmEventsConfig() {\n return this.updateStore().addListeners();\n }", "Map<String, Object> readConfig(VirtualHost vhost, String id);", "protected Config getConfig () {\n return this.conf;\n }", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }", "@Scheduled (fixedDelay = 10000)\n\tpublic void refreshConfiguration() {\n\t\tLOGGER.warn(\"***** REFRESHING\");\n\t\tthis.refresh.refresh(\"refreshableCredentials\");\n\n\t}", "public static void readConfig() {\n\t\tint[] defaultBanned = Loader.isModLoaded(\"twilightforest\") ? new int[]{7} : new int[0];\n\t\t\n\t\tDIMENSION_LIST = ConfigHelpers.getIntArray(config, \"dimensionIdList\", \"general\", defaultBanned, \"The list of dimension IDs, used as a allow-list or deny-list, depending on your other config settings. Internal numeric IDs, please.\");\n\t\t\n\t\tMODE = ConfigHelpers.getEnum(config, \"mode\", \"general\", ListMode.DENY_LIST, \"What mode should Broken Wings operate under?\", (mode) -> {\n\t\t\tswitch (mode) {\n\t\t\t\tcase DENY_LIST: return \"Flying is disabled in only the dimensions listed in \\\"dimensionList\\\".\";\n\t\t\t\tcase ALLOW_LIST: return \"Flying is disabled in all dimensions, except the ones listed in \\\"dimensionList\\\".\";\n\t\t\t\tcase ALWAYS_DENY: return \"Flying is always disabled, regardless of dimension ID.\";\n\t\t\t\tcase ALWAYS_ALLOW: return \"Flying is never disabled (it's like the mod isn't even installed)\";\n\t\t\t\tdefault: return \"h\";\n\t\t\t}\n\t\t}, ListMode.class);\n\t\t\n\t\tARMOR_BYPASS_KEYS = ConfigHelpers.getItemList(config, \"bypassKeyArmor\", \"general\", new ItemList(), \"A player wearing one of these armor pieces will be immune to the no-flight rule.\");\n\t\t\n\t\tINVENTORY_BYPASS_KEYS = ConfigHelpers.getItemList(config, \"bypassKeyInventory\", \"general\", new ItemList(), \"A player with one of these items in their inventory will be immune to the no-flight rule.\");\n\t\t\n\t\tif(Loader.isModLoaded(\"baubles\")) {\n\t\t\tBUBBLE_BYPASS_KEYS = ConfigHelpers.getItemList(config, \"bypassKeyBauble\", \"general\", new ItemList(), \"A player wearing one of these Baubles will be immune to the no-flight rule.\");\n\t\t} else {\n\t\t\tBUBBLE_BYPASS_KEYS = new ItemList();\n\t\t}\n\t\t\n\t\t//Countermeasures\n\t\tCountermeasures.readConfig(config);\n\t\t\n\t\t//Effects\n\t\tPRINT_TO_LOG = config.getBoolean(\"printToLog\", \"effects\", true, \"Should a message be printed to the server console when a player is dropped from the sky?\");\n\t\t\n\t\tSEND_STATUS_MESSAGE = config.getBoolean(\"sendStatusMessage\", \"effects\", true, \"Should players receive a status message when they are dropped from the sky?\");\n\t\t\n\t\tSHOW_PARTICLES = config.getBoolean(\"showParticles\", \"effects\", true, \"Should players create particle effects when they are dropped from the sky?\");\n\t\t\n\t\tEFFECT_INTERVAL = config.getInt(\"effectInterval\", \"effects\", 3, 0, Integer.MAX_VALUE, \"To prevent spamming players and the server console, how many seconds will need to pass before performing another effect? (Players will still drop out of the sky if they try to fly faster than this interval.)\");\n\t\t\n\t\tFIXED_MESSAGE = config.getString(\"fixedStatusMessage\", \"effects\", \"\", \"Whatever you enter here will be sent to players when they are dropped out of the sky if 'effects.sendStatusMessage' is enabled. If this is empty, I'll choose from my own internal list of (tacky) messages.\").trim();\n\t\t\n\t\t//Client\n\t\tSHOW_BYPASS_KEY_TOOLTIP = config.getBoolean(\"showBypassKeyTooltip\", \"client\", true, \"Show a tooltip on items that are bypass-keys informing the player that they can use this item to bypass the rule.\");\n\t\t\n\t\tif(config.hasChanged()) config.save();\n\t}", "private String[] getConfiguration() {\n String[] result = new String[6];\n // Query the latest configuration file made and send it back in an array of strings\n String query = \"SELECT * FROM configuration ORDER BY configuration_id DESC LIMIT 1\";\n sendQuery(query);\n try {\n if(resultSet.next()) {\n for (int i = 1; i < 7; i++) {\n result[i-1] = resultSet.getString(i);\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "public Object getConfig() {\n return config;\n }", "private OpenApiHandlerConfig(String configName) {\n config = Config.getInstance();\n mappedConfig = config.getJsonMapConfigNoCache(configName);\n setConfigData();\n setConfigMap();\n }", "private void read() {\n // Read the properties from the project\n EditableProperties sharedProps = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties privateProps = antProjectHelper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n final ProjectConfiguration cfgs[] = configHelper.getConfigurations().toArray(new ProjectConfiguration[0]);\n final ProjectConfiguration confs[] = new ProjectConfiguration[cfgs.length];\n System.arraycopy(cfgs, 0, confs, 0, cfgs.length);\n setConfigurations(confs);\n // Initialize the property map with objects\n properties.put(J2ME_PROJECT_NAME, new PropertyInfo(new PropertyDescriptor(J2ME_PROJECT_NAME, true, DefaultPropertyParsers.STRING_PARSER), ProjectUtils.getInformation(project).getDisplayName()));\n for (PropertyDescriptor pd:PROPERTY_DESCRIPTORS) {\n EditableProperties ep = pd.isShared() ? sharedProps : privateProps;\n String raw = ep.getProperty( pd.getName());\n properties.put( pd.getName(), new PropertyInfo( pd, raw == null ? pd.getDefaultValue() : raw));\n for (int j=0; j<devConfigs.length; j++) {\n final PropertyDescriptor clone = pd.clone(CONFIG_PREFIX + devConfigs[j].getDisplayName() + '.' + pd.getName());\n raw = ep.getProperty(clone.getName());\n if (raw != null) {\n properties.put(clone.getName(), new PropertyInfo(clone, raw));\n }\n }\n }\n }", "@Override\n public SmarterMap fetchConf() {\n SmarterMap result = new SmarterMap();\n\n List<File> files = new LinkedList<>();\n File conf = new File(path);\n if (conf.isDirectory()) {\n for (File f : conf.listFiles()) {\n if (f.getName().endsWith(\".json\") || f.getName().endsWith(\".yaml\") || f.getName().endsWith(\".yml\")) {\n files.add(f);\n }\n }\n } else {\n files.add(conf);\n }\n\n for (File f : files) {\n if (f.isFile()) {\n String confFileName = f.getName().replaceAll(\"\\\\.[^.]*$\", \"\");\n SmarterMap c = Fwissr.parseConfFile(f);\n mergeConf(result, c, confFileName.split(\"\\\\.\"), TOP_LEVEL_CONF_FILES.contains(confFileName));\n }\n }\n\n return result;\n }", "private void loadApplication() throws Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(this.appfile));\n\t\tString line;\n\t\t\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"Date\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetDate(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"GPA\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tdouble newGPA = Double.parseDouble(line);\n\t\t\t\tsetGPA(newGPA);\n\t\t\t}\n\t\t\telse if (line.equals(\"Education Level\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetEducationLevel(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Status\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetStatus(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Priority\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tint newPriority = Integer.parseInt(line);\n\t\t\t\tsetPriority(newPriority);\n\t\t\t}\n\t\t}\n\t\tbr.close();\t\n\t}", "public void loadConfig(){\n \t\tFile configDir = this.getDataFolder();\n \t\tif (!configDir.exists())\n \t\t\tconfigDir.mkdir();\n \n \t\t// Check for existance of config file\n \t\tFile configFile = new File(this.getDataFolder().toString() + \"/config.yml\");\n \t\tconfig = YamlConfiguration.loadConfiguration(configFile);\n \t\t\n \t\t// Adding Variables\n \t\tif(!config.contains(\"Debug\"))\n \t\t{\n \t\t\tconfig.addDefault(\"Debug\", false);\n \t \n \t config.addDefault(\"Worlds\", \"ExampleWorld1, ExampleWorld2\");\n \t\n\t config.addDefault(\"Regions.Residence\", \"ExampleWorld.ExampleResRegion1, ExampleWorld.ExampleResRegion2\");\n \t \n\t config.addDefault(\"Regions.WorldGuard\", \"ExampleWorld.ExampleWGRegion1, ExampleWorld.ExampleWGRegion2\"); \n \t\t}\n \n // Loading the variables from config\n \tdebug = (Boolean) config.get(\"Debug\");\n \tpchestWorlds = (String) config.get(\"Worlds\");\n \tpchestResRegions = (String) config.get(\"Regions.Residence\");\n \tpchestWGRegions = (String) config.get(\"Regions.WorldGuard\");\n \n if(pchestWorlds != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Chests Worlds: \" + pchestWorlds);\n }\n \n if(pchestResRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Residence Regions: \" + pchestResRegions);\n }\n \n if(pchestWGRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All World Guard Regions: \" + pchestWGRegions);\n }\n \n config.options().copyDefaults(true);\n try {\n config.save(configFile);\n } catch (IOException ex) {\n Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, \"Could not save config to \" + configFile, ex);\n }\n }", "public static Config getConfig() {\r\n\t\treturn cfg;\r\n\t}", "public Map<String, Object> getStreamsConfig() {\n // returns a copy of the original properties\n return streamsConfig.originals();\n }", "void loadConfig() {\r\n\t\tFile file = new File(\"open-ig-mapeditor-config.xml\");\r\n\t\tif (file.canRead()) {\r\n\t\t\ttry {\r\n\t\t\t\tElement root = XML.openXML(file);\r\n\t\t\t\t\r\n\t\t\t\t// reposition the window\r\n\t\t\t\tElement eWindow = XML.childElement(root, \"window\");\r\n\t\t\t\tif (eWindow != null) {\r\n\t\t\t\t\tsetBounds(\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"x\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"y\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"width\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"height\"))\r\n\t\t\t\t\t);\r\n\t\t\t\t\tsetExtendedState(Integer.parseInt(eWindow.getAttribute(\"state\")));\r\n\t\t\t\t}\r\n\t\t\t\tElement eLanguage = XML.childElement(root, \"language\");\r\n\t\t\t\tif (eLanguage != null) {\r\n\t\t\t\t\tString langId = eLanguage.getAttribute(\"id\");\r\n\t\t\t\t\tif (\"hu\".equals(langId)) {\r\n\t\t\t\t\t\tui.languageHu.setSelected(true);\r\n\t\t\t\t\t\tui.languageHu.doClick();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tui.languageEn.setSelected(true);\r\n\t\t\t\t\t\tui.languageEn.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eSplitters = XML.childElement(root, \"splitters\");\r\n\t\t\t\tif (eSplitters != null) {\r\n\t\t\t\t\tsplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"main\")));\r\n\t\t\t\t\ttoolSplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"preview\")));\r\n\t\t\t\t\tfeaturesSplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"surfaces\")));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tElement eTabs = XML.childElement(root, \"tabs\");\r\n\t\t\t\tif (eTabs != null) {\r\n\t\t\t\t\tpropertyTab.setSelectedIndex(Integer.parseInt(eTabs.getAttribute(\"selected\")));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eLights = XML.childElement(root, \"lights\");\r\n\t\t\t\tif (eLights != null) {\r\n\t\t\t\t\talphaSlider.setValue(Integer.parseInt(eLights.getAttribute(\"preview\")));\r\n\t\t\t\t\talpha = Float.parseFloat(eLights.getAttribute(\"map\"));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eMode = XML.childElement(root, \"editmode\");\r\n\t\t\t\tif (eMode != null) {\r\n\t\t\t\t\tif (\"true\".equals(eMode.getAttribute(\"type\"))) {\r\n\t\t\t\t\t\tui.buildButton.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eView = XML.childElement(root, \"view\");\r\n\t\t\t\tif (eView != null) {\r\n\t\t\t\t\tui.viewShowBuildings.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"buildings\"))) {\r\n\t\t\t\t\t\tui.viewShowBuildings.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tui.viewSymbolicBuildings.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"minimap\"))) {\r\n\t\t\t\t\t\tui.viewSymbolicBuildings.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tui.viewTextBackgrounds.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"textboxes\"))) {\r\n\t\t\t\t\t\tui.viewTextBackgrounds.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tui.viewTextBackgrounds.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"textboxes\"))) {\r\n\t\t\t\t\t\tui.viewTextBackgrounds.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\trenderer.scale = Double.parseDouble(eView.getAttribute(\"zoom\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\tui.viewStandardFonts.setSelected(\"true\".equals(eView.getAttribute(\"standard-fonts\")));\r\n\t\t\t\t\tui.viewPlacementHints.setSelected(!\"true\".equals(eView.getAttribute(\"placement-hints\")));\r\n\t\t\t\t\tui.viewPlacementHints.doClick();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eSurfaces = XML.childElement(root, \"custom-surface-names\");\r\n\t\t\t\tif (eSurfaces != null) {\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(eSurfaces, \"tile\")) {\r\n\t\t\t\t\t\tTileEntry te = new TileEntry();\r\n\t\t\t\t\t\tte.id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tte.surface = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tte.name = tile.getAttribute(\"name\");\r\n\t\t\t\t\t\tcustomSurfaceNames.add(te);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eBuildigns = XML.childElement(root, \"custom-building-names\");\r\n\t\t\t\tif (eBuildigns != null) {\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(eBuildigns, \"tile\")) {\r\n\t\t\t\t\t\tTileEntry te = new TileEntry();\r\n\t\t\t\t\t\tte.id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tte.surface = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tte.name = tile.getAttribute(\"name\");\r\n\t\t\t\t\t\tcustomBuildingNames.add(te);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tElement eFilter = XML.childElement(root, \"filter\");\r\n\t\t\t\tif (eFilter != null) {\r\n\t\t\t\t\tfilterSurface.setText(eFilter.getAttribute(\"surface\"));\r\n\t\t\t\t\tfilterBuilding.setText(eFilter.getAttribute(\"building\"));\r\n\t\t\t\t}\r\n\t\t\t\tElement eAlloc = XML.childElement(root, \"allocation\");\r\n\t\t\t\tif (eAlloc != null) {\r\n\t\t\t\t\tui.allocationPanel.availableWorkers.setText(eAlloc.getAttribute(\"worker\"));\r\n\t\t\t\t\tui.allocationPanel.strategies.setSelectedIndex(Integer.parseInt(eAlloc.getAttribute(\"strategy\")));\r\n\t\t\t\t}\r\n\t\t\t\tElement eRecent = XML.childElement(root, \"recent\");\r\n\t\t\t\tif (eRecent != null) {\r\n\t\t\t\t\tfor (Element r : XML.childrenWithName(eRecent, \"entry\")) {\r\n\t\t\t\t\t\taddRecentEntry(r.getAttribute(\"file\")); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String getConfig() {\n\n return config;\n }", "private static void readSiteConfig() {\n\n\t\ttry(BufferedReader br = new BufferedReader(new FileReader(\"SiteConfiguration.txt\"))) {\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line = br.readLine().strip().toUpperCase();\n\t\t\t\tSite readSite = new Site(line);\n\n\t\t\t\tsites.putIfAbsent(readSite.getSiteName(), readSite);\n\t\t\t}\n\t\t}catch (IOException ioe) {\n\t\t\tlogger.log(Level.WARNING, \"Could not read SiteConfig file properly! \" + ioe);\n\t\t}\n\t}", "private void config() {\n\t}", "public void refresh() {\n List<ConfigPath> configPaths = getConfigFiles();\n\n // Delete configs from cache which don't exist on disk anymore\n Iterator<String> currentEntriesIt = confs.keySet().iterator();\n while (currentEntriesIt.hasNext()) {\n String path = currentEntriesIt.next();\n boolean found = false;\n for (ConfigPath configPath : configPaths) {\n if (configPath.path.equals(path)) {\n found = true;\n break;\n }\n }\n if (!found) {\n currentEntriesIt.remove();\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected removed config \" + path + \" in \" + location);\n }\n }\n }\n\n // Add/update configs\n for (ConfigPath configPath : configPaths) {\n CachedConfig cachedConfig = confs.get(configPath.path);\n if (cachedConfig == null || cachedConfig.lastModified != configPath.file.lastModified()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected updated or added config \" + configPath.path + \" in \" + location);\n }\n long lastModified = configPath.file.lastModified();\n ConfImpl conf = parseConfiguration(configPath.file);\n cachedConfig = new CachedConfig();\n cachedConfig.lastModified = lastModified;\n cachedConfig.conf = conf;\n cachedConfig.state = conf == null ? ConfigState.ERROR : ConfigState.OK;\n confs.put(configPath.path, cachedConfig);\n }\n }\n }", "public Config readConfig() throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new File(configPath));\n\t\tStringBuilder finalString = new StringBuilder();\n\t\twhile (sc.hasNextLine()) {\n\t\t\tfinalString.append(sc.nextLine());\n\t\t}\n\t\tsc.close();\n\t\treturn new Gson().fromJson(finalString.toString(), Config.class);\n\t}", "void configurationUpdated();", "public App read() throws IOException {\n String jsonData = readFile(source);\n JSONObject jsonObject = new JSONObject(jsonData);\n return parseApp(jsonObject);\n }", "public AppConfigurationRefreshEndpoint(ContextRefresher contextRefresher,\n AppConfigurationProperties appConfiguration) {\n this.contextRefresher = contextRefresher;\n this.appConfiguration = appConfiguration;\n\n }", "private Properties getAppSettings() {\n \t\t\n\t if(_appSettings == null){\n\t\t try {\n\t\t\tsynchronized(this){\t\t\n\t\t\t\tif(_appSettings == null) {\t\t\t\t\t\t\n\t\t\t\t\t_appSettings = new Properties();\t\n\t\t\t\t\t\n\t\t\t\t\t//look for an existing file this mmsi\n\t\t\t\t\t//if one doesn't exist, use a default file.\n\t\t\t\t\tString configFile = _configFile;\n\t\t\t\t\tFile file = new File(configFile);\n\t\t\t\t\tif(file.exists() == false){\n\t\t\t\t\t\tconfigFile = STORE_BASE + APPL_PROPS;\n\t\t\t\t\t}\n\t\t\t\t\tFileInputStream oFile = new FileInputStream(configFile);\n\t\t \t\tInputStream setupOutput = new DataInputStream(oFile);\t\t \t\t\t\t\n\t\t \t\t//InputStream propInput = new DataInputStream(this.getClass().getResourceAsStream(STORE_BASE + APP_SETTINGS));\t \t \t \t\t\t\n\t\t\t\t\t_appSettings.load(setupOutput);\t\n\t\t\t\t\t\n\t\t\t\t} \t \t\t\t\t\t\n\t\t\t}\t \t\t\t\n\t\t}catch(Exception oEx){\n\t\t\tAppLogger.error(oEx);\n\t\t}\t\t \t\t\t\t\t\n\t}\t\t\t \t\t\n\treturn _appSettings;\n }", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "private JobConfig getJobConfig(String sparkAppId, int attemptId) {\n\n LOG.info(\"Get job config for sparkAppId {}, attempt {}, appId {}\", sparkAppId, attemptId, app.getId());\n JobConfig jobConfig = null;\n\n try (FileSystem hdfs = HDFSUtil.getFileSystem(this.hdfsConf)) {\n // // For Yarn version >= 2.7,\n // // log name: \"application_1468625664674_0003_appattempt_1468625664674_0003_000001\"\n // String attemptIdFormatted = String.format(\"%06d\", attemptId);\n // // remove \"application_\" to get the number part of appID.\n // String sparkAppIdNum = sparkAppId.substring(12);\n // String attemptIdString = \"appattempt_\" + sparkAppIdNum + \"_\" + attemptIdFormatted;\n\n // For Yarn version 2.4.x\n // log name: application_1464382345557_269065_1\n String attemptIdString = Integer.toString(attemptId);\n\n //test appId_attemptId.inprogress/appId_attemptId/appId.inprogress/appId\n String eventLogDir = this.endpointConfig.eventLog;\n Path attemptFile = new Path(eventLogDir + \"/\" + sparkAppId + \"_\" + attemptIdString + \".inprogress\");\n if (!hdfs.exists(attemptFile)) {\n attemptFile = new Path(eventLogDir + \"/\" + sparkAppId + \"_\" + attemptIdString);\n if (!hdfs.exists(attemptFile)) {\n attemptFile = new Path(eventLogDir + \"/\" + sparkAppId + \".inprogress\");\n if (!hdfs.exists(attemptFile)) {\n attemptFile = new Path(eventLogDir + \"/\" + sparkAppId);\n }\n }\n }\n\n LOG.info(\"Attempt File path: \" + attemptFile.toString());\n jobConfig = parseJobConfig(hdfs.open(attemptFile));\n } catch (Exception e) {\n LOG.error(\"Fail to process application {}\", sparkAppId, e);\n }\n\n return jobConfig;\n }", "@GET\n @Path(RMWSConsts.SCHEDULER_CONF)\n @Produces({ MediaType.APPLICATION_JSON + \"; \" + JettyUtils.UTF_8,\n MediaType.APPLICATION_XML + \"; \" + JettyUtils.UTF_8 })\n public Response getSchedulerConfiguration(@Context HttpServletRequest hsr)\n throws AuthorizationException {\n UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);\n initForWritableEndpoints(callerUGI, true);\n\n ResourceScheduler scheduler = rm.getResourceScheduler();\n if (isConfigurationMutable(scheduler)) {\n MutableConfigurationProvider mutableConfigurationProvider =\n ((MutableConfScheduler) scheduler).getMutableConfProvider();\n // We load the cached configuration from configuration store,\n // this should be the conf properties used by the scheduler.\n Configuration schedulerConf = mutableConfigurationProvider\n .getConfiguration();\n return Response.status(Status.OK)\n .entity(new ConfInfo(schedulerConf))\n .build();\n } else {\n return Response.status(Status.BAD_REQUEST).entity(\n String.format(\"This API only supports to retrieve scheduler configuration\"\n + \" from a mutable-conf scheduler, underneath scheduler %s\"\n + \" is not an instance of %s\",\n scheduler.getClass().getSimpleName(),\n MutableConfScheduler.class.getSimpleName()))\n .build();\n }\n }", "com.google.container.v1.ConfigConnectorConfig getConfigConnectorConfig();", "public void reload() {\n reloadConfig();\n loadConfiguration();\n }", "public KernelConfig getConfig()\n {\n Kernel.checkAccess();\n return config;\n }" ]
[ "0.61003405", "0.57752043", "0.57654315", "0.5681234", "0.55766624", "0.55471367", "0.55247766", "0.54669535", "0.54636526", "0.5452375", "0.5430175", "0.5400469", "0.5383401", "0.5382973", "0.5379008", "0.53633946", "0.5312907", "0.5303969", "0.5298136", "0.52893496", "0.5280647", "0.5276458", "0.527218", "0.52351475", "0.5226634", "0.518831", "0.51823646", "0.51797324", "0.51733637", "0.5170345", "0.51586515", "0.5155677", "0.5134422", "0.51246125", "0.5122434", "0.5122347", "0.5096458", "0.5087536", "0.5078952", "0.50622696", "0.5058765", "0.5056321", "0.504689", "0.5035886", "0.50289375", "0.5027655", "0.5026693", "0.50189763", "0.5013326", "0.50122374", "0.5007258", "0.49982634", "0.49977267", "0.49959472", "0.49769238", "0.49732918", "0.4965194", "0.49606496", "0.49485645", "0.49427205", "0.49270454", "0.48968276", "0.4890945", "0.48832145", "0.48818502", "0.48807043", "0.4878352", "0.48756686", "0.487467", "0.48684323", "0.48674217", "0.4865549", "0.48532236", "0.48521203", "0.48489898", "0.4842444", "0.48368382", "0.4832827", "0.48324174", "0.48296493", "0.48280078", "0.48265976", "0.48239264", "0.48179957", "0.481556", "0.48147038", "0.48142147", "0.48123932", "0.48069367", "0.48036125", "0.48023", "0.48018607", "0.47993934", "0.47966546", "0.47940728", "0.47895563", "0.47887385", "0.4787442", "0.47800145", "0.477843" ]
0.6553812
0
Delete all the health_chaeck param of the healthCheckId
private static void removeHealthCheckParams(final Long healthCheckId) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_DELETE_HEALTH_CHECK_PARAMS); query.setLong("healthCheckId", healthCheckId).executeUpdate(); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@ContextCheck(compile = true)\n\tpublic static void checkDeleteAll(OperatorContextChecker checker) {\n\t\tHBASEPutDelete.compileTimeChecks(checker, \"HBASEDelete\");\n\t\tOperatorContext context = checker.getOperatorContext();\n\t\tSet<String> params = context.getParameterNames();\n\t\tif (params.contains(DELETE_ALL_PARAM_NAME)) {\n\t\t\tif (params.contains(HBASEOperator.STATIC_COLQ_NAME)\n\t\t\t\t\t|| params.contains(HBASEPutDelete.COL_QUAL_PARAM_NAME)) {\n\t\t\t\t// we're okay--\n\t\t\t} else {\n\t\t\t\tchecker.setInvalidContext(\"Parameter \" + DELETE_ALL_PARAM_NAME\n\t\t\t\t\t\t+ \" requires that either \"\n\t\t\t\t\t\t+ HBASEOperator.STATIC_COLQ_NAME + \" or \"\n\t\t\t\t\t\t+ HBASEPutDelete.COL_QUAL_PARAM_NAME + \" be set.\", null);\n\t\t\t}\n\t\t}\n\t}", "void deleteAllChallenges();", "@Headers({\"Content-Type: application/json\", \"Cache-Control: no-cache\"})\n @DELETE(\"/userpreference/delete\")\n Call<Void> deleteAllUserPreference();", "void deleteChallengeById(int id);", "int deleteByPrimaryKey(Integer chroniccheckId);", "public void delete(int uslActionId, int banHistoryId);", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "void deleteArgumentById(UUID id);", "@DeleteMapping(\"/trackGone\")\n public String deleteAllTrack() {\n trackService.deleteAll();\n return \"deletedAll\";\n }", "public void deleteShotData(ActionRequest request, ActionResponse response)\r\n\t throws Exception {\r\n\r\n\t long clubKey = ParamUtil.getLong(request, \"resourcePrimKey\");\r\n\r\n\t if (Validator.isNotNull(clubKey)) {\r\n\t ESPlayerShotDataLocalServiceUtil.deleteESPlayerShotData(clubKey);\r\n\t SessionMessages.add(request, \"clubDeleted\");\r\n\t }\r\n\t else {\r\n\t SessionErrors.add(request, \"error-deleting\");\r\n\t }\r\n\t }", "@Test\n public void deleteByHealthCodeSilentlyFails() {\n dao.deleteUploadsForHealthCode(\"nonexistentHealthCode\");\n }", "@Override\n\tpublic int delete(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "public void deleteByChucVuID(long chucVuId);", "@DeleteMapping(\"/percentages/{id}\")\n @Timed\n public ResponseEntity<Void> deletePercentage(@PathVariable Long id) {\n log.debug(\"REST request to delete Percentage : {}\", id);\n percentageService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Delete({\n \"delete from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(BUMBCheckingLogKey key);", "@DeleteMapping(\"/suivi-champs/{id}\")\n @Timed\n public ResponseEntity<Void> deleteSuiviChamps(@PathVariable Long id) {\n log.debug(\"REST request to delete SuiviChamps : {}\", id);\n suiviChampsService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteOptions(long setId, String attribute, String[] values) throws ServerException;", "@Override\n\tpublic String deleteBatchHtcgScheme(List<Map<String, Object>> list)\n\t\t\tthrows DataAccessException {\n\t\t try {\n\t\t\t\t\n\t\t\t\thtcgSchemeMapper.deleteBatchHtcgScheme(list);\n\t\t\t\t\n\t\t\t\treturn \"{\\\"msg\\\":\\\"删除成功.\\\",\\\"state\\\":\\\"true\\\"}\";\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tlogger.error(e.getMessage(), e);\n\t\t\t\tthrow new SysException(\"{\\\"error\\\":\\\"删除失败\\\"}\");\n\t\t\t}\n\t}", "public void deleteByVaiTroID(long vaiTroId);", "void deleteParameter(long id);", "@Override\n\tpublic int delDetailList(String bzhh) throws Exception {\n return exWarehouseDetailMapper.deleteByBzhh(bzhh);\n\t}", "int deleteByExample(ChronicCheckExample example);", "void delete(String resourceGroupName, String hubName, String predictionName);", "void deleteTAlgmntBussRule(Integer ruleId);", "public void deleteExperimentColors();", "int deleteByExample(ConfigDataExample example);", "int logicalDeleteByExample(@Param(\"example\") DashboardGoodsExample example);", "@DeleteMapping(\"/config-parameters/{id}\")\n @Timed\n public ResponseEntity<Void> deleteConfigParameter(@PathVariable Long id) {\n log.debug(\"REST request to delete ConfigParameter : {}\", id);\n configParameterRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Chucdanh : {}\", id);\n chucdanhRepository.deleteById(id);\n }", "void delete(String resourceGroupName, String hubName, String predictionName, Context context);", "public void deleteConfigurationValue(String name);", "@Query(\"DELETE FROM issue_table\")\n void deleteAll();", "@DeleteProvider(type=BUMBCheckingLogSqlProvider.class, method=\"deleteByExample\")\n int deleteByExample(BUMBCheckingLogExample example);", "public void deleteBatch(List<Integer> list) {\n\t\tEmployeeExample employeeExample=new EmployeeExample();\n\t\tCriteria createCriteria = employeeExample.createCriteria();\n\t\tcreateCriteria.andEmpIdIn(list);\n\t\temployeeMapper.deleteByExample(employeeExample);\n\t}", "int deleteByExample(HuoDongExample example);", "@Override\r\n\tpublic void deleteAllInBatch() {\n\t\t\r\n\t}", "void deletePokemon(Long pokemonId);", "public static void deletePromLookup(int envId, int compId, String lookupVaule) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_DELETE_PROM_LOOKUP);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"envId\", envId);\n\t\tquery.setString(\"lookupVaule\", lookupVaule);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public java.util.List<Long> deleteByHoppyIds(java.util.List<Long> hoppyIds) throws DataAccessException;", "void onClearAllParametersButtonClick();", "public void deleteEmptyHoards() {\n String where = KEY_GOLD_HOARDED_COLUMN + \"=\" + 0;\n String whereArgs[] = null;\n \n // Delete the rows that match the where clause.\n SQLiteDatabase db = hoardDBOpenHelper.getWritableDatabase();\n db.delete(HoardDBOpenHelper.DATABASE_TABLE, where, whereArgs);\n }", "void deleteAll() throws Exception;", "void deleteAll() throws Exception;", "@DeleteMapping(\"/record-25-herfinancieerings/{id}\")\n @Timed\n public ResponseEntity<Void> deleteRecord25Herfinancieering(@PathVariable Long id) {\n log.debug(\"REST request to delete Record25Herfinancieering : {}\", id);\n\n record25HerfinancieeringRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@ContextCheck(compile = true)\r\n\tpublic static void checkDeleteAll(OperatorContextChecker checker) {\r\n\t\tif (!checker.checkDependentParameters(\"jdbcDriverLib\")){\r\n//\t\tif (!checker.checkDependentParameters(\"jdbcDriverLib\", \"jdbcUrl\")){\r\n\t\t\tchecker.setInvalidContext(Messages.getString(\"JDBC_URL_NOT_EXIST\"), null);\r\n\t\t}\r\n\r\n\t\t// If checkConnection is set as parameter, idleSessionTimeOut can not be set\r\n\t\tchecker.checkExcludedParameters(\"checkConnection\", \"idleSessionTimeOut\");\r\n\r\n\t}", "@Test\r\n\tpublic void deleteGameGamestatses() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGameGamestatses \r\n\t\tInteger game_gameId_2 = 0;\r\n\t\tInteger related_gamestatses_gameStatsId = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tGame response = null;\r\n\t\tresponse = service.deleteGameGamestatses(game_gameId_2, related_gamestatses_gameStatsId);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: deleteGameGamestatses\r\n\t}", "@DeleteMapping(\"/hlds/{id}\")\n @Timed\n public ResponseEntity<Void> deleteHld(@PathVariable Long id) {\n log.debug(\"REST request to delete Hld : {}\", id);\n\n hldRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "void deleteCategoryParameterProductDetails(long id);", "public void deleteAll(UUID accId) {\n txMgr.doInTransaction(() -> {\n Set<UUID> notebooksIds = datasourcesIdx.delete(accId);\n\n datasourceTbl.deleteAll(notebooksIds);\n });\n }", "public void deleteAllToken() throws BusinessException;", "long delete(String collection, String hkey);", "@Query(\"DELETE FROM MessProviderProfile\")\n void deleteAll();", "void deleteByJobId(Long jobId);", "@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}", "@Delete({\n \"delete from spec_value\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "int deleteByExample(CmsChannelCriteria example);", "private void deleteAttacks(){\n while(!attacksToDelete.isEmpty()){\n attacks.remove(attacksToDelete.remove());\n }\n }", "public void deleteAll();", "public void deleteAll();", "public void deleteAll();", "public void deleteAll();", "private void DeleteScenario(HttpServletRequest request, HttpServletResponse response) throws NumberFormatException {\n int ScenarioIndexToDelete = Integer.parseInt(request.getParameter(\"index\"));\n XMLTree.getInstance().DeleteScenario(ScenarioIndexToDelete);\n }", "Ack deleteFilter(ID branchId, String name);", "public void removeCheckHealthListener(ActionListener actionListener) {\r\n jCheckHealth.removeActionListener(actionListener);\r\n }", "@Override\n public void deleteHeroVillain(int id) {\n jdbcTemplate.update(SQL_DELETE_HVPOWERS_HV_ID, id);\n \n // delete HVSightings relationship for HeroVillain\n jdbcTemplate.update(SQL_DELETE_HVSIGHTINGS_HV_ID, id);\n \n // delete HVOrganizations relationship for HeroVillain\n jdbcTemplate.update(SQL_DELETE_HVORGANIZATIONS_HV_ID, id);\n \n // delete HV\n jdbcTemplate.update(SQL_DELETE_HEROVILLAIN, id);\n }", "@Test\n public void deleteHouseholdUsingDeleteTest() throws ApiException {\n UUID householdId = null;\n api.deleteHouseholdUsingDelete(householdId);\n\n // TODO: test validations\n }", "Integer deleteAllCompletedJobs() throws GWTJahiaServiceException;", "@Override\n\tpublic void deleteWorkItemList(List<HongXunWorkItem> hongXunWorkItems) {\n\t\tgetHibernateTemplate().deleteAll(hongXunWorkItems);\n\t}", "public void deleteAllVisibleCookies();", "public void deleteAll() {\n\n\t}", "int deleteByExample(KaiwaExample example);", "void deleteChallenge();", "int deleteByExample(BpmInstanciaHistoricaExample example);", "@DeleteMapping(KekMappingValues.GUID)\n @PreAuthorize(KekRoles.TENANT_USER_ADMIN)\n public ResponseEntity deleteData(@PathVariable String guid) {\n logger.info(\"Accepted request to delete the data from Google Cloud Storage bucket by guid {}\", guid);\n\n cloudStorageService.deleteByGuid(guid);\n\n logger.info(\"Data ({}) successfully deleted\", guid);\n return ResponseEntity\n .status(HttpStatus.ACCEPTED)\n .build();\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete KeyConfig : {}\", id);\n keyConfigRepository.deleteById(id);\n }", "public void deleteSiteStats () throws DataServiceException;", "public void deleteColors();", "int deleteByExample(BlacklistExample example);", "@Override\n\tpublic Result delComBorrowings(String id) {\n\t\tString[] item = id.split(\",\");\n\t\tint ret = 0;\n\t\tfor (int i = 0; i < item.length; i++) { \n\t\t\tret = comBorrowingsMapper.deleteByPrimaryKey(Long.parseLong(item[i])); \n\t\t}\n\t\tif (ret == 0) {\n\t\t\treturn Result.build(500, \"ɾ³ýʧ°Ü£¡\");\n\t\t}\n\t\treturn Result.ok();\n\t}", "public void DeleteAllActivityUser(iconnectionpool connectionPool, String id){\n try{\n Connection con=null;\n //get connection from Pool\n con=connectionPool.getConnection();\n Statement stmt=con.createStatement(); \n String sql=\"delete from similarplaces where id_user=\"+id;\n stmt.executeUpdate(sql); \n }catch(Exception e){}\n }", "int deleteByExample(DashboardGoodsExample example);", "public void delete(Long id) {\n log.debug(\"Request to delete ActionParam : {}\", id);\n actionParamRepository.deleteById(id);\n }", "@Override\n\tpublic int delExWarehouse(String ckdh) throws Exception {\n\n\t\texWarehouseDetailMapper.deleteByCkdh(ckdh);\n\t\texWarehouseMapper.deleteByCkdh(ckdh);\n\t\t\n\t\treturn 1;\n\t}", "public void deleteAnswerStatistics(int sid);", "@RequestMapping(value = \"/cophongs/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCophong(@PathVariable Long id) {\n log.debug(\"REST request to delete Cophong : {}\", id);\n cophongRepository.delete(id);\n cophongSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"cophong\", id.toString())).build();\n }", "void removeAll(String check) throws RepositoryException;", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "public boolean deleteMealvoucherConf(MealVoucherConfiguration bean) {\r\n\t\tboolean result = false;\r\n\t\tObject addObj[][] = new Object[1][1];\r\n\t\taddObj[0][0] = bean.getMealvoucherconfID();\r\n\r\n\t\tString query = \"DELETE FROM HRMS_MEAL_VOUCHER_CONFIG WHERE MEAL_CONFIG_CODE=?\";\r\n\r\n\t\tresult = getSqlModel().singleExecute(query, addObj);\r\n\t\treturn result;\r\n\t}", "public void deleteResult(String hw) {\n IDatabase database = new MySqlDatabase();\n Connection connection = database.getConnection();\n db.deleteResult(hw);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete ScriptParam : {}\", id);\n scriptParamRepository.deleteById(id);\n }", "public void deleteAll() {\n\t\t\n\t}", "public void deleteAll()\n\t{\n\t}", "public void deleteAll()\n\t{\n\t}", "public void decomminsionHost( int hostId );", "void deleteAll();", "void deleteAll();" ]
[ "0.60440326", "0.5813594", "0.5810001", "0.5537065", "0.54714394", "0.54115665", "0.53502846", "0.53480375", "0.5325867", "0.5323175", "0.5303507", "0.5295113", "0.5283494", "0.5264934", "0.52581227", "0.52531606", "0.5237513", "0.5233733", "0.52249837", "0.51922345", "0.51787996", "0.5168073", "0.515393", "0.5150972", "0.5116944", "0.5108728", "0.5105847", "0.5102225", "0.51016843", "0.50900143", "0.50863254", "0.5066854", "0.50640035", "0.50622207", "0.50614446", "0.50595814", "0.50495934", "0.5047783", "0.5047092", "0.50336105", "0.5023564", "0.50232846", "0.50232846", "0.5018679", "0.50135666", "0.50091976", "0.50020766", "0.49984425", "0.49980402", "0.4993461", "0.49899143", "0.49810082", "0.4979904", "0.4977216", "0.4977216", "0.4977026", "0.49746957", "0.49670565", "0.49617228", "0.49614105", "0.49614105", "0.49614105", "0.49598438", "0.49563587", "0.49553752", "0.49535823", "0.49502575", "0.49379453", "0.4931831", "0.4931587", "0.4921757", "0.49210227", "0.49174127", "0.4913296", "0.4909761", "0.49064273", "0.49048305", "0.49009115", "0.48903722", "0.48875052", "0.4886011", "0.48808193", "0.4875778", "0.4873759", "0.48714694", "0.48708403", "0.48685074", "0.48632312", "0.48632312", "0.48632312", "0.48632312", "0.48539135", "0.48486924", "0.48469797", "0.48414338", "0.48413786", "0.48413786", "0.48375994", "0.4836681", "0.4836681" ]
0.7222672
0
Update the healthCheckTypeId and delInd = 0 for the given healthCheckId.
private static void updateHealthCheck(final Long healthCheckId, final Integer healthCheckTypeId) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_TYPE); query.setLong("hcTypeId", healthCheckTypeId); query.setLong("healthCheckId", healthCheckId); query.executeUpdate(); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void removeHealthCheckParams(final Long healthCheckId) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_DELETE_HEALTH_CHECK_PARAMS);\n\t\tquery.setLong(\"healthCheckId\", healthCheckId).executeUpdate();\n\t\ttxn.commit();\n\t}", "public static void updateDelIndForHealthCheck(final int compId,\n\t\t\tfinal int delInd, final int enviromentId, final Long regionID) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_DELIND);\n\t\tquery.setLong(\"delInd\", delInd);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"enviromentId\", enviromentId);\n\t\tquery.setLong(\"regionID\", regionID);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public void setIdChecklist(Checklist_Base idChecklist) {\r\n\t\tthis.idChecklist = idChecklist;\r\n\t}", "void updateHouseStatus(long houseId, int status);", "public void updateContestStatus(long contestId, long contestStatusId) throws ContestManagementException {\r\n updatedContestId = contestId;\r\n updatedStatusId = contestStatusId;\r\n }", "@Override\n\tpublic int updateByPrimaryKey(Checkingin record) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int updateByPk(BaseEntity entity) throws DaoException {\n\t\treturn 0;\n\t}", "private static void setDelIndOfComponent(final int componentId, final int delInd) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_COMPONENT_DELIND);\n\t\tquery.setLong(\"delInd\", delInd);\n\t\tquery.setLong(\"componentId\", componentId);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public void updateContestStatus(long contestId, long newStatusId) throws ContestManagementException {\r\n }", "public void setStatusId(long statusId);", "int updateByPrimaryKey(ChronicCheck record);", "void updateStorageByDessert(Integer dessertId, Integer count) throws DaoException;", "public static void insertHealthCheck(final int componentId,\n\t\t\tfinal Long regionId, final int environmentId,\n\t\t\tfinal int healthCheckTypeId, final int maxRetryCount) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tHealthCheckEntity healthEntity = new HealthCheckEntity();\n\t\tComponentEntity compEntity = new ComponentEntity();\n\t\tcompEntity.setComponentId(componentId);\n\t\thealthEntity.setComponent(compEntity);\n\t\tRegionEntity regEntity = new RegionEntity();\n\t\tregEntity.setRegionId(regionId);\n\t\thealthEntity.setRegion(regEntity);\n\t\tEnvironmentEntity envEntity = new EnvironmentEntity();\n\t\tenvEntity.setEnvironmentId(environmentId);\n\t\thealthEntity.setEnvironment(envEntity);\n\t\tHealthCheckTypeEntity hctEntity = new HealthCheckTypeEntity();\n\t\thctEntity.setHealthCheckTypeId(healthCheckTypeId);\n\t\thealthEntity.setHealthCheckType(hctEntity);\n\t\tStatusEntity upStatus = new StatusEntity();\n\t\tupStatus.setStatusId(Status.UP.getStatusId());\n\t\thealthEntity.setCurrentStatus(upStatus);\n\t\thealthEntity.setMaxRetryCount((long) maxRetryCount);\n\t\thealthEntity.setFailedCount(0L);\n\t\tsession.save(healthEntity);\n\t\ttxn.commit();\n\t}", "Future<UpdateHealthCheckerResponse> updateHealthChecker(\n UpdateHealthCheckerRequest request,\n AsyncHandler<UpdateHealthCheckerRequest, UpdateHealthCheckerResponse> handler);", "public void setCheckListId(int checkListId) {\n this.checkListId = checkListId;\n }", "public int updateCheck(int PID, Boolean check) {\n ContentValues cv = new ContentValues();\n cv.put(DBHelper.SHOPPINGLIST_CHECKMARK, check);\n\n String wheresql = DBHelper.SHOPPINGLIST_PID + \"=?\";\n String[] args = new String[]{String.valueOf(PID)};\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n int updates = db.update(DBHelper.TABLE_SHOPPINGLIST, cv, wheresql, args);\n db.close();\n\n return updates;\n }", "public void updateEsGoodsIndexByBrandId(List<Integer> brandIds,Integer shopId){\n List<Integer> goodsIds = goodsService.getGoodsIdByBrandId(brandIds);\n if( goodsIds.isEmpty() ){\n return ;\n }\n addEsGoodsIndex(goodsIds,shopId,DBOperating.UPDATE);\n }", "void updateCatFood(Long catId, Long foodId, Long newFoodId);", "int updateByPrimaryKey(HospitalType record);", "protected void updateAction(String actionId) {\n IAction action = globalActions.get(actionId);\n if (action instanceof IUpdate) {\n ((IUpdate) action).update();\n }\n }", "public void sethId(Long hId) {\n this.hId = hId;\n }", "public static void insertHealthCheckParam(final long healthCheckId,\n\t\t\tfinal String healthCheckParamKey, final String healthCheckPramVal) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tHealthCheckParamEntity hcpEntity = new HealthCheckParamEntity();\n\t\tHealthCheckEntity healthEntity = new HealthCheckEntity();\n\t\thealthEntity.setHealthCheckId(healthCheckId);\n\t\thcpEntity.setHealthCheck(healthEntity);\n\t\thcpEntity.setHealthCheckParamKey(healthCheckParamKey);\n\t\thcpEntity.setHealthCheckParamVal(healthCheckPramVal);\n\t\tsession.save(hcpEntity);\n\t\ttxn.commit();\n\t}", "public void updateInspectionChecklist(boolean isPassed, InspectionDTO target) {\n currentInspectionChecklist.updateInspectionDTO(isPassed, target);\n }", "public void updateAssignmentForTurnOffAlarm(long assignmentId) throws Exception {\n\n\t\ttry{ \n\t\t\tContentValues dataToInsert = new ContentValues(); \n\n\t\t\tdataToInsert.putNull(MySQLiteHelper.ASSIGNMENT_ALARM);\n\n\t\t\tString where = MySQLiteHelper.ASSIGNMENT_ID + \"=\" + assignmentId;\n\n\t\t\tdatabase.update(MySQLiteHelper.TABLE_ASSIGNMENT, dataToInsert, where, null);\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n\tpublic void setId(long id) {\n\t\t_contentupdate.setId(id);\n\t}", "public void updateEsGoodsIndexByBrandId(Integer brandId,Integer shopId){\n List<Integer> goodsIds = goodsService.getGoodsIdByBrandId(brandId);\n if( goodsIds.isEmpty() ){\n return ;\n }\n addEsGoodsIndex(goodsIds,shopId,DBOperating.UPDATE);\n }", "@Override\n\tpublic void update(HongXunWorkNum hongXunWorkNum) {\n\t\tgetHibernateTemplate().update(hongXunWorkNum);\n\t}", "public void updateHoardValue(int hoardId, float newHoardValue) {\n ContentValues updatedValues = new ContentValues();\n \n // Assign values for each row.\n updatedValues.put(KEY_GOLD_HOARDED_COLUMN, newHoardValue);\n // [ ... Repeat for each column to update ... ]\n \n // Specify a where clause the defines which rows should be\n // updated. Specify where arguments as necessary.\n String where = KEY_ID + \"=\" + hoardId;\n String whereArgs[] = null;\n \n // Update the row with the specified index with the new values.\n SQLiteDatabase db = hoardDBOpenHelper.getWritableDatabase();\n db.update(HoardDBOpenHelper.DATABASE_TABLE, updatedValues, \n where, whereArgs);\n }", "@Override\n\tpublic int update(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "public int updateCheck(Object obj) throws SQLException {\n\t\treturn dao.updateCheck(obj);\n\t}", "@PUT\n @Path(\"/{educationId : \\\\d+}\") // catch only numeric identifiers\n @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n public Response updateEducation( @PathParam(\"educationId\") Long educationId,\n Education education,\n @BeanParam GenericBeanParam params ) throws ForbiddenException, UnprocessableEntityException, InternalServerErrorException {\n\n RESTToolkit.authorizeAccessToWebService(params);\n logger.log(Level.INFO, \"updating existing Education by executing EducationResource.updateEducation(educationId, education) method of REST API\");\n\n // set resource ID passed in path param on updated resource object\n education.setEducationId(educationId);\n\n Education updatedEducation = null;\n try {\n // reflect updated resource object in database\n updatedEducation = educationFacade.update(education, true);\n // populate created resource with hypermedia links\n EducationResource.populateWithHATEOASLinks(updatedEducation, params.getUriInfo());\n\n } catch (EJBTransactionRolledbackException ex) {\n ExceptionHandler.handleEJBTransactionRolledbackException(ex);\n } catch (EJBException ex) {\n ExceptionHandler.handleEJBException(ex);\n } catch (Exception ex) {\n throw new InternalServerErrorException(ExceptionHandler.ENTITY_UPDATE_ERROR_MESSAGE);\n }\n\n return Response.status(Status.OK).entity(updatedEducation).build();\n }", "int updateByPrimaryKey(Dish record);", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "int updateByPrimaryKey(Blacklist record);", "@Override\r\n\tpublic void updateDelete(String id) {\n \tUpdate update = new Update();\r\n\t\tupdate.set(\"status\", Constants.MSG_STATUS_DELETED);\r\n\t\t\r\n\t\tmongoTemplate.updateFirst(new Query(Criteria.where(\"id\").is(id)), update, AsxDataVO.class);\r\n\t}", "public abstract void setStatusId(long statusId);", "public void updateEsGoodsIndexBySortId(Integer sortId,Integer shopId){\n List<Integer> sortIds = goodsSortService.getChildSortIdsBySortId(sortId);\n sortIds.add(sortId);\n List<Integer> goodsIds = goodsService.getGoodsIdBySortId(sortIds);\n if( goodsIds.isEmpty() ){\n return ;\n }\n addEsGoodsIndex(goodsIds,shopId,DBOperating.UPDATE);\n }", "int updateByPrimaryKeySelective(ChronicCheck record);", "int deleteByPrimaryKey(Integer chroniccheckId);", "void updateHouseStatus(String username, long houseId, int status);", "int updateByPrimaryKey(OrgIntegralDeductRule record);", "public void updateExpense(Expense expense, int expenseId) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(COLUMN_EXPENSE_AMOUNT, expense.getAmount());\n values.put(COLUMN_EXPENSE_CURRENCY, expense.getCurrency());\n values.put(COLUMN_EXPENSE_CATEGORY, expense.getCategory());\n values.put(COLUMN_EXPENSE_WALLET, expense.getWalletTitle());\n values.put(COLUMN_EXPENSE_WALLET_ID, expense.getWalletId());\n values.put(COLUMN_EXPENSE_NOTE, expense.getNote());\n values.put(COLUMN_EXPENSE_EXPENSE_DATE, expense.getExpenseDate());\n\n // Inserting Row\n db.update(EXPENSE_TABLE, values, COLUMN_EXPENSE_ID+\" = \"+expenseId, null);\n db.close();\n }", "public void removeIntentionTypeReferences(long typeId)\n\t{\n\t\tfor (CIntentionCell cell : cells.values())\n\t\t{\n\t\t\tif (cell.getIntentionTypeId() == typeId)\n\t\t\t{\n\t\t\t\tcell.clearIntentionType();\n\t\t\t}\n\t\t}\n\t}", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "void setCardIndexInArgumentUnchecked(UUID argumentId, short newIndex, short oldIndex);", "@Override\n\tpublic int updateEmployeeDesigById(int employeeId, String desig) {\n\t\tif (getEmployeeById(employeeId) == null) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn template.update(\"update employee set desig = ? where empid = ?\", desig, employeeId);\n\t\t}\n\t}", "public void update() throws SQLException {\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n int safeCheck = BusinessFacade.getInstance().checkChildsIDinDB(this.goodID,\n this.order.getID(), \"orders\", \"goods_id\", \"orders_id\");\n\n if (check != -1 && safeCheck == -1) {\n if (check != this.goodID) {\n int oldGoodID = this.goodID;\n this.goodID = check;\n this.order.update();\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n oldGoodID + \" LIMIT 1;\");\n }\n } else if (check != -1 && safeCheck != -1) {\n this.goodID = check;\n } else if (check == -1 && safeCheck == -1) {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n stmtIn.executeUpdate(\"UPDATE ngaccount.goods SET product_type_id = \" +\n this.productRelation.getID() + \", post_id = \" + this.post.getID() +\n \" WHERE goods.goods_id = \" + this.goodID);\n } else {\n this.goodID = BusinessFacade.getInstance().lastIDInDB(\"product_type\") + 1;\n this.insert();\n }\n }", "int updateByPrimaryKey(TycCompanyCheckCrawler record);", "@Override\n\tpublic int delete(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "public void updateVentureCheckList(VentureChecklist ventureChecklist) {\n\t\tSl = \"UPDATE venture_checklist SET ventureChecklistContent = ? WHERE memberAccount= ? AND mapSubClassID = ?\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl);\r\n\t\t\tsmt.setString(1, ventureChecklist.getContent());\r\n\t\t\tsmt.setString(2, ventureChecklist.getAccount());\r\n\t\t\tsmt.setInt(3, ventureChecklist.getClassID());\r\n\t\t\tsmt.executeUpdate();\t\r\n\t\t\trs.close();\r\n\t\t\tsmt.close(); \r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n \r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@SmallTest\n public void testUpdate() {\n int result = -1;\n if (this.entity != null) {\n Settings settings = SettingsUtils.generateRandom(this.ctx);\n settings.setId(this.entity.getId());\n\n result = (int) this.adapter.update(settings);\n\n Assert.assertTrue(result >= 0);\n }\n }", "public void clearCell(long cellId)\n\t{\n\t\tCIntentionCell cell = cells.get(cellId);\n\t\tfor (CIntentionType type : IntentionCanvasController.getInstance().getActiveIntentionTypes())\n\t\t{\n\t\t\tif (cell.getIntentionTypeId() == type.getId())\n\t\t\t{\n\t\t\t\ttoggleCellIntentionType(cellId, type.getId(), false, true);\n\t\t\t}\n\t\t}\n\n\t\tif (cell.hasUserTitle())\n\t\t{\n\t\t\tsetCellTitle(cellId, CIntentionCell.DEFAULT_TITLE, true);\n\t\t}\n\t}", "public void updateItem(int id, String desc, String family, float price, int stock) {\n ContentValues values = new ContentValues();\n values.put(\"description\", desc);\n values.put(\"family\", family);\n values.put(\"price\", price);\n\n dbW.update(\"store\", values, \"_id=?\", new String[] { String.valueOf(id) });\n }", "void updatePurchaseOrderLinkedSaleOrderStatus(long pohId);", "@Test\r\n\tpublic void testDeleteCheckList() {\n\t\tthis.checklistDAO.saveOrUpdateCheckList(this.checklist);\r\n\t\tString id = this.checklist.getId();\r\n\r\n\t\t// Test the method deleteCheckList with an checklist existing into the\r\n\t\t// db.\r\n\t\tthis.checklistDAO.deleteCheckList(this.checklist);\r\n\r\n\t\t// See if this.checklist is now absent in the db.\r\n\t\tCheckList checklistTmp = (CheckList) this.checklistDAO.getCheckList(id);\r\n\t\tassertNull(checklistTmp);\r\n\r\n\t\t// Test the method deleteCheckList with an checklist unexisting into the\r\n\t\t// db.\r\n\t\t// Normally here there are no exception thrown.\r\n\t\tthis.checklistDAO.deleteCheckList(this.checklist);\r\n\t}", "int updateByPrimaryKeySelective(HospitalType record);", "public StudentQualifyingData updateStudentStatus(int id, StudentQualifyingData stdStatus) {\n\t\tStudentQualifyingData curStatus = sqdRepository.findByStdAccId(id);\n\t\tif (sqdRepository.findByStdAccId(id).equals(null)) {\n\t\t\tthrow new ArithmeticException(\"Invalid ID.\");\n\t\t}\n\t\t\n\t\tif(stdStatus.getStdStatusId().equals(2)) {\n\t\t\tcurStatus.setStdOrgId(null);\n\t\t}\n\t\tif(stdStatus.getStdStatusId().equals(3)) {\n\t\t\tcurStatus.setStdOrgId(stdStatus.getStdOrgId());\n\t\t}\n\t\tcurStatus.setStdStatusId(stdStatus.getStdStatusId());\n\t\treturn sqdRepository.save(curStatus);\t\n\t}", "@Override\n\tpublic void setId(long id) {\n\t\t_dmGtStatus.setId(id);\n\t}", "public void myanwDelete(int idx) {\n\t\tdao.myanwDelete(idx);\r\n\t}", "public void onCheckedChanged( RadioGroup group, int checkedId ) {\n dbManager.deleteById( checkedId );\n Toast.makeText( DeleteActivity.this, \"Alarm deleted\",\n Toast.LENGTH_SHORT ).show( );\n\n // update screen\n updateView( );\n }", "void updatePassengerInCheck(int passengerInCheck);", "int updateGoodsByGoodsId(Goods goods);", "public void update(Adjustment adjustment) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.update(adjustment);\r\n\t\tsession.flush();\r\n\t}", "public int updateById(EvaluetingListDO evaluetingList) throws DataAccessException;", "int updateByPrimaryKey(SellType record);", "@Override\n\tpublic CheckBean getSpecificCheck(long checkId) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "int updateByPrimaryKey(DashboardGoods record);", "@Override\r\n\tpublic void updateEmployee(long employeeId, Employee updateEmployee) {\n\t\t\r\n\t}", "public static void updateMarathonHealthCheckStatus(final int componentId, final int environmentId,\n\t\t\tfinal long regionID,final HealthCheckType healthCheckType, final Status status, boolean isStatusChanged) {\n\t\tString queryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_NO_CHG;\n\t\tif(isStatusChanged){\n\t\t\tqueryString = HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_STATUS_CHG;\n\t\t}\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(queryString);\n\t\tquery.setLong(\"statusId\", status.getStatusId());\n\t\tquery.setTimestamp(\"statusUpdateTime\", new java.sql.Timestamp(System.currentTimeMillis()));\n\t\tquery.setLong(\"healthCheckTypeId\", healthCheckType.getHealthCheckTypeId());\n\t\tquery.setLong(\"environmentId\", environmentId);\n\t\tquery.setLong(\"componentId\", componentId);\n\t\tquery.setLong(\"regionId\", regionID);\n\t\tint rowCount = query.executeUpdate();\n\t\tlogger.info(\"Number of Updated Kubernetes row - \"+ rowCount);\n\t\ttxn.commit();\n\t\t\n\t}", "public void setStatusId(int statusId) {\n _statusId = statusId;\n }", "public boolean updateFood(Food food, String typeId) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\t\t\n\t\ttry {\n\t\t\tFoodType foodType=findFoodTypeByFoodId(food.getId());\n\t\t\tFood selectFood=session.get(Food.class, food.getId());\n\t\t\tfoodType.getFoodSet().remove(selectFood);\n\t\t\tFoodType type=session.get(FoodType.class,Integer.parseInt(typeId));\n\t\t\ttype.getFoodSet().add(food);\n\t\t\tfood.setType(type);\n\t\t\tsession.update(type);\n\t\t\tsession.clear();//必须清理,否则session中会存在两个id相同的同一个类的对象\n\t\t\tsession.update(foodType);\n\t\t\tsession.update(food);\n\t\t\ttran.commit();\n\t\t\tsession.close();\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.print(e);\n\t\t\ttran.rollback();\n\t\t\tsession.close();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "int updateByPrimaryKey(FctWorkguide record);", "public void addExemptionPermanently(CheckType check) {\n exemptions.put(check, -1L);\n }", "int updateByPrimaryKeySelective(Dish record);", "public HrJBorrowcontract update(HrJBorrowcontract entity);", "public HrCStatitem update(HrCStatitem entity);", "@Override\r\n\tpublic boolean updHouse(House h) {\n\t\treturn adi.updHouse(h);\r\n\t}", "public void setGoodstypeId(Integer goodstypeId) {\n this.goodstypeId = goodstypeId;\n }", "@Override\n\tpublic void UpdateReductin(int red, long shelfId) {\n\t\t\n\t\tshelfRepository.updateReductionPercentage(red, shelfId);\n\t}", "void updatePurchaseOrderLinkedBoqStatus(long pohId);", "public synchronized void updateLocalCheckpoint(final String allocationId, final long checkpoint) {\n final int indexOfKey = inSyncLocalCheckpoints.indexOf(allocationId);\n if (indexOfKey >= 0) {\n final long current = inSyncLocalCheckpoints.indexGet(indexOfKey);\n if (current < checkpoint) {\n inSyncLocalCheckpoints.indexReplace(indexOfKey, checkpoint);\n if (logger.isTraceEnabled()) {\n logger.trace(\"updated local checkpoint of [{}] to [{}] (was [{}])\", allocationId, checkpoint, current);\n }\n } else {\n logger.trace(\n \"skipping update of local checkpoint [{}], current checkpoint is higher (current [{}], incoming [{}], type [{}])\",\n allocationId,\n current,\n checkpoint,\n allocationId);\n }\n } else {\n logger.trace(\"[{}] isn't marked as in sync. ignoring local checkpoint of [{}].\", allocationId, checkpoint);\n }\n }", "private static void updateHealthCheckStatus(final HealthCheckVO healthCheckVO, final int currentFailedCount) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\t\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\tif ((healthCheckVO.getCurrentStatus() == null && status == Status.UP) || status == healthCheckVO.getCurrentStatus()\n\t\t\t\t|| (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) ) {\n\t\t\tString queryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE_WITH_STATUS;\n\t\t\tif (healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\t\tqueryString = HQLConstants.UPDATE_HEALTH_CHECK_NO_CHANGE;\n\t\t\t}\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tQuery query = session.createQuery(queryString)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tif (healthCheckVO.getCurrentStatus() != null \n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()){\n\t\t\t\t/*NOT - First time status check. Failed but did not cross max-retry count */\n\t\t\t\tsts.setStatusId(healthCheckVO.getCurrentStatus().getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t} else if (!(healthCheckVO.getCurrentStatus() == null\n\t\t\t\t\t&& status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue())) {\n\t\t\t\t/* First time status check. Status changed and max-retry count is crossed. No need to update lastStatusChange */\n\t\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\t\tquery.setEntity(\"status\", sts);\n\t\t\t}\n\t\t\tquery.executeUpdate();\n\t\t} else {\n\t\t\tQuery query = session.createQuery(HQLConstants.UPDATE_HEALTH_CHECK_CHANGE)\n\t\t\t\t\t.setTimestamp(\"updateTime\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setTimestamp(\"lastStatusChange\", new java.sql.Timestamp( Calendar.getInstance().getTimeInMillis() ))\n\t\t\t\t\t.setInteger(\"failedCount\", (currentFailedCount >= SurveillerConstants.DB_MAX_FAILED_COUNT) ? SurveillerConstants.DB_MAX_FAILED_COUNT : currentFailedCount)\n\t\t\t\t\t.setInteger(\"healthCheckId\", healthCheckVO.getHealthCheckId().intValue());\n\t\t\tStatusEntity sts = new StatusEntity();\n\t\t\tsts.setStatusId(status.getStatusId());\n\t\t\tquery.setEntity(\"status\", sts);\n\t\t\tquery.executeUpdate();\n\t\t}\n\t\ttxn.commit();\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic boolean update(Long id, PhieuDatHang newInfor) {\n\t\treturn this.phieuDatHangDaoImpl.update(id, newInfor);\r\n\t}", "int updateByPrimaryKeySelective(TycCompanyCheckCrawler record);", "public void updateContestTypeConfig(ContestTypeConfig arg0) throws ContestManagementException {\r\n }", "@Test\n @Ignore\n public void testUpdate() {\n System.out.println(\"update\");\n Index entity = null;\n IndexDaoImpl instance = null;\n Index expResult = null;\n Index result = instance.update(entity);\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 }", "@Override\n public void setFollowableNotifiableStatusByFSTID(Long fstId, Followable.FollowableNotifiable notifiable) {\n logger.debug(\"setFollowableNotifiableStatusByFSTID(fstId: {}, notifiable: {})\", fstId, notifiable);\n // get FST\n FollowStateTracker fst = fstRepository.findById(fstId)\n .orElseThrow( () -> new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Le suivi n'existe pas.\") );\n // process update\n this.setFollowableNotifiableStatusByFST(fst, notifiable);\n }", "public DbTruth updateTruth( long truthId,\n long truthSetId, String type, String value, String contextValue)\n throws NameSystemException{\n\n validateTruthExists(truthId);\n validateTruthData(truthId, type, value);\n\n return getTruthDAO().update(truthId,truthSetId,value,contextValue);\n }", "@Override\n public void forceIncrementModificationCounter(SideDishEntity entity) {\n\n }", "private void updateDataUsageAndAssert(long dataId, int assertValue) {\n Uri uri = DataUsageFeedback.FEEDBACK_URI.buildUpon().appendPath(String.valueOf(dataId))\n .appendQueryParameter(DataUsageFeedback.USAGE_TYPE,\n DataUsageFeedback.USAGE_TYPE_CALL).build();\n int result = mResolver.update(uri, new ContentValues(), null, null);\n assertTrue(result > 0);\n\n assertDataUsageEquals(dataId, assertValue);\n }", "public void setHpId(String hpId) {\r\n this.hpId = hpId == null ? null : hpId.trim();\r\n }", "@Override\n\t\t\tpublic TestEntity updateTest(BigInteger testId, TestEntity test) \n\t\t\t{\n\t\t\t\tboolean exists = testDao.existsById(testId);\n\t\t\t\tif (exists)\n\t\t\t\t{\n\t\t\t\t\ttest = testDao.save(test);\n\t\t\t\t\treturn test;\n\t\t\t\t}\n\t\t\t\tthrow new TestNotFoundException(\"Test not found for id=\"+testId);\n\t\t\t}", "@Override\r\n\tpublic void SavePrivilege(String[] check,String id)\r\n\t{\n\t\tList a = Sel.HSQL(\"from Userprivileges where users.userId='\" + id + \"'\");\r\n\r\n\t\tif (a != null && a.size() > 0)\r\n\t\t{\r\n\t\t\tDel.Delhql(\"delete from Userprivileges where users.userId='\" + id + \"'\");\r\n\t\t}\r\n\r\n\t\tif (check.length != 0)\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < check.length; i++)\r\n\t\t\t{\r\n\t\t\t\tUserprivileges u = new Userprivileges();\r\n\t\t\t\tu.setUsers((Users) Sel.getHQL(Users.class, id));\r\n\t\t\t\tu.setPrivileges((Privileges) Sel.getHQL(Privileges.class, check[i]));\r\n\t\t\t\tIns.INS(u);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "int updateByPrimaryKey(TbInvCategory record);", "@Override\n public void deleteSighting(int sightingId) {\n jdbcTemplate.update(SQL_DELETE_HVSIGHTING,\n sightingId);\n // delete sighting\n jdbcTemplate.update(SQL_DELETE_SIGHTING,\n sightingId);\n }", "int updateByPrimaryKeySelective(DashboardGoods record);", "int updateByPrimaryKey(CfgSearchRecommend record);", "@Override\r\n\tpublic int updateByExample(Emp record, EmpExample example) {\n\t\treturn 0;\r\n\t}", "boolean update(DataTableDef def) throws IOException;", "private void changeReportPropertyThingIdReport(List<ReportEntryOptionProperty> properties, Long thingTypeId) {\n List<Long> thingTypesIds = getInstance().getThingTypeIdsOfPathsByThingTypeId(thingTypeId);\n if (thingTypesIds.indexOf(thingTypeId) == -1) {\n thingTypesIds.add(thingTypeId);\n }\n if ((properties != null) && (!properties.isEmpty())) {\n for (ReportEntryOptionProperty optionProperty : properties) {\n Long thingTypeIdOptionProp = optionProperty.getThingTypeIdReport();\n if (thingTypeIdOptionProp != null &&\n !thingTypesIds.contains(thingTypeIdOptionProp)) {\n optionProperty.setThingTypeIdReport(0L);\n }\n }\n }\n }" ]
[ "0.5608556", "0.51049215", "0.48802024", "0.47298434", "0.454885", "0.44502613", "0.44269475", "0.44130638", "0.43666014", "0.4352959", "0.42961386", "0.4285699", "0.42723292", "0.42095894", "0.42056468", "0.4204499", "0.41752863", "0.41643032", "0.41555893", "0.41550344", "0.41452307", "0.41413823", "0.41407335", "0.41184476", "0.4105007", "0.409832", "0.4091326", "0.4090533", "0.4085679", "0.40795857", "0.40668333", "0.4066823", "0.40544912", "0.40496525", "0.4043006", "0.40411085", "0.40340915", "0.40323225", "0.4023524", "0.4020275", "0.40152434", "0.40150914", "0.40080515", "0.40060323", "0.399506", "0.39947128", "0.39935338", "0.39905375", "0.39866638", "0.3977675", "0.39753336", "0.3971989", "0.39708343", "0.39687836", "0.3960684", "0.39593995", "0.39534885", "0.39532363", "0.39521444", "0.3947467", "0.39292774", "0.39260626", "0.3916546", "0.39124832", "0.39092562", "0.39065078", "0.3902006", "0.39011672", "0.38955188", "0.38923687", "0.38846442", "0.38777018", "0.38764527", "0.38717785", "0.38716564", "0.38696903", "0.3869343", "0.38669962", "0.38652518", "0.3863438", "0.385965", "0.3857388", "0.3854994", "0.38524497", "0.38515845", "0.38445833", "0.3838863", "0.38377753", "0.38328913", "0.38293624", "0.38286957", "0.38236022", "0.38192743", "0.38190317", "0.381822", "0.3809112", "0.38081136", "0.38045081", "0.37989905", "0.37958595" ]
0.7180508
0
Get the if Component Table if component is already present. Insert Data if the Component is not present. Update del_ind if component is deleted.
private static int insertParentComponent(final String appName, final ComponentType compType, String platform) { int appId = getComponentByNameAndParent(appName, 0, compType.getComponentTypeId(), platform); if (appId == 0) { insertComponent(appName, 0, compType.getComponentTypeId(), false, platform); appId = getComponentByNameAndParent(appName, 0, compType.getComponentTypeId(), platform); } return appId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String addComponent() throws Exception {\n\t\ttry {\n\t\t\tLOGGER.info(\n\t\t\t\t\t\"Start of DataListTableBean.addComponent()\");\n\t\t\tcomponentService.addComponent(component);\n\t\t\tdataList = componentService.findAllComponent();\n\t\t\t\n\t\t\tFacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Data saved\", \"Data saved\");\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, facesMessage);\n\t\t\tdata = new Data();\n\t\t\t\n\t\t\tLOGGER.info(\n\t\t\t\t\t\"End of DataListTableBean.addComponent()\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\treturn manageError(e, \"Error while saving Data. \");\n\t\t}\n\t\treturn \"componentTable\";\n\t}", "public void acquireDataTable() {\n if (MainWindow.tabPane.getSelectedComponent() == null)\n return;\n\n BasicEDFPane splitPane = (BasicEDFPane)MainWindow.tabPane.getSelectedComponent();\n if (splitPane instanceof WorkingTablePane) {\n WorkingTablePane pane = (WorkingTablePane)splitPane;\n dataTable = pane.getEdfTable();\n } else if (splitPane instanceof ESATemplatePane) {\n ESATemplatePane pane = (ESATemplatePane)splitPane;\n dataTable = pane.getEsaTemplateTable();\n }\n }", "public void updateSelectedTable() {\n if (this.getSelectedTable().getTbl_name() != null) {\n //TableList temp = new TableList();\n \n fetchLoginDetails();\n this.setMsg(\"Created !! \");\n //this.getColumnList().clear();\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable().selectedTbUpdated :: \" + this.getColumnList().size());\n TblListDAO tbdao = new TblListDAO();\n this.setSelectedTable(tbdao.getTblDetails(selectedTable.getTbl_name()));\n //temp.setDb_id(this.getSelectedDb().getId());\n //temp.setTbl_name(this.getNewTable().getTbl_name().replaceAll(\" \", \"\"));\n //temp.setNo_of_col(0);\n //DBHandler dbHandler = new DBHandler();\n /*if (dbHandler.createTable(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name())) {\n TblListDAO tbldao = new TblListDAO();\n boolean flag = tbldao.createNewTable(temp);\n TableList temp2=tbldao.getTblDetails(temp.getTbl_name());\n for (ColList c : this.getColumnList()) {\n ColListDAO coldao=new ColListDAO();\n c.setTbl_id(temp2.getId());\n coldao.createNewColumn(c);\n dbHandler.createColumn(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name(), c.getCol_name());\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable() :: \" + c.toString());\n }\n boolean s_flag=dbHandler.buildSchema(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name(),this.getColumnList());\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable() :: Schema Creation Status :: \"+s_flag);\n this.getNewTable().setTbl_name(\"\");\n this.setMsg(\"Created !! \" + flag);\n } else {\n this.getNewTable().setTbl_name(\"\");\n this.setMsg(\"Table Creation failed.\");\n }*/\n\n //this.getNewTable().setTbl_name(\"\");\n //this.getColumnList().clear();\n\n } else {\n //this.setMsg(\"Select Database\");\n //this.getNewTable().setTbl_name(\"\");\n //this.getColumnList().clear();\n }\n\n }", "public interface ComponentDAO {\r\n /**\r\n * Retrieves all coverage components\r\n *\r\n * @param record input record\r\n * @param recordLoadProcessor an instance of the load processor to set page entitlements\r\n * @return\r\n */\r\n RecordSet loadAllComponents(Record record, RecordLoadProcessor recordLoadProcessor);\r\n\r\n /**\r\n * Retrieves all pending prior act coverage components\r\n *\r\n * @param record input record\r\n * @param recordLoadProcessor an instance of the load processor to set page entitlements\r\n * @return\r\n */\r\n RecordSet loadAllPendPriorActComp(Record record, RecordLoadProcessor recordLoadProcessor);\r\n\r\n /**\r\n * Save all input component records with the Pm_Nb_End.Save_Covg_Component stored procedure.\r\n * Set the rowStatus field to NEW for records that are newly added in this request.\r\n * Set the rowStatus field to MODIFIED for records that have already been saved in this WIP transaction,\r\n * and are just being updated.\r\n *\r\n * @param inputRecords a set of Records, each with the PolicyHeader, PolicyIdentifier,\r\n * and Component Detail info matching the fields returned from the loadAllComponents method.\r\n * @return the number of rows updated.\r\n */\r\n int addAllComponents(RecordSet inputRecords);\r\n\r\n /**\r\n * Update all given input records with the Pm_Endorse.Change_Covg_Component stored procedure.\r\n *\r\n * @param inputRecords a set of Records, each with the PolicyHeader, PolicyIdentifier,\r\n * and Component Detail info matching the fields returned from the loadAllComponents method.\r\n * @return the number of rows updated.\r\n */\r\n int updateAllComponents(RecordSet inputRecords);\r\n\r\n /**\r\n * Delete all given input records with the Pm_Nb_Del.Del_Covg_Component stored procedure.\r\n *\r\n * @param inputRecords a set of Records, each with the PolicyHeader, PolicyIdentifier,\r\n * and Component Detail info matching the fields returned from the loadAllComponents method.\r\n * @return the number of rows updated.\r\n */\r\n int deleteAllComponents(RecordSet inputRecords);\r\n\r\n /**\r\n * Get the Cancel WIP rule\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public Record getCancelWipRule(Record record);\r\n\r\n /**\r\n * Get the component cycle years\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public int getCycleYearsForComponent(Record record);\r\n\r\n /**\r\n * Get the component num days\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public int getNumDaysForComponent(Record record);\r\n\r\n /**\r\n * To load all dependent components\r\n *\r\n * @param record\r\n * @param recordLoadProcessor\r\n * @return\r\n */\r\n public RecordSet loadAllAvailableComponent(Record record, RecordLoadProcessor recordLoadProcessor);\r\n\r\n /**\r\n * Get the earliest contiguous coverage effective date with the function Pm_Dates.Nb_Covg_Startdt(coverage_fk, check_dt)\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public Record getCoverageContiguousEffectiveDate(Record record);\r\n\r\n /**\r\n * Get component PK and base record FK\r\n *\r\n * @param record\r\n * @return\r\n */\r\n public Record getComponentIdAndBaseId(Record record);\r\n\r\n /**\r\n * Load Cycle Detail\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllCycleDetail(Record inputRecord);\r\n\r\n /**\r\n * Load Surcharge Points\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllSurchargePoint(Record inputRecord);\r\n\r\n /**\r\n * Save all surcharge points data.\r\n *\r\n * @param inputRecords intput record\r\n * @return the number of row updateds\r\n */\r\n public int saveAllSurchargePoint(RecordSet inputRecords);\r\n\r\n /**\r\n * validate component copy\r\n * @param inputRecord\r\n * @return validate status code statusCode\r\n */\r\n String validateCopyAllComponent(Record inputRecord);\r\n\r\n /**\r\n * delete all component from coverage for delete risk all\r\n * @param compRs\r\n */\r\n void deleteAllCopiedComponent(RecordSet compRs);\r\n\r\n /**\r\n * Load all processing event.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessingEvent(Record inputRecord, RecordLoadProcessor entitlementRLP);\r\n\r\n /**\r\n * Load all processing detail.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessingDetail(Record inputRecord);\r\n\r\n /**\r\n * Save all processing event.\r\n *\r\n * @param inputRecords\r\n * @return the number of row updated\r\n */\r\n public int saveAllProcessingEvent(RecordSet inputRecords);\r\n\r\n /**\r\n * Set RMT Classification indicator.\r\n *\r\n * @param inputRecord\r\n */\r\n public void setRMTIndicator(Record inputRecord);\r\n\r\n /**\r\n * Process RM Discount\r\n *\r\n * @param inputRecord\r\n * @return Record\r\n */\r\n public Record processRmDiscount(Record inputRecord);\r\n\r\n /**\r\n * Load all Corp/Org discount member.\r\n *\r\n * @param inputRecord\r\n * @param entitlementRLP\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllCorpOrgDiscountMember(Record inputRecord, RecordLoadProcessor entitlementRLP);\r\n\r\n /**\r\n * Process Corp/Org discount\r\n *\r\n * @param inputRecord\r\n * @return Record\r\n */\r\n public Record processCorpOrgDiscount(Record inputRecord);\r\n\r\n /**\r\n * Load all processing event history\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessEventHistory(Record inputRecord);\r\n\r\n /**\r\n * Load all processing detail history\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllProcessDetailHistory(Record inputRecord);\r\n\r\n /**\r\n * Apply the component\r\n *\r\n * @param inputRecord\r\n * @return Record\r\n */\r\n public Record applyMassComponet(Record inputRecord);\r\n\r\n /**\r\n * Check if it is a problem policy\r\n *\r\n * @param inputRecord\r\n * @return String\r\n */\r\n public String isProblemPolicy(Record inputRecord);\r\n\r\n /**\r\n * Check if add component allowed\r\n *\r\n * @param inputRecord\r\n * @return\r\n */\r\n String isAddComponentAllowed(Record inputRecord);\r\n\r\n /**\r\n * Get short term component's effective from and effective to date\r\n *\r\n * @param inputRecord Input record containing risk and coverage level details\r\n * @return Record that contains component effective from date and effective to date.\r\n */\r\n Record getShortTermCompEffAndExpDates(Record inputRecord);\r\n\r\n /**\r\n * Check if the official component record has a temp record exists for the specific transaction.\r\n *\r\n * @param inputRecord include component base record id and transaction id\r\n * @return true if component temp record exists\r\n * false if component temp record does not exist\r\n */\r\n boolean isComponentTempRecordExist(Record inputRecord);\r\n\r\n /**\r\n * Check if changing component expiring date in OOSE is allowed\r\n *\r\n * @param inputRecord\r\n * @return\r\n */\r\n String isOoseChangeDateAllowed(Record inputRecord);\r\n\r\n /**\r\n * Load effective to date with PM_Dates.NB_Covg_ExpDt stored procedure.\r\n * <p/>\r\n *\r\n * @param inputRecord a Record with information to load the effective to date.\r\n * @return Coverage effective to date.\r\n */\r\n String getCoverageExpirationDate(Record inputRecord);\r\n\r\n /**\r\n * Validate component duplicate.\r\n * @param inputRecord\r\n * @return\r\n */\r\n Record validateComponentDuplicate(Record inputRecord);\r\n\r\n /**\r\n * Check if the NDD expiration date is configured for the component.\r\n *\r\n * @param inputRecord include component base record id and transaction id\r\n * @return true if configured\r\n * false if not configured\r\n */\r\n boolean getNddSkipValidateB(Record inputRecord);\r\n\r\n /**\r\n * Load experience discount history information.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadExpHistoryInfo(Record inputRecord);\r\n\r\n /**\r\n * Load claim information for a specific period of the risk.\r\n *\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadClaimInfo(Record inputRecord);\r\n}", "public void updateDataComp() {\n\t\tdataEntryDao.updateDataComp();\n\t}", "private Vector getDataForTheTable()\r\n {\r\n Vector vectData = null;\r\n try\r\n {\r\n if(tableStructureBeanPCDR == null)\r\n System.out.println(\"tableStructure == null\");\r\n //Get all stored procedures associated with this table.\r\n HashMap hashStoredProcedure =\r\n (HashMap)tableStructureBeanPCDR.getHashStoredProceduresForThisTable();\r\n if(hashStoredProcedure == null)\r\n System.out.println(\"hashStoredProcedure == null\");\r\n //Get the select stored procedure associated witht this table.\r\n StoredProcedureBean selectStoredProcedure =\r\n (StoredProcedureBean)hashStoredProcedure.get(new Integer(0));\r\n\r\n RequestTxnBean requestTxnBean = new RequestTxnBean();\r\n requestTxnBean.setAction(\"GET_DATA\");\r\n requestTxnBean.setStoredProcedureBean(selectStoredProcedure);\r\n\r\n RequesterBean requester = new RequesterBean();\r\n requester.setDataObject(requestTxnBean) ;\r\n\r\n String connectTo =CoeusGuiConstants.CONNECTION_URL\r\n + CODE_TABLE_SERVLET ;\r\n AppletServletCommunicator comm\r\n = new AppletServletCommunicator(connectTo,requester);\r\n comm.send();\r\n\r\n //after send(), we have a username in requester\r\n userId = requester.getUserName();\r\n\r\n ResponderBean responder = comm.getResponse();\r\n if (responder.isSuccessfulResponse())\r\n {\r\n accDataBean = (DataBean)responder.getDataObject() ;\r\n }\r\n\r\n if(accDataBean != null)\r\n {\r\n System.out.println(\"*** Recvd a DataBean ***\");\r\n vectData = accDataBean.getVectData();\r\n System.out.println(\"vectData.size() in GUI: \"+vectData.size());\r\n }\r\n }\r\n catch(Exception ex)\r\n {\r\n ex.printStackTrace() ;\r\n\r\n }\r\n\r\n// accDataBean.setVectData(vectData);\r\n return vectData;\r\n\r\n }", "private static void setDelIndOfComponent(final int componentId, final int delInd) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_COMPONENT_DELIND);\n\t\tquery.setLong(\"delInd\", delInd);\n\t\tquery.setLong(\"componentId\", componentId);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@Override\r\n\tpublic boolean updateTable() {\r\n\t\t/*\r\n\t\t * VERSION 1\r\n\t\t *\r\n\t\tobjectCollection.clear();\r\n\t\tobjectCollection.addAll(retrieveObjects());\r\n\t\trefreshTable();*/\r\n\t\tlong size=objectCollection.size();\r\n\t\tobjectCollection.clear();\r\n\t\tint index=getSelectionIndex();\r\n\t\tupdateTable(SWT.DEFAULT);\r\n\t\tselectElement(index);\r\n\t\treturn objectCollection.size()!=size;\r\n\t}", "boolean isComponentTempRecordExist(Record inputRecord);", "public DataSourceVector getInsertRows() throws IllegalStateException {\r\n DataSourceVector dataInserted = new DataSourceVector();\r\n dataInserted.setColumnName(columnNames);\r\n dataInserted.flagAddStatusRow = false;\r\n /*Read data from data Vector*/\r\n for (int row = 0; row < data.size(); row++) {\r\n if (((Vector) data.elementAt(row)).elementAt(numberOfcolumns).\r\n equals(new Integer(IS_INSERTED))) {\r\n dataInserted.addNewRow((Vector)data.elementAt(row));\r\n }\r\n }\r\n return dataInserted;\r\n }", "protected ValidationComponent createTableExistenceComponent (\n\t\tfinal String tableName)\n\t{\n\t\treturn createTableExistenceComponent(tableName, null);\n\t}", "private Vector getModifiedRows()\r\n {\r\n Vector vecUpdatedRows = new Vector();\r\n int rowCount = 0;\r\n \r\n /* CASE #607 Add deletes to the vector before inserts and updates to avoid \r\n * unique constraint error */\r\n \r\n if (vecDeletedRows.size() > 0 )\r\n {//append deleted rows to vecUpdatedRows\r\n for (int row = 0; row < vecDeletedRows.size(); row++)\r\n {\r\n vecUpdatedRows.add(vecDeletedRows.get(row));\r\n } \r\n } \r\n\r\n while(rowCount < tblProtoCorresp.getRowCount())\r\n {// check AC_TYPE field\r\n String tmpACType ;\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowCount), codeTableModel.getColumnCount()-1) != null)\r\n {\r\n vecUpdatedRows.add(getTableRow(rowCount)) ;\r\n }\r\n rowCount++ ;\r\n }//end while\r\n\r\n return vecUpdatedRows ;\r\n }", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "public void updateSelectedDb() {\n if (this.getSelectedDb().getDb_name() != null) {\n //TableList temp = new TableList();\n \n fetchLoginDetails();\n this.setMsg(\"Created !! \");\n //this.getColumnList().clear();\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable().selectedDbUpdated :: \" + this.getColumnList().size());\n DbListDAO dbdao = new DbListDAO();\n this.setSelectedDb(dbdao.findDBListbyDBName(this.getSelectedDb().getDb_name()));\n //temp.setDb_id(this.getSelectedDb().getId());\n //temp.setTbl_name(this.getNewTable().getTbl_name().replaceAll(\" \", \"\"));\n //temp.setNo_of_col(0);\n //DBHandler dbHandler = new DBHandler();\n /*if (dbHandler.createTable(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name())) {\n TblListDAO tbldao = new TblListDAO();\n boolean flag = tbldao.createNewTable(temp);\n TableList temp2=tbldao.getTblDetails(temp.getTbl_name());\n for (ColList c : this.getColumnList()) {\n ColListDAO coldao=new ColListDAO();\n c.setTbl_id(temp2.getId());\n coldao.createNewColumn(c);\n dbHandler.createColumn(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name(), c.getCol_name());\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable() :: \" + c.toString());\n }\n boolean s_flag=dbHandler.buildSchema(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name(),this.getColumnList());\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable() :: Schema Creation Status :: \"+s_flag);\n this.getNewTable().setTbl_name(\"\");\n this.setMsg(\"Created !! \" + flag);\n } else {\n this.getNewTable().setTbl_name(\"\");\n this.setMsg(\"Table Creation failed.\");\n }*/\n\n //this.getNewTable().setTbl_name(\"\");\n //this.getColumnList().clear();\n\n } else {\n //this.setMsg(\"Select Database\");\n //this.getNewTable().setTbl_name(\"\");\n //this.getColumnList().clear();\n }\n\n }", "private static int getComponentIdFromCompName(String compName){\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "private JTable getJTableDbTable() {\r\n\t\tif (jTableDbTable == null) {\r\n\t\t\tString [] colName = {\"字段\",\"导入值\"};\r\n\t\t\tdbTableModel = new DefaultTableModel(colName);\r\n\t\t\tdbTableModel.setEditColumns(new int[]{1});\r\n\t\t\tjTableDbTable = new JTable(dbTableModel);\r\n\t\t\tjTableDbTable.setRowHeight(25);\r\n\t\t\tTableUtil.setTableAlign(jTableDbTable, JLabel.CENTER);\r\n\t\t}\r\n\t\treturn jTableDbTable;\r\n\t}", "public boolean updateInformationSchemaTable(){\n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\t\tboolean isFound = false;\n\t\ttry {\n\t\t\tRandomAccessFile tablesTableFile = new RandomAccessFile(\"information_schema.table.tbl\", \"rw\");\n\n\t\t\t//Searching to see if the information schema is present or not\n\t\t\twhile(tablesTableFile.getFilePointer() < tablesTableFile.length()){\n\t\t\t\tString readSchemaName = \"\";\n\t\t\t\tbyte varcharLength = tablesTableFile.readByte();\n\t\t\t\tfor(int j = 0; j < varcharLength; j++)\n\t\t\t\t\treadSchemaName += (char)tablesTableFile.readByte();\n\n\t\t\t\tif(readSchemaName.equals(currentSchemaName)){\n\t\t\t\t\tString readTableName = \"\";\n\t\t\t\t\tbyte varcharTableLength = tablesTableFile.readByte();\n\t\t\t\t\tfor(int j = 0; j < varcharTableLength; j++)\n\t\t\t\t\t\treadTableName += (char)tablesTableFile.readByte();\n\n\t\t\t\t\tif(readTableName.equals(tableName)){\n\t\t\t\t\t\tisFound = true;\n\t\t\t\t\t\tSystem.out.println(\"Table '\" + tableName + \"' already exits...\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\ttablesTableFile.readLong();\n\t\t\t\t} else {\n\t\t\t\t\tbyte traverseLength = tablesTableFile.readByte();\n\t\t\t\t\tfor(int j = 0; j < traverseLength; j++)\n\t\t\t\t\t\ttablesTableFile.readByte();\n\t\t\t\t\ttablesTableFile.readLong();\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t\tif(!isFound){\n\t\t\t\t//Traversing to the end of file\n\t\t\t\ttablesTableFile.seek(tablesTableFile.length());\n\t\t\t\ttablesTableFile.writeByte(currentSchemaName.length()); // TABLE_SCHEMA\n\t\t\t\ttablesTableFile.writeBytes(currentSchemaName);\n\t\t\t\ttablesTableFile.writeByte(tableName.length()); // TABLE_NAME\n\t\t\t\ttablesTableFile.writeBytes(tableName);\n\t\t\t\ttablesTableFile.writeLong(0); // TABLE_ROWS\n\t\t\t}\n\n\t\t\ttablesTableFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\treturn isFound;\n\t}", "@Override\n\n public Componente put(String key, Componente value) {\n \n \n Componente cp = null;\n \n try {\n conn = Connect.connect();\n \n //String com a querie -> inserir um Componente na BD\n PreparedStatement stm = conn.prepareStatement(\"INSERT INTO Componente (nome,tipo,designacao,preco,visivel,stock)\\n\" +\n \"VALUES (?, ?, ?, ?,TRUE,?)\\n\" +\n \"ON DUPLICATE KEY UPDATE nome=VALUES(nome), tipo=VALUES(tipo), designcao=VALUES(designcao), preco=VALUES(preco), visivel=VALUES(visivel),stock=VALUES(stock);\", Statement.RETURN_GENERATED_KEYS);\n \n //Parse dos dados Componentes argumento (value)\n stm.setString(1, value.getNome());\n stm.setString(2, value.getTipo());\n stm.setString(3, value.getDesignacao());\n stm.setDouble(4,value.getPreco());\n stm.setInt(5,value.getStock());\n \n // executa a querie\n stm.executeUpdate();\n \n this.adicionarIncompativeis(cp);\n this.adicionarObrigatorias(cp);\n\n \n ResultSet rs = stm.getGeneratedKeys();\n if(rs.next()) {\n String newId = rs.getString(\"nome\");\n if (!newId.equals(value.getNome()))\n throw new PutComponenteFailureException(\"Put Componente failure - falha na inserção de uma componente na base de dados\");\n }\n \n cp = value;\n } catch (SQLException | PutComponenteFailureException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return cp;\n }", "@Override\r\n public void insert( Component component, Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin );\r\n\r\n component.setId( newPrimaryKey( plugin ) );\r\n\r\n daoUtil.setInt( 1, component.getId( ) );\r\n daoUtil.setString( 2, component.getGroupId( ) );\r\n daoUtil.setString( 3, component.getTitle( ) );\r\n daoUtil.setString( 4, component.getDescription( ) );\r\n daoUtil.setString( 5, component.getArtifactId( ) );\r\n daoUtil.setString( 6, component.getVersion( ) );\r\n daoUtil.setString( 7, component.getComponentType( ) );\r\n\r\n daoUtil.executeUpdate( );\r\n daoUtil.free( );\r\n }", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {\n Tables tables = new Tables();\n try{\n int id = Integer.parseInt(lblID.getText().trim());\n String tableNumber = txtUpdateTable.getText().trim();\n \n int asAvailable = 1 ;\n \n tables.setTableId(id);\n tables.setTableNumber(tableNumber);\n tables.setAsAvailable(asAvailable);\n \n tableService.updateTableNumber(tables);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Please Fill TextField\");\n }\n \n vectorTablesNumber = commonService.getVectorTables();\n\n TablesTableModel tableTableModel = new TablesTableModel(vectorTablesNumber);\n tblTablesNumber.setModel(tableTableModel);\n \n \n txtUpdateTable.setText(\"\");\n \n }", "private CdeTableModel GetCdeTableModel() {\n\t\treturn (CdeTableModel) panelCde.getPanelTableCde().getTable().getModel();\n\t}", "private void addComponents() {\n LOOGER.info(\"Get add Components Entry\");\n // Adding loadButton to first row.\n this.add(loadButton);\n\n // Adding fillButton to first row.\n this.add(fillButton);\n\n // Adding deleteButton to first row.\n this.add(deleteButton);\n LOOGER.info(\"add Components exit\");\n }", "public int getComponentID() {\n return COMPONENT_ID;\n }", "public void loadItemsTable(String reqId) {\n dao.setup();\n ObservableList<RequisitionItemEntity> items = FXCollections.observableArrayList(dao.read(RequisitionItemEntity.class));\n dao.exit();\n\n TableColumn<RequisitionItemEntity, String> poIdCol = new TableColumn<>(\"Purchase ID\");\n poIdCol.setCellValueFactory(new PropertyValueFactory<RequisitionItemEntity, String>(\"poid\"));\n\n TableColumn<RequisitionItemEntity, String> reqIdCol = new TableColumn<>(\"Requisiton ID\");\n reqIdCol.setCellValueFactory(new PropertyValueFactory<>(\"reqid\"));\n\n TableColumn<RequisitionItemEntity, Number> supidCol = new TableColumn<>(\"Supplier ID\");\n supidCol.setCellValueFactory(new PropertyValueFactory<>(\"supplier_id\"));\n\n TableColumn<RequisitionItemEntity, Double> tamontCol = new TableColumn<>(\"Total Amount\");\n tamontCol.setCellValueFactory(new PropertyValueFactory<>(\"total_amount\"));\n\n for (RequisitionItemEntity item : items){\n if(reqId == item.getReqId())\n tableItems.getItems().add(item);\n }\n\n tableItems.getColumns().addAll(poIdCol,reqIdCol,supidCol,tamontCol);\n\n\n }", "public InsertUpdateDialog(String tableName, ArrayList<String> data, boolean inserting, JTable table) {\r\n\t\t\r\n\t\tsetBounds(20, 20, 800, 500);\r\n\t\t\r\n\t\tJLabel lblInsertData = new JLabel(\"Insert data\");\r\n\t\tlblInsertData.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\r\n\t\tif(!inserting)\r\n\t\t\tlblInsertData.setText(\"Update data\");\r\n\t\tlblInsertData.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tgetContentPane().add(lblInsertData, BorderLayout.NORTH);\r\n\t\t\r\n\t\tJPanel panelContent = new JPanel();\r\n\t\tpanelContent.setLayout(new BoxLayout(panelContent, BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\t//START CREATING panelContent\r\n\t\tConnection con = null;\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tcon = JDBCConnector.getInstance();\r\n\t\t\tstmt = con.createStatement();\r\n\t\t\trs = stmt.executeQuery(\"select * from \"+tableName);\r\n\t\t\tint numberOfColumns = rs.getMetaData().getColumnCount();\r\n\t\t\tnames = new ArrayList<>();\r\n\t\t\ttypes = new ArrayList<>();\r\n\t\t\t//System.out.println(\"InsertUpdateDialog: \"+tableName);\r\n\t\t\t//System.out.println(\"Varchar = \"+Types.VARCHAR);\r\n\t\t\tfor(int i = 0; i<numberOfColumns; i++) {\r\n\t\t\t\tnames.add(rs.getMetaData().getColumnLabel(i+1));\r\n\t\t\t\ttypes.add(rs.getMetaData().getColumnType(i+1));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"SQLError in InsertUpdateDialog\");\r\n\t\t}finally {\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tcon.close();\r\n\t\t\t} catch (SQLException e) {;}\r\n\t\t}\r\n\t\t\r\n\t\tif(names!=null){\r\n\t\t\titems = new ArrayList<>();\r\n\t\t\tfor(int i = 0; i<names.size(); i++) {\r\n\t\t\t\tItemPanel currentIPanel = null;\r\n\t\t\t\tif(inserting)\r\n\t\t\t\t\tcurrentIPanel = new ItemPanel(names.get(i), \"\");\r\n\t\t\t\telse\r\n\t\t\t\t\tcurrentIPanel = new ItemPanel(names.get(i), data.get(i));\r\n\t\t\t\titems.add(currentIPanel);\r\n\t\t\t\tpanelContent.add(currentIPanel);\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetContentPane().add(panelContent, BorderLayout.CENTER);\r\n\t\t//END CREATING panelContent\r\n\t\t\r\n\t\tJPanel panelButtons = new JPanel();\r\n\t\tgetContentPane().add(panelButtons, BorderLayout.SOUTH);\r\n\t\t\r\n\t\tJButton btnSave = new JButton(\"Save\");\r\n\t\tbtnSave.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(inserting) {\r\n\t\t\t\t\tArrayList<String> ftm = new ArrayList<>(); \r\n\t\t\t\t\tString insertString = \"insert into \"+tableName+\" values (\";\r\n\t\t\t\t\tfor(int i = 0;i<items.size();i++) {\r\n\t\t\t\t\t\tif(types.get(i)==Types.VARCHAR||types.get(i)==Types.TIME||types.get(i)==Types.DATE){\r\n\t\t\t\t\t\t\tinsertString+=\"'\"+items.get(i).getItemValue()+\"',\";\r\n\t\t\t\t\t\t\tftm.add(items.get(i).getItemValue());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tinsertString+=items.get(i).getItemValue()+\",\";\r\n\t\t\t\t\t\t\tftm.add(items.get(i).getItemValue());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinsertString=insertString.substring(0, insertString.length()-1);\r\n\t\t\t\t\tinsertString+=\");\";\r\n\t\t\t\t\tSystem.out.println(Arrays.toString(ftm.toArray()));\r\n\t\t\t\t\tif(Utility.insert(insertString)){\r\n\t\t\t\t\t\t((DefaultTableModel)table.getModel()).addRow(ftm.toArray());\r\n\t\t\t\t\t}else{\r\n//\t\t\t\t\t\tJOptionPane.showMessageDialog(InsertUpdateDialog.this, \"Error during insertion of new data\", \"Message\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tString updateString = \"update \"+tableName+\" set \";\r\n\t\t\t\t\tArrayList<String> ftm = new ArrayList<>(); \r\n\t\t\t\t\tfor(int i = 0;i<items.size();i++) {\r\n\t\t\t\t\t\tif(types.get(i)==Types.VARCHAR||types.get(i)==Types.TIME||types.get(i)==Types.DATE){\r\n\t\t\t\t\t\t\tupdateString+=names.get(i)+\"='\"+items.get(i).getItemValue()+\"',\";\r\n\t\t\t\t\t\t\tftm.add(items.get(i).getItemValue());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tupdateString+=names.get(i)+\"=\"+items.get(i).getItemValue()+\",\";\r\n\t\t\t\t\t\t\tftm.add(items.get(i).getItemValue());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tupdateString=updateString.substring(0, updateString.length()-1)+\" \";\r\n\t\t\t\t\t// ------------Not sure if it is right\r\n\t\t\t\t\tupdateString += \"where \" + names.get(0) + \"=\" + data.get(0);\r\n\t\t\t\t\t// ------------\r\n\t\t\t\t\tif (Utility.insert(updateString)) {\r\n\t\t\t\t\t\tint row = table.getSelectedRow();\r\n\t\t\t\t\t\tfor (int i = 0; i < table.getColumnCount(); i++) {\r\n\t\t\t\t\t\t\t((DefaultTableModel) table.getModel()).setValueAt(ftm.get(i), row, i);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n//\t\t\t\t\t\tJOptionPane.showMessageDialog(InsertUpdateDialog.this, \"Error during updating of data\",\r\n//\t\t\t\t\t\t\t\t\"Message\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t\tdispose();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tpanelButtons.add(btnSave);\r\n\t\t\r\n\t\tJButton btnCancel = new JButton(\"Cancel\");\r\n\t\tbtnCancel.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tpanelButtons.add(btnCancel);\r\n\t\t\r\n\t\tsetModal(true);\r\n\t\tsetVisible(true);\r\n\t}", "private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public void DataIsInserted() {\n }", "private void register_to_data_table() {\n\n\t\t\tfinal DataClient dc = this.task.data_client;\n\t\t\tfinal Transaction tx = dc.beginTransaction();\n\n\t\t\tfinal String repoid = this.op_repo;\n\t\t\tString uid = this.op_user;\n\n\t\t\tAliasDAO alias_dao = new AliasDAO(dc);\n\t\t\tuid = alias_dao.findUser(uid);\n\n\t\t\tRepoDTM repoinfo = dc.get(uid, RepoDTM.class);\n\t\t\tif (repoinfo == null) {\n\t\t\t\trepoinfo = new RepoDTM();\n\t\t\t\tdc.insert(uid, repoinfo);\n\t\t\t}\n\n\t\t\tMap<String, RepoItem> tab = repoinfo.getTable();\n\t\t\tif (tab.containsKey(repoid)) {\n\t\t\t\tString msg = \"the repo with name [%s] exists.\";\n\t\t\t\tmsg = String.format(msg, repoid);\n\t\t\t\tthrow new SnowflakeException(msg);\n\t\t\t}\n\n\t\t\tURI location = this.repo.getComponentContext().getURI();\n\n\t\t\tRepoItem item = new RepoItem();\n\t\t\titem.setName(repoid);\n\t\t\titem.setLocation(location.toString());\n\t\t\titem.setDescriptor(this.getRepoDescriptorId().toString());\n\t\t\ttab.put(repoid, item);\n\n\t\t\tdc.update(repoinfo);\n\n\t\t\ttx.commit();\n\n\t\t}", "public interface ComponentService {\n\n Component upsertComponent(final Component component) throws ComponentOperationFailedException, IllegalArgumentException;\n\n List<Component> findComponents(final EntityFilter filter) throws ComponentOperationFailedException, IllegalArgumentException;\n\n boolean deleteComponent(final Component component) throws ComponentOperationFailedException, IllegalArgumentException;\n\n}", "protected int insertionIndex(int key) {\r\n\t\tint hash = key & 0x7fffffff;\r\n\t\tint index = this.hashFunc1(hash) * FREE.length;\r\n\t\t// int stepSize = hashFunc2(hash);\r\n\t\tbyte[] cur = new byte[4];\r\n\t\tkeys.position(index);\r\n\t\tkeys.get(cur);\r\n int storehash=(cur[0] << 24)+ ((cur[1] & 0xFF) << 16)+ ((cur[2] & 0xFF) << 8)+ (cur[3] & 0xFF);\r\n\r\n\t\tif (Arrays.equals(cur, FREE)) {\r\n\t\t\treturn index; // empty, all done\r\n\t\t} else if (storehash==key) {\r\n\t\t\treturn -index - 1; // already stored\r\n\t\t} else { // already FULL or REMOVED, must probe\r\n\t\t\t// compute the double hash\r\n\t\t\tfinal int probe = (1 + (hash % (size - 2))) * FREE.length;\r\n\r\n\t\t\t// if the slot we landed on is FULL (but not removed), probe\r\n\t\t\t// until we find an empty slot, a REMOVED slot, or an element\r\n\t\t\t// equal to the one we are trying to insert.\r\n\t\t\t// finding an empty slot means that the value is not present\r\n\t\t\t// and that we should use that slot as the insertion point;\r\n\t\t\t// finding a REMOVED slot means that we need to keep searching,\r\n\t\t\t// however we want to remember the offset of that REMOVED slot\r\n\t\t\t// so we can reuse it in case a \"new\" insertion (i.e. not an update)\r\n\t\t\t// is possible.\r\n\t\t\t// finding a matching value means that we've found that our desired\r\n\t\t\t// key is already in the table\r\n\t\t\tif (!Arrays.equals(cur, REMOVED)) {\r\n\t\t\t\t// starting at the natural offset, probe until we find an\r\n\t\t\t\t// offset that isn't full.\r\n\t\t\t\tdo {\r\n\t\t\t\t\tindex += (probe); // add the step\r\n\t\t\t\t\tindex %= (size * FREE.length); // for wraparound\r\n\t\t\t\t\tcur = new byte[FREE.length];\r\n\t\t\t\t\tkeys.position(index);\r\n\t\t\t\t\tkeys.get(cur);\r\n\t\t\t\t} while (!Arrays.equals(cur, FREE)\r\n\t\t\t\t\t\t&& !Arrays.equals(cur, REMOVED)\r\n\t\t\t\t\t\t&& storehash!=hash);\r\n\t\t\t}\r\n\r\n\t\t\t// if the index we found was removed: continue probing until we\r\n\t\t\t// locate a free location or an element which equal()s the\r\n\t\t\t// one we have.\r\n\t\t\tif (Arrays.equals(cur, REMOVED)) {\r\n\t\t\t\tint firstRemoved = index;\r\n\t\t\t\twhile (!Arrays.equals(cur, FREE)\r\n\t\t\t\t\t\t&& (Arrays.equals(cur, REMOVED) || storehash!=hash)) {\r\n\t\t\t\t\tindex += (probe); // add the step\r\n\t\t\t\t\tindex %= (size * FREE.length); // for wraparound\r\n\t\t\t\t\tcur = new byte[FREE.length];\r\n\t\t\t\t\tkeys.position(index);\r\n\t\t\t\t\tkeys.get(cur);\r\n\t\t\t\t}\r\n\t\t\t\t// NOTE: cur cannot == REMOVED in this block\r\n\t\t\t\treturn (!Arrays.equals(cur, FREE)) ? -index - 1 : firstRemoved;\r\n\t\t\t}\r\n\t\t\t// if it's full, the key is already stored\r\n\t\t\t// NOTE: cur cannot equal REMOVE here (would have retuned already\r\n\t\t\t// (see above)\r\n\t\t\treturn storehash!=hash ? -index - 1 : index;\r\n\t\t}\r\n\t}", "private void continuarInicializandoComponentes() {\n javax.swing.table.TableColumn columna1 = tablaDetalle.getColumn(\"Id\");\n columna1.setPreferredWidth(10); \n javax.swing.table.TableColumn columna2 = tablaDetalle.getColumn(\"Tipo\");\n columna2.setPreferredWidth(250); \n javax.swing.table.TableColumn columna3 = tablaDetalle.getColumn(\"Número\");\n columna3.setPreferredWidth(50); \n DefaultTableCellRenderer tcrr = new DefaultTableCellRenderer();\n tcrr.setHorizontalAlignment(SwingConstants.RIGHT);\n DefaultTableCellRenderer tcrc = new DefaultTableCellRenderer();\n tcrc.setHorizontalAlignment(SwingConstants.CENTER);\n tablaDetalle.getColumnModel().getColumn(0).setCellRenderer(tcrc);\n tablaDetalle.getColumnModel().getColumn(2).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(3).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(4).setCellRenderer(tcrr);\n }", "public static ComponentVO getComponent(final int componentId) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tComponentEntity comp = session.get(ComponentEntity.class, componentId);\n\t\ttxn.commit();\n\t\t\n\t\tComponentVO cVO = new ComponentVO();\n\t\tcVO.setComponentId(comp.getComponentId());\n\t\tcVO.setComponentName(comp.getComponentName());\n\t\tcVO.setComponentDesc(comp.getComponentDesc());\n\t\tif(comp.getParentComponent() != null){\n\t\t\tcVO.setParentComponentId(comp.getParentComponent().getComponentId());\n\t\t\tcVO.setParentComponentName(comp.getParentComponent().getComponentName());\n\t\t}\n\t\tcVO.setComponentTypeId(comp.getComponentType().getComponentTypeId());\n\t\tcVO.setDelInd(comp.getDelInd());\n\t\t\n\t\treturn cVO;\n\t}", "private void refTable() {\n try {\n String s = \"select * from stock\";\n pstm = con.prepareStatement(s);\n res = pstm.executeQuery(s);\n table.setModel(DbUtils.resultSetToTableModel(res));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"There Is No Data In Server\");\n }\n }", "private boolean insertaTbrCtaTipDocUsrMod(){\n boolean blnRes=true;\n String strColVec=\"\";\n int w=0;\n String strColTbl=\"\";\n String strCodUsrGrp=\"\";\n int intCodCta=0;\n String strInsCtaUsr=\"\";\n try{\n if(con!=null){\n strInsCtaUsr=\"\";\n stm=con.createStatement();\n for(int i=0; i<objTblModPlaCta.getRowCountTrue(); i++){\n if(objTblModPlaCta.getValueAt(i, INT_TBL_PLA_CTA_LIN)==\"M\"){\n for( int j=(numColModIni); j<=numColModFinGlb; j++ ){\n strColVec=strVecDat[w][2]==null?\"\":strVecDat[w][2];\n strColTbl=\"\"+j;\n while( !(strColVec.equals(\"\")) ){\n if(strColVec.toString().equals(strColTbl)){\n if(objTblModPlaCta.isChecked(i, j)){\n strCodUsrGrp=strVecDat[w][0]==null?\"\":strVecDat[w][0];\n intCodCta=Integer.parseInt(\"\"+objTblModPlaCta.getValueAt(i, INT_TBL_PLA_CTA_COD_CTA));\n \n strSQL=\"\";\n strSQL+=\"INSERT INTO tbr_ctatipdocusr(\";\n strSQL+=\" co_emp, co_loc, co_tipdoc, co_usr, co_cta)\";\n strSQL+=\" VALUES (\";\n strSQL+=\"\" + objParSis.getCodigoEmpresa() + \",\";\n strSQL+=\" \" + objParSis.getCodigoLocal() + \",\";\n strSQL+=\" \" + txtCodTipDoc.getText() + \",\";\n strSQL+=\" \" + strCodUsrGrp + \",\";\n strSQL+=\" \" + intCodCta + \"\";\n strSQL+=\" );\";\n strInsCtaUsr+=strSQL;\n \n }\n }\n w++;\n strColVec=strVecDat[w][2]==null?\"\":strVecDat[w][2];\n }\n w=0;\n } \n }\n }\n System.out.println(\"SQL: \" + strInsCtaUsr);\n stm.executeUpdate(strInsCtaUsr);\n stm.close();\n stm=null;\n }\n }\n catch (java.sql.SQLException e){\n blnRes=false;\n objUti.mostrarMsgErr_F1(this, e);\n }\n catch (Exception e){\n blnRes=false;\n objUti.mostrarMsgErr_F1(this, e);\n }\n return blnRes;\n }", "public JTable crtTBLPNL1(JPanel LP_TBLPNL,String[] LP_COLHD,int LP_ROWCNT,int LP_XPOS,int LP_YPOS,int LP_WID,int LP_HGT,int[] LP_ARRGSZ){ \n\t try{\n\t\t cl_tab2 L_TBLOBJ1; \n\t\t JPanel pnlTAB1 = new JPanel();\n\t\t Object[][] L_TBLDT1;\n\t\t L_TBLDT1 = crtTBLDAT(LP_ROWCNT,LP_COLHD.length); // Creating the Object Data\n\t\t L_TBLOBJ1 = new cl_tab2(L_TBLDT1,LP_COLHD);\n\t\t JTable L_TBL1 = new JTable(L_TBLOBJ1); \n\t\t L_TBL1.setBackground(new Color(213,213,255));\n\t\t int h1 = JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS;\n\t\t int v1 = JScrollPane.VERTICAL_SCROLLBAR_ALWAYS;\n\t\t JScrollPane jspTBL1 = new JScrollPane(L_TBL1,v1,h1);\n\t\t jspTBL1.setPreferredSize(new Dimension(LP_WID-25,LP_HGT-25));\n\t\t jspTBL1.setLocation(0,100);\n\t\t pnlTAB1.removeAll();\n\t\t setCOLWDT(L_TBL1,LP_COLHD,LP_ARRGSZ);\n\t\t pnlTAB1.add(jspTBL1);\n\t\t pnlTAB1.setSize(LP_WID,LP_HGT);\n\t\t pnlTAB1.setLocation(LP_XPOS,LP_YPOS);\n\t\t LP_TBLPNL.add(pnlTAB1);\n\t\t LP_TBLPNL.updateUI();\n\t\treturn L_TBL1;\n\t }catch(Exception L_EX){\n\t\t System.out.println(\"crtTBLPNL1 \"+L_EX);\n\t }\n\treturn null;\n }", "@Override\n\tpublic boolean insertOne(finalDataBean t) throws Exception {\n\t\treturn false;\n\t}", "@Override\r\n public void store( Component component, Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE, plugin );\r\n\r\n daoUtil.setInt( 1, component.getId( ) );\r\n daoUtil.setString( 2, component.getGroupId( ) );\r\n daoUtil.setString( 3, component.getTitle( ) );\r\n daoUtil.setString( 4, component.getDescription( ) );\r\n daoUtil.setString( 5, component.getArtifactId( ) );\r\n daoUtil.setString( 6, component.getVersion( ) );\r\n daoUtil.setString( 7, component.getComponentType( ) );\r\n daoUtil.setInt( 8, component.getId( ) );\r\n\r\n daoUtil.executeUpdate( );\r\n daoUtil.free( );\r\n }", "private void initTableView() {\n // nastaveni sloupcu pro zobrazeni spravne hodnoty a korektniho datoveho typu\n this.colId.setCellValueFactory(cellData -> cellData.getValue().getPersonalIdProperty());\n this.colName.setCellValueFactory(cellData -> cellData.getValue().getDisplayNameProperty());\n this.colAge.setCellValueFactory(cellData -> cellData.getValue().getAgeProperty().asObject());\n this.colGender.setCellValueFactory(cellData -> cellData.getValue().getGenderProperty());\n this.colPrice.setCellValueFactory(cellData -> cellData.getValue().getPriceProperty().asObject());\n\n // nastaveni listu prvku tabulce\n this.offerTable.setItems(this.marketplace.getOfferList());\n\n // listener pro zjisteni, ktery prvek tabulky uzivatel oznacil a naplneni aktualni reference na vybrane dite\n this.offerTable.getSelectionModel().getSelectedCells().addListener(new ListChangeListener<TablePosition>() {\n\n @Override\n public void onChanged(Change<? extends TablePosition> change) {\n ObservableList selectedCells = offerTable.getSelectionModel().getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0);\n currentChild = marketplace.getOfferList().get(tablePosition.getRow());\n System.out.println(currentChild);\n updateUi();\n }\n });\n }", "private void inicializarComponentes() \n\t{\n\t\tthis.table=new JTable(); \n\t\ttablas.setBackground(Color.white);\n\t\tscroll =new JScrollPane(table); // Scroll controla la tabla\n\t\tthis.add(scroll,BorderLayout.CENTER);\n\t\tthis.add(tablas,BorderLayout.NORTH);\n\t\t\n\t}", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }", "boolean hasInsert();", "private HashMap getTableRow(int rowNum)\r\n {\r\n HashMap hashRow = new HashMap() ;\r\n int colTotal = codeTableModel.getColumnCount()-1;\r\n for (int colCount=0; colCount <= codeTableModel.getColumnCount()-1; colCount++)\r\n { // for each column u will build a hashmap\r\n// if (colCount == 1 )\r\n// {//sponsor name is not in update sp.\r\n// continue;\r\n// }\r\n TableColumn column = codeTableColumnModel.getColumn(colCount) ;\r\n ColumnBean columnBean = (ColumnBean)column.getIdentifier() ;\r\n Object val = null ;\r\n // the whole idea of setting up the columnBean as the identifier is that u get to know\r\n // all abt the structure details of the column, so u can create appropriate type of object\r\n // and stick it in to the hashMap\r\n if (columnBean.getDataType().equals(\"NUMBER\"))\r\n {\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount) == null\r\n ||(codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).equals(\"\")))\r\n {\r\n val = null ; //new Integer(0)\r\n }\r\n else\r\n {\r\n val = codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount);\r\n if (val instanceof ComboBoxBean)\r\n {\r\n if (((ComboBoxBean)val).getCode().equals(\"\"))// user deleted selection\r\n val = null;\r\n else\r\n val = new Integer(((ComboBoxBean)val).getCode().toString());\r\n }\r\n else\r\n {\r\n val = new Integer(val.toString()) ;\r\n }\r\n }\r\n }\r\n\r\n if (columnBean.getDataType().equals(\"VARCHAR2\"))\r\n {\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount)==null)\r\n {\r\n val = \"\";\r\n }\r\n else\r\n {\r\n val = codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).toString() ;\r\n }\r\n }\r\n\r\n if (columnBean.getDataType().equals(\"DATE\"))\r\n {\r\n //coeusdev-568 start\r\n //Date today = new Date();\r\n //coeusdev-568 end\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum), codeTableModel.getColumnCount()-1).equals(\"I\")) // if itz an insert\r\n { //AV_ & AW_ will be the same for insert\r\n //coeusdev-568 start\r\n //val = new java.sql.Timestamp(today.getTime());\r\n val = CoeusUtils.getDBTimeStamp();\r\n //coeusdev-568 end\r\n }\r\n else\r\n { // for update\r\n // there will be only two dates in any table one AV_UPDATE_TIMESTAMP and the other one AW_UPDATE_TIMESTAMP\r\n if (columnBean.getQualifier().equals(\"VALUE\"))\r\n { //AV_...\r\n //coeusdev-568 start\r\n //val = new java.sql.Timestamp(today.getTime());\r\n val = CoeusUtils.getDBTimeStamp();\r\n //coeusdev-568 end\r\n }\r\n else\r\n { //AW_...\r\n val = java.sql.Timestamp.valueOf(codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).toString()) ;\r\n }\r\n }\r\n }\r\n\r\n hashRow.put(columnBean.getColIdentifier(), val) ;\r\n } //end for\r\n return hashRow;\r\n }", "private JScrollPane getJScrollPaneDbTable() {\r\n\t\tif (jScrollPaneDbTable == null) {\r\n\t\t\tjScrollPaneDbTable = new JScrollPane();\r\n\t\t\tjScrollPaneDbTable.setBounds(new Rectangle(341, 18, 303, 236));\r\n\t\t\tjScrollPaneDbTable.setViewportView(getJTableDbTable());\r\n\t\t}\r\n\t\treturn jScrollPaneDbTable;\r\n\t}", "private void initTable(){\n TableCellEditor nonSelEditor = new TableCellEditor() {\n @Override\n public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {\n return null;\n }\n @Override\n public Object getCellEditorValue() {return null; }\n\n @Override\n public boolean isCellEditable(EventObject anEvent) {return false;}\n\n @Override\n public boolean shouldSelectCell(EventObject anEvent) {return false;}\n\n @Override\n public boolean stopCellEditing() {return false;}\n\n @Override\n public void cancelCellEditing() {/*NOP*/}\n\n @Override\n public void addCellEditorListener(CellEditorListener l) {/*NOP*/}\n\n @Override\n public void removeCellEditorListener(CellEditorListener l) {/*NOP*/}\n };\n\n tableModelArrays = new DefaultTableModel();\n\n String[] columns = {\"N\", \"Data type\", \"Length\", \"State\",\"Kit\"};\n for(String s : columns){\n tableModelArrays.addColumn(s);\n }\n\n /*\n * Add information about have generated structures to the table model\n */\n if(dataList != null){\n for(int i = 0; i<dataList.getLength(); i++){\n tableModelArrays.addRow(new String[]{\n Integer.toString(i + 1),\n dataList.getData(i).getType(),\n Integer.toString(dataList.getData(i).getLength(0)),\n dataList.getData(i).getState()\n });\n }\n }\n\n /*\n * Create table from table model\n */\n final JTable tableArrays = new JTable(tableModelArrays);\n\n /*\n * Runs popup menu for edition notices which contain in table.\n */\n tableArrays.addMouseListener(new PopupMenu(popupMenu){\n @Override\n public void maybeShowPopup(MouseEvent e) {\n if (e.isPopupTrigger()) {\n popupMenu.show(e.getComponent(),\n e.getX(), e.getY());\n if (e.getButton() == MouseEvent.BUTTON3) {\n Point point = e.getPoint();\n int column = tableArrays.columnAtPoint(point);\n int row = tableArrays.rowAtPoint(point);\n tableArrays.setColumnSelectionInterval(column, column);\n tableArrays.setRowSelectionInterval(row, row);\n selectedRow = tableArrays.getSelectedRow();\n }\n }\n }\n });\n\n tableArrays.setRowHeight(20);\n tableArrays.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n /*\n * Changes width all the columns in the table\n */\n tableArrays.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n tableArrays.getColumnModel().getColumn(0).setPreferredWidth(23);\n tableArrays.getColumnModel().getColumn(1).setPreferredWidth(67);\n tableArrays.getColumnModel().getColumn(2).setPreferredWidth(70);\n tableArrays.getColumnModel().getColumn(3).setPreferredWidth(65);\n tableArrays.getColumnModel().getColumn(4).setPreferredWidth(27);\n\n /*\n * Each notice sets as manually no editable\n */\n for (int i = 0; i<tableArrays.getColumnCount(); i++ ){\n tableArrays.getColumnModel().getColumn(i).setCellEditor(nonSelEditor);\n }\n\n /*\n * Add scroll controls to table\n */\n JScrollPane scrollTable = new JScrollPane(tableArrays);\n scrollTable.setSize(TABLE_WIDTH,getHeight()-FIELD_HEIGHT-150);\n scrollTable.setLocation(getWidth()-scrollTable.getWidth()-15, FIELD_HEIGHT+60);\n\n /*\n * Add table to frame\n */\n add(scrollTable);\n\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private EstabelecimentoTable() {\n\t\t\t}", "public void getComponents(DatabaseMetaData meta) throws SQLException {\n String[] types = {\"TABLE\"};\n ResultSet rs = meta.getTables(null, null, null, types);\n while(rs.next()){\n Table t = new MysqlTable(rs.getString(\"TABLE_NAME\"), rs.getString(\"TABLE_TYPE\"));\n //t.getComponents(meta);\n this.setTables(t);\n }\n try{\n rs.close();\n } catch (Exception ignored){\n } finally { rs.close(); /*Anyway*/ }\n }", "public DBOpEntry createUniqueInsertDBOpEntry(DatabaseTable dbT, Insert insertStatement) throws SQLException {\n\t\tDBOpEntry dbOpEntry = new DBOpEntry(DatabaseDef.UNIQUEINSERT, dbT.get_Table_Name());\n\t\tIterator colIt = insertStatement.getColumns().iterator();\n\t\tIterator valueIt = ((ExpressionList)insertStatement.getItemsList()).getExpressions().iterator();\n\t\tif(colIt == null || colIt.hasNext() == false) {\n\t\t\t//added in the sorted manner\n\t\t\tint index = 0;\n\t\t\twhile(valueIt.hasNext()) {\n\t\t\t\tString value = valueIt.next().toString();\n\t\t\t\tDataField df = dbT.get_Data_Field(index);\n\t\t\t\tPrimitiveType pt = CrdtFactory.generateCrdtPrimitiveType(this.getDateFormat(), df, value, null);\n\t\t\t\tif(df.is_Primary_Key()) {\n\t\t\t\t\tdbOpEntry.addPrimaryKey(pt);\n\t\t\t\t}else {\n\t\t\t\t\tdbOpEntry.addNormalAttribute(pt);\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}else {\n\t\t\twhile(colIt.hasNext() && valueIt.hasNext()) {\n\t\t\t\tString colName = colIt.next().toString();\n\t\t\t\tString value = valueIt.next().toString();\n\t\t\t\tDataField df = dbT.get_Data_Field(colName);\n\t\t\t\tPrimitiveType pt = CrdtFactory.generateCrdtPrimitiveType(this.getDateFormat(), df, value, null);\n\t\t\t\tif(df.is_Primary_Key()) {\n\t\t\t\t\tdbOpEntry.addPrimaryKey(pt);\n\t\t\t\t}else {\n\t\t\t\t\tdbOpEntry.addNormalAttribute(pt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dbOpEntry;\n\t}", "private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n public Componente remove(Object key) {\n Componente cp = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Componente SET visivel=FALSE WHERE nome=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return cp;\n }", "public ComprasRealizadas() {\n initComponents();\n tablaCompraDefault = (DefaultTableModel) tablaCompra.getModel();//conveirto la tabla\n tablaComprasDefault = (DefaultTableModel) tablaCompras.getModel();\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "private TableInformation readTable(String tablePath, Component parent)\n {\n // Read the table's data from the database\n TableInformation tableInfo = dbTable.loadTableData(tablePath,\n false,\n false,\n false,\n false,\n parent);\n\n // Check that the data was successfully loaded from the database and\n // that the table isn't empty\n if (!tableInfo.isErrorFlag() && tableInfo.getData().length != 0)\n {\n // Get the table's type definition\n TypeDefinition typeDefn = tableTypeHandler.getTypeDefinition(tableInfo.getType());\n\n // Get the data and place it in an array for reference below. Add\n // columns to contain the table type and path\n String[][] data = CcddUtilities.appendArrayColumns(tableInfo.getData(), 2);\n int typeColumn = data[0].length - TYPE_COLUMN_DELTA;\n int pathColumn = data[0].length - PATH_COLUMN_DELTA;\n\n // Get the index of the column containing the data type for this\n // table if it has one\n int dataTypeColumn = typeDefn.getColumnIndexByInputType(InputDataType.PRIM_AND_STRUCT);\n\n // Step through each row\n for (int row = 0; row < data.length && !tableInfo.isErrorFlag(); row++)\n {\n // Use the index column to store the table path and type for\n // reference during script execution\n data[row][typeColumn] = tableInfo.getType();\n data[row][pathColumn] = tablePath;\n\n // Store the data from the table in the combined storage array\n combinedData = CcddUtilities.concatenateArrays(combinedData,\n new String[][] {data[row]});\n\n // Check if this is a table reference (a data type column was\n // found and it does not contain a primitive data type)\n if (dataTypeColumn != -1\n && !dataTypeHandler.isPrimitive(data[row][dataTypeColumn]))\n {\n // Get the column containing the variable name for this\n // table\n int varNameColumn = typeDefn.getColumnIndexByInputType(InputDataType.VARIABLE);\n\n // Check that a variable name column was found\n if (varNameColumn != -1)\n {\n // Get the column containing the array size for this\n // table\n int arraySizeColumn = typeDefn.getColumnIndexByInputType(InputDataType.ARRAY_INDEX);\n\n // Check if the data type or variable name isn't blank,\n // and if an array size column doesn't exist or that\n // the row doesn't reference an array definition. This\n // is necessary to prevent appending the prototype\n // information for this data type structure\n if ((!data[row][dataTypeColumn].isEmpty()\n || !data[row][varNameColumn].isEmpty())\n && (arraySizeColumn == -1\n || data[row][arraySizeColumn].isEmpty()\n || ArrayVariable.isArrayMember(data[row][varNameColumn])))\n {\n // Get the variable in the format\n // dataType.variableName, prepend a comma to\n // separate the new variable from the preceding\n // variable path, then break down the child table\n readTable(tablePath\n + \",\"\n + data[row][dataTypeColumn]\n + \".\"\n + data[row][varNameColumn],\n parent);\n }\n }\n // Table has no variable name column\n else\n {\n tableInfo.setErrorFlag();\n break;\n }\n }\n }\n }\n\n return tableInfo;\n }", "public interface ComponentDAO<T> extends Serializable {\n \n /**\n * Adds the specified DTO to the database.\n */\n public void create(T e);\n\n /**\n * Returns a Collection of all of the records in the appropriate table,\n * each record being represented by the DTO T.\n */\n public Collection<T> readAll();\n \n /**\n * Updates the specified DTO in the database.\n */\n public void update(T e);\n \n /**\n * Deletes the specified DTO from the database.\n */\n public void delete(T e);\n \n}", "private int findComp(Component cmpnt) {\n\n for (int i = 0; i < compList.length; i++) {\n if (compList[i].equals(cmpnt)) {\n return i;\n }\n }\n\n return 0;\n }", "private JXTable getSelectedTable() {\n JScrollPane scrollPane = (JScrollPane) closeableTabbedPane1.getSelectedComponent();\n\n return (JXTable) scrollPane.getViewport().getView();\n }", "private void copyDialogTable(TableLayout dialogTable,\n\t\t\tTableLayout storedDialogTable) {\n\t\tint rowsNeeded = storedDialogTable.getChildCount()-1;\n\t\tfor(int i=-1; i<rowsNeeded; i++){\n\t\t\tTableRow newRow = new TableRow(getActivity());\n\t\t\tTableRow.LayoutParams rowParams = new TableRow.LayoutParams();\n\t\t\trowParams.height = TableRow.LayoutParams.WRAP_CONTENT;\n\t\t\trowParams.width = TableRow.LayoutParams.WRAP_CONTENT;\n\t\t\t//use k columns\n\t\t\tTableRow storedRow = null;\n\t\t\tstoredRow = (TableRow) storedDialogTable.getChildAt(i+1);\n\t\t\tfor(int k=0; k<3; k++){\n\t\t\t\tView theView = null;\n\t\t\t\tif(k==2 && i != -1){\n\t\t\t\t\tSpinner spin = new Spinner(SlideoutNavigationActivity.theActiveActivity);\n\t\t\t\t\tString [] spin_arry = SlideoutNavigationActivity.theActiveActivity.getResources().getStringArray(R.array.spaltentypen);\n\t\t\t\t\tspin.setAdapter(targetFragment.new DialogSpinnerAdapter<CharSequence>(SlideoutNavigationActivity.theActiveActivity, spin_arry));\n\t\t\t\t\ttheView = spin;\n\t\t\t\t\ttargetFragment.setSpinnerStyle(spin);\n\t\t\t\t\tspin.setOnItemSelectedListener(new OnItemSelectedListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent, View arg1, int arg2, long arg3) {\n\t\t\t\t\t\t\t((TextView) parent.getChildAt(0)).setTextColor(SlideoutNavigationActivity.theActiveActivity.getResources().getColor(R.color.background));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\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\tLog.d(\"i,k\", \"i==\" + i+ \", k==\" +k);\n\t\t\t\t\tspin.setSelection(((Spinner) storedRow.getChildAt(k)).getSelectedItemPosition());\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfinal EditText oneColumn = new EditText(SlideoutNavigationActivity.theActiveActivity);\n\t\t\t\t\ttargetFragment.setTableStyle((EditText) oneColumn);\n\t\t\t\t\tif (i == -1) {\n\t\t\t\t\t\tif (k == 0) {\n\t\t\t\t\t\t\toneColumn.setText(SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.number));\n\t\t\t\t\t\t} else if (k == 1) {\n\t\t\t\t\t\t\toneColumn.setText(SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.column_name));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toneColumn.setText(SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.column_type));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// insert the number of the column in the first row\n\t\t\t\t\telse if (k == 0) {\n\t\t\t\t\t\toneColumn.setText((i + 1) + SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.dot));\n\t\t\t\t\t} else if (k == 1) {\n//\t\t\t\t\t\tTableRow headerRow = (TableRow) targetFragment.headerTable\n//\t\t\t\t\t\t\t\t.getChildAt(0);\n//\t\t\t\t\t\tEditText headerText = (EditText) headerRow\n//\t\t\t\t\t\t\t\t.getChildAt(i);\n//\t\t\t\t\t\t// Log.d(\"i,k\", \"i==\" + \", k==\" +k);\n//\t\t\t\t\t\tif (headerText == null) {\n//\t\t\t\t\t\t\toneColumn.setText(\"\");\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse{\n//\t\t\t\t\t\t\toneColumn.setText(headerText.getText());\n//\t\t\t\t\t\t}\n\t\t\t\t\t\toneColumn.setText(((TextView) storedRow.getChildAt(k)).getText());\n\t\t\t\t\t}\n\t\t\t\t\ttheView = oneColumn;\n\t\t\t\t}\n\t\t\t\tnewRow.addView(theView);\n\t\t\t}\n\t\t\tdialogTable.addView(newRow);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n bindingGroup = new org.jdesktop.beansbinding.BindingGroup();\r\n\r\n entityManager = java.beans.Beans.isDesignTime() ? null : Persistence.createEntityManagerFactory(\"mg_PU\", persistenceMap).createEntityManager();\r\n query = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(\"SELECT t FROM TblCuentasContables t ORDER BY t.id\");\r\n list = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(query.getResultList());\r\n cuentaContableCellRenderer1 = new com.gnadenheimer.mg.utils.CuentaContableCellRenderer();\r\n masterScrollPane = new javax.swing.JScrollPane();\r\n masterTable = new javax.swing.JTable();\r\n idLabel = new javax.swing.JLabel();\r\n descripcionLabel = new javax.swing.JLabel();\r\n idField = new javax.swing.JTextField();\r\n descripcionField = new javax.swing.JTextField();\r\n saveButton = new javax.swing.JButton();\r\n refreshButton = new javax.swing.JButton();\r\n newButton = new javax.swing.JButton();\r\n deleteButton = new javax.swing.JButton();\r\n descripcionLabel1 = new javax.swing.JLabel();\r\n cboCuentaMadre = new javax.swing.JComboBox();\r\n descripcionLabel3 = new javax.swing.JLabel();\r\n chkImputable = new javax.swing.JCheckBox();\r\n jTabbedPane1 = new javax.swing.JTabbedPane();\r\n jPanel1 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n cboCuentaContado = new javax.swing.JComboBox<>();\r\n jLabel2 = new javax.swing.JLabel();\r\n cboCuentaCredito = new javax.swing.JComboBox<>();\r\n jLabel4 = new javax.swing.JLabel();\r\n cboCuentaAportes = new javax.swing.JComboBox<>();\r\n jLabel5 = new javax.swing.JLabel();\r\n cboCuentaDonaciones = new javax.swing.JComboBox<>();\r\n cboCuentaCompras = new javax.swing.JComboBox<>();\r\n jLabel6 = new javax.swing.JLabel();\r\n jLabel7 = new javax.swing.JLabel();\r\n cboCuentaACobrar = new javax.swing.JComboBox<>();\r\n jLabel8 = new javax.swing.JLabel();\r\n cboCuentaEfectivo = new javax.swing.JComboBox<>();\r\n jLabel9 = new javax.swing.JLabel();\r\n cboCuentaCtaCte = new javax.swing.JComboBox<>();\r\n\r\n FormListener formListener = new FormListener();\r\n\r\n cuentaContableCellRenderer1.setText(\"cuentaContableCellRenderer1\");\r\n\r\n masterTable.setAutoCreateRowSorter(true);\r\n masterTable.setRowHeight(20);\r\n masterTable.setRowMargin(3);\r\n\r\n org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list, masterTable);\r\n org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${id}\"));\r\n columnBinding.setColumnName(\"Nro\");\r\n columnBinding.setColumnClass(Integer.class);\r\n columnBinding.setEditable(false);\r\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${descripcion}\"));\r\n columnBinding.setColumnName(\"Descripcion\");\r\n columnBinding.setColumnClass(String.class);\r\n columnBinding.setEditable(false);\r\n bindingGroup.addBinding(jTableBinding);\r\n jTableBinding.bind();\r\n masterScrollPane.setViewportView(masterTable);\r\n if (masterTable.getColumnModel().getColumnCount() > 0) {\r\n masterTable.getColumnModel().getColumn(0).setResizable(false);\r\n masterTable.getColumnModel().getColumn(0).setPreferredWidth(100);\r\n masterTable.getColumnModel().getColumn(0).setCellRenderer(cuentaContableCellRenderer1);\r\n masterTable.getColumnModel().getColumn(1).setResizable(false);\r\n masterTable.getColumnModel().getColumn(1).setPreferredWidth(400);\r\n }\r\n\r\n idLabel.setText(\"Nro.:\");\r\n\r\n descripcionLabel.setText(\"Descripcion:\");\r\n\r\n org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.id}\"), idField, org.jdesktop.beansbinding.BeanProperty.create(\"text\"));\r\n binding.setSourceUnreadableValue(\"null\");\r\n bindingGroup.addBinding(binding);\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement != null}\"), idField, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\r\n bindingGroup.addBinding(binding);\r\n\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.descripcion}\"), descripcionField, org.jdesktop.beansbinding.BeanProperty.create(\"text\"));\r\n binding.setSourceUnreadableValue(\"null\");\r\n bindingGroup.addBinding(binding);\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement != null}\"), descripcionField, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\r\n bindingGroup.addBinding(binding);\r\n\r\n saveButton.setText(\"Guardar\");\r\n saveButton.addActionListener(formListener);\r\n\r\n refreshButton.setText(\"Cancelar\");\r\n refreshButton.addActionListener(formListener);\r\n\r\n newButton.setText(\"Nuevo\");\r\n newButton.addActionListener(formListener);\r\n\r\n deleteButton.setText(\"Eliminar\");\r\n\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement != null}\"), deleteButton, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\r\n bindingGroup.addBinding(binding);\r\n\r\n deleteButton.addActionListener(formListener);\r\n\r\n descripcionLabel1.setText(\"Cuenta madre:\");\r\n\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.idCuentaMadre}\"), cboCuentaMadre, org.jdesktop.beansbinding.BeanProperty.create(\"selectedItem\"));\r\n bindingGroup.addBinding(binding);\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement != null}\"), cboCuentaMadre, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\r\n bindingGroup.addBinding(binding);\r\n\r\n descripcionLabel3.setText(\"Imputable:\");\r\n\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.imputable}\"), chkImputable, org.jdesktop.beansbinding.BeanProperty.create(\"selected\"));\r\n binding.setSourceNullValue(false);\r\n binding.setSourceUnreadableValue(false);\r\n bindingGroup.addBinding(binding);\r\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement != null}\"), chkImputable, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\r\n bindingGroup.addBinding(binding);\r\n\r\n jLabel1.setText(\"Cuenta Haber para Facturas Compra Contado\");\r\n\r\n cboCuentaContado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n jLabel2.setText(\"Cuenta Haber para Facturas Compra Credito\");\r\n\r\n cboCuentaCredito.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n jLabel4.setText(\"Cuenta Aportes\");\r\n\r\n cboCuentaAportes.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n jLabel5.setText(\"Cuenta Donaciones\");\r\n\r\n cboCuentaDonaciones.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n cboCuentaCompras.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n jLabel6.setText(\"Cuenta Debe para Compras\");\r\n\r\n jLabel7.setText(\"Cuenta A Cobrar\");\r\n\r\n cboCuentaACobrar.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n jLabel8.setText(\"Cuenta Efectivo/CAJA\");\r\n\r\n cboCuentaEfectivo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n jLabel9.setText(\"Cuenta Cta. Cte. Coop. Chortitzer \");\r\n\r\n cboCuentaCtaCte.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel1)\r\n .addComponent(jLabel2)\r\n .addComponent(jLabel6)\r\n .addComponent(jLabel4)\r\n .addComponent(jLabel5)\r\n .addComponent(jLabel7)\r\n .addComponent(jLabel8)\r\n .addComponent(jLabel9))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(cboCuentaCtaCte, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(cboCuentaEfectivo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(cboCuentaACobrar, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(cboCuentaDonaciones, 0, 208, Short.MAX_VALUE)\r\n .addComponent(cboCuentaAportes, 0, 208, Short.MAX_VALUE)\r\n .addComponent(cboCuentaCompras, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(cboCuentaCredito, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(cboCuentaContado, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addContainerGap())\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1)\r\n .addComponent(cboCuentaContado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel2)\r\n .addComponent(cboCuentaCredito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cboCuentaCompras, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel6))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cboCuentaACobrar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel7))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cboCuentaAportes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel4))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cboCuentaDonaciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel5))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cboCuentaEfectivo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel8))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cboCuentaCtaCte, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel9))\r\n .addContainerGap(35, Short.MAX_VALUE))\r\n );\r\n\r\n jTabbedPane1.addTab(\"Cuentas por defecto\", jPanel1);\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(newButton)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(deleteButton)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(refreshButton)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(saveButton)\r\n .addGap(10, 10, 10))\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(masterScrollPane)\r\n .addGap(29, 29, 29)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addComponent(descripcionLabel3)\r\n .addGap(28, 28, 28))\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(descripcionLabel1)\r\n .addComponent(descripcionLabel)\r\n .addComponent(idLabel))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\r\n .addComponent(chkImputable)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(descripcionField)\r\n .addComponent(idField)\r\n .addComponent(cboCuentaMadre, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\r\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING))\r\n .addContainerGap())\r\n );\r\n\r\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deleteButton, newButton, refreshButton, saveButton});\r\n\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(idField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(idLabel))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(descripcionField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(descripcionLabel))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cboCuentaMadre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(descripcionLabel1))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(descripcionLabel3)\r\n .addComponent(chkImputable))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(masterScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 458, Short.MAX_VALUE))\r\n .addGap(20, 20, 20)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(saveButton)\r\n .addComponent(refreshButton)\r\n .addComponent(deleteButton)\r\n .addComponent(newButton))\r\n .addContainerGap())\r\n );\r\n\r\n bindingGroup.bind();\r\n }", "public Component getComponent()\n {\n if(null == _sqlPanel)\n {\n _sqlPanel = createSqlPanel();\n }\n return _sqlPanel;\n }", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "final void refresh() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n String conURL = \"jdbc:mysql://localhost/enoriadb?\"\n + \"user=root&password=\";\n java.sql.Connection con = DriverManager.getConnection(conURL);\n\n java.sql.PreparedStatement pstmt = con.prepareStatement(\"SELECT * FROM tblproducts ORDER BY id DESC\");\n ResultSet rs = pstmt.executeQuery();\n DefaultTableModel tblmodel = (DefaultTableModel) prodTBL.getModel();\n tblmodel.setRowCount(0);\n\n while (rs.next()) {\n tblmodel.addRow(new Object[]{rs.getString(\"id\"),\n rs.getString(\"P_name\"),\n rs.getString(\"Qty\"),\n rs.getString(\"price\")});\n }\n\n //TFrCode.requestFocus();\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProductClass.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(ProductClass.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "private void buildIngredientTable(){\n\n //IL=IM.getIngredientItemArrayList();\n\n\n\n ingredientTable = new JTable();\n ingredientTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);\n\n ingredientTable.getTableHeader().setReorderingAllowed(false);\n\n DTM = IM.getIngDTM();\n ingredientTable.setModel(DTM);\n\n ingredientTable.setRowSelectionAllowed(true);\n\n ingredientTable.setPreferredScrollableViewportSize(new Dimension(500, 50));\n ingredientTable.setDragEnabled(false);\n ingredientTable.setDefaultEditor(Object.class, null);\n //TODO\n\n TableColumnModel columnModel = ingredientTable.getColumnModel();\n columnModel.getColumn(1).setWidth(500);\n\n scrollPane = new JScrollPane(ingredientTable,ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n scrollPane.setPreferredSize(new Dimension(450, 450));\n\n }", "public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }", "@Override\n\t/**\n\t * Actualizo un empleado.\n\t */\n\tpublic boolean update(Object c) {\n\t\treturn false;\n\t}", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "private void initComponent() {\n\t\t// Create Table Model (rows, columns...)\n\t\ttableur = new DefaultTableModel();\n\t\t// Add title column\n\t\ttableur.addColumn(fileNumber);\n\t\ttableur.addColumn(fileName);\n\t\ttableur.addColumn(\"\");\n\t\t// Add line of Action History with NodeStructureDTO\n\t\twhile(rootNode != null){\n\t\t\ttableur.addRow(new Object[] {rootNode.getId() , rootNode.getCompletePath()});\n\t\t\trootNode = rootNode.getNextNode();\n\t\t}\n\t\t//Create JTable \n\t\ttableHistory = new JTable(tableur);\n\t\t//Change the renderer of third cells whith grey font \n\t\ttableHistory.getColumn(\"\").setCellRenderer(new ButtonRenderer());\n\t\t//Make a CheckBox in this cell\n\t\ttableHistory.getColumn(\"\").setCellEditor(new ButtonEditor(new JCheckBox()));\n\t\t//Block reordering\n\t\ttableHistory.getTableHeader().setReorderingAllowed(false);\n\t\ttableHistory.setPreferredScrollableViewportSize(new Dimension(600 , 400));\n\t\tadd(new JScrollPane(tableHistory) , BorderLayout.CENTER);\n\t}", "private void loadTBL(String q1) {\n try {\n\n ResultSet rs = DB.search(q1);\n\n DefaultTableModel dtm = (DefaultTableModel) jTable1.getModel();\n dtm.setRowCount(0);\n while (rs.next()) {\n\n Vector v = new Vector();\n v.add(rs.getString(\"id_before_p\"));\n v.add(rs.getString(\"date\"));\n\n ResultSet rs3 = DB.search(\"select name from supplier where id_sup='\" + rs.getString(\"supplier_id_sup\") + \"'\");\n if (rs3.next()) {\n v.add(rs3.getString(\"name\"));\n }\n String qty = rs.getString(\"qty\");\n String fat = rs.getString(\"fat\");\n String ts = rs.getString(\"ts\");\n String ph = rs.getString(\"ph\");\n String acidity = rs.getString(\"acidity\");\n\n if (qty.equals(\"0\")) {\n v.add(\"\");\n } else {\n v.add(qty);\n\n }\n if (fat.equals(\"0\")) {\n v.add(\"\");\n } else {\n v.add(fat);\n }\n if (ts.equals(\"0\")) {\n v.add(\"\");\n } else {\n v.add(ts);\n }\n if (ph.equals(\"0\")) {\n v.add(\"\");\n } else {\n v.add(ph);\n }\n if (acidity.equals(\"0\")) {\n v.add(\"\");\n } else {\n v.add(acidity);\n }\n\n String ts_2 = rs.getString(\"ts_2\");\n String ph_2 = rs.getString(\"ph_2\");\n String acidity_2 = rs.getString(\"acidity_2\");\n\n if (ts_2.equals(\"0\")) {\n v.add(\"\");\n\n } else {\n v.add(ts_2);\n\n }\n if (ph_2.equals(\"0\")) {\n v.add(\"\");\n\n } else {\n v.add(ph_2);\n\n }\n if (acidity_2.equals(\"0\")) {\n v.add(\"\");\n\n } else {\n\n v.add(acidity_2);\n\n }\n\n v.add(rs.getString(\"buyer_1\"));\n String qty_1_2 = rs.getString(\"qty_1\");\n String qty_2_2 = rs.getString(\"qty_2\");\n String sample = rs.getString(\"sample\");\n if (qty_1_2.equals(\"0\")) {\n v.add(\"\");\n } else {\n v.add(qty_1_2);\n\n }\n v.add(rs.getString(\"buyer_2\"));\n if (qty_2_2.equals(\"0\")) {\n\n v.add(\"\");\n } else {\n\n v.add(qty_2_2);\n }\n if (sample.equals(\"0\")) {\n\n v.add(\"\");\n } else {\n v.add(sample);\n\n }\n\n dtm.addRow(v);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private <T> T getComponent(Class<T> clazz) {\n List<T> list = Context.getRegisteredComponents(clazz);\n if (list == null || list.size() == 0)\n throw new RuntimeException(\"Cannot find component of \" + clazz);\n return list.get(0);\n }", "@SuppressWarnings(\"unchecked\")\n public <T extends Component> T getComponent() {\n try {\n return (T) component;\n } catch (ClassCastException ex) {\n getLogger().log(Level.SEVERE,\n \"Component code/design type mismatch\", ex);\n }\n return null;\n }", "public static SpObsComp findConflictingObsComp(SpItem parent,\n SpObsComp spObsComp) {\n // See if this obs comp must be unique a scope.\n // If not, nothing can conflict with it.\n if (!spObsComp.mustBeUnique()) {\n return null;\n }\n\n // Evaluate the scope to see whether a component of the given subtype\n // already exists at this scope.\n SpType type = spObsComp.type();\n SpObsComp oc = SpTreeMan.findObsCompSubtype(parent, type);\n\n // If the component is the same object (identical object ref) as the\n // one being inserted, then there is no conflict.\n if (oc == spObsComp) {\n return null;\n }\n\n // If there already is a component of this exact subtype, then there\n // is a conflict.\n if (oc != null) {\n return oc;\n }\n\n // Now we know there was no component with the same subtype as the\n // new one. Unless the new component is an instrument, and there\n // is already an instrument in this scope, then there is no conflict.\n\n if (spObsComp instanceof SpInstObsComp) {\n return SpTreeMan.findInstrumentInContext(parent);\n }\n\n return null;\n }", "TableRow componentATableRow(){\n\n TableRow componentATableRow = new TableRow(this.context);\n View view = this.headerObjects.get(0);\n componentATableRow.addView(view);\n\n return componentATableRow;\n }", "private void updateDatabase() {\n\n Database db = new Database();\n \n ArrayList<Order> orderArr = new ArrayList<>();\n orderArr = db.getPaidOrders(1);\n \n for (int i = 0; i < orderArr.size(); i++) {\n DefaultTableModel model = (DefaultTableModel) tblInvoices.getModel();\n \n boolean available = true;\n if (orderArr.get(i).getQuantity() == 0){\n available = false;\n }\n \n Object[] row = {orderArr.get(i).getOrderid(),\n orderArr.get(i).getBusinessname(), \n orderArr.get(i).getAmount(), \n orderArr.get(i).getDate()};\n model.addRow(row);\n } \n }", "public void updateTable() {\n\t\ttable.getSelectionModel().removeListSelectionListener(lsl);\n\t\tdtm = new DefaultTableModel();\n\t\td = new Diet();\n\t\tdtm.addColumn(\"Id\");\n\t\tdtm.addColumn(\"Meal Id\");\n\t\tdtm.addColumn(\"Meal Type\");\n\t\tdtm.addColumn(\"Food Name\");\n\t\tdtm.addColumn(\"Food Type\");\n\t\tdtm.addColumn(\"Food Category\");\n\t\tdtm.addColumn(\"Ready Time\");\n\t\tdtm.addColumn(\"Calories (g)\");\t\t\n\t\tdtm.addColumn(\"Protein (g)\");\n\t\tdtm.addColumn(\"Fat (g)\");\n\t\tdtm.addColumn(\"Carbohydrates\");\n\t\tdtm.addColumn(\"VitaminA\");\n\t\tdtm.addColumn(\"VitaminC\");\n\t\tdtm.addColumn(\"Calcium\");\n\t\tdtm.addColumn(\"Iron\");\n\t\tdtm.addColumn(\"Author\");\n\t\tArrayList<Diet> dietList = dI.getDietList();\n\t\tif(isOrder && orderby!=\"\")\n\t\t{\t\t\t\n\t\t\tSystem.out.println(\"entering ----------------\"+orderby);\n\t\t\tdietList=dI.getDietOrderedList(type,orderby);\n\t\t\tfor (Diet d : dietList) {\t\n\t\t\t\tSystem.out.println(d.getId()+\" ------ \"+d.getCalories());\n\t\t\t}\n\t\t}\n\t\tif(isFiltered)\n\t\t{\n\t\t\tif(mealtypeSel!=\"\")\n\t\t\tdietList=dI.getFilteredMealTypeList(mealtypeSel);\n\t\t\tif(foodtypeSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredFoodTypeList(foodtypeSel);\n\t\t\tif(authorSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredauthorList(authorSel);\n\t\t\tif(foodCategorySel!=\"\")\n\t\t\t\tdietList=dI.getFilterFoodCategoryList(foodCategorySel);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (Diet d : dietList) {\t\n\t\t\tdtm.addRow(d.getVector());\n\t\t}\n\t\ttable.setModel(dtm);\n\n\t\ttable.getSelectionModel().addListSelectionListener(lsl);\n\n\t}", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n compname = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n compid = new javax.swing.JTextField();\n submit = new javax.swing.JButton();\n update = new javax.swing.JButton();\n Delete = new javax.swing.JButton();\n back = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable_default = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setLocation(new java.awt.Point(400, 200));\n\n jLabel1.setText(\"Company name\");\n\n jLabel2.setText(\"Comapny id\");\n\n submit.setText(\"Submit\");\n submit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n submitActionPerformed(evt);\n }\n });\n\n update.setText(\"Update\");\n update.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n updateActionPerformed(evt);\n }\n });\n\n Delete.setText(\"Delete\");\n Delete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n DeleteActionPerformed(evt);\n }\n });\n\n back.setText(\"Back\");\n back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backActionPerformed(evt);\n }\n });\n\n jTable_default.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null},\n {null, null},\n {null, null},\n {null, null},\n {null, null},\n {null, null},\n {null, null},\n {null, null},\n {null, null},\n {null, null},\n {null, null}\n },\n new String [] {\n \"Company Name\", \"Company Id\"\n }\n ));\n jTable_default.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable_defaultMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable_default);\n\n jButton1.setText(\"Reset\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(216, 216, 216)\n .addComponent(back)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(56, 56, 56)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(compname, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)\n .addComponent(compid))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(89, 89, 89)\n .addComponent(update, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(submit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(Delete, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(25, 25, 25))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(49, 49, 49)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(compname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(submit)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(update)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(compid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(Delete)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(back)\n .addComponent(jButton1))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@Override\r\n\tpublic Table getEntity(TableDTO dto) {\n\t\treturn null;\r\n\t}", "public boolean fetchPrev(Transaction trans, DatasetCursor cursor,\n DBObject obj, Filter filter, boolean forUpdate)\n throws StorageException, LockConflict {\n Rowid rowid = cursor.getRowid();\n int index = rowid.getIndex();\n\n if (index == Short.MAX_VALUE)\n index = dir.getCount();\n\n while (true) {\n --index;\n\n if (index < 0 || index >= dir.getCount())\n return false;\n\n rowid.setIndex((short) index);\n\n if (_read(trans, obj, index, forUpdate, filter))\n return true;\n }\n }", "private DataTypeComponent replaceComponent(DataTypeComponent origDtc, DataType resolvedDataType,\n\t\t\tint length, String name, String comment, boolean doNotify) {\n\n// FIXME: Unsure how o support replace operation with bit-fields. Within unaligned structure \n// the packing behavior for bit-fields prevents a one-for-one replacement and things may shift\n// around which the unaligned structure tries to avoid. Insert and delete are less of a concern\n// since movement already can occur, although insert at offset may not retain the offset if it \n// interacts with bit-fields.\n\n\t\ttry {\n\t\t\tint ordinal = origDtc.getOrdinal();\n\t\t\tint newOffset = origDtc.getOffset();\n\t\t\tint dtcLength = origDtc.getLength();\n\t\t\tint bytesNeeded = length - dtcLength;\n\t\t\tint deltaOrdinal = -bytesNeeded;\n\t\t\tint origStructLength = structLength;\n\t\t\tif (!isInternallyAligned() && bytesNeeded > 0) {\n\t\t\t\tint bytesAvailable = getNumUndefinedBytes(ordinal + 1);\n\t\t\t\tif (bytesAvailable < bytesNeeded) {\n\t\t\t\t\tif (ordinal == getLastDefinedComponentIndex()) {\n\t\t\t\t\t\tgrowStructure(bytesNeeded - bytesAvailable);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Not enough undefined bytes to fit \" +\n\t\t\t\t\t\t\tresolvedDataType.getPathName() + \" in structure \" + getPathName() +\n\t\t\t\t\t\t\t\" at offset 0x\" + Integer.toHexString(newOffset) + \".\" + \" It needs \" +\n\t\t\t\t\t\t\t(bytesNeeded - bytesAvailable) + \" more byte(s) to be able to fit.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tRecord rec = componentAdapter.createRecord(dataMgr.getResolvedID(resolvedDataType), key,\n\t\t\t\tlength, ordinal, newOffset, name, comment);\n\t\t\tresolvedDataType.addParent(this);\n\t\t\tDataTypeComponentDB newDtc =\n\t\t\t\tnew DataTypeComponentDB(dataMgr, componentAdapter, this, rec);\n\t\t\tint index;\n\t\t\tif (isInternallyAligned()) {\n\t\t\t\tindex = ordinal;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tindex = Collections.binarySearch(components, Integer.valueOf(ordinal),\n\t\t\t\t\tordinalComparator);\n\t\t\t}\n\t\t\tif (index < 0) {\n\t\t\t\tindex = -index - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tDataTypeComponentDB dataTypeComponentDB = components.get(index); // TODO Remove this.\n\t\t\t\tdataTypeComponentDB.getDataType().removeParent(this);\n\t\t\t\tDataTypeComponentDB dtc = components.remove(index);\n\t\t\t\tcomponentAdapter.removeRecord(dtc.getKey());\n\t\t\t}\n\t\t\tcomponents.add(index, newDtc);\n\t\t\tif (deltaOrdinal != 0) {\n\t\t\t\tshiftOffsets(index + 1, deltaOrdinal, 0);\n\t\t\t}\n\t\t\tif (structLength != origStructLength) {\n\t\t\t\trecord.setIntValue(CompositeDBAdapter.COMPOSITE_LENGTH_COL, structLength);\n\t\t\t\tcompositeAdapter.updateRecord(record, true);\n\t\t\t\tadjustInternalAlignment(false);\n\t\t\t\tnotifySizeChanged();\n\t\t\t}\n\t\t\telse if (doNotify) {\n\t\t\t\tdataMgr.dataTypeChanged(this);\n\t\t\t}\n\t\t\treturn newDtc;\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tdataMgr.dbError(e);\n\t\t}\n\t\treturn null;\n\t}", "private void loadTableName()\n{\n try\n {\n ArrayList<String> tableList=DatabaseDAO.getAllTableName();\n if(tableList.isEmpty()==true)\n JOptionPane.showMessageDialog(null, \"Sorry.! No Table is created yet\",\"No Record\",JOptionPane.INFORMATION_MESSAGE);\n else\n {\n jcTableName.removeAllItems(); \n for(String tList:tableList)\n jcTableName.addItem(tList); \n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"SQLException \"+ex,\"Error \",JOptionPane.ERROR_MESSAGE); \n }\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n tblEnterprise = new javax.swing.JTable();\n backJButton = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(51, 51, 255)));\n\n tblEnterprise.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Location\", \"Type\", \"Enterprise Name\", \"Admin\", \"Address\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, true, true\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(tblEnterprise);\n\n backJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/back-arrow-icon.png\"))); // NOI18N\n backJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButtonActionPerformed(evt);\n }\n });\n\n btnDelete.setText(\"Delete Details\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Calligraphy\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 255));\n jLabel1.setText(\"View Enterprises\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnDelete)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(backJButton)\n .addGap(157, 157, 157)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(67, 67, 67)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 715, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(66, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(backJButton)\n .addComponent(jLabel1))\n .addGap(27, 27, 27)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(53, 53, 53)\n .addComponent(btnDelete)\n .addContainerGap(164, Short.MAX_VALUE))\n );\n }", "private void updateComponents() {\n try {\n java.sql.Date cDate = new java.sql.Date(System.currentTimeMillis());\n java.sql.Date sDate = Date.valueOf(\"1971-01-01\");\n DefaultTableModel tData = or.getOrderData(sDate,cDate);\n oTable.setModel(tData);\n setSales(tData);\n } catch (Exception ex) {\n System.out.println(ex);\n }\n }", "public void writeTable(){\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n\n\n final Integer[] i = {0};\n\n tabela.getColumns().forEach((Consumer<TableColumn<Map, String>>) col -> {\n col.setCellValueFactory(new MapValueFactory<>(\"column\" + (i[0]).toString()));\n\n\n if(alegereBD!=\"0\")\n switch(alegereTabela){\n case \"Artists\":\n\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Country\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n textField1.disableProperty().setValue(false);\n textField2.disableProperty().setValue(false);\n\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n\n\n\n break;\n case \"Albums\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"Genre\");\n if(i[0]==3)\n col.setText(\"Artist\");\n if(i[0]==4)\n col.setText(\"Realease\");\n\n textField3.disableProperty().setValue(false);\n textField4.disableProperty().setValue(false);\n textField5.disableProperty().setValue(false);\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n\n\n break;\n case \"Genres\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Name\");\n if(i[0]==2)\n col.setText(\"\");\n if(i[0]==3)\n col.setText(\"\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n case \"Charts\":\n if(i[0]==0)\n col.setText(\"id\");\n if(i[0]==1)\n col.setText(\"Album\");\n if(i[0]==2)\n col.setText(\"Artist\");\n if(i[0]==3)\n col.setText(\"Position\");\n if(i[0]==4)\n col.setText(\"\");\n\n textField1.disableProperty().setValue(true);\n textField2.disableProperty().setValue(true);\n textField3.disableProperty().setValue(true);\n textField4.disableProperty().setValue(true);\n textField5.disableProperty().setValue(true);\n\n break;\n }\n\n\n System.out.println(i[0]);\n i[0]++;\n });\n\n\n\n tabela.setItems(generateDataInMap());\n }", "public void doAdd() {\r\n\t\tif (_mode == MODE_LIST_ON_PAGE && _listForm != null) {\r\n\t\t\tDataStoreBuffer listDs = _listForm.getDataStore();\r\n\t\t\tDataStoreBuffer ds = getDataStore();\r\n\t\t\tif (listDs == ds && ds != null) {\r\n\t\t\t\t//same datastore on list and detail\r\n\t\t\t\tif (ds.getRowCount() > 0 && (ds.getRowStatus() == DataStoreBuffer.STATUS_NEW))\r\n\t\t\t\t\treturn;\r\n\r\n if (ds.getRowStatus() == DataStoreBuffer.STATUS_NEW_MODIFIED) ds.deleteRow();\r\n if (isDataModified()) undoChanges();\r\n\r\n\t\t\t\tds.insertRow();\r\n\t\t\t\tif (_listForm.getDataTable() != null) {\r\n\t\t\t\t\tJspDataTable tab = _listForm.getDataTable();\r\n\t\t\t\t\tif (!tab.isRowOnPage(ds.getRowCount() - 1))\r\n\t\t\t\t\t\ttab.setPage(tab.getPage(ds.getRowCount() - 1));\r\n\t\t\t\t}\r\n\t\t\t\tHtmlFormComponent comp = findFirstFormComponent(this);\r\n\t\t\t\tif (comp != null)\r\n\t\t\t\t\tcomp.setFocus();\r\n\t\t\t\tscrollToMe();\r\n\r\n\t\t\t} else if (_ds != null) {\r\n\t\t\t\t//different datastores on list and detail\r\n\t\t\t\tif (listDs != null)\r\n\t\t\t\t\tlistDs.clearSelectedRow();\r\n\t\t\t\t_listSelectedRow = null;\r\n\t\t\t\t_ds.reset();\r\n\t\t\t\t_ds.insertRow();\r\n\t\t\t\tHtmlFormComponent comp = findFirstFormComponent(this);\r\n\t\t\t\tif (comp != null)\r\n\t\t\t\t\tcomp.setFocus();\r\n\t\t\t\tscrollToMe();\r\n\t\t\t}\r\n\t\t\tsetVisible(true);\r\n\t\t} else {\r\n\t\t\t_listSelectedRow = null;\r\n\t\t\t_ds.reset();\r\n\t\t\t_ds.insertRow();\r\n\t\t\tHtmlFormComponent comp = findFirstFormComponent(this);\r\n\t\t\tif (comp != null)\r\n\t\t\t\tcomp.setFocus();\r\n\t\t\tscrollToMe();\r\n\t\t}\r\n\t}", "public PxProductInfo getDbCombo() {\n long __key = this.dbComboId;\n if (dbCombo__resolvedKey == null || !dbCombo__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n PxProductInfoDao targetDao = daoSession.getPxProductInfoDao();\n PxProductInfo dbComboNew = targetDao.load(__key);\n synchronized (this) {\n dbCombo = dbComboNew;\n \tdbCombo__resolvedKey = __key;\n }\n }\n return dbCombo;\n }", "private void reloadShoppingCarTable() {\n\t\t\r\n\t}", "public boolean createIndex(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tQuad comp;\n\t\tint part;\n\t\tint type1_s, type1_o;\n\t\tint type_s,type_o;\n\t\tint wei, wei1; // compared use\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\t//String insert = \"insert into `sindex` values \";\n//\t\tString update = \"update \"\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse res = key;\n\t\t// hashcode sealing\t\n\t\t//\tkey = String.valueOf(key.hashCode()); \n\t\t\t\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\tcomp = list.get(i);\n\t\t\t\tpart = i;\n\t\t\t\ttype_s = comp.type_s;\n\t\t\t\ttype_o = comp.type_o;\n\t\t\t\twei = comp.weight;\n\t\t\t\to_bytes = comp.o_bytes;\n\t\t\t\ts_bytes = comp.s_bytes;\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\twei1 = rs.getInt(\"weight\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t// unpdate records\t\n\t\t\t\t\t\twei += wei1;\n\t\t\t\t\t\t/*if(wei < wei1){\n\t\t\t\t\t\t\twei = wei1;\n\t\t\t\t\t\t\tflag2 = 1;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t//\tif(flag2 == 1)\n\t\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\t\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t// directly insert the record\n\t\t\t\t\t\n\t\t\t\t/**\t\t(option 1 as below)\t\n\t\t\t\t *\t\tvalue = \"('\"+key+\"',\"+part+\",'\"+type+\"',\"+wei+\")\";\n\t\t\t\t *\t\tupdateSql(insert+value);\n\t\t\t\t */\n\t\t\t\t//\t\toption 2 to realize\t\t\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(key);\n\t\t\t\t}finally{\n\t\t\t\t// ??should wait until all database operation finished!\t\t\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private void refreshTable(){\n DefaultTableModel dm = (DefaultTableModel)table.getModel();\r\n dm.getDataVector().removeAllElements();\r\n System.out.println(\"Refresh Table\");\r\n\r\n //calling method addRows\r\n addRows();\r\n }", "public Entity getComponent() {\n return component;\n }", "public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }", "byte[] getRow() {\r\n return delete.getRow();\r\n }", "protected boolean checkExistence(E entity) throws DAOException {\n\t\tString existanceSQL = getEntityExistanceSQL(entity);\n\n\t\ttry (Connection connection = source.getConnection();\n\t\t\t\tStatement st = connection.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(existanceSQL)) {\n\n\t\t\treturn rs.next();\n\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\t}", "private JPanel getJPanel_table() {\n\t\tif (jPanel_table == null) {\n\t\t\tjPanel_table = new JPanel();\n\t\t\tjPanel_table.setLayout(c);\n\t\t\tjPanel_table.add(getJPanel_table_spect(), getJPanel_table_spect().getName());\n\t\t\tjPanel_table.add(getJPanel_table_member(), getJPanel_table_member().getName());\n\t\t\tjPanel_table.add(getJPanel_table_room(), getJPanel_table_room().getName());\n\t\t}\n\t\treturn jPanel_table;\n\t}", "public abstract @NotNull LibraryTable getLibraryTable();", "private void init(){\n conn = ConnectionDb.instance();\n listData=new HashMap<>();\n choose_ship.setModel(new javax.swing.DefaultComboBoxModel(loadCombo()));\n tbm = (DefaultTableModel) grid_data.getModel();\n tbm.setRowCount(0);\n tbm1 = (DefaultTableModel) grid_error.getModel();\n tbm1.setRowCount(0);\n formatdata=new DataFormatter();\n boxes=0;\n pieces=0;\n delete=new JMenuItem(\"Remove box\");\n delete.addActionListener((evt)->{\n String lpn=grid_data.getValueAt(grid_data.getSelectedRow(), 0).toString().trim();\n String requete=\"delete from box_shipped where idlpn=(select id from box_contain where lpn=?)\";\n String requete1=\"update BOX_CONTAIN set shipment_id=NULL,STATUS=4 where lpn=?\";\n \n if(conn.Update(requete, 0, lpn)&& conn.Update(requete1, 0, lpn)){\n JOptionPane.showMessageDialog(this, lpn+\" has removed from shipment\", \"Succes\", JOptionPane.INFORMATION_MESSAGE);\n tbm.removeRow(grid_data.getSelectedRow());\n }\n });\n Popup.add(delete);\n \n }", "public Component addComponent(Component c) {\n\t\tsessionFactory.getCurrentSession().save(c);\n\t\treturn c;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panel = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tablaA = new javax.swing.JTable();\n bAñadir = new javax.swing.JButton();\n tID = new javax.swing.JTextField();\n tNombre = new javax.swing.JTextField();\n tNota = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n cbConsulta = new javax.swing.JComboBox<>();\n tConsulta = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n bConsulta = new javax.swing.JButton();\n bMostrar = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n bModificar = new javax.swing.JButton();\n tNombreM = new javax.swing.JTextField();\n tNotaM = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n bBorrar = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n tablaC = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n tablaA.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Nombre\", \"Nota\", \"Curso\"\n }\n ));\n jScrollPane1.setViewportView(tablaA);\n\n bAñadir.setText(\"Añadir\");\n bAñadir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bAñadirActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"ID\");\n\n jLabel2.setText(\"Nombre\");\n\n jLabel3.setText(\"Nota\");\n\n cbConsulta.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"ID\", \"Nombre\", \"Nota\", \"Curso\" }));\n\n jLabel4.setText(\"Inserción de filas\");\n\n jLabel5.setText(\"Consulta de filas\");\n\n bConsulta.setText(\"Consultar\");\n bConsulta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bConsultaActionPerformed(evt);\n }\n });\n\n bMostrar.setText(\"Mostrar\");\n bMostrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bMostrarActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Modificación de filas\");\n\n bModificar.setText(\"Modificar\");\n bModificar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bModificarActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Nombre\");\n\n jLabel8.setText(\"Nota\");\n\n bBorrar.setText(\"Borrar\");\n bBorrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bBorrarActionPerformed(evt);\n }\n });\n\n tablaC.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Nombre\"\n }\n ));\n jScrollPane2.setViewportView(tablaC);\n\n javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);\n panel.setLayout(panelLayout);\n panelLayout.setHorizontalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(bModificar)\n .addGap(212, 212, 212)\n .addComponent(bConsulta)\n .addGap(88, 88, 88))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(panelLayout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(45, 45, 45)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(bMostrar)\n .addComponent(bBorrar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE))\n .addGroup(panelLayout.createSequentialGroup()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tNombreM, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tNotaM, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(50, 50, 50))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(121, 121, 121)))))\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(58, 58, 58))\n .addComponent(tNota, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(tID, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(panelLayout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)\n .addComponent(tNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel3))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(41, 41, 41))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(cbConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(tConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(21, 21, 21))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addComponent(bAñadir)\n .addGap(69, 69, 69))))\n );\n panelLayout.setVerticalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(18, 18, Short.MAX_VALUE)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(19, 19, 19)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tID, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tNota, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)))\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(bMostrar, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(32, 32, 32)\n .addComponent(bBorrar, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addComponent(bAñadir, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(80, 80, 80)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addGap(28, 28, 28)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tNotaM, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tNombreM, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8)\n .addComponent(jLabel7))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(bConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bModificar, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(panelLayout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(44, 44, 44))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n instance = this;\r\n components = new LinkedList<>();\r\n deletedComponents = new LinkedList<>();\r\n\r\n if (ProjectViewController.getOpenedProject() != null && ProjectViewController.getOpenedProject().getId() != null) {\r\n components = new ComponentController().findComponentsByProjectIdAndComponentType(ProjectViewController.getOpenedProject().getId(), \"Kubikmeter\");\r\n }\r\n\r\n tv_Materials.setEditable(true);\r\n\r\n tf_Amount.textProperty().addListener((ObservableValue<? extends String> observable, String oldValue, String newValue) -> {\r\n tf_Amount.setText(tf_Amount.getText().replace(\".\", \",\").replaceAll(\"[^\\\\d,]\", \"\"));\r\n tf_Amount.setText(UtilityFormat.removeUnnecessaryCommas(tf_Amount.getText()));\r\n });\r\n\r\n tc_Category.setCellValueFactory(new PropertyValueFactory<>(\"category\"));\r\n\r\n tc_ProductName.setCellValueFactory(new PropertyValueFactory<>(\"product\"));\r\n\r\n tc_Length.setCellValueFactory((TableColumn.CellDataFeatures<Component, String> param) -> {\r\n if (param.getValue().getLengthComponent() != null) {\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.getStringForTableColumn(param.getValue().getLengthComponent()));\r\n } else {\r\n return new ReadOnlyObjectWrapper<>(\"\");\r\n }\r\n });\r\n tc_Length.setCellFactory((TableColumn<Component, String> param) -> new ComponentValueCell());\r\n tc_Length.setOnEditCommit((TableColumn.CellEditEvent<Component, String> event) -> {\r\n Component component = event.getTableView().getItems().get(event.getTablePosition().getRow());\r\n if (!event.getNewValue().equals(\"\")) {\r\n component.setLengthComponent(Double.parseDouble(event.getNewValue().replace(',', '.')));\r\n } else {\r\n component.setLengthComponent(null);\r\n }\r\n refreshTable();\r\n });\r\n\r\n tc_Amount.setCellValueFactory((TableColumn.CellDataFeatures<Component, String> param) -> {\r\n if (param.getValue().getNumberOfProducts() != null) {\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.getStringForTableColumn(param.getValue().getNumberOfProducts()));\r\n } else {\r\n return new ReadOnlyObjectWrapper<>(\"\");\r\n }\r\n });\r\n tc_Amount.setCellFactory((TableColumn<Component, String> param) -> new ComponentValueCell());\r\n tc_Amount.setOnEditCommit((TableColumn.CellEditEvent<Component, String> event) -> {\r\n Component component = (event.getTableView().getItems().get(event.getTablePosition().getRow()));\r\n if (!event.getNewValue().equals(\"\")) {\r\n component.setNumberOfProducts(Double.parseDouble(event.getNewValue().replace(',', '.')));\r\n } else {\r\n component.setNumberOfProducts(null);\r\n }\r\n refreshTable();\r\n });\r\n\r\n tc_Volume.setCellValueFactory((CellDataFeatures<Component, String> param) -> {\r\n Component component = param.getValue();\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.worthWithThreeDecimalPlaces(component.getWidthComponent() / 100 * component.getLengthComponent() * component.getHeightComponent() / 100 * component.getNumberOfProducts()));\r\n });\r\n\r\n tc_PricePerCubic.setCellValueFactory((CellDataFeatures<Component, String> param) -> {\r\n Component component = param.getValue();\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.getStringForTableColumn(component.getPriceComponent() / ((component.getWidthComponent() / 100.0) * component.getLengthComponent() * (component.getHeightComponent() / 100.0) * component.getNumberOfProducts())));\r\n });\r\n tc_PricePerCubic.setCellFactory((TableColumn<Component, String> param) -> new ComponentValueCell());\r\n tc_PricePerCubic.setOnEditCommit((TableColumn.CellEditEvent<Component, String> event) -> {\r\n Component component = (event.getTableView().getItems().get(event.getTablePosition().getRow()));\r\n component.setPriceComponent(((component.getWidthComponent() / 100.0) * component.getLengthComponent() * (component.getHeightComponent() / 100.0) * component.getNumberOfProducts()) * (Double.parseDouble(event.getNewValue().replace(',', '.'))));\r\n refreshTable();\r\n });\r\n\r\n tc_Price.setCellValueFactory((TableColumn.CellDataFeatures<Component, String> param) -> {\r\n if (param.getValue().getPriceComponent() != null) {\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.getStringForTableColumn(param.getValue().getPriceComponent()));\r\n } else {\r\n return new ReadOnlyObjectWrapper<>(\"\");\r\n }\r\n });\r\n tc_Price.setCellFactory((TableColumn<Component, String> param) -> new ComponentValueCell());\r\n tc_Price.setOnEditCommit((TableColumn.CellEditEvent<Component, String> event) -> {\r\n Component component = (event.getTableView().getItems().get(event.getTablePosition().getRow()));\r\n if (!event.getNewValue().equals(\"\")) {\r\n component.setPriceComponent(Double.parseDouble(event.getNewValue().replace(',', '.')));\r\n } else {\r\n component.setPriceComponent(null);\r\n }\r\n refreshTable();\r\n });\r\n\r\n tc_CuttingHours.setCellValueFactory((TableColumn.CellDataFeatures<Component, String> param) -> {\r\n if (param.getValue().getTailoringHours() != null) {\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.getStringForTableColumn(param.getValue().getTailoringHours()));\r\n } else {\r\n return new ReadOnlyObjectWrapper<>(\"\");\r\n }\r\n });\r\n tc_CuttingHours.setCellFactory((TableColumn<Component, String> param) -> new ComponentValueCell());\r\n tc_CuttingHours.setOnEditCommit((TableColumn.CellEditEvent<Component, String> event) -> {\r\n Component component = (event.getTableView().getItems().get(event.getTablePosition().getRow()));\r\n if (!event.getNewValue().equals(\"\")) {\r\n component.setTailoringHours(Double.parseDouble(event.getNewValue().replace(',', '.')));\r\n } else {\r\n component.setTailoringHours(null);\r\n }\r\n refreshTable();\r\n });\r\n\r\n tc_CuttingPricePerHours.setCellValueFactory((TableColumn.CellDataFeatures<Component, String> param) -> {\r\n if (param.getValue().getTailoringPricePerHour() != null) {\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.getStringForTableColumn(param.getValue().getTailoringPricePerHour()));\r\n } else {\r\n return new ReadOnlyObjectWrapper<>(\"\");\r\n }\r\n });\r\n tc_CuttingPricePerHours.setCellFactory((TableColumn<Component, String> param) -> new ComponentValueCell());\r\n tc_CuttingPricePerHours.setOnEditCommit((TableColumn.CellEditEvent<Component, String> event) -> {\r\n Component component = (event.getTableView().getItems().get(event.getTablePosition().getRow()));\r\n if (!event.getNewValue().equals(\"\")) {\r\n component.setTailoringPricePerHour(Double.parseDouble(event.getNewValue().replace(',', '.')));\r\n } else {\r\n component.setTailoringPricePerHour(null);\r\n }\r\n refreshTable();\r\n });\r\n\r\n tc_CuttingPrice.setCellValueFactory((CellDataFeatures<Component, String> param) -> {\r\n Component component = param.getValue();\r\n return new ReadOnlyObjectWrapper<>(UtilityFormat.getStringForTableColumn(component.getTailoringHours() * component.getTailoringPricePerHour()));\r\n });\r\n\r\n /**\r\n * Delete Button\r\n */\r\n tc_Deletion.setCellFactory(new Callback<TableColumn<Component, String>, TableCell<Component, String>>() {\r\n @Override\r\n public TableCell<Component, String> call(TableColumn<Component, String> param) {\r\n TableCell<Component, String> cell = new TableCell<Component, String>() {\r\n\r\n Label deletionLabel = new Label();\r\n\r\n @Override\r\n protected void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(null);\r\n\r\n if (empty) {\r\n setGraphic(null);\r\n } else {\r\n deletionLabel.setId(\"delete\");\r\n deletionLabel.setTooltip(new Tooltip(\"Material löschen\"));\r\n\r\n deletionLabel.setOnMouseClicked(event -> {\r\n\r\n Alert alert = null;\r\n\r\n if (Project_ConstructionMaterialController.getInstance().getAssemblyCount() > 0) {\r\n if(getBelongings(tv_Materials.getSelectionModel().getSelectedItem()).length() != 0) {\r\n alert = new Alert(Alert.AlertType.CONFIRMATION, \"Wenn Sie dieses Material löschen, werden auch alle dazugehörigen Produkte gelöscht:\\n\"\r\n + getBelongings(tv_Materials.getSelectionModel().getSelectedItem()) + \"\\nMöchten Sie troztdem fortfahren?\",\r\n ButtonType.YES, ButtonType.CANCEL);\r\n alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label) node).setMinHeight(Region.USE_PREF_SIZE));\r\n alert.showAndWait();\r\n }\r\n if (getBelongings(tv_Materials.getSelectionModel().getSelectedItem()).length() == 0 || alert.getResult() == ButtonType.YES) {\r\n Project_ConstructionMaterialController.getInstance().deleteRelativeAssemblies(tv_Materials.getSelectionModel().getSelectedItem());\r\n\r\n try {\r\n deletedComponents.add(tv_Materials.getSelectionModel().getSelectedItem());\r\n components.remove(tv_Materials.getSelectionModel().getSelectedItem());\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n } catch (Exception ex) {\r\n Logging.getLogger().log(Level.SEVERE, \"Couldn't delete material.\", ex);\r\n } finally {\r\n refreshTable();\r\n }\r\n }\r\n } else {\r\n alert = new Alert(Alert.AlertType.CONFIRMATION, \"Sind Sie sicher, dass sie dieses Material entgültig löschen möchten?\",\r\n ButtonType.YES, ButtonType.CANCEL);\r\n alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label) node).setMinHeight(Region.USE_PREF_SIZE));\r\n alert.showAndWait();\r\n\r\n if (alert.getResult() == ButtonType.YES) {\r\n try {\r\n components.remove(tv_Materials.getSelectionModel().getSelectedItem());\r\n if (tv_Materials.getSelectionModel().getSelectedItem().getId() != null) {\r\n new ComponentController().destroy(tv_Materials.getSelectionModel().getSelectedItem().getId());\r\n }\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n } catch (Exception ex) {\r\n Logging.getLogger().log(Level.SEVERE, \"Couldn't delete material.\", ex);\r\n } finally {\r\n refreshTable();\r\n }\r\n }\r\n }\r\n });\r\n setGraphic(deletionLabel);\r\n }\r\n }\r\n };\r\n return cell;\r\n }\r\n });\r\n\r\n List<Category> categoryList = new LinkedList<>();\r\n categoryList.add(new CategoryController().findCategoryByShortTerm(\"K\"));\r\n categoryList.add(new CategoryController().findCategoryByShortTerm(\"KD\"));\r\n\r\n cb_Category.setItems(FXCollections.observableArrayList(categoryList));\r\n cb_Product.setItems(FXCollections.observableArrayList(new ProductController().findByProductTypeOrderByName(ProductType.WOOD)));\r\n cb_Category.getSelectionModel().select(0);\r\n cb_Product.getSelectionModel().select(0);\r\n\r\n refreshTable();\r\n\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.FALSE);\r\n }", "public com.walgreens.rxit.ch.cda.StrucDocTbody addNewTbody()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTbody target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTbody)get_store().add_element_user(TBODY$10);\n return target;\n }\n }", "private void persistTable() {\n\n final EditText edit = findViewById(editId);\n final EditText edit2 = findViewById(editId2);\n String fileName = tableId;\n try {\n FileOutputStream fos = getBaseContext().openFileOutput(fileName, Context.MODE_PRIVATE);\n ObjectOutputStream os = new ObjectOutputStream(fos);\n os.writeObject(table);\n os.close();\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n edit.setText(table.getSerializedProducts());\n if (lastProductAdded != null)\n edit2.setText(lastProductAdded.getName());\n else\n edit2.setText(\"\");\n\n productNames = table.getProductNames();\n currentlySelectedProduct=0;\n\n refreshPrice();\n\n if (table.map.size() == 0) {\n deleteFile(tableId);\n return;\n }\n }" ]
[ "0.55192035", "0.49899346", "0.49350736", "0.48952013", "0.4809543", "0.47986344", "0.47958097", "0.47634318", "0.47535545", "0.47355565", "0.46772432", "0.4602474", "0.45940265", "0.4591675", "0.45724565", "0.45403314", "0.45352602", "0.45335028", "0.4519413", "0.45144978", "0.44965765", "0.449148", "0.4485398", "0.446571", "0.44630858", "0.4459637", "0.44583303", "0.44544402", "0.44373927", "0.4426479", "0.44262752", "0.4422595", "0.44217813", "0.44158554", "0.44132853", "0.4413276", "0.44039762", "0.4388542", "0.43720084", "0.43706733", "0.43497327", "0.4348189", "0.43466777", "0.43431666", "0.43410003", "0.433906", "0.4338638", "0.43365866", "0.43339774", "0.43335518", "0.4333049", "0.43211427", "0.43209133", "0.43054092", "0.43050843", "0.4304964", "0.43002206", "0.42832318", "0.42814344", "0.42729875", "0.42594436", "0.42580038", "0.42577595", "0.42575958", "0.4251092", "0.42506498", "0.42475587", "0.42469946", "0.4242346", "0.423218", "0.42268053", "0.42219517", "0.42207974", "0.42161426", "0.42112374", "0.42100865", "0.42080033", "0.42074636", "0.42060164", "0.42054465", "0.42049587", "0.42039075", "0.42037192", "0.4197085", "0.41913423", "0.41910273", "0.41906145", "0.41791975", "0.4172644", "0.4172374", "0.41722742", "0.4168974", "0.41649514", "0.41633838", "0.4160868", "0.4158108", "0.41573018", "0.4151103", "0.41508228", "0.41504878", "0.41501936" ]
0.0
-1
Get the component id with the given name and parent id. If a row is already present with del_ind = 1, it will be updated as 0.
public static int getComponentByNameAndParent(final String name, final int parentId, final int componentTypeId, String platform) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria healthCheckCriteria = session.createCriteria(ComponentEntity.class, "c"); healthCheckCriteria.createCriteria("c.componentType","ct"); if(parentId != 0){ healthCheckCriteria.createCriteria("c.parentComponent", "prnt"); healthCheckCriteria.add(Restrictions.eq("prnt.componentId", parentId)); healthCheckCriteria.add(Restrictions.eq("c.platform", platform)); } else { healthCheckCriteria.add(Restrictions.isNull("c.parentComponent")); } healthCheckCriteria.add(Restrictions.eq("c.componentName", name)); healthCheckCriteria.add(Restrictions.eq("ct.componentTypeId", componentTypeId)); healthCheckCriteria.setMaxResults(1); ComponentEntity comp = (ComponentEntity) healthCheckCriteria.uniqueResult(); txn.commit(); if(comp == null){ return 0; } if(comp.getDelInd() == 1){ DBQueryUtil.setDelIndOfComponent(comp.getComponentId(), 0); } return comp.getComponentId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getComponentId(final String compName, final String parentCompName) {\n\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.createCriteria(\"parentComponent\", \"pc\");\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"pc.componentName\",parentCompName));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "private static int getComponentIdFromCompName(String compName){\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "java.lang.String getParentId(int index);", "private int parentIdx(int idx) {\r\n // TODO\r\n return -1;\r\n }", "public java.lang.Integer getParentId();", "public IntColumn getParentId() {\n return delegate.getColumn(\"parent_id\", DelegatingIntColumn::new);\n }", "public String getIdForRow(int row);", "public long checkComponent(String name) {\n\t\tif(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().size()>0){\n\t\t\treturn ((Component)(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().get(0))).getId();\n\t\t}\n\t\treturn -1;\n\t}", "String getChildId();", "public String getUniqueId(int row);", "@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }", "com.google.protobuf.ByteString\n getParentIdBytes(int index);", "private static int getJarId(String jarName, AclId[] ownerRet)\n\tthrows SQLException\n\t{\n\t\tPreparedStatement stmt = SQLUtils\n\t\t\t.getDefaultConnection()\n\t\t\t.prepareStatement(\n\t\t\t\t\"SELECT jarId, jarOwner FROM sqlj.jar_repository WHERE jarName = ?\");\n\t\ttry\n\t\t{\n\t\t\treturn getJarId(stmt, jarName, ownerRet);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSQLUtils.close(stmt);\n\t\t}\n\t}", "public int getComponentId(int v) {\n return ids[v];\n }", "public int getRow( String name )\n {\n Property p = null;\n if ( componentModel != null )\n {\n p = componentModel.findProperty( name );\n }\n\n if ( p != null )\n {\n return ( getRow( p ) );\n }\n\n return -1;\n }", "public String getComponentId();", "public int getParent_id() {\n return this.parent_id;\n }", "@DISPID(84)\r\n\t// = 0x54. The runtime will prefer the VTID if present\r\n\t@VTID(82)\r\n\tint parentID();", "private int findParent(int[] parent, int i) {\n if (parent[i] == i)\n return i;\n return findParent(parent, parent[i]);\n }", "public final Integer indexInParent() {\n Container p = getParent();\n return p==null ? null : p.indexOf(this);\n }", "public int getId(String name){\r\n\t\tfor(int i=0; i<graphSize; i++){\r\n\t\t\tif(myGraph[i].name.compareToIgnoreCase(name) == 0){\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public int findParent(int[] parent, int u) {\n\t\tif (parent[u] == -1) { // matlab u khud ka parent hai/godfather/leader/founder\n\t\t\treturn u;\n\t\t}\n\t\treturn findParent(parent, parent[u]);\n\t}", "public Record getComponentIdAndBaseId(Record record);", "private int parent(int index) {\n // Formula to calculate the index of the parent node\n return Math.floorDiv(index - 1, d);\n }", "private static void setDelIndOfComponent(final int componentId, final int delInd) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_COMPONENT_DELIND);\n\t\tquery.setLong(\"delInd\", delInd);\n\t\tquery.setLong(\"componentId\", componentId);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();", "public abstract Integer getCompteId();", "public int getId(String name)\n {\n List<Category> list = c.list();\n for(int i = 0; i < list.size(); ++i)\n {\n if(list.get(i).getName().equals(name))\n {\n return list.get(i).getId();\n }\n }\n return 0;\n }", "public static int loadPodsAndContainers(final int envId,final String compName,final String parentCompName, final int numPods, int numCont ) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\t\n\t\tfinal int compId = getComponentId(compName, parentCompName);\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; Parent Component Name = \" + parentCompName + \"; is not available in the DB\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tK8sPodsContainersEntity podStat = new K8sPodsContainersEntity();\n\t\tEnvironmentEntity environment = new EnvironmentEntity();\n\t\tenvironment.setEnvironmentId(envId);\n\t\tpodStat.setEnvironment(environment);\n\t\tpodStat.setStatusDate(todayDate);\n\t\tComponentEntity component = new ComponentEntity();\n\t\tcomponent.setComponentId(compId);\n\t\tpodStat.setComponent(component);\n\t\tpodStat.setTotalPods(numPods);\n\t\tpodStat.setTotalContainers(numCont);\n\t\tsession.save(podStat);\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "public int getParent();", "public Integer getParentid() {\n\t\treturn parentid;\n\t}", "io.dstore.values.IntegerValue getTreeNodeId();", "public UUID getComponentId();", "public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }", "@Override\n public int getVisaIdByName(String name) throws SQLException, ClassNotFoundException {\n return dao.getId(name);\n }", "private int parent ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "int getAccessibleIndexInParent() {\n MenuContainer localParent = parent;\n if (!(localParent instanceof MenuComponent)) {\n // MenuComponents only have accessible index when inside MenuComponents\n return -1;\n }\n MenuComponent localParentMenu = (MenuComponent)localParent;\n return localParentMenu.getAccessibleChildIndex(this);\n }", "public int indexOf() { return _parent!=null? _parent.indexOfChild(this) : -1; }", "public long getParentId()\n {\n return parentId;\n }", "public static int findParent(int child, int[]parent){\n if(parent[child] == child){\n return child;\n }\n return findParent(parent[child], parent);\n }", "public int getParentID() {\n\t\treturn _parentID;\n\t}", "@Override\r\n\tpublic int getIndexOfChild(Object parent, Object child) {\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public int getComponentID() {\n return COMPONENT_ID;\n }", "public StructuredId getParent()\r\n {\r\n return parent;\r\n }", "private static int insertParentComponent(final String appName, final ComponentType compType, String platform) {\n\t\tint appId = getComponentByNameAndParent(appName, 0, compType.getComponentTypeId(), platform);\n\t\tif (appId == 0) {\n\t\t\tinsertComponent(appName, 0, compType.getComponentTypeId(), false, platform);\n\t\t\tappId = getComponentByNameAndParent(appName, 0, compType.getComponentTypeId(), platform);\n\t\t}\n\t\treturn appId;\n\t}", "public String getComponentId() {\n \t\treturn componentId;\n \t}", "private int nameToPropertiesRowIndex(String name) {\n \tInteger index = (Integer)nameToPropertiesRowIndex.get(name);\n return (index != null) ? index.intValue() : -1;\n }", "public int getIndexOfChild(Object parent, Object child) {\r\n\t\tURI[] children = getChildren(parent);\r\n\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\tint result = comp.compare((URI) child, children[i]);\r\n\t\t\tif (result == 0) {\r\n\t\t\t\treturn i;\r\n\t\t\t} else if (result < 0) {\r\n\t\t\t\treturn -i - 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -children.length - 1;\r\n\t}", "@Override public int getNodeId(String name) {\n\t\tint id = node_index_.tryGet(name);\n\t\tif (id == -1) System.err.println(\"Unknown node name=\" + name);\n\t\treturn id;\n\t}", "ContentIdentifier getParent(ContentIdentifier cid);", "public int getParentID() {\n\t\treturn parentID;\n\t}", "@Override\r\n\tpublic long getChildId(int groupPosition, int childPosition) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}", "int getCellid();", "public Integer getParentId() {\n return parentId;\n }", "public Integer getParentId() {\n return parentId;\n }", "public Integer getParentId() {\n return parentId;\n }", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "public int getIdForName(String name)\n\t{\n\t\tint id = 0;\n\t\ttry\n\t\t{\n\t\t\tif (database==null)\n\t\t\t\tdatabase = this.getWritableDatabase();\n\t\t\t\n\t\t\tCursor c = database.rawQuery(\"SELECT * FROM \"+PLAYERS_TABLE_NAME+\" WHERE \"+PLAYER_NAME+\" = \\\"\"+name+\"\\\";\", null);\n\n\t\t\tc.moveToFirst();\n\t\t\tif (c != null) \n\t\t\t{\n\t\t\t\tid = c.getInt(c.getColumnIndex(PLAYER_ID));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\t Log.e(\"Error\", \"Error\", e);\n\t\t} \n\t\treturn id;\n\t}", "public int find(int [] parent, int vertex)\n\t\t{\n\t\t\tif(parent[vertex] != vertex)\n\t\t\t\treturn find(parent, parent[vertex]);\n\t\t\treturn vertex;\n\t\t}", "public static int parent(int i, int d) {\n \treturn Math.floorDiv(i-1, d);\n }", "private int findComp(Component cmpnt) {\n\n for (int i = 0; i < compList.length; i++) {\n if (compList[i].equals(cmpnt)) {\n return i;\n }\n }\n\n return 0;\n }", "public ILexComponent getParent();", "public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}", "private int findParent(int e, int[] parents) {\n if (parents[e] != e) {\n return findParent(parents[e], parents);\n }\n\n return parents[e];\n }", "String getOuter_id();", "public static int getCollectionId(Connection c, String name) throws SQLException {\r\n\t\tPreparedStatement s = c.prepareStatement(\"select \"+quote(FC_ID_FIELD.name)+\" from \"+quote(FC_TABLE_NAME)+\" where \"+quote(FC_NAME_FIELD.name)+\"=\"+\"?\");\r\n\t\ts.setString(1, name);\r\n\t\tResultSet rs = s.executeQuery();\r\n\t\trs.next();\r\n\t\tint id = rs.getInt(1);\r\n\t\ts.close();\r\n\t\treturn id;\r\n\t}", "private int getIndex(String id) {\n for (int i = 0; i < this.container.size(); i++) {\n if (id.equals(this.container.get(i).getId())) {\n return i;\n }\n }\n return -1;\n }", "public int getParentId() {\r\n\t\treturn parentId;\r\n\t}", "public int getAccessibleIndexInParent() {\n try {\n return unoAccessibleContext.getAccessibleIndexInParent();\n } catch (com.sun.star.uno.RuntimeException e) {\n return -1;\n } \n }", "@Override\n\tpublic long getChildId(int sectionPosition, int childPosition) {\n\t\treturn childPosition;\n\t}", "private Integer getFirstOpenParent(int currentIndex, String componentId) {\n\t\tStatisticsLog statisticsLog = messageFlowLogs.get(messageFlowLogs.get(currentIndex).getParentIndex());\n\t\twhile (statisticsLog.getCurrentIndex() > 0) {\n\t\t\tif (statisticsLog.isOpenLog() && statisticsLog.getComponentName().equals(componentId)) {\n\t\t\t\treturn statisticsLog.getCurrentIndex();\n\t\t\t}\n\t\t\tstatisticsLog = messageFlowLogs.get(statisticsLog.getParentIndex());\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic long getChildId(int groupPosition, int childPosition) {\n\t\treturn 0;\n\t}", "public Long getParentId() {\n return this.parentId;\n }", "public void setParent(int id);", "private int parent(int index) {\n return index / 2;\n }", "private int parent(int index) {\n return index / 2;\n }", "public int getIndexNumber(){\n return id;\r\n }", "public static void updateContainerDetails(final int envId, String compName, int numOfcont, String parentCompName, String platform){\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tfinal int compId = getComponentId(compName, parentCompName);\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; Parent Component Name = \" + parentCompName + \"; is not available in the DB\");\n\t\t\treturn;\n\t\t}\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tString updateApiStsQry = null;\n\t\tif(platform.equalsIgnoreCase(\"Mesos\")){\n\t\t\tupdateApiStsQry = HQLConstants.UPDATE_CONTAINER_DETAILS;\n\t\t}\n\t\tQuery query = session.createQuery(updateApiStsQry);\n\t\tquery.setInteger(\"numOfContainers\", numOfcont);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"environmentId\", envId);\n\t\tquery.setDate(\"stsDate\", todayDate);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public String getParentId() {\n return getParent() != null ? getParent().getId() : null;\n }", "public static int getCalendarTrackerChildRowID(long id, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ROWID};\n String whereClause = DatabaseContract.CalendarTrackerEntry._ID + \"=?\";\n String[] whereValue = {String.valueOf(id)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_ROWID);\n\n try {\n cursor.moveToFirst();\n return cursor.getInt(idColumnOutput);\n } finally {\n cursor.close();\n database.close();\n }\n }", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "public Long getParentId() {\n return parentId;\n }", "public Long getParentId() {\n return parentId;\n }", "public Long getParentId() {\n return parentId;\n }", "public Long getParentId() {\n return parentId;\n }", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "protected final int getFileIdForIndex(int index) {\n return getChildIds().get(index);\n }", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "public int get_parentId() {\n return (int)getUIntBEElement(offsetBits_parentId(), 16);\n }", "protected final int findParentDirectoryId(DBDeviceContext ctx, String path, boolean filePath) {\n\n // Split the path\n \n String[] paths = null;\n \n if ( path != null && path.startsWith(\"\\\\\")) {\n\n // Split the path\n \n paths = FileName.splitPath(path);\n }\n else {\n \n // Add a leading slash to the path before parsing\n \n paths = FileName.splitPath(\"\\\\\" + path);\n }\n \n if ( paths[0] != null && paths[0].compareTo(\"\\\\\") == 0 || paths[0].startsWith(\"\\\\\") == false)\n return 0;\n \n // Check if the file is in the cache\n \n FileStateCache cache = ctx.getStateCache();\n FileState state = null;\n \n if ( cache != null) {\n \n // Search for the file state\n \n state = cache.findFileState(paths[0]);\n if ( state != null && state.getFileId() != -1) {\n \n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"@@ Cache hit - findParentDirectoryId() path=\" + paths[0]);\n \n // Return the file id\n \n return state.getFileId();\n }\n }\n\n // Get the directory id list\n \n int[] ids = findParentDirectoryIdList(ctx,path,filePath);\n if ( ids == null)\n return -1;\n \n // Check for the root directory id only\n \n if ( ids.length == 1)\n return ids[0];\n \n // Return the directory id of the last directory\n \n int idx = ids.length - 1;\n if ( filePath == true && ids[ids.length - 1] == -1)\n idx--;\n \n return ids[idx];\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }" ]
[ "0.7135265", "0.6678693", "0.6338618", "0.59891075", "0.59497404", "0.5804281", "0.57731897", "0.57052517", "0.5634453", "0.5614114", "0.5446396", "0.5436999", "0.5307241", "0.530492", "0.5291977", "0.52708036", "0.523263", "0.5204816", "0.51943773", "0.5149169", "0.5137477", "0.5137394", "0.51371676", "0.51294696", "0.51081", "0.5106144", "0.51058906", "0.5103541", "0.507904", "0.5066548", "0.5061097", "0.50561345", "0.5018128", "0.5000954", "0.499541", "0.49707773", "0.49336255", "0.49263987", "0.49226567", "0.49209154", "0.4903245", "0.49025685", "0.49011055", "0.4892743", "0.48916635", "0.48887795", "0.4888578", "0.4875156", "0.48710358", "0.48701087", "0.48664826", "0.485809", "0.48554274", "0.48434415", "0.48426756", "0.48426756", "0.48426756", "0.4838016", "0.48316446", "0.48273027", "0.48262328", "0.48257396", "0.4817842", "0.48141927", "0.48055393", "0.47998604", "0.47964782", "0.47884172", "0.47798526", "0.47728357", "0.4763611", "0.47575486", "0.47568592", "0.4751632", "0.4746252", "0.4740367", "0.4740367", "0.4739688", "0.47388238", "0.47383365", "0.47359136", "0.47348344", "0.47348344", "0.47329634", "0.47329634", "0.47329634", "0.47329634", "0.47262508", "0.47047058", "0.47045866", "0.47045866", "0.47045866", "0.47045866", "0.47045866", "0.47026965", "0.47021198", "0.47004128", "0.47004128", "0.47004128", "0.47004128" ]
0.6448928
2
Set the DelInd of Component table.
private static void setDelIndOfComponent(final int componentId, final int delInd) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_COMPONENT_DELIND); query.setLong("delInd", delInd); query.setLong("componentId", componentId); query.executeUpdate(); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDel(Integer del) {\r\n\t\tthis.del = del;\r\n\t}", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public Integer getDel() {\r\n\t\treturn del;\r\n\t}", "public void setDelmark(Integer delmark) {\n this.delmark = delmark;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n tblEnterprise = new javax.swing.JTable();\n backJButton = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(51, 51, 255)));\n\n tblEnterprise.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Location\", \"Type\", \"Enterprise Name\", \"Admin\", \"Address\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, true, true\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(tblEnterprise);\n\n backJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/back-arrow-icon.png\"))); // NOI18N\n backJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButtonActionPerformed(evt);\n }\n });\n\n btnDelete.setText(\"Delete Details\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Calligraphy\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 255));\n jLabel1.setText(\"View Enterprises\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnDelete)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(backJButton)\n .addGap(157, 157, 157)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(67, 67, 67)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 715, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(66, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(backJButton)\n .addComponent(jLabel1))\n .addGap(27, 27, 27)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(53, 53, 53)\n .addComponent(btnDelete)\n .addContainerGap(164, Short.MAX_VALUE))\n );\n }", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "public void setDelFlag(boolean delFlag) {\n this.delFlag = delFlag;\n }", "public void setIsDel(Integer isDel) {\n this.isDel = isDel;\n }", "public void setIsDel(Integer isDel) {\n this.isDel = isDel;\n }", "public void setDelFlag(String delFlag) {\n this.delFlag = delFlag;\n }", "public void setDelflag(Boolean delflag) {\r\n this.delflag = delflag;\r\n }", "public static void setIDt(int IDt) {\n Componente.IDt = IDt;\n }", "public void toDeletIndex()\n {\n try\n { \n //DefaultTableModel model=(DefaultTableModel)jt.getModel(); \n //jt.getModel();\n int num=Integer.parseInt(JOptionPane.showInputDialog(rootPane,\"Enter the row number\")); \n jtModel.removeRow(num-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted selected row number \" +num);\n }\n catch(NumberFormatException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Enter integer not alphabet\");\n } \n catch(ArrayIndexOutOfBoundsException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"This row dosent exist\");\n }\n }", "public static void updateDelIndForHealthCheck(final int compId,\n\t\t\tfinal int delInd, final int enviromentId, final Long regionID) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_DELIND);\n\t\tquery.setLong(\"delInd\", delInd);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"enviromentId\", enviromentId);\n\t\tquery.setLong(\"regionID\", regionID);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public String removeDSIndex(String dsID, String dschemaID, String attriName);", "public void deleteDepartmentByDeptNo(int dept_no);", "public void setDeleteAt(long deleteAt)\n\t{\n\t\tthis.deleteAt = deleteAt;\n\t}", "public void delete(ControlAcceso entity) {\n\n\t}", "public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}", "public String eliminarDetalle()\r\n/* 340: */ {\r\n/* 341:400 */ this.cuentaContableDimensionContable = ((CuentaContableDimensionContable)this.dtCuentaContable.getRowData());\r\n/* 342:401 */ this.cuentaContableDimensionContable.setEliminado(true);\r\n/* 343:402 */ return \"\";\r\n/* 344: */ }", "@Override\r\n public int deptDelete(int dept_seq) {\n return sqlSession.delete(\"deptDAO.deptDelete\", dept_seq);\r\n }", "@Override\n\tpublic int delete(PrestationCDI obj) throws DAOException {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void ad_no_delete(int an_no) {\n\t\tadao.ad_no_Delete(an_no);\r\n\t}", "private static void izbrisiClanaIzTabele(int red) {\r\n\t\tDefaultTableModel dtm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\t\tdtm.removeRow(red);\r\n\t}", "public abstract boolean del(State s, Term[]binding, Vector[] delAddList);", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "public void setDEL(boolean DEL) {\n this.DEL = DEL;\n }", "public void dvRemoved()\r\n/* 61: */ {\r\n/* 62:132 */ this.numDVRecords -= 1;\r\n/* 63: */ }", "@Override\n\tpublic void delete(int codigo) {\n\t\tSystem.out.println(\"Borra el empleado con \" + codigo + \" en la BBDD.\");\n\t}", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "public void deldrumentry(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE, Drum_RowID + \"=\" +idi, null);\n\t\t\t\n\t}", "private void setComponentsId(){\n this.tableA.setId(1);\n this.horizontalScrollViewB.setId(2);\n this.scrollViewC.setId(3);\n this.scrollViewD.setId(4);\n }", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIDatabaseDatasetDescriptor(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public void disTable () {\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\t\t\tvalues = new Vector();\n\t\t\t\tvalues.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\");values.add(\"20\");values.add(new Boolean(false));\n\t\t\t\tmyModel.addRow(values ); // more practicle, vector can take only objects.\n\t\t myModel.addRow(data);\n\n\n\t\t\t\tgetContentPane().add(scrollPane, BorderLayout.CENTER);\n\n\t\t\t\t addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t });\n\t}", "@Override\n\tpublic void delRec() {\n\t\t\n\t}", "private void Drop(String[]p){\n List<DeputyTableItem> dti;\n dti = Drop1(p);\n for(DeputyTableItem item:dti){\n deputyt.deputyTable.remove(item);\n }\n }", "public void setDelFlag(Short delFlag) {\n\t\tsetField(\"delFlag\", delFlag);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "public void testSetDelDyn() {\n }", "@Override\n\t\tprotected void _delete() {\n\t\t\toldValue = 0;\n\t\t\tnewValue = 0;\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Eliminar Incidencies\");\n setResizable(false);\n addWindowFocusListener(new java.awt.event.WindowFocusListener() {\n public void windowGainedFocus(java.awt.event.WindowEvent evt) {\n formWindowGainedFocus(evt);\n }\n public void windowLostFocus(java.awt.event.WindowEvent evt) {\n }\n });\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Titol\", \"Descripcio\", \"Zona\", \"User\", \"Data\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jLabel1.setText(\"Segur que vols eliminar?\");\n\n jButton4.setText(\"Sí\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Cercar\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Eliminar\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Enrere\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(90, 90, 90)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(18, 18, 18)))\n .addGap(16, 16, 16))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 12, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jButton4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2)\n .addComponent(jButton1))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton3)\n .addContainerGap())))\n );\n\n pack();\n }", "@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}", "public void delFor(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE5, Sales_Id + \"=\" +idi, null);\n\t\t\n\t}", "@Override\n\tpublic void deleteCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN\n // -\n // FIRST\n // :\n // event_deleteButtonActionPerformed\n int rowIndex = headerTable.getSelectedRow();\n if (rowIndex > -1) {\n removeRow(rowIndex);\n }\n }", "public void delete(int cID) {\n\t\tacmapper.delete(cID);\n\t}", "public final native void setForDelete(boolean del) /*-{\n\t\tthis.forDelete = del;\n\t}-*/;", "private void jBtn_SupprimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_SupprimerActionPerformed\n // Si onglet Client\n if(numOnglet() == 0){\n // On stock l index quand une ligne de la table est selectionnnee\n int rowIndex = jTable_Clients.getSelectedRow();\n // Si pas de ligne selectionnee\n if(rowIndex == -1){\n showMessageDialog(null, \"Veuillez sélectionner la ligne du Client \"\n + \"à supprimer\");\n }\n else{\n // On appelle la methode d instance associee au Client selectionne\n laListeClient.get(rowIndex).Suppression();\n try {\n tableClient();\n } catch (Exception ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n // Onglet Prospect\n else{\n // On stock l index quand une ligne de la table est selectionnnee\n int rowIndex = jTable_Prospects.getSelectedRow();\n // Si pas de ligne selectionnee\n if(rowIndex == -1){\n showMessageDialog(null, \"Veuillez sélectionner la ligne du Prospect \"\n + \"à supprimer\");\n }\n else{\n // On appelle la methode d instance associee au Client selectionne\n laListeProspeect.get(rowIndex).Suppression();\n try {\n tableProspect();\n } catch (Exception ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n hideButton();\n }", "public void setIsDel(Boolean isDel) {\n this.isDel = isDel;\n }", "public void setDeActiveInARow(int deActiveInARow) {\n this.deActiveInARow = deActiveInARow;\n }", "public void delete() throws Exception {\n\t\tLOGGER.info(\n\t\t\t\t\"Start of DataListTableBean:delete()\");\n\t\ttry {\n\t\t\tcomponentService.delete(data);\n\t\t\tdataList = componentService.findAllComponent();\n\t\t\t\n\t\t\tFacesMessage facesMessage = new FacesMessage(\n\t\t\t\t\tFacesMessage.SEVERITY_INFO, \"Data is Deleted\",\n\t\t\t\t\t\"Data is Deleted\");\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, facesMessage);\n\t\t\t\n\t\t\tLOGGER.info(\n\t\t\t\t\t\"End of DataListTableBean:delete()\");\t\n\t\t} catch (Exception e) {\n\t\t\tmanageError(e, \"Error while Deleting data. \");\n\t\t}\n\t}", "public void deleteEmp(int empno) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\talunos.remove(indice);\n\t\t\t\t\n//LIMPAR OS CAMPOS\n\t\t\t\ttxtNome.setText(\"\");\n\t\t\t\ttxtNota1.setText(\"\");\n\t\t\t\ttxtNota2.setText(\"\");\n\t\t\t\t\n//CURSOR NO CAMPO NOME\n\t\t\t\ttxtNome.requestFocus();\n\t\t\t\t\n//ATUALIZAR DEFAULT TABLE MODEL\n\t\t\t\tdtm.setRowCount(0);\n\t\t\t\tfor (int i=0; i<alunos.size(); i++) {\n\t\t\t\t\tdtm.addRow(new Object[] {\n\t\t\t\t\t\talunos.get(i).getNome(),\n\t\t\t\t\t\talunos.get(i).getNota1(),\n\t\t\t\t\t\talunos.get(i).getNota2(),\n\t\t\t\t\t\talunos.get(i).getMedia(),\n\t\t\t\t\t\talunos.get(i).getSituacao()\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "private void setDel() {\n\t\tDelOpt.add(\"-d\");\n\t\tDelOpt.add(\"/d\");\n\t\tDelOpt.add(\"delete\");\n\n\t}", "public void actionPerformed(ActionEvent ae) {\n Table.editingCanceled(null);\n EditModel.delRecord(TopRow, BottomRow, null);\n DelButton.setEnabled(false);\n UpButton.setEnabled(false);\n DownButton.setEnabled(false);\n validate();\n repaint();\n }", "public IBusinessObject setDeleteState(DeleteState ds)\n throws ORIOException;", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(24)\n\tvoid deleted(boolean pVal);", "@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }", "public void setDelFlg(String delFlg) {\n this.delFlg = delFlg;\n }", "@Override\npublic int delete(Department department) {\n\treturn 0;\n}", "public void setIdDetalleComponenteCosto(int idDetalleComponenteCosto)\r\n/* 63: */ {\r\n/* 64: 87 */ this.idDetalleComponenteCosto = idDetalleComponenteCosto;\r\n/* 65: */ }", "@Override\n\tpublic void setDeptno(Integer deptno) {\n\t\tsuper.setDeptno(deptno);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane2 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n Eliminar = new javax.swing.JButton();\n\n setClosable(true);\n setTitle(\"Vencimientos\");\n setToolTipText(\"\");\n\n jTable1.setModel(buscarlotes());\n jScrollPane2.setViewportView(jTable1);\n\n Eliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/delete.png\"))); // NOI18N\n Eliminar.setText(\"Eliminar Registros Vencidos\");\n Eliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n EliminarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 499, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(133, 133, 133)\n .addComponent(Eliminar)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Eliminar)\n .addGap(21, 21, 21))\n );\n\n pack();\n }", "@Override\r\n\tpublic void k_delete(String MF_NO) {\n\t\t\r\n\t}", "int deleteByPrimaryKey(String deptCode);", "public void delsal(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE2, Sales_Id + \"=\" +idi, null);\n\t\t\n\t}", "@Override\n\tpublic void delRecMaterial(int id) {\n\t\t\n\t}", "private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTblDptos = new javax.swing.JTable();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jBtnAgregar = new javax.swing.JButton();\n jBtnVer = new javax.swing.JButton();\n jBtnEliminar = new javax.swing.JButton();\n jBtnAdicionar = new javax.swing.JButton();\n jTexCodigo = new javax.swing.JTextField();\n jTexNombre = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"CRUD Departamentos\");\n setResizable(false);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosed(java.awt.event.WindowEvent evt) {\n formWindowClosed(evt);\n }\n });\n\n jTblDptos.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(jTblDptos);\n\n jLabel1.setText(\"Código:\");\n\n jLabel2.setText(\"Nombre:\");\n\n jBtnAgregar.setText(\"Agregar Dpto\");\n\n jBtnVer.setText(\"Ver Dpto\");\n jBtnVer.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBtnVerActionPerformed(evt);\n }\n });\n\n jBtnEliminar.setText(\"Eliminar Dpto\");\n jBtnEliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBtnEliminarActionPerformed(evt);\n }\n });\n\n jBtnAdicionar.setText(\"Adicionar Dpto\");\n jBtnAdicionar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBtnAdicionarActionPerformed(evt);\n }\n });\n\n jTexCodigo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTexCodigoActionPerformed(evt);\n }\n });\n jTexCodigo.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTexCodigoKeyTyped(evt);\n }\n });\n\n jTexNombre.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTexNombreKeyTyped(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTexNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTexCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 366, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(71, 71, 71)\n .addComponent(jBtnVer)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jBtnAdicionar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jBtnAgregar, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jBtnEliminar)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jBtnAdicionar, jBtnAgregar, jBtnEliminar, jBtnVer});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTexCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTexNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBtnVer)\n .addComponent(jBtnAdicionar)\n .addComponent(jBtnAgregar)\n .addComponent(jBtnEliminar))\n .addContainerGap(16, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void delete(JTable tblUser)\n {\n int i = tblUser.getSelectedRow();\n \n if(i != -1)\n {\n usersDto = users[i];\n \n if(usersDto.getState() != 3)\n {\n if(JOptionPane.showConfirmDialog(null, \"¿Está seguro que desea eliminar el registro?\", \"Eliminar\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)\n {\n try {\n usersDto.setState((short) 3);\n \n if(usersDao.update(usersDto.createPk(), usersDto)) {\n tableModel = (DefaultTableModel) tblUser.getModel();\n tableModel.setValueAt(\"*\", i, 6);\n }\n \n } catch (UsersDaoException exception) {}\n }\n \n } else { JOptionPane.showMessageDialog(null, \"El registro ya está eliminado\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n \n } else { JOptionPane.showMessageDialog(null, \"Seleccione un registro a eliminar\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n }", "public String getDelFlag() {\n return delFlag;\n }", "public String getDelFlag() {\n return delFlag;\n }", "public String getDelFlag() {\n return delFlag;\n }", "public void propagateDelete(Environment env, STentry entry){\n for(String id : entry.getPropagation().keySet()){\n // Getting the id of the entry in the symbol table where these variables are assigned\n // to the current deleted one, we need to propagate the delete state for them in the\n // pointer level between the assigned level to pointed value :: level - 0\n STentry prop = env.lookup(env.getNestingLevel(), id);\n int level = entry.getPropagation().get(id);\n\n for(int i = level; i >= 0; i--){\n prop.setEffectState(i, 2); // propagation of delete state\n }\n\n }\n }", "public JIFDevolver() {\n initComponents();\n\n refreshTable();\n table.setClass(Locacao.class);\n\n table.getTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent e) {\n try {\n int row = table.getTable().getSelectedRow();\n if (row >= 0) {\n locacao = (Locacao) table.getTableModel().getDataList().get(row);\n locacao.setCliente(clienteDao.buscar(locacao.getCliente()));\n cliente = locacao.getCliente();\n veiculo = veiculoDao.buscar(new Veiculo(locacao.getIdVeiculo(), null, null, null, null, null, null, null) {\n @Override\n public double getValorDiariaLocacao() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n });\n } else {\n locacao = null;\n }\n refreshForm();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n });\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tremoveRowsIsSelected();\r\n\t\t\t\t\told_Num_Total=0;\r\n\t\t\t\t\tdeleteJButton.setEnabled(false);\r\n\t\t\t\t}", "public void deleteByTdiarySeq(int tdiarySeq) {\n\r\n\t}", "@Override\n public void deletarPessoa(int codigo) throws ErroDAOException {\n }", "public void doDropTable();", "public abstract void setDisabTempl(int disabTempl);", "public void unlinkUD()\n {\n this.U.D = this.D;\n this.D.U = this.U;\n }", "public Integer getDelmark() {\n return delmark;\n }", "void delData();", "public void setID(int iD) {\r\n\t\tthis.iD = iD;\r\n\t}", "void clrCOMP1()\n\t{\n\t\ttry\n\t\t{\n\t\t\trdbSTSYS.setSelected(true);\n\t\t\trdbSTSNO.setSelected(false);\n\t\t\ttxtPROQT.setText(\"\");\n\t\t\ttxtUTLQT.setText(\"\");\n \t\t\tinlTBLEDIT(tblLICDL);\n \t\t\ttblLICDL.clrTABLE();\n\t\t}\t\n\t\tcatch(Exception E)\n\t\t{\n\t\t\tsetMSG(E,\"clrCOMP1()\");\t\t\t\n\t\t}\t\n\t}", "@Override\r\n\tpublic void DeleteCitizen(int cin) {\n\r\n\t\tem.remove(em.find(Citizen.class, cin));\r\n\r\n\t}", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIconMarkerDescriptorRefPtr(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public void setDelFlg(String delFlg) {\n\t\tthis.delFlg = delFlg;\n\t}", "public void setIndx(int indx){\n this.indx = indx;\n }", "public DropAwareJXTable() {\n acceptableActions = DnDConstants.ACTION_COPY_OR_MOVE;\n dt = new DropTarget(this, acceptableActions, this);\n }", "public void keyPressedOnTable(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_DELETE) {\n\t\t\taksiDelete();\n\t\t}\n\t}", "private JButton getCmdDel() {\r\n\t\tif (cmdDel == null) {\r\n\t\t\tcmdDel = new JButton();\r\n\t\t\tcmdDel.setText(\"\");\r\n\t\t\tcmdDel.setToolTipText(\"Delete selected proxy\");\r\n\t\t\tcmdDel.setIcon(new ImageIcon(getClass().getResource(\"/delete.png\")));\r\n\t\t\tcmdDel.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tint numRows = jTable.getSelectedRows().length;\r\n\t\t\t\t\tfor(int i=0; i<numRows ; i++ ) model.removeRow(jTable.getSelectedRow());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdDel;\r\n\t}", "public void deleteData(int id, String tablename, String colName, Object obj) {\n\t\tString sql = \"delete from \" + tablename + \" where \" + colName + \"=\" + id;\n\t\ttry {\n\t\t\tstat.execute(\"BEGIN TRANSACTION\");\n\t\t\tint row = stat.executeUpdate(sql);\n\t\t\tstat.execute(\"COMMIT\");\n\t\t\trow = row + 1;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (tablename.equals(\"def4_meth\") || tablename.equals(\"def3_attr\")) {\n\t\t\tList<Map> l = Util698.getFiledsInfo(obj);\n\t\t\tint colNum = l.size();\n\t\t\t// 对象属性转存在数组中\n\t\t\tObject[] data = new Object[colNum];\n\t\t\tint i = 1;\n\t\t\tfor (Map<String, Object> info : l) {\n\t\t\t\tString name = info.get(\"name\").toString();\n\t\t\t\tObject val = Util698.getFieldValueByName(name, obj);\n\t\t\t\t// 对象属性转存在数组中\n\t\t\t\tdata[i - 1] = val;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tint object_id = (int) data[2], idx = (int) data[3];\n\t\t\tdataSync(object_id, idx, tablename);\n\t\t}\n\t}", "@Override\r\n\tpublic int delete(Integer pk) throws SQLExceptionIFOpenDoors {\n\t\treturn 0;\r\n\t}", "@Override\n public int delete( J34SiscomexOrigemDi j34SiscomexOrigemDi ) {\n return super.doDelete(j34SiscomexOrigemDi);\n }", "public void addDeActiveness(){\n deActiveInARow +=1;\n }", "@Override\n public void delete(Integer key) throws SQLException {\n //Ei toteutettu\n }", "public void evt_DeleteCurrent()\r\n {\r\n rh4PickFlags[0] = -1;\r\n rh4PickFlags[1] = -1;\r\n rh4PickFlags[2] = -1;\r\n rh4PickFlags[3] = -1;\r\n\r\n int oil;\r\n CObjInfo oilPtr;\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n oilPtr = rhPtr.rhOiList[oil];\r\n oilPtr.oilEventCount = rh2EventCount;\r\n oilPtr.oilListSelected = -1;\r\n oilPtr.oilNumOfSelected = 0;\r\n }\r\n }" ]
[ "0.60726863", "0.5588262", "0.53460765", "0.53174156", "0.52985257", "0.5279519", "0.5240671", "0.5231701", "0.5231701", "0.5230531", "0.5208954", "0.5192573", "0.5164197", "0.5136296", "0.5131366", "0.5127641", "0.51012564", "0.5082523", "0.5082031", "0.50739884", "0.50495386", "0.50384325", "0.503557", "0.5033156", "0.50293463", "0.50227237", "0.5013359", "0.50132865", "0.49901205", "0.4979974", "0.49777344", "0.49769336", "0.49570867", "0.49519926", "0.49218997", "0.49212772", "0.49126846", "0.49110964", "0.49110964", "0.49062058", "0.48919192", "0.48869506", "0.48838994", "0.48810977", "0.48771673", "0.48758072", "0.48685732", "0.48635596", "0.4852969", "0.48498625", "0.4848629", "0.4840921", "0.48363844", "0.48360854", "0.4831531", "0.48073235", "0.48062056", "0.47966385", "0.47942013", "0.47846794", "0.47790676", "0.47774035", "0.4773338", "0.47601956", "0.47574908", "0.47508833", "0.47495866", "0.47491083", "0.47462827", "0.474411", "0.47424945", "0.47355613", "0.47302127", "0.47302127", "0.47302127", "0.47233775", "0.47223088", "0.4722093", "0.47197783", "0.47190154", "0.47138375", "0.47132117", "0.4707951", "0.47066733", "0.47063923", "0.46948582", "0.46839097", "0.46791545", "0.46758923", "0.4674275", "0.46717444", "0.46697065", "0.46658495", "0.4665452", "0.46648258", "0.46639508", "0.46615672", "0.4660999", "0.46569023", "0.46561512" ]
0.7360749
0
Function to get Component from component id
public static ComponentVO getComponent(final int componentId) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); ComponentEntity comp = session.get(ComponentEntity.class, componentId); txn.commit(); ComponentVO cVO = new ComponentVO(); cVO.setComponentId(comp.getComponentId()); cVO.setComponentName(comp.getComponentName()); cVO.setComponentDesc(comp.getComponentDesc()); if(comp.getParentComponent() != null){ cVO.setParentComponentId(comp.getParentComponent().getComponentId()); cVO.setParentComponentName(comp.getParentComponent().getComponentName()); } cVO.setComponentTypeId(comp.getComponentType().getComponentTypeId()); cVO.setDelInd(comp.getDelInd()); return cVO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getComponentId();", "public Component getComponent(long id) {\n\t\treturn (Component)sessionFactory.getCurrentSession().get(Component.class, id);\n\t}", "public UUID getComponentId();", "public Component getComponent(int componentId) {\r\n if (opened != null && opened.getId() == componentId) {\r\n return opened;\r\n }\r\n if (chatbox != null && chatbox.getId() == componentId) {\r\n return chatbox;\r\n }\r\n if (singleTab != null && singleTab.getId() == componentId) {\r\n return singleTab;\r\n }\r\n if (overlay != null && overlay.getId() == componentId) {\r\n return overlay;\r\n }\r\n for (Component c : tabs) {\r\n if (c != null && c.getId() == componentId) {\r\n return c;\r\n }\r\n }\r\n return null;\r\n }", "public int getComponentID() {\n return COMPONENT_ID;\n }", "public String getComponentId() {\n \t\treturn componentId;\n \t}", "public Componente getComponente(int id) {\n\t\ttry {\n\t\t\tfor(Map.Entry<String, ArrayList<Componente>> entry : this.mappaComponenti.entrySet()) {\n\t\t\t\tArrayList<Componente> tempList = entry.getValue();\n\t\t\t\tfor(Componente c : tempList) {\n\t\t\t\t\tif(c.getId() == id) return c;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public abstract Component getComponentByName(String name);", "StartedModule<?> getComponent(UUID id);", "public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }", "<T> T getComponent(Object key);", "public abstract DrawingComponent getObjectByPathId(UUID uid);", "public org.apache.axis.types.Token getComponentID() {\n return componentID;\n }", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "private <T> T getComponent(Class<T> clazz) {\n List<T> list = Context.getRegisteredComponents(clazz);\n if (list == null || list.size() == 0)\n throw new RuntimeException(\"Cannot find component of \" + clazz);\n return list.get(0);\n }", "public void setComponentId(String id) {\n \t\tthis.componentId = id;\n \t}", "Object getComponent(WebElement element);", "public <T extends Component> T getComponent(Class<T> componentType);", "String getComponentName();", "String getComponentName();", "public int getComponentId(int v) {\n return ids[v];\n }", "public String getComponent() {\r\n\t\treturn component;\r\n\t}", "public String getComponent() {\n return this.component;\n }", "private static int getComponentIdFromCompName(String compName){\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "String getId(IApiComponent component) throws CoreException {\n StringBuffer buffer = new StringBuffer();\n //$NON-NLS-1$\n buffer.append(component.getSymbolicName()).append(\" \").append('(').append(component.getVersion()).append(')');\n return buffer.toString();\n }", "public Componente getComponente(int id, String categoria) {\n\t\ttry {\n\t\t\tfor (Componente elemento : this.mappaComponenti.get(categoria)) {\n\t\t\t\tif (elemento.getId() == id) {\n\t\t\t\t\treturn elemento;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public static BaseComponent $getComponentInstance(BasePage page,\n HJ_Dyn dyn,int component_id, String cn, String short_name,int wc_id){\n // we need wc_id to generate ids in shared areas\n\t// is called only for components\n String dyn_id = dyn.getDynId();\n String full_id = Integer.toString(component_id) + dyn_id;\n String storage_id = page.$getPageId() + full_id;\n BaseComponent component = (BaseComponent)page.session.getAttribute(storage_id);\n if(component == null){\n int share_area_id = page.$get_$SH2(component_id);\n if(share_area_id != 0){ // this is a shared component\n // this is the only place where ComponentReference instance is created\n component = new ComponentReference(page,cn, short_name,share_area_id,wc_id,dyn_id);\n } else {\n component = (BaseComponent)createInstance(cn);\n }\n component.short_name = short_name;\n component.dyn_id = dyn_id;\n component.shallow_rank = page.$get_$SR2(component_id);\n component.deep_rank = page.$get_$DR2(component_id);\n component.senior_compid = page.$get_$SI2(component_id);\n component.senior_loops = page.$get_$SL2(component_id);\n component.storage_id = storage_id;\n component.full_id = full_id;\n page.session.setAttribute(storage_id,component);\n String key = w_reg_pref + page.$getPageId();\n ComponentRegistry wr = (ComponentRegistry)page.session.getAttribute(key);\n if(wr == null){\n \twr = new ComponentRegistry();\n \tpage.session.setAttribute(key,wr);\n } //if\n component.page = page;\n if(component.senior_compid > -1){\n String target_dyn_id = calcDynId(component.dyn_id,component.senior_loops);\n String target_full_id = page.$getPageId() + Integer.toString(component.senior_compid) + target_dyn_id;\n component.parent_component = (BaseComponent)page.session.getAttribute(target_full_id);\n }\n wr.add(component);\n } //if(component == null)\n\n if(component instanceof ComponentReference){\n ComponentReference ref = (ComponentReference)component;\n ref.referred.representative = ref;\n return ref.referred;\n }\n return component;\n}", "public Component getComponent(String path)\r\n {\r\n Class<? extends Component> componentClass = components.get(path);\r\n if (componentClass == null)\r\n {\r\n return null;\r\n }\r\n Constructor<?>[] constructors = componentClass.getConstructors();\r\n for (Constructor<?> constructor : constructors)\r\n {\r\n if ((constructor.getParameterTypes().length == 1) \r\n && (constructor.getParameterTypes()[0] == Component.class))\r\n {\r\n Component instance;\r\n try\r\n {\r\n instance = (Component) constructor.newInstance(new Object[] {null});\r\n } catch (InstantiationException | IllegalAccessException\r\n | IllegalArgumentException | InvocationTargetException e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n postConstruct(instance);\r\n return instance;\r\n }\r\n }\r\n throw new IllegalStateException(\"Component of class \" + componentClass.getName() \r\n + \" has no constructor with a single Component parameter\");\r\n }", "<T extends Component> Optional<T> getComponent(Class<T> type);", "public Component getComponent() {\n return component;\n }", "public int getThreadPoolChooserNumericId(String componentId);", "public Component getComponent() {\n\treturn component;\n}", "public JComponent getComponent();", "public Component componentAt( int x, int y ) {\n Component component = componentAt( x, y, desktop, true );\n if ( component != desktop ) {\n return component;\n }\n \n return null; \n }", "private Component createComponent(XmlNode node, String id) {\n\n Component comp = null;\n String tag = node.getTag();\n\n if (tag.equals(TAG_PANEL)) {\n comp = layoutContainer(new JPanel(), node, node.getChildren());\n } else if (tag.equals(TAG_BORDER)) {\n comp = layoutBorder(node, node.getChildren());\n } else if (tag.equals(TAG_TEXTINPUT)) {\n int cols = node.getAttribute(ATTR_COLS, -1);\n int rows = node.getAttribute(ATTR_ROWS, -1);\n String value = node.getAttribute(ATTR_VALUE, \"\");\n\n JTextComponent textComp;\n if (rows > 1) {\n if (cols < 0) {\n cols = 30;\n }\n textComp = new JTextArea(value, rows, cols);\n } else {\n if (cols == -1) {\n textComp = new JTextField(value);\n } else {\n textComp = new JTextField(value, cols);\n }\n ((JTextField) textComp).addActionListener(this);\n }\n comp = textComp;\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n if (action != null) {\n componentToAction.put(textComp, action);\n }\n } else if (tag.equals(TAG_MENUITEM) || tag.equals(TAG_CBMENUITEM)) {\n String actionTemplate = null;\n JMenuItem mi;\n String label = node.getAttribute(ATTR_LABEL, \"\");\n String action = node.getAttribute(ATTR_ACTION);\n String value = node.getAttribute(ATTR_VALUE);\n String key = node.getAttribute(ATTR_KEY);\n if ((action == null) && (actionTemplate != null)\n && (value != null)) {\n action = GuiUtils.replace(actionTemplate, \"%value%\", value);\n }\n if ((key != null) && !key.startsWith(\"group:\")) {\n label = label + \" \" + key;\n }\n\n if (node.getTag().equals(TAG_CBMENUITEM)) {\n boolean initValue = node.getAttribute(ATTR_VALUE, true);\n JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(label,\n initValue);\n String group = node.getAttribute(ATTR_GROUP, (String) null);\n addToGroup(group, cbmi);\n mi = cbmi;\n if (action != null) {\n Hashtable actions = new Hashtable();\n actions.put(ATTR_ACTION, action);\n actions.put(ATTR_VALUE, new Boolean(initValue));\n componentToAction.put(cbmi, actions);\n cbmi.addItemListener(this);\n if ((group == null) || initValue) {\n itemStateChanged(new ItemEvent(cbmi, 0, cbmi,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n }\n\n if (key != null) {\n if (key.startsWith(\"group:\")) {\n if (group != null) {\n key = key.substring(6);\n keyToComponent.put(key.toLowerCase(), group);\n }\n } else {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n } else {\n mi = new JMenuItem(label);\n if (action != null) {\n mi.setActionCommand(action);\n mi.addActionListener(this);\n if (key != null) {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n }\n if (id != null) {\n idToMenuItem.put(id, mi);\n }\n comp = mi;\n } else if (tag.equals(TAG_MENU)) {\n Vector children = node.getChildren();\n JMenu menu = new JMenu(node.getAttribute(ATTR_LABEL, \"\"));\n comp = menu;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n if (childElement.getTag().equals(TAG_SEPARATOR)) {\n menu.addSeparator();\n\n continue;\n }\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menu.add(childComponent);\n }\n } else if (tag.equals(TAG_MENUBAR)) {\n Vector children = node.getChildren();\n JMenuBar menuBar = new JMenuBar();\n comp = menuBar;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menuBar.add(childComponent);\n }\n } else if (tag.equals(TAG_SPLITPANE)) {\n Vector xmlChildren = node.getChildren();\n if (xmlChildren.size() != 2) {\n throw new IllegalArgumentException(\n \"splitpane tag needs to have 2 children \" + node);\n }\n XmlNode leftNode = getReffedNode((XmlNode) xmlChildren.get(0));\n XmlNode rightNode = getReffedNode((XmlNode) xmlChildren.get(1));\n Component leftComponent = xmlToUi(leftNode);\n Component rightComponent = xmlToUi(rightNode);\n boolean continuous = node.getAttribute(ATTR_CONTINUOUS, true);\n int orientation = findValue(node.getAttribute(ATTR_ORIENTATION,\n (String) null), SPLITPANE_NAMES,\n SPLITPANE_VALUES);\n\n JSplitPane split = new JSplitPane(orientation, continuous,\n leftComponent, rightComponent);\n int divider = node.getAttribute(ATTR_DIVIDER, -1);\n if (divider != -1) {\n split.setDividerLocation(divider);\n }\n split.setOneTouchExpandable(\n node.getAttribute(ATTR_ONETOUCHEXPANDABLE, true));\n double resizeweight = node.getAttribute(ATTR_RESIZEWEIGHT, -1.0);\n if (resizeweight != -1.0) {\n split.setResizeWeight(resizeweight);\n }\n comp = split;\n } else if (tag.equals(TAG_LABEL)) {\n String label = node.getAttribute(ATTR_LABEL, \"\");\n comp = new JLabel(label, getAlign(node));\n } else if (tag.equals(TAG_IMAGE)) {\n comp = makeImageButton(node, null, null);\n } else if (tag.equals(TAG_SHAPEPANEL)) {\n comp = new ShapePanel(this, node);\n } else if (tag.equals(TAG_BUTTON)) {\n JButton b = new JButton(node.getAttribute(ATTR_LABEL, \"\"));\n b.setActionCommand(node.getAttribute(ATTR_ACTION, \"No action\"));\n b.addActionListener(this);\n comp = b;\n } else if (tag.equals(TAG_CHOICE)) {\n Choice b = new java.awt.Choice();\n String action = node.getAttribute(ATTR_ACTION,\n (String) null);\n int selected = node.getAttribute(ATTR_SELECTED, 0);\n Hashtable actions = new Hashtable();\n for (int i = 0; i < node.size(); i++) {\n XmlNode child = getReffedNode(node.get(i));\n if ( !child.getTag().equals(TAG_ITEM)) {\n throw new IllegalArgumentException(\"Bad choice item:\"\n + child);\n }\n b.add(child.getAttribute(ATTR_LABEL, \"\"));\n String value = child.getAttribute(ATTR_VALUE, (String) null);\n if (value != null) {\n actions.put(ATTR_VALUE + i, value);\n }\n String subAction = child.getAttribute(ATTR_ACTION,\n (String) null);\n if (subAction != null) {\n actions.put(ATTR_ACTION + i, subAction);\n }\n }\n comp = b;\n if (action != null) {\n actions.put(ATTR_ACTION, action);\n componentToAction.put(b, actions);\n b.select(selected);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else if (tag.equals(TAG_CHECKBOX)) {\n JCheckBox b = new JCheckBox(node.getAttribute(ATTR_LABEL, \"\"),\n node.getAttribute(ATTR_VALUE, false));\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n comp = b;\n if (action != null) {\n componentToAction.put(comp, action);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else {\n comp = new JLabel(\"Unknown tag:\" + tag);\n System.err.println(\"Unknown tag:\" + node);\n }\n\n return comp;\n\n }", "public <S> ComponentInstance<S> getComponentInstance();", "public long checkComponent(String name) {\n\t\tif(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().size()>0){\n\t\t\treturn ((Component)(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().get(0))).getId();\n\t\t}\n\t\treturn -1;\n\t}", "public Component createComponent(String ComponentClass, String id) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\t\n\t\tComponent c = (Component)Class.forName(ComponentClass).newInstance();\n\t\tc.setId(id);\n\t\t\n\t\treturn c;\n\t}", "public IDomain getComponent(int index);", "public <U extends T> U getComponent(Class<U> clazz);", "<T extends Component> Optional<T> getExactComponent(Class<T> type);", "public String getCustomPowerComponentName(int componentId) {\n return mPowerComponents.getCustomPowerComponentName(componentId);\n }", "public Component getComponent(String fieldAlias)\n {\n return fieldMap.get(fieldAlias);\n }", "public Component getComponent(Class type) {\n for (Component component : components) {\n if (component.getClass().equals(type)) {\n return component;\n }\n }\n return null;\n }", "public JPanel getComponentAt( String name) {\n Component comp = null;\n for (Component child : this.getContentPane().getComponents()) {\n if (child.getName().equals(name)) {\n comp = child;\n }\n }\n return (JPanel)comp;\n }", "public Component getComponent() {\n if (getUserObject() instanceof Component)\n return (Component)getUserObject();\n return null;\n }", "public Component select( Object hint )\n throws ComponentException\n {\n final Component component = (Component)m_components.get( hint );\n\n if( null != component )\n {\n return component;\n }\n else\n {\n throw new ComponentException( hint.toString(), \"Unable to provide implementation.\" );\n }\n }", "@SuppressWarnings(\"unchecked\")\n public <T extends Component> T getComponent() {\n try {\n return (T) component;\n } catch (ClassCastException ex) {\n getLogger().log(Level.SEVERE,\n \"Component code/design type mismatch\", ex);\n }\n return null;\n }", "@Override public Object getComponente(String componente){\n return getBlindaje(componente);\n }", "ClassLoader getWebComponentClassLoader(URI componentId);", "@Override\n public AbstractProcess getComponent(String name)\n {\n return components.get(name);\n }", "public JComponent getComponentAtIndex(int i) {\n\t\tFancyTab tab= tabsPanel.getTabAt(i);\n\t\treturn tabMap.get(tab);\n\t}", "private GComponent getComponentAt(Point point)\n {\n // Create a reverse list iterator\n ListIterator<GComponent> it = this.components.listIterator(this.components.size());\n while (it.hasPrevious())\n {\n GComponent component = it.previous();\n \n // If this component is a the specified position, then return it\n if (component.getBounds().contains(point))\n return component;\n }\n \n // Nothing found, so return null\n return null;\n }", "public Object get(Class cl, int id) throws HibException;", "public Entity getComponent() {\n return component;\n }", "@Override\r\n public Component load( int nId, Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT, plugin );\r\n daoUtil.setInt( 1, nId );\r\n daoUtil.executeQuery( );\r\n\r\n Component component = null;\r\n\r\n if ( daoUtil.next( ) )\r\n {\r\n component = new Component( );\r\n\r\n component.setId( daoUtil.getInt( 1 ) );\r\n component.setGroupId( daoUtil.getString( 2 ) );\r\n component.setTitle( daoUtil.getString( 3 ) );\r\n component.setDescription( daoUtil.getString( 4 ) );\r\n component.setArtifactId( daoUtil.getString( 5 ) );\r\n component.setVersion( daoUtil.getString( 6 ) );\r\n component.setComponentType( daoUtil.getString( 7 ) );\r\n }\r\n\r\n daoUtil.free( );\r\n\r\n return component;\r\n }", "Component createComponent();", "Component createComponent();", "public Component getTabComponent();", "public ResourceId component() {\n return this.component;\n }", "public static Object getComponentInstance(String name, ServletContext sc) {\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}", "public abstract Integer getCompteId();", "public Record getComponentIdAndBaseId(Record record);", "protected final Component getComponent()\n\t{\n\t\treturn component;\n\t}", "public String getElementId();", "@RequestMapping(value = {\"/admin2543/detail_component\"}, method = RequestMethod.GET)\n public String detail_component(Model model, @RequestParam(value = \"cmp\", required = false, defaultValue = \"-1\") final String cmpId) {\n try {\n Integer componentId = Integer.parseInt(cmpId); \n Component component = componentDAO.getComponentById(componentId);\n if( component.getComponentGroup() != null ) {\n component.setForm_id_component_group( component.getComponentGroup().getId_component_group() );\n }\n \n /* Maybe some better solution? */\n if(componentId.equals(component.getId_component())) {\n model.addAttribute(\"component\", component);\n model.addAttribute(\"componentGroups\", this.getComponentGroupNames());\n return \"admin2543/detail/component_detail\";\n } \n } catch(Exception e) {\n e.printStackTrace();\n }\n return \"redirect:view_components\";\n }", "public Optional<ComponentSymbol> getComponent() {\r\n if (!this.getEnclosingScope().getSpanningSymbol().isPresent()) {\r\n return Optional.empty();\r\n }\r\n if (!(this.getEnclosingScope().getSpanningSymbol().get() instanceof ComponentSymbol)) {\r\n return Optional.empty();\r\n }\r\n return Optional.of((ComponentSymbol) this.getEnclosingScope().getSpanningSymbol().get());\r\n }", "public JComponent getComponent() {\n return getGradleUI().getComponent();\n }", "public abstract JComponent getComponent();", "String getElementNameById(Integer elementId);", "public ThreadPoolChooser getThreadPoolChooser(String componentId);", "private @Nullable ComponentName getOwnerComponent(int userId) {\n synchronized (getLockObject()) {\n if (mOwners.getDeviceOwnerUserId() == userId) {\n return mOwners.getDeviceOwnerComponent();\n }\n if (mOwners.hasProfileOwner(userId)) {\n return mOwners.getProfileOwnerComponent(userId);\n }\n }\n return null;\n }", "protected abstract C newComponent(String id, IModel<M> model);", "public Object get(Class cl, Serializable id) throws HibException;", "JComponent getImpl();", "protected LttlComponent getHostComponent()\n\t{\n\t\tif (hostCompId < 0) return null;\n\t\treturn Lttl.scenes.findComponentByIdAllScenes(hostCompId);\n\t}", "public static int getComponentId(final String compName, final String parentCompName) {\n\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.createCriteria(\"parentComponent\", \"pc\");\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"pc.componentName\",parentCompName));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "String getModuleId();", "public ImageComponent fetchImageComponent(String filename)\n throws IOException\n {\n ImageComponent ret_val = (ImageComponent)componentMap.get(filename);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(filename);\n componentMap.put(filename, ret_val);\n }\n \n return ret_val;\n }", "private Drawable obtainIconFromResource(Integer id, Context context, ComponentName component)\n\t{\n\t\t\n Resources res = null;\n \n try {\n \t \n\t\t\tres = context.getPackageManager().\n\t\t\t\t\tgetResourcesForApplication(component.getPackageName());\n\t\t\n\t\t} catch (NameNotFoundException e) {\n\t\t\tres = null;\n\t\t\te.printStackTrace();\n\t\t}\n if(res != null)\n {\n return res.getDrawable(id);\n }\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n protected <C> C getComponent(Class<C> componentType) {\n return componentType.cast(((HasComponent<C>) getActivity()).getComponent());\n }", "Object getId();", "public ServiceResultInterface getComponentByName(String name) {\n\t\tfor (ServiceResultInterface res : components) {\n\t\t\tif (res.getName().equals(name)) {\n\t\t\t\treturn res;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "Builder setComponent(String component);", "public static Object getComponentInstance(String name, HttpServletRequest request) {\r\n\t\tServletContext sc = request.getSession().getServletContext();\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();" ]
[ "0.7669638", "0.751834", "0.73494977", "0.7326221", "0.7157524", "0.70262283", "0.6940492", "0.6654378", "0.66399086", "0.6501789", "0.6392944", "0.63580054", "0.6333266", "0.63221204", "0.6283975", "0.6283368", "0.62641865", "0.62578976", "0.6253261", "0.6253261", "0.6249698", "0.62421954", "0.6203478", "0.61802936", "0.6170734", "0.61403024", "0.61270094", "0.61219656", "0.604981", "0.6039198", "0.6036041", "0.5976531", "0.5941769", "0.59407586", "0.59293556", "0.5923444", "0.58790606", "0.58706176", "0.5848022", "0.5812054", "0.58105546", "0.57698804", "0.57661796", "0.57597", "0.57321644", "0.5721131", "0.57066333", "0.5702839", "0.5702397", "0.56862813", "0.568532", "0.56338584", "0.5629279", "0.5627274", "0.5627063", "0.56227773", "0.56208706", "0.56208706", "0.56114435", "0.5606184", "0.5599825", "0.5598884", "0.5593157", "0.5590166", "0.5562735", "0.55367386", "0.5509016", "0.54967564", "0.549218", "0.5488714", "0.54768175", "0.54674387", "0.54662955", "0.5454924", "0.5446513", "0.54461706", "0.5433223", "0.5387056", "0.53840154", "0.5374474", "0.53719217", "0.53684634", "0.5349347", "0.5346777", "0.53334624", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005", "0.5333005" ]
0.5844336
39
Function to insert a new component into the DB.
public static void insertComponent(final String name, final int parentId, final int componentType, boolean hasParent, String platform) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); ComponentEntity componentEntity = new ComponentEntity(); componentEntity.setComponentName(name); componentEntity.setDelInd(0); ComponentTypeEntity compTypeEntity = new ComponentTypeEntity(); compTypeEntity.setComponentTypeId(componentType); componentEntity.setComponentType(compTypeEntity); if (hasParent) { componentEntity.setPlatform(platform); ComponentEntity parCompEntity = new ComponentEntity(); parCompEntity.setComponentId(parentId); componentEntity.setParentComponent(parCompEntity); } session.save(componentEntity); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void insert( Component component, Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin );\r\n\r\n component.setId( newPrimaryKey( plugin ) );\r\n\r\n daoUtil.setInt( 1, component.getId( ) );\r\n daoUtil.setString( 2, component.getGroupId( ) );\r\n daoUtil.setString( 3, component.getTitle( ) );\r\n daoUtil.setString( 4, component.getDescription( ) );\r\n daoUtil.setString( 5, component.getArtifactId( ) );\r\n daoUtil.setString( 6, component.getVersion( ) );\r\n daoUtil.setString( 7, component.getComponentType( ) );\r\n\r\n daoUtil.executeUpdate( );\r\n daoUtil.free( );\r\n }", "public void insertCourse(){\n \n }", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void insert() throws SQLException {\n String sql = \"INSERT INTO course (courseDept, courseNum, courseName, credit, info) \"\n + \" values ('\"\n + this.courseDept + \"', '\"\n + this.courseNum + \"', '\"\n + this.courseName + \"', \"\n + this.credit + \", '\"\n + this.info + \"')\";\n\n DatabaseConnector.updateQuery(sql);\n }", "public Component addComponent(Component c) {\n\t\tsessionFactory.getCurrentSession().save(c);\n\t\treturn c;\n\t}", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "private void insert(String component, String feature) {\n\tthis.entities.putIfAbsent(component, new HashSet<String>());\n\tSet<String> componentFeatures = this.entities.get(component);\n\tcomponentFeatures.add(feature);\n\tthis.entities.put(component, componentFeatures);\n\t// From features to components which possess them\n\tthis.features.putIfAbsent(feature, new HashSet<String>());\n\tSet<String> components = this.features.get(feature);\n\tcomponents.add(component);\n\t//LogInfo.logs(\" adding: %s :: %s\", feature, component);\n\tthis.features.put(feature, components);\n }", "@Override\r\n public void store( Component component, Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE, plugin );\r\n\r\n daoUtil.setInt( 1, component.getId( ) );\r\n daoUtil.setString( 2, component.getGroupId( ) );\r\n daoUtil.setString( 3, component.getTitle( ) );\r\n daoUtil.setString( 4, component.getDescription( ) );\r\n daoUtil.setString( 5, component.getArtifactId( ) );\r\n daoUtil.setString( 6, component.getVersion( ) );\r\n daoUtil.setString( 7, component.getComponentType( ) );\r\n daoUtil.setInt( 8, component.getId( ) );\r\n\r\n daoUtil.executeUpdate( );\r\n daoUtil.free( );\r\n }", "void insert(CTipoComprobante record) throws SQLException;", "void insert(Disproduct record);", "@Override\n\tpublic void dbInsert(MovementModel model, String insertStm) throws DAOSysException\t\t{\n\t\tPreparedStatement preparedStm = null;\n\t\tConnection connection = null;\n\n\t\ttry\t{\n\t\t\tconnection = connectToDB();\n\t\t\tpreparedStm = connection.prepareStatement(insertStm);\n\t\t\tpreparedStm.setInt(1, model.getMovementNumber());\n\t\t\tpreparedStm.setString(2, model.getMovementName());\n\t\t\tpreparedStm.executeUpdate();\n\n\t\t}\tcatch (SQLException sex)\t{\n\t\t\tthrow new DAOSysException(\"Error adding composition <\" + model.getMovementNumber() + \" \"+ model.getMovementName() + \"> \" + sex.getMessage());\n\n\t\t}\tfinally\t{\n\t\t\ttry\t{\n\t\t\t\treleaseAll(null, preparedStm, connection);\n\t\t\t} catch (Exception ex)\t{\n\t\t\t\tSystem.err.println(\"Error releasing resources <\" + ex.toString());\n\t\t\t}\n\t\t}\n\t}", "int insert(Course record);", "int insert(Course record);", "public void insert() throws SQLException;", "int insert(Product record);", "public void insert(Course course) {\n\t\tString sql = \"INSERT course(Cour_Name,CourCate_ID,Cour_BriefIntro) \"\n\t\t\t\t+ \"VALUES(?,?,?)\";\n\t\ttry {\n\t\t\t\n\t\t\tconn = dataSource.getConnection();\n\t\t\tsmt = conn.prepareStatement(sql);\n\t\t\tsmt.setString(1, course.getCourName());\n\t\t\tsmt.setInt(2, course.getCourseCate().getCourCateId());\t\t\t\n\t\t\tsmt.setString(3, course.getCourBriefIntro());\n\t\t\tsmt.executeUpdate();\t\t\t\n\t\t\tsmt.close();\n \n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n \n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "public void insertCourse(Course course) {\n\t\tthis.getHibernateTemplate().save(course);\n\n\t}", "int insert(Commet record);", "int insert(WfCfgModuleCatalog record);", "public void insert()\n\t{\n\t}", "@FXML\n\t private void insertProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.insertProd(denumireText.getText(),producatorText.getText(),pretText.getText(),marimeText.getText(),culoareText.getText());\n\t resultArea.setText(\"Product inserted! \\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while inserting product \" + e);\n\t throw e;\n\t }\n\t }", "public void insertCourse(Course course) {\n ProgressTrackerDatabase.databaseWriteExecutor.execute(() -> {\n mCourseDao.insert(course);\n });\n }", "public void addToDatabaseProduct() {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n final String sqlProductName = txtProductName.getText();\n String sqlManufName = txtManufacturer.getText();\n ItemType sqlItemType = choiceType.getValue();\n\n stmt = conn.prepareStatement(\"INSERT INTO Product(type, manufacturer, name) VALUES (?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setString(1, sqlItemType.toString());\n stmt.setString(2, sqlManufName);\n stmt.setString(3, sqlProductName);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "int insert(Commodity record);", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "public void insertDB() {\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to insert values of a User object into the database\n String query = \"INSERT INTO User VALUES ('\" + userID + \"','\" + password + \"','\" + firstName + \"','\" +\n lastName + \"');\";\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n //shows a message that a new user has been added successfully\n System.out.println(\"new user has been added into the data base successfully\");\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n Message errorMessage = new Message(\"Error\", \"Something wrong happened, when there was a attempt to add user into the database. Try again later.\");\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n }", "int insert(TrainingCourse record);", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Override\n\tpublic void Insert(PersonelContract entity) {\n\n\t}", "int insert(courses record);", "int insert(BasicEquipment record);", "int insert(TrainCourse record);", "public void insert(Contact c);", "@Override\n\n public Componente put(String key, Componente value) {\n \n \n Componente cp = null;\n \n try {\n conn = Connect.connect();\n \n //String com a querie -> inserir um Componente na BD\n PreparedStatement stm = conn.prepareStatement(\"INSERT INTO Componente (nome,tipo,designacao,preco,visivel,stock)\\n\" +\n \"VALUES (?, ?, ?, ?,TRUE,?)\\n\" +\n \"ON DUPLICATE KEY UPDATE nome=VALUES(nome), tipo=VALUES(tipo), designcao=VALUES(designcao), preco=VALUES(preco), visivel=VALUES(visivel),stock=VALUES(stock);\", Statement.RETURN_GENERATED_KEYS);\n \n //Parse dos dados Componentes argumento (value)\n stm.setString(1, value.getNome());\n stm.setString(2, value.getTipo());\n stm.setString(3, value.getDesignacao());\n stm.setDouble(4,value.getPreco());\n stm.setInt(5,value.getStock());\n \n // executa a querie\n stm.executeUpdate();\n \n this.adicionarIncompativeis(cp);\n this.adicionarObrigatorias(cp);\n\n \n ResultSet rs = stm.getGeneratedKeys();\n if(rs.next()) {\n String newId = rs.getString(\"nome\");\n if (!newId.equals(value.getNome()))\n throw new PutComponenteFailureException(\"Put Componente failure - falha na inserção de uma componente na base de dados\");\n }\n \n cp = value;\n } catch (SQLException | PutComponenteFailureException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return cp;\n }", "int insert(CmsRoomBook record);", "public void insert(Job job) throws DatabaseException, IllegalArgumentException;", "int insert(ScoreProduct record);", "int insert(DashboardGoods record);", "int insert(FctWorkguide record);", "int insert(ItoProduct record);", "int insert(NjProductTaticsRelation record);", "public void insert(AsxDataVO entity) {\n\t\tmongoTemplate.insert(entity); \r\n\t}", "void insertSelective(CTipoComprobante record) throws SQLException;", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "void addComponent(Component component);", "private void addToDB(String CAlias, String CPwd, String CFirstName,\n String CLastName, String CStreet, String CZipCode, String CCity,\n String CEmail)\n {\n con.driverMysql();\n con.dbConnect();\n \n try \n {\n sqlStatement=con.getDbConnection().createStatement();\n sqlString=\"INSERT INTO customer (CAlias, CFirstName, CLastName, CPwd, \"\n + \"CStreetHNr, CZipCode, CCity, CEmail, CAccessLevel)\"\n + \" VALUES\"\n + \"('\" + CAlias + \"', '\" + CFirstName + \"', '\" + CLastName\n + \"', '\" + CPwd + \"', '\" + CStreet + \"', '\" \n + CZipCode + \"', '\" + CCity + \"', '\" + CEmail + \"', 1);\";\n \n sqlStatement.executeUpdate(sqlString);\n sqlString=null;\n con.getDbConnection().close();\n } \n catch (Exception ex) \n {\n error=ex.toString();\n }\n }", "int insert(Goods record);", "int insert(Sequipment record);", "@Override\n\tpublic void insert(ExportProduct exportProduct) {\n\t\t\n\t}", "public void insert(Employee e) throws ClassNotFoundException, SQLException;", "@Override\n\tpublic void insert(Categoria cat) throws SQLException {\n\t\t\n\t}", "@Override\r\n\tpublic void insert(BbsDto dto) {\n\t}", "public void registerDB(Course curs, Student stud) throws SQLException {\r\n Connection con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/Hogwarts\",\"postgres\" , \"admin\");\r\n Statement st = con.createStatement();\r\n\r\n st.executeUpdate(\"INSERT INTO public.enrolled(\\n\" +\r\n \"\\t\\\"studentID\\\", \\\"courseID\\\")\\n\" +\r\n \"\\tVALUES (\" + stud.getId() + \", \" + curs.getId() + \")\");\r\n\r\n st.close();\r\n }", "public void addCourse(Courses course) throws SQLException {\n ConnectDB db = ConnectDB.getInstance();\n Connection con = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try {\n String sql = \"insert into [dbo].[Courses] values (?,?,?,?,?,?,?)\";\n\n con = db.openConnection();\n ps = con.prepareStatement(sql);\n ps.setString(1, course.getCourseName());\n ps.setString(2, course.getCourseImage());\n ps.setInt(3, course.getFee());\n ps.setInt(4, course.getCourseDuration());\n ps.setString(5, course.getTeacherName());\n ps.setString(6, course.getCourseDescription());\n ps.setInt(7, course.getCategory());\n ps.execute();\n\n } catch (Exception ex) {\n Logger.getLogger(CoursesDAO.class.getName()).log(Level.SEVERE,\n null, ex);\n } finally {\n ps.close();\n con.close();\n\n }\n }", "@Override\n\tpublic void insertProduct(ProductVO dto) {\n\n\t}", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "WriteRequest insert(PiEntity entity);", "public int insert(IEntity entity) throws SQLException;", "int insert(GoodsPo record);", "int insert(WizardValuationHistoryEntity record);", "void insert(BnesBrowsingHis record) throws SQLException;", "public void insert(Student student) {\t\t\r\n\t\tdao.insertStudent(student); \r\n\t}", "public DRIVER_INSERT() {\n initComponents();\n }", "public void insertBooking(Booking booking) throws SQLException, Exception;", "@Override\n\tpublic void dbInsert(PreparedStatement pstmt) {\n\t\ttry \n\t\t{\n\t\t\tpstmt.setInt(1, getParent());\n\t\t\tpstmt.setInt(2, getParentType().getValue()); \t\t\t// owner_type\n\t\t\tpstmt.setString(3, this.predefinedPeriod.getKey() ); \t\t\t// period key\n\t\t\tpstmt.setDouble(4, this.getProductiveTime());\t\t\t\t\t\t// productive time\n\t\t\tpstmt.setDouble(5, this.getQtySchedToProduce());\t\t\t\t// Quantity scheduled to produce\n\t\t\tpstmt.setDouble(6, this.getQtyProduced());\t\t\t\t\t\t// Quantity produced\n\t\t\tpstmt.setDouble(7, this.getQtyDefective());\t\t\t\t\t\t// Quantity with rework or considered defective. \n\n\t\t\tpstmt.addBatch();\n\n\t\t} catch (SQLException e) {\n\t\t\tLogger logger = LogManager.getLogger(OverallEquipmentEffectiveness.class.getName());\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\n\t}", "public String insertSelective(SmartComponentType record) {\n SQL sql = new SQL();\n sql.INSERT_INTO(\"smart_component_type\");\n \n if (record.getId() != null) {\n sql.VALUES(\"id\", \"#{id,jdbcType=BIGINT}\");\n }\n \n if (record.getTypeName() != null) {\n sql.VALUES(\"type_name\", \"#{typeName,jdbcType=VARCHAR}\");\n }\n \n if (record.getStatus() != null) {\n sql.VALUES(\"status\", \"#{status,jdbcType=VARCHAR}\");\n }\n \n if (record.getCreateTime() != null) {\n sql.VALUES(\"create_time\", \"#{createTime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getIsControllerCenter() != null) {\n sql.VALUES(\"is_controller_center\", \"#{isControllerCenter,jdbcType=INTEGER}\");\n }\n \n if (record.getRemark() != null) {\n sql.VALUES(\"remark\", \"#{remark,jdbcType=VARCHAR}\");\n }\n \n return sql.toString();\n }", "@Override\r\n\tpublic int addCourse(Courses course) {\n\t\tString sql=\"insert into courseshv values(?,?)\";\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tint rowAdded=0;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setLong(1, course.getCourseid());\r\n\t\t\tpstmt.setString(2, course.getCourseName());\r\n\t\t\trowAdded=pstmt.executeUpdate();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rowAdded;\r\n\t}", "int insert(Cargo record);", "int insert(Computer record);", "int insert(WayShopCateRoot record);", "public void testInsert() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n\n // Verify insert\n // Verify\n Command select = das.createCommand(\"Select ID, NAME from COMPANY\");\n DataObject root = select.executeQuery();\n\n assertEquals(4, root.getList(\"COMPANY\").size());\n assertTrue(root.getInt(\"COMPANY[1]/ID\") > 0);\n\n }", "Integer insert(JzAct record);", "public void addDistBelt(String plate,String date){\n \n plate = convertToDBForm(plate);\n \n try {\n stmt = conn.createStatement();\n stmt.executeUpdate(\"INSERT INTO DISTBELT VALUES('\" + plate + \"','\" + date + \"');\");\n stmt.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "public FieldsTemplateLibrary templateFieldLibraryInsert(FieldsTemplateLibrary entity) {\n\t\tFieldsTemplateLibraryDAO dao = new FieldsTemplateLibraryDAO();\n\t\tentity = dao.saveNew(entity);\n\t\treturn entity;\n\t}", "public void addComponent(Component c);", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "public int insert(){\n\t\tif (jdbcTemplate==null) createJdbcTemplate();\n\t\t jdbcTemplate.update(insertStatement, ticketId,locationNumber);\n\t\treturn ticketId;\n\t}", "public static int insert(Product p) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO product (productCode, productName, catalogCategory, description, price, imageURL) \"\n + \"VALUES (?, ?, ?, ?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, p.getProductCode());\n ps.setString(2, p.getProductName());\n ps.setString(3, p.getCatalogCategory());\n ps.setString(4, p.getDescription());\n ps.setFloat(5, p.getPrice());\n ps.setString(6, p.getImageURL());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "int insert(EquipmentOrder record);", "public void saveNewProduct(Product product) throws BackendException;", "public InsertOrUpdate_Details() {\n initComponents();\n }", "public int agregar(SegFacultadDto comp) throws Exception, BusinessException{\r\n\t\treturn segFacultadDao.insertar(comp);\r\n\t}", "int insert(ActActivityRegister record);", "int insert(Ltsprojectpo record);", "int insert(Engine record);", "int insert(CommunityInform record);", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "public void inserir(Comentario c);", "@Insert\n void insert(Course... courses);", "public void insert(taxi ta)throws ClassNotFoundException,SQLException\r\n {\n String taxino=ta.getTaxino();\r\n String drivername=ta.getDrivername();\r\n String driverno=ta.getDriverno();\r\n String taxitype=ta.getTaxitype();\r\n String state=ta.getState();\r\n String priority=ta.getPriority();\r\n connection= dbconnection.createConnection();\r\nString sqlString=\"INSERT INTO taxi (taxino,drivername,driverno,taxitype,state,priority) VALUES ('\"+taxino+\"','\"+drivername+\"','\"+driverno+\"','\"+taxitype+\"','\"+state+\"','\"+priority+\"')\";\r\n PreparedStatement preparedStmt = connection.prepareStatement(sqlString); \r\n preparedStmt.execute(); \r\n connection.close();\r\n \r\n }", "@Override\n\tpublic void insert(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"INSERT INTO room VALUES (?,?)\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\t\t\tps.setInt(2, ob.getIdRoomType());\n\n\t\t\tps.execute();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t}", "public static boolean insertCategory(productCategory product,ArrayList<String> attributes,String partNumber)\n {\n PreparedStatement stmt = null;\n\n try\n {\n String pstmt = \"INSERT INTO \" + product.categoryName.getValue() + constructValues(product,attributes,partNumber);\n\n stmt = DBConnectionManager.con.prepareStatement(pstmt);\n\n\n stmt.executeUpdate();\n\n return true;\n\n } catch (SQLException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try { if (stmt != null) stmt.close(); } catch (Exception ignored) {}\n }\n\n return false;\n }", "int insert(CptDataStore record);", "int insert(UserCourseHistory record);", "@Override\n\tpublic void insert(DhtmlxGridForm f) throws Exception {\n\t\t\n\t}", "public void insert(Service servico){\n Database.servico.add(servico);\n }" ]
[ "0.7349599", "0.6500363", "0.64401406", "0.6398189", "0.6354247", "0.62467283", "0.6188264", "0.6185661", "0.61780226", "0.6177547", "0.61772645", "0.61533916", "0.61533916", "0.61299694", "0.61264384", "0.6102536", "0.6080276", "0.6065256", "0.6036124", "0.60212255", "0.59817773", "0.5961285", "0.5907403", "0.5886843", "0.58839744", "0.58775204", "0.58715993", "0.5854786", "0.58488536", "0.58367443", "0.58336675", "0.5827885", "0.5810144", "0.5800906", "0.57908165", "0.57894695", "0.57877326", "0.57827055", "0.5770717", "0.5769263", "0.5764259", "0.5761806", "0.57598263", "0.57520545", "0.57473665", "0.5745719", "0.5744613", "0.57439137", "0.57431483", "0.5734615", "0.5732544", "0.572653", "0.57241565", "0.5719238", "0.57063967", "0.5699019", "0.5699016", "0.56953406", "0.5685052", "0.56841165", "0.5681089", "0.56799155", "0.5678345", "0.567821", "0.5677352", "0.56756616", "0.567499", "0.56688124", "0.5667521", "0.5666609", "0.5660868", "0.5645063", "0.56401527", "0.56366366", "0.5632222", "0.56321883", "0.5629735", "0.5629057", "0.56277215", "0.5627076", "0.5621028", "0.56192017", "0.56190217", "0.56180054", "0.5611494", "0.5609934", "0.56087214", "0.5605308", "0.5602476", "0.56008035", "0.55904126", "0.5586171", "0.55860597", "0.5582337", "0.55809903", "0.5573847", "0.5568074", "0.55651104", "0.55572677", "0.5552322" ]
0.60346013
19
Insert in to Health_Check_Param table.
public static void insertHealthCheckParam(final long healthCheckId, final String healthCheckParamKey, final String healthCheckPramVal) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); HealthCheckParamEntity hcpEntity = new HealthCheckParamEntity(); HealthCheckEntity healthEntity = new HealthCheckEntity(); healthEntity.setHealthCheckId(healthCheckId); hcpEntity.setHealthCheck(healthEntity); hcpEntity.setHealthCheckParamKey(healthCheckParamKey); hcpEntity.setHealthCheckParamVal(healthCheckPramVal); session.save(hcpEntity); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Insert({\n \"insert into B_UMB_CHECKING_LOG (JNLNO, TRANDATE, \",\n \"ACCOUNTDATE, CHECKTYPE, \",\n \"STATUS, DONETIME, FILENAME)\",\n \"values (#{jnlno,jdbcType=VARCHAR}, #{trandate,jdbcType=VARCHAR}, \",\n \"#{accountdate,jdbcType=VARCHAR}, #{checktype,jdbcType=CHAR}, \",\n \"#{status,jdbcType=CHAR}, #{donetime,jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR})\"\n })\n int insert(BUMBCheckingLog record);", "@Insert({\n \"insert into spec_value (spec_id, value, \",\n \"orders)\",\n \"values (#{specId,jdbcType=INTEGER}, #{value,jdbcType=VARCHAR}, \",\n \"#{orders,jdbcType=INTEGER})\"\n })\n @Options(useGeneratedKeys=true,keyProperty=\"id\")\n int insert(SpecValuePO record);", "@Insert({\r\n \"insert into `review_level_setting` (`id`, `ops_op`, \",\r\n \"`ops_op_label`, `ops_op_level`, \",\r\n \"`created_by`, `created_at`, \",\r\n \"`updated_by`, `updated_at`, \",\r\n \"`del_flg`)\",\r\n \"values (#{id,jdbcType=VARCHAR}, #{opsOp,jdbcType=VARCHAR}, \",\r\n \"#{opsOpLabel,jdbcType=VARCHAR}, #{opsOpLevel,jdbcType=VARCHAR}, \",\r\n \"#{createdBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, \",\r\n \"#{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, \",\r\n \"#{delFlg,jdbcType=VARCHAR})\"\r\n })\r\n int insert(ReviewLevelSetting record);", "int insertSelective(WizardValuationHistoryEntity record);", "int insert(WizardValuationHistoryEntity record);", "int insert (EmpBean emp) throws ClassNotFoundException, SQLException {\n\t\t\n\tConnection con = DBUtil.getConnection();\n\tString sql= \"insert into empTab values(?,?,?)\";\n\tPreparedStatement ps = con.prepareStatement(sql);\n\tps.setString(1, emp.getEmpName());\n\tps.setString(2, emp.getEmpemailid());\n\tps.setInt(3, emp.getEmpphoneno());\n\t\n\n\treturn ps.executeUpdate(); //1 row inserted\n\t\n\t\n\t\n}", "int insert(HpItemParamItem record);", "@Insert({\n \"insert into t_apikey (id, key, \",\n \"name, api_id, des_key, \",\n \"parkIds)\",\n \"values (#{id,jdbcType=INTEGER}, #{key,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{apiId,jdbcType=VARCHAR}, #{desKey,jdbcType=VARCHAR}, \",\n \"#{parkids,jdbcType=VARCHAR})\"\n })\n int insert(TApikey record);", "@Override\r\n\tpublic int insert(CommonParamDomain t) {\n\t\treturn getPersistanceManager().insert(getNamespace() + \".insert\", t);\r\n\t}", "@Insert({\n \"insert into mail_host (id, host_name, \",\n \"smtp_host, smtp_host_port, \",\n \"pop3_host, pop3_host_port)\",\n \"values (#{id,jdbcType=INTEGER}, #{hostName,jdbcType=VARCHAR}, \",\n \"#{smtpHost,jdbcType=VARCHAR}, #{smtpHostPort,jdbcType=VARCHAR}, \",\n \"#{pop3Host,jdbcType=VARCHAR}, #{pop3HostPort,jdbcType=VARCHAR})\"\n })\n int insert(MailHost record);", "@Insert({\n \"insert into test_module (id, title, \",\n \"create_time, create_id, \",\n \"update_time, update_id)\",\n \"values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, \",\n \"#{createTime,jdbcType=TIMESTAMP}, #{createId,jdbcType=VARCHAR}, \",\n \"#{updateTime,jdbcType=TIMESTAMP}, #{updateId,jdbcType=VARCHAR})\"\n })\n int insert(TestModule record);", "public void testInsert() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.insert(\"paramName\", \"other description\", \"other value\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// paramName is primary key, no duplicates\n\t\t\t\tassertTrue(true);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "int insert(ConfigData record);", "int insert(Assist_table record);", "void insertBatch(List<InspectionAgency> recordLst);", "public int insertFinance(Object params) throws Exception;", "@Insert({\n \"insert into actions_accounts (actor, permission, \",\n \"action_id)\",\n \"values (#{actor,jdbcType=VARCHAR}, #{permission,jdbcType=VARCHAR}, \",\n \"#{actionId,jdbcType=INTEGER})\"\n })\n int insert(ActionsAccounts record);", "@Insert({\n \"insert into basic_info_precursor_process_type (code, process_name, \",\n \"types)\",\n \"values (#{code,jdbcType=INTEGER}, #{processName,jdbcType=VARCHAR}, \",\n \"#{types,jdbcType=TINYINT})\"\n })\n int insert(BasicInfoPrecursorProcessType record);", "Integer insert(ChronicCheck record);", "public void insert() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { myData.record.save(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "int insertSelective(HpItemParamItem record);", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "@Insert({\n \"insert into generalcourseinformation (courseid, code, \",\n \"name, teacher, credit, \",\n \"week, day_detail1, \",\n \"day_detail2, location, \",\n \"remaining, total, \",\n \"extra, index)\",\n \"values (#{courseid,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{teacher,jdbcType=VARCHAR}, #{credit,jdbcType=INTEGER}, \",\n \"#{week,jdbcType=VARCHAR}, #{day_detail1,jdbcType=VARCHAR}, \",\n \"#{day_detail2,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, \",\n \"#{remaining,jdbcType=INTEGER}, #{total,jdbcType=INTEGER}, \",\n \"#{extra,jdbcType=VARCHAR}, #{index,jdbcType=INTEGER})\"\n })\n int insert(GeneralCourse record);", "int insertSelective(Assist_table record);", "@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);", "@Override\n\tpublic int boardJudgeInsert(Map param) {\n\t\treturn dao.boardJudgeInsert(session, param);\n\t}", "int insertSelective(ConfigData record);", "int insertSelective(InspectionAgency record);", "int insertSelective(SpecValuePO record);", "int insert(InspectionAgency record);", "@Override\n\tpublic void dbInsert(PreparedStatement pstmt) {\n\t\ttry \n\t\t{\n\t\t\tpstmt.setInt(1, getParent());\n\t\t\tpstmt.setInt(2, getParentType().getValue()); \t\t\t// owner_type\n\t\t\tpstmt.setString(3, this.predefinedPeriod.getKey() ); \t\t\t// period key\n\t\t\tpstmt.setDouble(4, this.getProductiveTime());\t\t\t\t\t\t// productive time\n\t\t\tpstmt.setDouble(5, this.getQtySchedToProduce());\t\t\t\t// Quantity scheduled to produce\n\t\t\tpstmt.setDouble(6, this.getQtyProduced());\t\t\t\t\t\t// Quantity produced\n\t\t\tpstmt.setDouble(7, this.getQtyDefective());\t\t\t\t\t\t// Quantity with rework or considered defective. \n\n\t\t\tpstmt.addBatch();\n\n\t\t} catch (SQLException e) {\n\t\t\tLogger logger = LogManager.getLogger(OverallEquipmentEffectiveness.class.getName());\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\n\t}", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "int insert(MrpConfigSettingsEntity record);", "@Insert({\n \"insert into PURCHASE (ID, SDATE, \",\n \"STYPE, SMONEY, TOUCHING, \",\n \"ACCOUNT, CHECKSTATUS, \",\n \"DEMO1, DEMO2, DEMO3)\",\n \"values (#{id,jdbcType=DECIMAL}, #{sdate,jdbcType=TIMESTAMP}, \",\n \"#{stype,jdbcType=VARCHAR}, #{smoney,jdbcType=DECIMAL}, #{touching,jdbcType=VARCHAR}, \",\n \"#{account,jdbcType=VARCHAR}, #{checkstatus,jdbcType=DECIMAL}, \",\n \"#{demo1,jdbcType=DECIMAL}, #{demo2,jdbcType=VARCHAR}, #{demo3,jdbcType=DECIMAL})\"\n })\n int insert(Purchase record);", "@Insert({\n \"insert into dept (id, dept_name)\",\n \"values (#{id,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR})\"\n })\n int insert(Dept record);", "int insert(VarRatio record);", "public void insert() {\n String sqlquery = \"insert into SCORE (NICKNAME, LEVELS,HIGHSCORE, NUMBERKILL) values(?, ?, ?,?)\";\n try {\n ps = connect.prepareStatement(sqlquery);\n ps.setString(1, this.nickname);\n ps.setInt(2, this.level);\n ps.setInt(3, this.highscore);\n ps.setInt(4, this.numofKill);\n ps.executeUpdate();\n //JOptionPane.showMessageDialog(null, \"Saved\", \"Insert Successfully\", JOptionPane.INFORMATION_MESSAGE);\n System.out.println(\"Insert Successfully!\");\n ps.close();\n connect.close();\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public void insertBillDrink(Bill billDrink) {\n\tString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\t\tps.setString(1, null);\n\t\t\tps.setInt(2, billDrink.getIdD());\n\t\t ps.setInt(3, billDrink.getIdE());\n\t\t\tps.setDouble(4, billDrink.getPrice());\n\t\t\tps.setString(5, billDrink.getSerialNumber());\n\t\t\tps.setDouble(6, billDrink.getTotal());\n\t\t\tps.execute();\n\t\t \n\t\t \n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\n}\n\t\n}", "@Insert({\r\n \"insert into cwv_game_contract_address (contract_address_id, contract_address, \",\r\n \"contract_type, contract_state, \",\r\n \"contract_num, chain_status, \",\r\n \"chain_trans_hash, create_time)\",\r\n \"values (#{contractAddressId,jdbcType=INTEGER}, #{contractAddress,jdbcType=VARCHAR}, \",\r\n \"#{contractType,jdbcType=VARCHAR}, #{contractState,jdbcType=CHAR}, \",\r\n \"#{contractNum,jdbcType=INTEGER}, #{chainStatus,jdbcType=TINYINT}, \",\r\n \"#{chainTransHash,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(CWVGameContractAddress record);", "@Insert({\n \"insert into `category` (`cate_id`, `cate_name`)\",\n \"values (#{cateId,jdbcType=INTEGER}, #{cateName,jdbcType=VARCHAR})\"\n })\n int insert(Category record);", "Integer insertSelective(ChronicCheck record);", "int insert(PaasCustomAutomationRecord record);", "int insertSelective(MrpConfigSettingsEntity record);", "public void insertBillFood(Bill billFood) {\nString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n \ntry {\n\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t \n\t\n\t\tps.setInt(1, billFood.getIdF());\n\t\tps.setString(2,null);\n\t ps.setInt(3, billFood.getIdE());\n\t\tps.setDouble(4, billFood.getPrice());\n\t\tps.setString(5, billFood.getSerialNumber());\n\t\tps.setDouble(6, billFood.getTotal());\n\t\tps.execute();\n\t\t\n\t\n\t \n} catch (SQLException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\n\n\t\n\t\n}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public int insertSensorData(DataValue dataVal) throws Exception;", "int insert(CfgSearchRecommend record);", "int insertSelective(DashboardGoods record);", "void insert(IrpSignInfo record) throws SQLException;", "public void insertEmp(Emp emp) {\n\t\t\n\t}", "void insertSelective(IrpSignInfo record) throws SQLException;", "@Insert({\n \"insert into kd_user_medal (id, userid, \",\n \"medalId, bindUserid, \",\n \"remark, createTime)\",\n \"values (#{id,jdbcType=BIGINT}, #{userid,jdbcType=BIGINT}, \",\n \"#{medalid,jdbcType=BIGINT}, #{binduserid,jdbcType=BIGINT}, \",\n \"#{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP})\"\n })\n int insert(KDUserMedal record);", "private void insertIntoIncidentTicketTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString insertIntoIncidentTicketQuery = \"INSERT INTO Incidentticket VALUES \" + \"(?, ?, ?, ?, ?, ?, ?);\";\n\n\ttry {\n\n\t\tfor (IncidentTicket IncidentTicket : this.getIncidentTicketObjects()) {\n\t\t\tpst = conn.prepareStatement(insertIntoIncidentTicketQuery);\n\t\t\tpst.setInt(1, IncidentTicket.getId());\n\t\t\tpst.setInt(2, IncidentTicket.getInapuserid());\n\t\t\tpst.setInt(3, IncidentTicket.getInappostid());\n\t\t\tpst.setInt(4, IncidentTicket.getAssignedTechnicianid());\n\t\t\tpst.setString(5, IncidentTicket.getDate());\n\t\t\tpst.setString(6, IncidentTicket.getTime());\n\t\t\tpst.setNString(7, IncidentTicket.getIssue());\n\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords Inserted into IncidentTicket Table Successfully\\n\");\n\n\t\t}\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n---------Please Check Error Below for inserting values into Incident Ticket Table---------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}", "int insertSelective(Miss_control_log record);", "@Override\n\tpublic int insert(ElectricalCheck entity) throws Exception {\n\t\treturn electricalCheckMapper.insert(entity);\n\t}", "int insertSelective(ActivityHongbaoPrize record);", "int insert(Miss_control_log record);", "@Insert({\n \"insert into t_address (addrid, userid, \",\n \"province, city, \",\n \"region, address, \",\n \"postal, consignee, \",\n \"phone, status, createdate)\",\n \"values (#{addrid,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, \",\n \"#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, \",\n \"#{region,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, \",\n \"#{postal,jdbcType=VARCHAR}, #{consignee,jdbcType=VARCHAR}, \",\n \"#{phone,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP})\"\n })\n int insert(Address record);", "int insert(ActivityHongbaoPrize record);", "@Test\n public void testInsert() throws Exception {\n TestConnection conn = methodWatcher.getOrCreateConnection();\n conn.setAutoCommit(false);\n\n // insert good data\n PreparedStatement ps = methodWatcher.prepareStatement(\n String.format(\"insert into %s.%s (taskId, empId, startedAt, finishedAt) values (?,?,?,?)\",\n tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, \"1011\");\n ps.setInt(2, 101);\n ps.setInt(3, 0600);\n ps.setInt(4, 0700);\n int rows = ps.executeUpdate();\n\n Assert.assertEquals(1, rows);\n }", "public void insertIntoTable (String tableName , LinkedList<String> values);", "public void insertIntoParaList(Integer _taskID,Integer _optID, String _tupleTag, String _taskType, String _info1, String _info2, String _destIP,\r\n String _port,String _location, long _timestamp, Object _appSpecific) {\r\n \r\n List entry = new ArrayList();\r\n entry.add(_optID);\r\n entry.add(_tupleTag);\r\n entry.add(_taskType);\r\n entry.add(_info1);\r\n entry.add(_info2);\r\n entry.add(_destIP);\r\n entry.add(_port);\r\n entry.add(_location);\r\n entry.add(_timestamp); \r\n entry.add(_appSpecific);\r\n synchronized (lock) {\r\n paramList.put(_taskID, entry);\r\n } \r\n //System.out.println(\"Parameter list: \"+paramList);\r\n }", "void insertSelective(HrHBscCpuQos record);", "int insertSelective(PrescriptionVerifyRecordDetail record);", "int insert(PcQualificationInfo record);", "int insert(PageItemCfg record);", "int insertSelective(PmKeyDbObj record);", "int insert(WstatTeachingClasshourTeacher record);", "int insertSelective(WstatTeachingClasshourTeacher record);", "int insert(CustomReport record);", "public void complainAdd(String uName,String cm_type, String uCom,String userEmail,String UserTp){\n\n conn = con.connectTODB();\n\n try {\n String insert = \"INSERT INTO complain(u_name,c_type,u_complain,u_email,u_tp) VALUES('\"+uName+\"','\"+cm_type+\"','\"+uCom+\"','\"+userEmail+\"','\"+UserTp+\"')\";\n Statement RegisterUser = conn.createStatement();\n RegisterUser.execute(insert);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n\n }", "@Insert({ \"insert into ALERT_QUEUE (ALERT_Q_ID, ALERT_TYPE, \", \"USER_ID, SMS_TEXT, \", \"EMAIL_TEXT, CREATE_TIME, \", \"SCHEDULED_TIME, DELIVERED_STATUS, \", \"RETRY_COUNT, MOBILE_NO, \",\n\t\t\t\"EMAIL_TO, EMAIL_TEMPLATE_ID, \", \"BULK_EMAIL_MEMBER_NO)\", \"values (#{alertQId,jdbcType=DECIMAL}, #{alertType,jdbcType=VARCHAR}, \",\n\t\t\t\"#{userId,jdbcType=VARCHAR}, #{smsText,jdbcType=VARCHAR}, \", \"#{emailText,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, \",\n\t\t\t\"#{scheduledTime,jdbcType=TIMESTAMP}, #{deliveredStatus,jdbcType=VARCHAR}, \", \"#{retryCount,jdbcType=DECIMAL}, #{mobileNo,jdbcType=VARCHAR}, \",\n\t\t\t\"#{emailTo,jdbcType=VARCHAR}, #{emailTemplateId,jdbcType=VARCHAR}, \", \"#{bulkEmailMemberNo,jdbcType=VARCHAR})\" })\n\tint insert(AlertQueue record);", "int insertSelective(PayLogInfoPo record);", "void insertSelective(HrMscChaAssig record);", "void insert(BnesBrowsingHis record) throws SQLException;", "@Insert({\n \"insert into payment_t_weixin_callback_records (ID, OUT_TRADE_NO, \",\n \"TRANSACTION_ID, RESULT_CODE, \",\n \"PARAMETER_LIST, CALLBACK_TIME)\",\n \"values (#{id,jdbcType=BIGINT}, #{outTradeNo,jdbcType=VARCHAR}, \",\n \"#{transactionId,jdbcType=VARCHAR}, #{resultCode,jdbcType=VARCHAR}, \",\n \"#{parameterList,jdbcType=VARCHAR}, #{callbackTime,jdbcType=TIMESTAMP})\"\n })\n @Options(useGeneratedKeys=true,keyProperty=\"id\")\n int insert(WeixinCallbackRecordsGenerateBean record);", "int insert(DashboardGoods record);", "void insert(HrMscChaAssig record);", "public void insertValues(String tablename, ArrayList<Value> valueList) throws SQLException {\n String sql = \"INSERT INTO `\" + tablename + \"` \";\n String keys = \"( `\" + valueList.get(0).getKey() + \"`\";\n String values = \") VALUES ('\" + valueList.get(0).getValue() + \"'\";\n\n for(Value value : valueList){\n if(value != valueList.get(0)){\n\n keys += \" , `\" + value.getKey() + \"`\";\n values += \" , '\" + value.getValue() + \"'\";\n\n }\n }\n // Add values to the SQL-Syntax\n sql += keys + values + \")\";\n mysql.update(sql);\n }", "int insertSelective(@Param(\"record\") TbSerdeParams record, @Param(\"selective\") TbSerdeParams.Column ... selective);", "@Override\npublic int insert(StudentBo bo) throws Exception {\n\ttry {\n\tConnection con=ds.getConnection();\n\tps=con.prepareStatement(STUDENT_INSERT_QUERY);\n\t//set value to query param\n\tps.setInt(1, bo.getSno());\n\tps.setString(2,bo.getSname());\n\tps.setInt(3,bo.getTotal());\n\tps.setFloat(4, bo.getAvg());\n\tps.setString(5,bo.getResult());\n\t//exceute the result\n\tresult=ps.executeUpdate();\n\n\t\n\treturn result;\n}\n\tcatch(SQLException se) {\n\t\treturn 0;\n\t}\n\tcatch(Exception e) {\n\t\treturn 0;\n\t}\n}", "int insert(CommonQuestionStrategyType record);", "int insert(BizUserWhiteList record);", "public void beforeInsert(DevicelabtestBean pObject) throws SQLException;", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected void addParameterTable( SecurityCheck securityCheck, XFormField field )\n \t{\n \t\tfield.setProperty( \"component\", new SecurityCheckedParametersTablePanel( new SecurityParametersTableModel(\n \t\t\t\t( ( AbstractSecurityCheckWithProperties )securityCheck ).getParameterHolder() ), securityCheck\n \t\t\t\t.getTestStep().getProperties() ) );\n \t}", "int insertSelective(BizUserWhiteList record);", "void insert(HrHBscCpuQos record);", "public void insert(List<T> entity) throws NoSQLException;", "int insertSelective(SurveystatusPkey record);", "public void insert(String tableName, String header, int value)\r\n {\r\n try \r\n {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO \"+tableName+\"(\"+header+\")VALUES(\"+value+\")\");\r\n } \r\n catch (NumberFormatException | SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n \r\n }\r\n }", "int insert(ParseTableLog record);", "int insert(AgentLevel record);", "@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);", "void addParameter(String name, String value) throws CheckerException;", "int insert(CmIndustryConfig record);", "int insert(HospitalType record);", "int insertSelective(CustomReport record);", "void insertOrUpdate(StockList stockList) throws Exception;", "public EvaluationsDegreePk insert(EvaluationsDegree dto) throws EvaluationsDegreeDaoException;" ]
[ "0.60373205", "0.5850249", "0.5782086", "0.56993014", "0.56876284", "0.5676407", "0.5675208", "0.56538826", "0.56295586", "0.5581731", "0.55380017", "0.548805", "0.54471594", "0.5442848", "0.54416263", "0.5431838", "0.5422712", "0.5413792", "0.54063433", "0.540036", "0.53934693", "0.53879964", "0.5367938", "0.5346378", "0.53449494", "0.5341687", "0.53405637", "0.5335325", "0.53242433", "0.53241426", "0.5323336", "0.53216285", "0.5318553", "0.5311648", "0.5305637", "0.52900517", "0.52898085", "0.5281769", "0.5274862", "0.5273624", "0.52707833", "0.5270653", "0.5268162", "0.52666926", "0.5265481", "0.52599883", "0.5256506", "0.5254633", "0.5251252", "0.52455246", "0.5228011", "0.52191824", "0.52101773", "0.5208621", "0.52062327", "0.5203479", "0.52031827", "0.520213", "0.5201482", "0.5193294", "0.5189098", "0.51863116", "0.5185551", "0.5185284", "0.5184293", "0.51826394", "0.51769346", "0.51760936", "0.5174493", "0.5169297", "0.5169237", "0.5168028", "0.51679933", "0.51678807", "0.5167087", "0.51629543", "0.51600766", "0.51550245", "0.5148695", "0.51471716", "0.5144928", "0.51427555", "0.51415193", "0.5138704", "0.5136128", "0.5131286", "0.5126066", "0.5122434", "0.5120938", "0.5119418", "0.5116342", "0.5110775", "0.51104546", "0.5110314", "0.51102513", "0.5109113", "0.5107313", "0.51071346", "0.510654", "0.5102079" ]
0.6791266
0
Insert in Health_Check table.
public static void insertHealthCheck(final int componentId, final Long regionId, final int environmentId, final int healthCheckTypeId, final int maxRetryCount) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); HealthCheckEntity healthEntity = new HealthCheckEntity(); ComponentEntity compEntity = new ComponentEntity(); compEntity.setComponentId(componentId); healthEntity.setComponent(compEntity); RegionEntity regEntity = new RegionEntity(); regEntity.setRegionId(regionId); healthEntity.setRegion(regEntity); EnvironmentEntity envEntity = new EnvironmentEntity(); envEntity.setEnvironmentId(environmentId); healthEntity.setEnvironment(envEntity); HealthCheckTypeEntity hctEntity = new HealthCheckTypeEntity(); hctEntity.setHealthCheckTypeId(healthCheckTypeId); healthEntity.setHealthCheckType(hctEntity); StatusEntity upStatus = new StatusEntity(); upStatus.setStatusId(Status.UP.getStatusId()); healthEntity.setCurrentStatus(upStatus); healthEntity.setMaxRetryCount((long) maxRetryCount); healthEntity.setFailedCount(0L); session.save(healthEntity); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer insert(ChronicCheck record);", "public void insert() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { myData.record.save(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\n\tpublic int insert(ElectricalCheck entity) throws Exception {\n\t\treturn electricalCheckMapper.insert(entity);\n\t}", "int insert(WizardValuationHistoryEntity record);", "int insert(Miss_control_log record);", "int insert(InspectionAgency record);", "int insert(WstatTeachingClasshourTeacher record);", "int insert(HostSummaryByStatementType record);", "void insert(BnesBrowsingHis record) throws SQLException;", "@Test(enabled = false)\n public void testInsertIntoTempTable() throws Exception {\n String tableName = createTable();\n String insertTableName = createTable(false, false, true);\n\n assertTableIsRegistered(DEFAULT_DB, tableName);\n assertTableIsNotRegistered(DEFAULT_DB, insertTableName, true);\n\n String query = \"insert into \" + insertTableName + \" select id, name from \" + tableName;\n\n runCommand(query);\n\n Set<ReadEntity> inputs = getInputs(tableName, Entity.Type.TABLE);\n Set<WriteEntity> outputs = getOutputs(insertTableName, Entity.Type.TABLE);\n\n outputs.iterator().next().setWriteType(WriteEntity.WriteType.INSERT);\n\n HiveEventContext event = constructEvent(query, HiveOperation.QUERY, inputs, outputs);\n AtlasEntity hiveProcess = validateProcess(event);\n AtlasEntity hiveProcessExecution = validateProcessExecution(hiveProcess, event);\n AtlasObjectId process = toAtlasObjectId(hiveProcessExecution.getRelationshipAttribute(\n BaseHiveEvent.ATTRIBUTE_PROCESS));\n Assert.assertEquals(process.getGuid(), hiveProcess.getGuid());\n Assert.assertEquals(numberOfProcessExecutions(hiveProcess), 1);\n\n assertTableIsRegistered(DEFAULT_DB, tableName);\n assertTableIsRegistered(DEFAULT_DB, insertTableName, null, true);\n }", "int insert(TycCompanyCheckCrawler record);", "Integer insertSelective(ChronicCheck record);", "int insert(ParseTableLog record);", "int insert(Assist_table record);", "@Insert({\n \"insert into B_UMB_CHECKING_LOG (JNLNO, TRANDATE, \",\n \"ACCOUNTDATE, CHECKTYPE, \",\n \"STATUS, DONETIME, FILENAME)\",\n \"values (#{jnlno,jdbcType=VARCHAR}, #{trandate,jdbcType=VARCHAR}, \",\n \"#{accountdate,jdbcType=VARCHAR}, #{checktype,jdbcType=CHAR}, \",\n \"#{status,jdbcType=CHAR}, #{donetime,jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR})\"\n })\n int insert(BUMBCheckingLog record);", "void insert(HrHBscCpuQos record);", "int insert(SurveystatusPkey record);", "void insert(HrMscChaAssig record);", "int insert(EventsWaitsSummaryByInstance record);", "int insertSelective(WizardValuationHistoryEntity record);", "int insert(BpmInstanciaHistorica record);", "int insert(DashboardGoods record);", "void insert(Metric metric) throws MetricException;", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "int insert(StatusByUser record);", "int insert(AgentLevel record);", "int insert(CrawlTest record);", "int insert(CustomReport record);", "private void insert() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"insert into OldStudent(id,name,grade) select s.id,s.name,s.grade from Student s\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows inserted in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\t}", "int insert(ActivityHongbaoPrize record);", "int insert(BasCounties record);", "public void insert(Item x) {\n\t\tint probe = 0;\n\t\tif(amount==table.length) {\n\t\t\tSystem.out.println(\"Linear Insertion Failed: Table is full\");\n\t\t\tSystem.exit(0);\n\t\t\treturn;\n\t\t}\n\t\tint h = hash(x.getDate());\n\t\twhile(table[h]!=null) {\n\t\t\tprobe++;\n\t\t\t\n\t\t\th=(h+1)%getTablesize();\n\t\t}\n\t\ttable[h] = x;\n\t\tamount++;\n\t\tprobesInsert[amount-1] = probe;\n\t\tfixLoadFactor();\n\t\t\n\t\t\n\t\t\n\t}", "int insert(HomeWork record);", "int insertSelective(InspectionAgency record);", "public void insert() throws SQLException;", "int insert(FinancialManagement record);", "int insert(AccuseInfo record);", "public void insertStat(Stats stat) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tint idMatch = getMatchesRowNumber() + 1;\n\t\t\tString insertStat_sql = \"INSERT INTO \" + stats_table\n\t\t\t\t\t+ \" (id, idMatch, goalsHome, goalsAway, numberOfCorners, numberOfFouls)\" + \" VALUES (NULL, '\"\n\t\t\t\t\t+ idMatch + \"', '\" + stat.getGoalsHome() + \"' , '\" + stat.getGoalsAway() + \"' , '\"\n\t\t\t\t\t+ stat.getNumberOfCorners() + \"' , '\" + stat.getNumberOfFouls() + \"')\";\n\t\t\tstatement.executeUpdate(insertStat_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This team is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "void insert(TResearchTeach record);", "private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public static void trackerAdd(Status s) throws ClassNotFoundException, SQLException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\t\n\t\tDB_Interface.insertStatus(conn, s);\n\t\tconn.close();\n\t}", "HealthCheck createHealthCheck(TableName tableName);", "int insertSelective(WstatTeachingClasshourTeacher record);", "int insert(BizUserWhiteList record);", "@Test\n public void testInsert() throws Exception {\n TestConnection conn = methodWatcher.getOrCreateConnection();\n conn.setAutoCommit(false);\n\n // insert good data\n PreparedStatement ps = methodWatcher.prepareStatement(\n String.format(\"insert into %s.%s (taskId, empId, startedAt, finishedAt) values (?,?,?,?)\",\n tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, \"1011\");\n ps.setInt(2, 101);\n ps.setInt(3, 0600);\n ps.setInt(4, 0700);\n int rows = ps.executeUpdate();\n\n Assert.assertEquals(1, rows);\n }", "int insert(HospitalType record);", "int insert(BehaveLog record);", "protected void importIntoTable(HttpLogData data) throws Exception {\n Db db = getDb();\n st_insert_temp_table.setString(1, data.domain_name);\n st_insert_temp_table.setString(2, data.category);\n st_insert_temp_table.setString(3, data.site_name);\n st_insert_temp_table.setObject(4, null);\n st_insert_temp_table.setTimestamp(5, DateHelper.sql(data.datetime));\n st_insert_temp_table.setLong(6, data.time_taken);\n st_insert_temp_table.setInt(7, getOrCreateAuthorizationId(data.authorization));\n st_insert_temp_table.setLong(8, data.volume_client_to_server);\n st_insert_temp_table.setLong(9, data.volume_server_to_client);\n st_insert_temp_table.setInt(10, data.http_status);\n st_insert_temp_table.setString(11, data.user_agent);\n st_insert_temp_table.setString(12, data.agent_version);\n st_insert_temp_table.setInt(13, data.type);\n st_insert_temp_table.setString(14, data.ip_client);\n st_insert_temp_table.setString(15, obfuscateUsername(data.user_name));\n st_insert_temp_table.setString(16, data.mime_type);\n st_insert_temp_table.setBoolean(17, data.intranet);\n st_insert_temp_table.setString(18, data.path);\n st_insert_temp_table.setInt(19, data.specificFileWithoutReferer ? 1 : 0);\n st_insert_temp_table.setInt(20, data.robotsTxt ? 1 : 0);\n db.executeUpdate(st_insert_temp_table);\n }", "void insertBatch(List<InspectionAgency> recordLst);", "int insert(Drug_OutWarehouse record);", "int insert(Alert record);", "int insertSelective(TycCompanyCheckCrawler record);", "int insertSelective(BpmInstanciaHistorica record);", "int insert(ClinicalData record);", "int insert(HotspotLog record);", "int insertSelective(Miss_control_log record);", "int insert(AutoAssessDetailWithBLOBs record);", "int insert(Report record);", "@Override\n public Status insert(String table, String key, Map<String, ByteIterator> values) {\n String hash = serialize(values);\n InsertM request = InsertM.newBuilder().setTable(table).setKey(key).setValues(hash).build();\n Result response;\n try {\n response = blockingStub.insert(request);\n } catch (StatusRuntimeException e) {\n return Status.ERROR;\n }\n return Status.OK;\n }", "int insert(CfgSearchRecommend record);", "int insert(UvStatDay record);", "public void insert() {\n String sqlquery = \"insert into SCORE (NICKNAME, LEVELS,HIGHSCORE, NUMBERKILL) values(?, ?, ?,?)\";\n try {\n ps = connect.prepareStatement(sqlquery);\n ps.setString(1, this.nickname);\n ps.setInt(2, this.level);\n ps.setInt(3, this.highscore);\n ps.setInt(4, this.numofKill);\n ps.executeUpdate();\n //JOptionPane.showMessageDialog(null, \"Saved\", \"Insert Successfully\", JOptionPane.INFORMATION_MESSAGE);\n System.out.println(\"Insert Successfully!\");\n ps.close();\n connect.close();\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "int insert(BasicInfoAnodeBurningLossRate record);", "public void complainAdd(String uName,String cm_type, String uCom,String userEmail,String UserTp){\n\n conn = con.connectTODB();\n\n try {\n String insert = \"INSERT INTO complain(u_name,c_type,u_complain,u_email,u_tp) VALUES('\"+uName+\"','\"+cm_type+\"','\"+uCom+\"','\"+userEmail+\"','\"+UserTp+\"')\";\n Statement RegisterUser = conn.createStatement();\n RegisterUser.execute(insert);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n\n }", "int insert(StatusReplies record);", "int insert(Blacklist record);", "int insert(ac_teacher_instrument record);", "void insertSelective(HrHBscCpuQos record);", "@Insert({\n \"insert into actions_accounts (actor, permission, \",\n \"action_id)\",\n \"values (#{actor,jdbcType=VARCHAR}, #{permission,jdbcType=VARCHAR}, \",\n \"#{actionId,jdbcType=INTEGER})\"\n })\n int insert(ActionsAccounts record);", "int insert(FactRoomLog record);", "int insert(BachAlarmRole record);", "int insert(OpeningRequirement record);", "public void run() {\n String query = \"INSERT INTO CustomData (Server, Plugin, ColumnID, DataPoint, Updated) VALUES\";\n int currentSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // Iterate through each column\n for (Map.Entry<Column, Integer> entry : customData.entrySet()) {\n Column column = entry.getKey();\n int value = entry.getValue();\n\n // append the query\n query += \" (\" + server.getId() + \", \" + plugin.getId() + \", \" + column.getId() + \", \" + value + \", \" + currentSeconds + \"),\";\n }\n\n // Remove the last comma\n query = query.substring(0, query.length() - 1);\n\n // add the duplicate key entry\n query += \" ON DUPLICATE KEY UPDATE DataPoint = VALUES(DataPoint) , Updated = VALUES(Updated)\";\n\n // queue the query\n new RawQuery(mcstats, query).save();\n }", "int insert(CmIndustryConfig record);", "int insert(TrainingCourse record);", "int insert(ConfigData record);", "int insert(SupplyNeed record);", "public abstract boolean insert(Log log) throws DataException;", "int insert(TemperatureMeasureHitchEvent record);", "int insert(PrescriptionVerifyRecordDetail record);", "int insert(CommonQuestionStrategyType record);", "private void insert(SymObject obj) {\n try {\n table.insert(obj);\n } catch (NameAlreadyExistsExcpetion ex) {\n error(obj.name + \" already declared\");\n }\n }", "void insert(IrpSignInfo record) throws SQLException;", "public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }", "int insert(PaasCustomAutomationRecord record);", "void insert(GfanCodeBanner record) throws SQLException;", "int insert(Storydetail record);", "int insert(UserPonumberGoods record);", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "int insert(InternalTradeEpa022016 record);", "int insertSelective(SurveystatusPkey record);", "int insert(TestActivityEntity record);", "public void insert(Job job) throws DatabaseException, IllegalArgumentException;", "int insertSelective(DashboardGoods record);", "public void insertSiteStats (SiteStatisticsVO data) throws DataServiceException;", "int insert(SvcStoreBeacon record);", "private boolean insert()throws Exception{\n String query = \"INSERT INTO \" + tableName + \" VALUES(?, ?, ?)\";\n PreparedStatement pstm = this.con.prepareStatement(query);\n\n pstm.setObject(1, Name.getText().trim());\n pstm.setObject(2, City.getText().trim());\n pstm.setObject(3, Phone.getText().trim());\n\n int result = pstm.executeUpdate();\n\n return (result > 0);\n }", "int insert(ExamineApproveResult record);" ]
[ "0.66467583", "0.6547429", "0.6377034", "0.6278137", "0.6164675", "0.6130675", "0.6108128", "0.60725504", "0.60651153", "0.60243726", "0.6012513", "0.6010716", "0.5973945", "0.5962757", "0.5936567", "0.5933157", "0.59271234", "0.5922526", "0.58998024", "0.5855313", "0.58453345", "0.58425176", "0.5837055", "0.5830591", "0.58278126", "0.582598", "0.581442", "0.5814105", "0.5797055", "0.5791815", "0.57785434", "0.57778645", "0.5750531", "0.57490635", "0.57473963", "0.5742137", "0.57408255", "0.5737183", "0.5729784", "0.5725342", "0.5724008", "0.57039386", "0.5703493", "0.57008064", "0.5698188", "0.56940466", "0.5693352", "0.5688267", "0.56881475", "0.5680939", "0.5674962", "0.5671547", "0.56699646", "0.56663847", "0.56529665", "0.56529593", "0.5650933", "0.56467605", "0.5641789", "0.5639852", "0.5638113", "0.56371886", "0.56314754", "0.5623945", "0.5621153", "0.5619311", "0.561306", "0.5602484", "0.55963624", "0.55960864", "0.558842", "0.55811673", "0.5580406", "0.55681366", "0.5563158", "0.5560965", "0.55571157", "0.55562913", "0.5552591", "0.5551694", "0.55500865", "0.55469096", "0.5545874", "0.5544034", "0.5531136", "0.55288845", "0.5528262", "0.5525471", "0.55191565", "0.5517119", "0.55153626", "0.55125564", "0.5511745", "0.5510404", "0.5509281", "0.5506906", "0.55067164", "0.55005366", "0.5497939", "0.5496998" ]
0.5676241
50
Function to get all components in database
public static List<ComponentVO> getAllAPIComponentDetails(final int environmentId, String platform, long regionId) { AppTransformConfig config = readAppTransformConfig(); Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria healthCheckCriteria = session.createCriteria(HealthCheckEntity.class, "hc"); healthCheckCriteria.createCriteria("hc.component","cmp"); healthCheckCriteria.createCriteria("hc.component.parentComponent","prnt"); healthCheckCriteria.createCriteria("hc.component.componentType", "ct"); healthCheckCriteria.add(Restrictions.eq("hc.environment.environmentId", environmentId)); healthCheckCriteria.add(Restrictions.eq("hc.region.regionId", regionId)); healthCheckCriteria.add(Restrictions.isNotNull("prnt.componentId")); healthCheckCriteria.add(Restrictions.eq("cmp.platform", platform)); if(config == null){ healthCheckCriteria.add(Restrictions.eq("ct.componentTypeId", ComponentType.APP.getComponentTypeId())); }else{ healthCheckCriteria.add(Restrictions.or(Restrictions.eq("ct.componentTypeId",ComponentType.APP.getComponentTypeId()), Restrictions.in("prnt.componentName", config.getTransformName().values() )) ); } @SuppressWarnings("unchecked") List<HealthCheckEntity> compHltDetails = healthCheckCriteria.list(); txn.commit(); ArrayList<ComponentVO> returnList = new ArrayList<ComponentVO>(); for (HealthCheckEntity hc: compHltDetails) { ComponentVO cVO = new ComponentVO(); cVO.setDelInd(hc.getDelInd()); ComponentEntity comp = hc.getComponent(); cVO.setComponentId(comp.getComponentId()); cVO.setComponentName(comp.getComponentName()); cVO.setComponentDesc(comp.getComponentDesc()); cVO.setParentComponentId(comp.getParentComponent().getComponentId()); cVO.setComponentTypeId(comp.getComponentType().getComponentTypeId()); returnList.add(cVO); } return returnList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Compte> findAll() {\n\t\treturn dao.findAll();\n\t}", "@Override\r\n public Collection<Component> selectComponentsList( Plugin plugin )\r\n {\r\n Collection<Component> componentList = new ArrayList<Component>( );\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL, plugin );\r\n daoUtil.executeQuery( );\r\n\r\n while ( daoUtil.next( ) )\r\n {\r\n Component component = new Component( );\r\n\r\n component.setId( daoUtil.getInt( 1 ) );\r\n component.setGroupId( daoUtil.getString( 2 ) );\r\n component.setTitle( daoUtil.getString( 3 ) );\r\n component.setDescription( daoUtil.getString( 4 ) );\r\n component.setArtifactId( daoUtil.getString( 5 ) );\r\n component.setVersion( daoUtil.getString( 6 ) );\r\n component.setComponentType( daoUtil.getString( 7 ) );\r\n\r\n componentList.add( component );\r\n }\r\n\r\n daoUtil.free( );\r\n\r\n return componentList;\r\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "List<JModuleInfo> queryAll();", "public void getComponents(DatabaseMetaData meta) throws SQLException {\n String[] types = {\"TABLE\"};\n ResultSet rs = meta.getTables(null, null, null, types);\n while(rs.next()){\n Table t = new MysqlTable(rs.getString(\"TABLE_NAME\"), rs.getString(\"TABLE_TYPE\"));\n //t.getComponents(meta);\n this.setTables(t);\n }\n try{\n rs.close();\n } catch (Exception ignored){\n } finally { rs.close(); /*Anyway*/ }\n }", "@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}", "@Override\n public List<Seq> getAll() {\n Connection conn = null;\n Statement stmt = null;\n List<Seq> listSeqs = new ArrayList<>();\n\n try {\n String url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n conn = DriverManager.getConnection(url);\n stmt = conn.createStatement();\n ProcessesDAO pdao = new ProcessesDAO();\n String sql = \"select * from seq;\";\n ResultSet rs = stmt.executeQuery(sql);\n\n while (rs.next()) {\n\n Seq seq = new Seq(rs.getInt(\"id\"), pdao.getbyidentifier(rs.getString(\"identifier\")), rs.getInt(\"seq_number\"));\n listSeqs.add(seq);\n }\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n return listSeqs;\n }", "public ArrayList<Service> selectAll(){\n return Database.servico;\n }", "public List<ComponentType> getComponentsType() {\r\n\t\treturn ctDao.findAll();\r\n\t}", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "List<Product> getAllProducts() throws DataBaseException;", "List fetchAll() throws AdaptorException ;", "@Override\n\tpublic List<Computer> getAll() {\n\t\t\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tString sql = \"SELECT computer.id, computer.name, computer.introduced, computer.discontinued, computer.company_id, company.name FROM computer INNER JOIN company ON computer.company_id = company.id;\";\n\t\t\tconnection = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\tList<Computer> computerList = new ArrayList<Computer>();\n\t\t\twhile(resultSet.next()) {\n\t\t\t\n\t\t\t\tCompany company = Company.builder()\n\t\t\t\t\t\t.setId(resultSet.getLong(\"computer.company_id\"))\n\t\t\t\t\t\t.setName(resultSet.getString(\"company.name\"))\n\t\t\t\t\t\t.build();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tComputer computer = Computer.builder()\n\t\t\t\t\t\t.setId(resultSet.getLong(\"computer.id\"))\n\t\t\t\t\t\t.setName(resultSet.getString(\"computer.name\"))\n\t\t\t\t\t\t.setIntroduced(resultSet.getTimestamp(\"computer.introduced\"))\n\t\t\t\t\t\t.setDiscontinued(resultSet.getTimestamp(\"computer.discontinued\"))\n\t\t\t\t\t\t.setCompany_id(resultSet.getLong(\"computer.company_id\"))\n\t\t\t\t\t\t.setCompany(company)\n\t\t\t\t\t\t.build();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcomputer.toString();\n\t\t\t\tcomputerList.add(computer);\n\t\t\t}\n\t\t\t\n\t\t\treturn computerList;\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tthrow new DAOException(\"Impossible de récupérer la liste des ordinateurs\", e);\n\t\t}finally {\n\t\t\tDaoUtils.closeAll(resultSet, preparedStatement, connection);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "List<BasicEquipment> selectAll();", "void db_all(Context context);", "List<Product> getAllProducts() throws PersistenceException;", "public List<MS> selectAllEntries() throws SQLException {\r\n Connection connection = super.getDataSource().getConnection();\r\n try {\r\n PreparedStatement pstmt = connection\r\n .prepareStatement(\"SELECT ID, NAME,\" + COMPONENT + \",TOTAL \"\r\n \t\t\t\t+ \"FROM ROOT\");\r\n ResultSet rs = pstmt.executeQuery();\r\n ArrayList<MS> list = new ArrayList<MS>();\r\n while (rs.next()) {\r\n MS ms = new MS();\r\n ms.setId(new Integer(rs.getInt(1)));\r\n \r\n ms.setSum(super.getSum(ms.getId()));\r\n \r\n \r\n ms.setName(rs.getString(2));\r\n ms.generateINumber();\r\n \r\n ms.setMs(rs.getInt(3));\r\n ms.setTotal(rs.getInt(4));\r\n list.add(ms);\r\n }\r\n Collections.sort(list);;\r\n return list;\r\n } finally {\r\n if (connection != null) {\r\n connection.close();\r\n }\r\n }\r\n }", "public List selectAll() {\n\t\tList values = new ArrayList();\n\t\topen();\n\t\tCursor c = queryDB();\n\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t//\tvalues.add(hydrateNewObject(c));\n\t\t\t} while (c.moveToNext());\n\t\t}\n\t\t\n\t\tc.close();\n\t\tclose();\n\t\t\n\t\treturn values;\n\t}", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "List<Course> selectAll();", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "@Override\n\tpublic List<DatabaseObject> selectAll(DatabaseHandler db) {\n\t\treturn db.getAllWorks();\n\t}", "public List<CompradorEntity> findAll() {\r\n TypedQuery<CompradorEntity> query = em.createQuery(\"select u from CompradorEntity u\", CompradorEntity.class);\r\n return query.getResultList();\r\n }", "public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "java.util.List<yandex.cloud.api.mdb.mongodb.v1.DatabaseOuterClass.Database> \n getDatabasesList();", "public List<T> findAll() throws NoSQLException;", "List<Dormitory> selectAll();", "private static void buildList() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (connection == null || connection.isClosed()) \r\n\t\t\t\tconnection = DataSourceManager.getConnection();\r\n\t\t\t\r\n\t\t\tstatement = connection.prepareStatement(LOAD_ALL);\r\n\t \tresultset = statement.executeQuery();\r\n\t \t\r\n\t \tgroups = getCollectionFromResultSet(resultset);\r\n\t \tresultset.close();\r\n\t statement.close();\r\n\t\t\t\r\n\t\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t\tlog.fatal(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}", "<T extends Component> Collection<T> getAllComponents(Class<T> type);", "@Override\n\tpublic List<Product> getAll() throws SQLException {\n\t\treturn null;\n\t}", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(CertificationConstants.DB_TABLE, CertificationConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "public ArrayList<VideogameBean> doRetrieveAll() throws SQLException{\n\t\tDatabaseConnector connector = new DatabaseConnector();\n\t\tconnector.startConnection();\n\t\tPreparedStatement stateAll = connector.getJdbcConnection()\n\t\t\t\t.prepareStatement(\"SELECT * FROM Videogioco\");\n\t\tResultSet container = stateAll.executeQuery();\n\t\tArrayList<VideogameBean> allBeans = new ArrayList<VideogameBean>();\n\t\t\n\t\twhile(container.next()==true) {\n\t\t\t\n\t\t\tint codiceVideogioco = container.getInt(\"codiceVideogioco\");\n\t\t\tString titolo = container.getString(\"titolo\");\n\t\t\tString descrizione = container.getString(\"descrizione\");\n\t\t\tString console = container.getString(\"console\");\n\t\t\tdouble prezzo = container.getDouble(\"prezzo\");\n\t\t\tint disp = container.getInt(\"disponibilita\");\n\t\t\tint spedizione = container.getInt(\"spedizione\");\n\t\t\tString imgPath = container.getString(\"imgPath\");\n\t\t\tVideogameBean prod = new VideogameBean();\n\t\t\tprod.setVideogameCode(codiceVideogioco);\n\t\t\tprod.setTitle(titolo);\n\t\t\tprod.setDescription(descrizione);\n\t\t\tprod.setConsole(console);\n\t\t\tprod.setPrice(prezzo);\n\t\t\tprod.setAvailability(disp);\n\t\t\tprod.setShipment(spedizione);\n\t\t\tprod.setImgPath(imgPath);\n\t\t\tallBeans.add(prod);\n\t\t\t\n\t\t}\n\t\t\t\n\t\tif (allBeans.size()==0) {\n\t\t\tconnector.closeConnection();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tconnector.closeConnection();\n\t\treturn allBeans;\n\t\t\n\t}", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "public FindIterable<Document> getAllDocuments() {\n\t\tMongoDatabase db = mongoClient.getDatabase(MongoActions.props.getDBName());\n\t\tMongoCollection<Document> table = db.getCollection(MongoActions.props.getCollectionName());\n\t\tFindIterable<Document> iterable = table.find();\n\n\t\treturn iterable;\n\t}", "public List<CourseType> searchAllCourses(){\n ArrayList<CourseType> courses = new ArrayList<>();\n Connection connection = getConnection();\n if(connection != null){\n try{\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * from Courses\");\n ResultSet resultSet = preparedStatement.executeQuery();\n while (resultSet.next()){\n courses.add(new CourseType(\n \t\tresultSet.getInt(1),\n resultSet.getString(2),\n resultSet.getString(3),\n resultSet.getInt(4),\n resultSet.getInt(5),\n resultSet.getInt(6)));\n }\n }catch (SQLException e){e.printStackTrace();}\n finally {\n closeConnection(connection);\n }\n }\n return courses;\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "@Override\n\tpublic List<EhmoPackage> fetchAll() {\n\t\treturn ehmoPackageDao.fetchAll();\n\t}", "@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "List<StockList> fetchAll();", "@Override\n public Collection<Curso> getAll() {\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor,p.apellido as apellido, c.nombrecurso, c.claveprofesor,\\n\" +\n\" c.clavealumno from curso c, persona p\\n\" +\n\"where c.idprofesor = p.id\");\n \n\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n String nombre=\"\\\"\"+rs.getString(\"nombreprofesor\")+\" \"+rs.getString(\"apellido\")+\"\\\"\";\n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), nombre,rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "public List<Brands> LoadAllBrands() {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands`\";\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "List<Computer> findAll();", "public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }", "@Transactional\n public List<CourseDTO> findAll() {\n List<CourseDTO> courseList = new ArrayList<>();\n Iterable<Course> courseIter = courseDAO.findAll();\n for (Course course : courseIter) {\n CourseDTO courseDTO = courseMapper.mapFromCoursetoCourseDTO(course);\n courseList.add(courseDTO);\n }\n return courseList;\n }", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "ArrayList<E> getAllObjects() throws DatabaseNotAccessibleException;", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "public Cursor fetchAll() {\n\t\treturn db.query(tableName, fields, null, null, null, null, null);\n\t}", "public SampletypeBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM sampletype\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public Collection<T> getAll() throws DaoException;", "List<EquipmentCategory> getAllEquipment() throws PersistenceException;", "private List<String> queryForAll() {\n // query for all of the data objects in the database\n List<Contact> list = dao.queryForAll();\n List<String> creadentials = new ArrayList<String>();\n for (Contact contact : list) {\n creadentials.add(contact.email);\n creadentials.add(contact.password);\n }\n return creadentials;\n }", "public List<ConsejoEntity> findAll() {\r\n Query q = em.createQuery(\"select u from ConsejoEntity u\");\r\n return q.getResultList();\r\n }", "public java.util.List<CsclAppointeeMaster> findAll();", "@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }", "public List findAll() {\n\t\treturn dao.findAll();\r\n\t}", "public List<Product> findAll();", "List<Product> findAll();", "List<Product> findAll();", "List<CommunityInform> selectAll();", "public void getAll() {\n Cursor res = myDB.getAllData();\n if (res.getCount() == 0) {\n Log.e(\"NO_ELEMENT\", \"NO ELEMENTS IN THE DB\");\n }\n while (res.moveToNext()) {\n arrayList.add(res.getString(1));\n }\n Log.d(TAG, \"getAll() returned: \" + arrayList);\n }", "@Override\r\n\tpublic ArrayList<Board1> getAll() {\n\t\treturn dao.selectAll();\r\n\t}", "public ArrayList<ComProduct> get_all_comproduct() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<ComProduct> ComProduct_list;\n\n\t\t\tComProduct_list = ComProduct_Default_Activity_dao.get_all_comproduct();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn ComProduct_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "Collection<Book> getAll();", "public abstract List<Component> getComponentsByName(String name);", "public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n\tpublic List<Vehicle> getAll() {\n\t\tList<Vehicle> list = new LinkedList<Vehicle>();\n\t\ttry {\n\t\t\tStatement st = Database.getInstance().getDBConn().createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT v.vehicle_ID, v.plate_number, v.mv_number, v.engine_number, v.chassis_number, m.description as model_name, c.description as category, v.encumbered_to, v.amount, v.maturity_date, v.status, v.image FROM models m INNER JOIN vehicles v ON m.model_ID=v.model_ID INNER JOIN vehicle_categories c ON c.category_ID=v.category_ID\");\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tBlob blob = rs.getBlob(\"image\");\n\t\t\t\tInputStream is = blob.getBinaryStream(1, (int)blob.length());\n\t\t\t\tBufferedImage bf = ImageIO.read(is);\n\t\t\t\tImage img = SwingFXUtils.toFXImage(bf, null);\n\t\t\t\t\n\t\t\t\tlist.add(new Vehicle(rs.getInt(\"vehicle_ID\"), rs.getString(\"plate_number\"), rs.getString(\"mv_number\"), rs.getString(\"engine_number\"), rs.getString(\"chassis_number\"),rs.getString(\"model_name\"), rs.getString(\"category\"), rs.getString(\"encumbered_to\"), rs.getDouble(\"amount\"), Date.parse(rs.getString(\"maturity_date\")), rs.getString(\"status\"), img));\n\t\t\t}\n\t\t\t\n\t\t\tst.close();\n\t\t\trs.close();\n\t\t} catch(Exception err) {\n\t\t\terr.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<FicheColisageValue> getAll(){\n\t\t\r\n\t\treturn ficheColisagePersistance.getAll();\r\n\t}", "@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}", "E[] getAll();", "@Override\r\n\tpublic List<Combination> getAllCombination() {\n\t\tString hql = \"from Combination\";\r\n\t\treturn (List<Combination>) getHibernateTemplate().find(hql);\r\n\t}", "@Test\n\tpublic void selectAllFromCourseTable() {\n\t\tList arrayList = em.createNamedQuery(\"query_get_all_courses\").getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c -> {}\", arrayList);\n\t}", "@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}", "public InstitutionBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM institution\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public List<Product> getAll() {\n\t\treturn productRepository.findAll();\n\n\t}", "@Override\r\n\tpublic List<Product> getallProducts() {\n\t\treturn dao.getallProducts();\r\n\t}", "@Override\n\tpublic List<Comprobante> findAll() throws Exception {\n\t\treturn comproRepository.findAll();\n\t}", "public PreferenceBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM preference\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@Override\n public List<T> findAll() {\n String getAllQuery = \"SELECT * FROM \" + getTableName();\n return getJdbcTemplate().query(getAllQuery,\n BeanPropertyRowMapper.newInstance(getEntityClass()));\n }", "public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }", "@Override\n\tpublic List<Basicunit> selectAll() {\n\t\treturn basicDAOManager.selectAll();\n\t}", "@Override\n\tpublic List<Commande> getAll() {\n\n\t\ttry {\n\n\t\t\tps = this.connection.prepareStatement(\"SELECT * FROM commandes\");\n\n\t\t\trs = ps.executeQuery();\n\n\t\t\tList<Commande> listeCommandesBDD = new ArrayList<>();\n\t\t\tCommande commande = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tcommande = new Commande(rs.getInt(1), rs.getDate(2), rs.getInt(3));\n\t\t\t\tlisteCommandesBDD.add(commande);\n\n\t\t\t} // end while\n\n\t\t\treturn listeCommandesBDD;\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"...(CommandeDAOImpl) erreur de l'execution de getAll()...\");\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tps.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} // end finally\n\n\t\treturn null;\n\n\t}", "public static <T> void queryAll() {\n\t\tString sql = \"SELECT * FROM LIBRARY ORDER BY BID \";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tClass<T> clazz = (Class<T>) Lib.class;\n\t\tSystem.out.println(\"All books info is displayed below: \");\n\t\ttry {\n\t\t\tList<T> eleList = dao.queryData(sql, clazz);\n\t\t\tfor (T ele : eleList) {\n\t\t\t\tSystem.out.println(\"\\t\"+ele);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public RecordSet loadAllAvailableComponent(Record record, RecordLoadProcessor recordLoadProcessor);", "public List<Product> getAll() {\n List<Product> list = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + PRODUCT_TABLE;\n SQLiteDatabase database = this.getReadableDatabase();\n try (Cursor cursor = database.rawQuery(selectQuery, null)) {\n if (cursor.moveToFirst()) {\n do {\n int id = cursor.getInt(0);\n String name = cursor.getString(1);\n String url = cursor.getString(2);\n double current = cursor.getDouble(3);\n double change = cursor.getDouble(4);\n String date = cursor.getString(5);\n double initial = cursor.getDouble(6);\n Product item = new Product(name, url, current, change, date, initial, id);\n list.add(item);\n }\n while (cursor.moveToNext());\n }\n }\n return list;\n }", "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }", "public List<User> fetchAll()\n {\n String query = \"SELECT * FROM user\";\n RowMapper<User> userRowMapper = new BeanPropertyRowMapper<>(User.class); // a collection type that holds the results of the query\n List<User> userList; // list of users that will be returned\n try\n {\n userList = template.query(query, userRowMapper); // call the database and assign the results to the userList\n } catch (EmptyResultDataAccessException e)\n {\n userList = new ArrayList<>(); // return an empty arrayList\n }\n return userList;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public ArrayList<TEntity> getAll(){\n ArrayList<TEntity> list = new ArrayList<TEntity>();\n\n Cursor cursor = db.query(tableName, columns, null, null, null, null, null);\n\n cursor.moveToFirst();\n\n while (!cursor.isAfterLast()) {\n list.add(fromCursor(cursor));\n cursor.moveToNext();\n }\n\n return list;\n }", "public List<JianliBean> selectAll() {\n\t\treturn jianliDao.selectAll();\r\n\t}", "public List<Company> readFromDatabase() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM \" + table + \";\", (rs, i) -> new Company(rs.getString(\"Date\"), rs.getString(\"Security\"), rs.getDouble(\"Weighting\")));\n\t}", "public abstract List<Object> getAll();", "List<EcsAd> selectAll();", "List<T> getAll() throws PersistException;", "private Collection getDatabaseValidationList ()\n\t{\n\t\tArrayList list = new ArrayList();\n\t\tString className = getClassName();\n\t\tMappingClassElement mappingClass = getMappingClass(className);\n\n\t\tif (mappingClass != null)\n\t\t{\n\t\t\tArrayList tables = mappingClass.getTables();\n\t\t\tint i, count = ((tables != null) ? tables.size() : 0);\n\t\t\tMappingTableElement primaryTable = null;\n\t\t\tIterator iterator = null;\n\n\t\t\tlist.add(createSchemaExistenceComponent(className));\n\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\tMappingTableElement nextTable = \n\t\t\t\t\t(MappingTableElement)tables.get(i);\n\n\t\t\t\tlist.add(createTableExistenceComponent(nextTable.getTable()));\n\n\t\t\t\tif (i == 0)\n\t\t\t\t{\n\t\t\t\t\tprimaryTable = nextTable;\n\t\t\t\t\tlist.add(createPrimaryTableComponent(primaryTable));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMappingReferenceKeyElement referenceKey = \n\t\t\t\t\t\tfindReferenceKey(primaryTable, nextTable);\n\n\t\t\t\t\tif (referenceKey != null)\n\t\t\t\t\t{\n\t\t\t\t\t\titerator = referenceKey.getColumnPairNames().iterator();\n\t\t\t\t\t\twhile (iterator.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist.add(createColumnExistenceComponent(\n\t\t\t\t\t\t\t\t(String)iterator.next()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlist.add(createVersionConsistencyComponent(mappingClass));\n\n\t\t\titerator = mappingClass.getFields().iterator();\n\t\t\twhile (iterator.hasNext())\n\t\t\t{\n\t\t\t\tMappingFieldElement nextField = \n\t\t\t\t\t(MappingFieldElement)iterator.next();\n\t\t\t\tArrayList allColumns = new ArrayList();\n\t\t\t\tIterator columnIterator = null;\n\n\t\t\t\tif (isRelationship(nextField))\n\t\t\t\t{\n\t\t\t\t\tallColumns.addAll(((MappingRelationshipElement)nextField).\n\t\t\t\t\t\tgetAssociatedColumns());\n\t\t\t\t}\n\n\t\t\t\tallColumns.addAll(nextField.getColumns());\n\n\t\t\t\tcolumnIterator = allColumns.iterator();\n\t\t\t\twhile (columnIterator.hasNext())\n\t\t\t\t{\n\t\t\t\t\tlist.add(createColumnExistenceComponent(\n\t\t\t\t\t\t(String)columnIterator.next(), nextField));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "List<T> getAll();", "List<T> getAll();" ]
[ "0.6604304", "0.6560085", "0.6458518", "0.63760644", "0.6285447", "0.6275194", "0.6234653", "0.6224761", "0.61966395", "0.6177787", "0.61704797", "0.613376", "0.61264616", "0.6121158", "0.6117642", "0.608173", "0.6070707", "0.606968", "0.6050453", "0.60450405", "0.6043338", "0.603313", "0.6029127", "0.60261846", "0.60257137", "0.6011065", "0.6009727", "0.60079545", "0.5979299", "0.5978511", "0.59767336", "0.59762204", "0.59753597", "0.596936", "0.5968858", "0.59578717", "0.59515357", "0.59515357", "0.59515357", "0.5951162", "0.5937209", "0.59253806", "0.59240806", "0.5924062", "0.5922678", "0.59223485", "0.59208363", "0.59186804", "0.5917545", "0.5916596", "0.590397", "0.59016794", "0.58991724", "0.5898015", "0.5890099", "0.5879842", "0.58786047", "0.58684665", "0.58602035", "0.5858827", "0.58444345", "0.58444345", "0.58386505", "0.58347744", "0.58247536", "0.58228654", "0.58189213", "0.58184975", "0.5813459", "0.5810099", "0.58096606", "0.5802475", "0.5802244", "0.58013135", "0.5799519", "0.5798859", "0.5797712", "0.5796035", "0.5792569", "0.57903016", "0.5784703", "0.57730526", "0.57684404", "0.57622427", "0.5761315", "0.5758972", "0.57569253", "0.5755345", "0.5754589", "0.5750311", "0.57500184", "0.57445353", "0.57445335", "0.5743523", "0.5740604", "0.57367975", "0.57347196", "0.57310236", "0.5726762", "0.5726351", "0.5726351" ]
0.0
-1
Function to update the delInd of component and health check
public static void updateDelIndForHealthCheck(final int compId, final int delInd, final int enviromentId, final Long regionID) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_HEALTH_CHECK_DELIND); query.setLong("delInd", delInd); query.setLong("compId", compId); query.setLong("enviromentId", enviromentId); query.setLong("regionID", regionID); query.executeUpdate(); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void setDelIndOfComponent(final int componentId, final int delInd) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query =session.createQuery(HQLConstants.DB_QUERY_UPDATE_COMPONENT_DELIND);\n\t\tquery.setLong(\"delInd\", delInd);\n\t\tquery.setLong(\"componentId\", componentId);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public void update() {\r\n \t\tif(regenerateHealth && !isDead) {\r\n \t\t\tthis.health += healthRegen*1000*(\r\n \t\t\t\t\tSystem.currentTimeMillis()-lastRegTime);\r\n \t\t}\r\n \t}", "private void setComponentStatus() {}", "void updateDashboard() {\n\t}", "private void updateDiagnostics() {\n\t// driveSubsystem.updateDiagnostics();\n\t// elevatorSubsystem.updateDiagnostics();\n\t// cubeSubsystem.updateDiagnostics();\n\t// cubeVision.updateDiagnostics();\n }", "public void reduceHealth() {\n\t}", "@Override\n\tpublic int update(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "public void updateHealth(int healthLost){\n\t\thealth -= healthLost;\n\t\thealthLeftLabel.setText(\"\" + health);\n\t}", "public void addDeActiveness(){\n deActiveInARow +=1;\n }", "public void updateComponents() {\n\t\tremoveAllComponents();\n\t\tvalidatedHeader();\n\t}", "public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }", "@Override\r\n\tprotected void setHealth( double newHealth ) \r\n\t{\r\n\t\tthis._health = this._health - newHealth;\r\n\t}", "public void updateHud() {\r\n\r\n\t\tif (m_planet.getCoordinateSystemType() == Planet.CoordinateSystemType.GEOCENTRIC) {\r\n\t\t\t// Getting longitud and latitud informacion from planet\r\n\t\t\tlon = Hud.getSexagesinal(m_planet.getLongitude(), true);\r\n\t\t\tlat = Hud.getSexagesinal(m_planet.getLatitude(), false);\r\n\t\t\t\r\n\r\n\t\t\t// Updating text information\r\n\t\t\ttextoHud.setText(lonText + \" \" + lon + \" \" + latText + \" \" + lat);\r\n\t\t} else {\r\n\t\t\t// Getting longitud and latitud informacion from planet\r\n\t\t\tlon = Double.toString(m_planet.getLongitude());\r\n\t\t\tlat = Double.toString(m_planet.getLatitude());\r\n\r\n\t\t\t// Updating text information\r\n\t\t\ttextoHud.setText(lonText + \" \" + lon + \" \" + latText + \" \" + lat);\r\n\t\t}\r\n\t\t\r\n\t\tcompass.setScale(new Vec3(75,75,75));\r\n\t\tcompass.setPosition(new Vec3(m_canvas3d.getWidth()-70,m_canvas3d.getHeight()-70,0));\r\n\t\t// Repainting view\r\n\t\tif (m_canvas3d != null)\r\n\t\t\tm_canvas3d.repaint();\r\n\t}", "public void update() {\n remHpWidth = healthbarWidth * ent.getCurrentHealth() / ent.getMaxHealth();\n lostHpWidth = healthbarWidth - remHpWidth;\n }", "private void updateHealth() {\n float percentage = (float) game.getPlayerComponent().getHealth() / (float) game.getPlayerComponent().getMaxHealth(); //Possible placed in controller\n healthBar.setWidth(healthBarMaxWidth * percentage);\n }", "public void updateComponents(){\n adapter.updateItems();\n }", "@Override\n public void onNotify(StatsPacket statusPacket, ComponentType component) {\n this.hpVal = statusPacket.getEnergyPoints().getHealthPoints();\n this.hpValCapacity = statusPacket.getEnergyPoints().getHealthPointsCapacity();\n\n this.mpVal = statusPacket.getEnergyPoints().getManaPoints();\n this.mpValCapacity = statusPacket.getEnergyPoints().getManaPointsCapacity();\n\n this.xpVal = statusPacket.getExp();\n this.xpValCapacity = statusPacket.getCurrentExpCapacity();\n\n this.levelVal = statusPacket.getLevel();\n\n if(component != ComponentType.LEVEL_UP_SYSTEM_COMPONENT){\n this.goldVal = statusPacket.getGold();\n }\n\n this.hpValLabel.setText(hpVal);\n this.mpValLabel.setText(mpVal);\n this.xpValLabel.setText(xpVal);\n this.goldValLabel.setText(goldVal);\n this.levelValLabel.setText(levelVal.ordinal()+1);\n\n updateBar(hpBar, hpVal, hpValCapacity);\n updateBar(mpBar, mpVal, mpValCapacity);\n updateBar(xpBar, xpVal, xpValCapacity);\n }", "public void update() {\n\t\tthis.binder_Inventario.clear();\n\t}", "public synchronized void update() {\n localMemberHealth.setHeartbeat(localMemberHealth.getHeartbeat() + 1);\n long currentTime = System.currentTimeMillis();\n List<MemberHealth> removals = new ArrayList<>();\n for (MemberHealth memberHealth : memberHealths) {\n if (currentTime - memberHealth.getLastSeen() > 5500) {\n removals.add(memberHealth);\n } else if (currentTime - memberHealth.getLastSeen() > 2750) {\n if (!memberHealth.hasFailed() && !memberHealth.hasLeft()) {\n memberHealth.setHasFailed(true);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has failed\");\n }\n } else {\n if (memberHealth.hasFailed()) {\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has rejoined\");\n }\n memberHealth.setHasFailed(false);\n }\n }\n for (MemberHealth memberHealth : removals) {\n memberHealths.remove(memberHealth);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has been removed\");\n }\n }", "void disManager() {\n\t\t\tSystem.out.println(\"c \"+c);\n\t\t\tSystem.out.println(\"d \"+d);\n\t\t}", "public abstract void updateMainComponents(String component);", "public void updateDataComp() {\n\t\tdataEntryDao.updateDataComp();\n\t}", "void updateOccupancy() {\n\t\toccupied = !occupied;\n\t}", "@Override\n\tpublic boolean update(){\n\t\tif(dead){ return true; }\n\t\tfieldOfView.setOwnerId(this.ownerId);\n\t\tupdateHealthBar();\n\t\tupdateTexture();\n\t\tregenHealth();\n\t\tadjustAttackspeed();\n\t\tattack();\n\t\treturn false;\n\t}", "public static void changeHealth(int _value){\n healthLabel -= _value;\n healthHUD.setText(String.format(Locale.getDefault(),\"%03d\", healthLabel));\n }", "private void onComponentUpdate(InheritedComponentInstanceSelDTO dto) {\n\t\tInheritedComponentInstanceSelModelData oldModel = store.findModel(ModuleInstanceSelModelData.PROPERTY_ID, dto\n\t\t\t.getComponent().getId());\n\t\tInheritedComponentInstanceSelModelData newModel = new InheritedComponentInstanceSelModelData(dto);\n\t\tstore.remove(oldModel);\n\t\tstore.add(newModel);\n\t}", "public void setHealth(double Health){\r\n health = Health;\r\n }", "public void repair(){\n if(health < 9) {\n this.health++;\n }\n }", "public void decreaseHealth() {\n setHealth(getHealth()-1);\n }", "public void updateHealth(boolean up){\n\t\tif (up){\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"HealthOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"HealthOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbChange\");\n\t\t}\n\t\telse{\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"HealthOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbFade\");\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"HealthOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t}\n\t}", "@Override\n\tpublic int update() {\n\t\treturn 0;\n\t}", "protected void onUpdated( E entity, GameState state, int index )\r\n\t{\r\n\t\t\r\n\t}", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiation = owner.negotiation;\r\n\t\ttact = owner.tact;\r\n\t\tstrength = owner.strength;\r\n\r\n\t\txCoord = owner.xCoord;\r\n\t\tyCoord = owner.yCoord;\r\n\r\n\t\tmaxHealth = 2400 + ( perseverance * 200 );\r\n\r\n\t\thealth = maxHealth;\r\n\r\n\t\tsetDamages( );\r\n\t}", "void updateDutyCycle(double dutyCycle);", "@Override\n\tpublic void setHealth(double health) {\n\n\t}", "private void updatePanel() {\n\t\tProbeUtilities.updateModelProbePanel();\n\t}", "private void updateDelta() {\n\t\tbulletDelta = Delta.getDelta(\"bullet\");\n\t\tenemyDelta = Delta.getDelta(\"enemy\");\n\t}", "public void update(){\r\n\t\t\r\n\t}", "void notifyVisibilityStatusDecrease(JDPoint p);", "public void enleverlaDerniereObs() {\n\n\t\tobstaclesList.remove(obstaclesList.size()-1);\n\t}", "@Override\n\tpublic void m_debuff(Hero h, double d, int i) {\n\t\t\n\t}", "void onUpdate(long diskUsageSample);", "@Override\n\tpublic void p_debuff(Hero h, double d, int i) {\n\t\t\n\t}", "public void dvRemoved()\r\n/* 61: */ {\r\n/* 62:132 */ this.numDVRecords -= 1;\r\n/* 63: */ }", "@Override\n public void onRemoval() {\n try {\n if (eOutputHatches != null) {\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eOutputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eInputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_OutputData hatch_data : eOutputData) {\n hatch_data.id = -1;\n hatch_data.q = null;\n }\n for (GT_MetaTileEntity_Hatch_InputData hatch_data : eInputData) {\n hatch_data.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_Uncertainty hatch : eUncertainHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n }\n cleanOutputEM_EM();\n if (ePowerPass && getEUVar() > V[3] || eDismantleBoom && mMaxProgresstime > 0 && areChunksAroundLoaded_EM()) {\n explodeMultiblock();\n }\n } catch (Exception e) {\n if (DEBUG_MODE) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "public void update() {\r\n\t\t\r\n\t}", "private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "public void deductHealth( int amt) {\n currentHealth = currentHealth - amt;\n }", "@Override\n\tpublic void mpdUpdated(int arg0) {\n\t\t\n\t}", "private void updateMetrics(ContainerStatus status) {\n if (status != null) {\n switch (status.getExitStatus()) {\n case SUCCESS:\n componentMetrics.containersSucceeded.incr();\n scheduler.getServiceMetrics().containersSucceeded.incr();\n return;\n case PREEMPTED:\n componentMetrics.containersPreempted.incr();\n scheduler.getServiceMetrics().containersPreempted.incr();\n break;\n case DISKS_FAILED:\n componentMetrics.containersDiskFailure.incr();\n scheduler.getServiceMetrics().containersDiskFailure.incr();\n break;\n default:\n break;\n }\n }\n\n // containersFailed include preempted, disks_failed etc.\n componentMetrics.containersFailed.incr();\n scheduler.getServiceMetrics().containersFailed.incr();\n\n if (status != null && Apps.shouldCountTowardsNodeBlacklisting(\n status.getExitStatus())) {\n String host = scheduler.getLiveInstances().get(status.getContainerId())\n .getNodeId().getHost();\n failureTracker.incNodeFailure(host);\n currentContainerFailure.getAndIncrement();\n }\n }", "public void update(){}", "public void update(){}", "public void update(IComponent c);", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "void displayHealth(int health){\n\t\r\n\t\thealth = health + this.health + super.health + a.health;\r\n\t\tSystem.out.println(health);\r\n\t}", "@Override\n\t\tprotected void _delete() {\n\t\t\toldValue = 0;\n\t\t\tnewValue = 0;\n\t\t}", "@Override\r\n\tpublic void update(GameContainer gc, int detla) throws SlickException\r\n\t{\n\t\t\r\n\t}", "public void update() {\n Dashboard.sendToDash(\"/update Servo \" + id + \" \" + servo.getPosition());\n }", "private void updateGUIStatus() {\r\n\r\n }", "@Override\n public void update() {\n updateHealth();\n updateActiveWeapon();\n updateAmmunition();\n updateWaveCounter();\n updateReloading();\n }", "@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}", "void statusUpdate(boolean invalid);", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "public void DashboardUpdate(DashboardData dataStream){\n\n // Values Pertaining to the Elevator\n SmartDashboard.putNumber(\"Elevator Height\" , dataStream.m_rawElevatorHeight);\n \n // Values Associated with the Wheel Encoders\n SmartDashboard.putNumber(\"Right Wheels Velocity\" , dataStream.m_velocityRight);\n SmartDashboard.putNumber(\"Left Wheels Velocity\" , dataStream.m_velocityLeft);\n\n // Values Associated with Auton Functions\n SmartDashboard.putBoolean(\"Driver Assist Enabled\" , dataStream.m_driverAssist);\n SmartDashboard.putBoolean(\"Driver Assist Activated\" , dataStream.m_autonActive);\n SmartDashboard.putBoolean(\"Auton Reading Target\" , dataStream.m_readingTarget);\n \n // Values Associated with the Grabber\n SmartDashboard.putBoolean(\"Grabber Open\" , dataStream.m_grabberOpen);\n SmartDashboard.putNumber(\"Grabber Angle\", dataStream.m_rawGrabberAngle);\n\n // Misc Values\n SmartDashboard.putString(\"Proximity to Nearest Wall\" , dataStream.m_proximity);\n SmartDashboard.putNumber(\"Climber Position\" , dataStream.m_climberEncoder);\n //SmartDashboard.putBoolean(\"Ball Intake Running\" , dataStream.m_ballIntakeRunning);\n \n \n\n\n }", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\n public void update() {\n \n }", "public void onLivingUpdate()\n {\n this.updateArmSwingProgress();\n float var1 = this.getBrightness(1.0F);\n\n if (var1 > 0.5F)\n {\n this.entityAge += 2;\n }\n\n super.onLivingUpdate();\n }", "@DISPID(-2147412090)\n @PropGet\n java.lang.Object onafterupdate();", "@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void update() {\n\t\t\n\t}", "private void resetCounter() {\n // Obtain the most recent changelist available on the client\n String depot = parent.getDepot();\n Client client = Client.getClient();\n Changelist toChange = Changelist.getChange(depot, client);\n\n // Reset the Perforce counter value\n String counterName = parent.getCounter();\n Counter.setCounter(counterName, toChange.getNumber());\n }", "public String delUpdate(DtoEntrprs dto){\n\t\treturn null;\r\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void resetHealth(){\n curHp = healthPoint;\n }", "@DISPID(-2147412091)\n @PropGet\n java.lang.Object onbeforeupdate();", "@Override\n public void updateScreen() {\n if (dirty) {\n Alkahestry.logger.info(((ContainerMoleculeSplitter) container).moleculeSplitterTileEntity.progress);\n// String name = String.valueOf(((ContainerMoleculeSplitter) container).moleculeSplitterTileEntity.progress);\n// fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 6, 0x404040);\n// fontRenderer.drawString(playerInv.getDisplayName().getUnformattedText(), 8, ySize - 94, 0x404040);\n dirty = false;\n }\n// ((ContainerMoleculeSplitter) container)\n// .moleculeSplitterTileEntity\n// .\n super.updateScreen();\n }", "@Override\r\n\tpublic void update() {\r\n\t}", "private void dungeonDataChanged() {\n\t\tif (!panelsSetup) {\n\t\t\tsetupPanels();\n\t\t}\n\t\tboolean isDM = ServiceManager.getDungeonManager().isDungeonMaster();\n\t\t// hide the splitter\n\t\teast.setVisible(isDM);\n\t\tsplitPanel.setWidgetSize(east, isDM ? Window.getClientWidth() / 5.0 : 0.0);\n\t}", "void updateHostessState(HostessState hostessState);", "public void update(){\r\n }", "private void updateDDCount(HashMap<String, Integer> countMap, Path p) {\n if (p.size() <= 1)\n return;\n HashMap<GroumNode, String> labelMap = p.getLabelMap();\n GroumNode end = p.get(p.size() - 1);\n for (int i = 0; i < p.size() - 1; i++) {\n GroumNode start = p.get(i);\n String lable = labelMap.get(start) + Path.API_SPLIT + labelMap.get(end);\n Integer count = hasDataDependency(start, end) ? 1 : 0;\n if (countMap.containsKey(lable)) {\n count += countMap.get(lable);\n }\n countMap.put(lable, count);\n }\n }", "public void update() {\n\t\tVec2 newPos = calculatePos();\n\t\t/* energy bar */\n\t\tfloat newEnergy = actor.getEnergy();\n\t\tfloat maxEnergy = actor.getEnergyLimit();\n\t\tenergy.setPosition(newPos.getX(), newPos.getY() + paddingHealth / Application.s_Viewport.getX(), newEnergy,\n\t\t\t\tmaxEnergy);\n\t\t/* health bar */\n\t\tfloat newHealth = actor.getHealth();\n\t\tfloat maxHealth = actor.getHealthLimit();\n\t\thealth.setPosition(newPos.getX(), newPos.getY() + paddingEnergy / Application.s_Viewport.getX(), newHealth,\n\t\t\t\tmaxHealth);\n\t\t/* name label */\n\t\tplayerName.setPosition(newPos.getX(), newPos.getY() + paddingName / Application.s_Viewport.getY());\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\tpublic void updateVariables(){\n\t\t\tthis.currentX = odometer.getCurrentX();\n\t\t\tthis.currentY = odometer.getCurrentY();\n\t\t\tthis.currentAngle = odometer.getHeadingAngle();\n\t\t\tthis.currentAverageVelocity = odometer.getCurrentAverageVelocity();\n\t\t}", "public Vector<RationaleStatus> updateOnDelete()\r\n\t{\r\n\t\treturn this.updateStatus();\r\n\t}", "public void updateDimensions() {\n }" ]
[ "0.58501774", "0.54813623", "0.5446228", "0.5287651", "0.5268249", "0.5260968", "0.52258307", "0.51890475", "0.5174295", "0.5141862", "0.51398593", "0.51396155", "0.5136739", "0.5129747", "0.5054123", "0.50405383", "0.5037472", "0.5010427", "0.50084513", "0.5001959", "0.49979576", "0.49846655", "0.49836957", "0.49829382", "0.49763048", "0.49721104", "0.49507982", "0.49459347", "0.4936138", "0.49221736", "0.49180183", "0.49150744", "0.4911433", "0.49080497", "0.48987475", "0.48785996", "0.487119", "0.48591596", "0.48581347", "0.4857321", "0.4847446", "0.4846873", "0.48458937", "0.4829386", "0.48271868", "0.48239884", "0.48224458", "0.48170543", "0.48135903", "0.48113158", "0.48113158", "0.4803232", "0.47993183", "0.4798079", "0.47968134", "0.4785566", "0.4785566", "0.47853553", "0.47819546", "0.47819546", "0.47819546", "0.47819546", "0.47819546", "0.4779959", "0.47773403", "0.47641417", "0.47591776", "0.47590664", "0.47581026", "0.47571665", "0.47556362", "0.47479165", "0.47479165", "0.47479165", "0.4743278", "0.4741922", "0.4737948", "0.47364214", "0.47329867", "0.47313002", "0.47275186", "0.47238925", "0.47227937", "0.47182938", "0.47182938", "0.47182938", "0.47182938", "0.47142038", "0.47048616", "0.47042248", "0.47041842", "0.47031942", "0.47026175", "0.47007442", "0.46999228", "0.4697485", "0.4695321", "0.46871874", "0.468578", "0.46837917" ]
0.5405058
3
Function to get all subscriptions from the DB
public static List<SubscriptionVO> getAllSubscriptions(Set<Integer> compIdSet) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_ALERT_SUB_WITH_COMP); query.setParameterList("componentIdList", compIdSet); @SuppressWarnings("unchecked") List<AlertSubscriptionEntity> resultList = query.list(); txn.commit(); ArrayList<SubscriptionVO> returnList = new ArrayList<SubscriptionVO>(); for(AlertSubscriptionEntity ase : resultList){ SubscriptionVO sVO = new SubscriptionVO(); if(ase.getComponentId() != null){ sVO.setComponentId(ase.getComponentId()); } sVO.setEnvironmentId(ase.getEnvironment().getEnvironmentId()); sVO.setSubscriptionValue(ase.getSubscriptionVal()); sVO.setSubscriptionType(ase.getSubscriptionType()); if(ase.getGlobalComponentTypeId() != null){ sVO.setGlobalComponentTypeId(ase.getGlobalComponentTypeId()); } returnList.add(sVO); } return returnList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<Subscription> getSubscriptions();", "List<Subscription> findAll();", "List<Subscription> findAllActiveSubscriptions();", "private void readSubscriptions() {\n DatabaseReference reference = FirebaseDatabase.getInstance(\"https://projectsub-9f668-default-rtdb.europe-west1.firebasedatabase.app\")\n .getReference(\"users/\"+user.getUid()+\"/subscriptions\");\n\n reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull @NotNull DataSnapshot dataSnapshot) {\n mSubscriptions.clear();\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n Subscription subscription = snapshot.getValue(Subscription.class);\n\n savedSubs.add(subscription);\n mSubscriptions.add(subscription);\n }\n\n adapter.notifyDataSetChanged();\n\n }\n\n @Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n // TODO\n }\n });\n }", "List<ClientTopicCouple> listAllSubscriptions();", "List<Subscription> findActiveSubscriptions(User user);", "@GetMapping(\"/subscriptions\")\n @Timed\n public ResponseEntity<List<Subscription>> getAllSubscriptions(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Subscriptions\");\n Page<Subscription> page = subscriptionService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/subscriptions\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "Collection<Service> getAllSubscribeService();", "protected SubscriptionsStore getSubscriptions() {\n return subscriptions;\n }", "public ArrayList getSubscriptions(){\n\t return subscriptions;\n\t}", "public List<User> getSubscriptions() {\n return subscriptions;\n }", "public static void subscriptions() {\n\t\ttry {\n\t\t\tList<Subscription> subscriptions = PlatformClient\n\t\t\t\t\t.subscriptions(getUser());\n\t\t\trender(subscriptions);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get subscriptions : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "public List<Subscription> subscriptions() {\n return this.subscriptions;\n }", "public List<String> subscriptions() {\n return this.subscriptions;\n }", "public final ISubscription<T> [] getSubscriptions() {\n\t\t ISubscription<T>[] array = (SubscriptionDelegate[]) Array.newInstance(SubscriptionDelegate.class, 0); \n\t\t return activeSubscriptions.toArray(array);\n\t}", "@Query(value = \"select subscriptions from User u where u.id =:userId\")\n List<User> findUserSubscriptions(@Param(\"userId\") long userId);", "public List<Subscription> findAllClientSubscriptions(int clientId) throws ServiceException {\n try (ConnectionWrapper connectionManager = new ConnectionWrapper()) {\n SubscriptionDAO subscriptionDAO = new SubscriptionDAO(connectionManager.getConnection());\n\n return subscriptionDAO.selectClientSubscriptions(clientId);\n } catch (DAOException exception) {\n throw new ServiceException(\"Exception during attempt to find client's subscription operation.\", exception);\n }\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces();", "public List<Prescription> getPrescriptions(){\n return prescriptionRepository.findAll();\n }", "public List<Subscription> selectClientSubscriptions(int clientId)\n throws DAOException {\n try (PreparedStatement preparedStatement\n = prepareStatementForQuery(SELECT_CLIENT_ORDERS_QUERY,\n clientId)) {\n ResultSet resultSet = preparedStatement.executeQuery();\n List<Subscription> orders = new ArrayList<>();\n\n while (resultSet.next()) {\n Subscription order = buildEntity(resultSet);\n\n orders.add(order);\n }\n return orders;\n } catch (SQLException exception) {\n throw new DAOException(exception.getMessage(), exception);\n }\n }", "public void populateSubscriptions()\n {\n JSONObject dataJSON = new JSONObject();\n\n httpRequestHandler.sendHTTPRequest(Request.Method.GET,\"/subscription/allCategories\", dataJSON, new HTTPRequestHandler.VolleyCallback() {\n\n @Override\n public void onSuccess(JSONObject jSONObject) throws JSONException {\n JSONArray subscriptionArray = jSONObject.getJSONArray(\"categories\");\n\n subscriptions = new HashMap<>();\n\n for(int i = 0 ; i < subscriptionArray.length() ; i++)\n {\n JSONObject singleEntry = (JSONObject) subscriptionArray.get(i);\n subscriptions.put(singleEntry.getString(\"Category_Name\"), false);\n }\n\n String[] mySubscriptions = userDetails.getSubscribedCategories();\n\n for(int j = 0 ; j < mySubscriptions.length ; j++)\n {\n subscriptions.put(mySubscriptions[j], true);\n }\n\n Log.d(\"Subscribe\", \"My subscriptions \"+subscriptions.toString());\n }\n });\n }", "public final ISubscription<T> [] getSubscriptions(final InstrumentSpecification spec, final TimeFrame timeFrame) {\n\t\tList<ISubscription<T>> subscriptions = new ArrayList<ISubscription<T>>();\n\t\t// iterate over all subscriptions and search for matching subscriptions ...\n\t\tfor(ISubscription<T> subscription : activeSubscriptions){\n\t\t\tif(subscription.getInstrumentSpecification().equals(spec) && subscription.getTimeFrame().equals(timeFrame)){\n\t\t\t\t// ... and add them to the list of returned subscriptions. \n\t\t\t\tsubscriptions.add(subscription); \n\t\t\t}\n\t\t}\n\t\t// have to take way across Delegate. \n\t\tISubscription<T>[] array = (SubscriptionDelegate[]) Array.newInstance(SubscriptionDelegate.class, 0);\n\t\treturn subscriptions.toArray(array); \n\t}", "private SubscriptionList getAllVersionsSubscriptions(String baseNamespace, String libraryName) throws RepositoryException {\n \tString cacheKey = baseNamespace + \"~\" + libraryName;\n \tSubscriptionResource sr = allVersionsCache.get( cacheKey );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNamespace, libraryName, null );\n\t\t\t\tallVersionsCache.put( cacheKey, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "@Override\r\n\tpublic List<Subjects> getListAll() {\n\t\treturn subectsDao.getListAll();\r\n\t}", "public Set<Subscriber> getSubscribersOfAPI(APIIdentifier identifier) throws APIManagementException {\n\n Set<Subscriber> subscriberSet = null;\n try {\n subscriberSet = apiMgtDAO.getSubscribersOfAPI(identifier);\n } catch (APIManagementException e) {\n handleException(\"Failed to get subscribers for API : \" + identifier.getApiName(), e);\n }\n return subscriberSet;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces(\n @QueryMap ListSubscriptionForAllNamespaces queryParameters);", "@Override\n @Transactional(readOnly = true)\n public List<ConferenceDTO> findAll() {\n log.debug(\"Request to get all Conferences\");\n return conferenceRepository.findAll().stream()\n .map(conferenceMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "private SubscriptionList getNamespaceSubscriptions(String baseNS) throws RepositoryException {\n \tSubscriptionResource sr = namespaceCache.get( baseNS );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNS, null, null );\n\t\t\t\tnamespaceCache.put( baseNS, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "public List<User> getSubscribers() {\n return subscribers;\n }", "public List<SubscribedAPI> getSubscriptionsOfAPI(String apiName, String apiVersion, String provider)\n throws APIManagementException {\n return apiMgtDAO.getSubscriptionsOfAPI(apiName, apiVersion, provider);\n }", "public List<CustomerPurchase> getAll() throws SQLException;", "@Override\n\tpublic List<Subscribe> getSubList(int subAccountId) {\n\t\t\n\t\t\n\t\t\n\t\tList<Subscribe> subList= null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tSession session = sessionFactory.openSession();\n\t\t\tTypedQuery<Subscribe> query = session.createQuery(\"select s from Subscribe s where s.subscriber.kullaniciid= :subId\");\n\t\t\t\n\t\t\tquery.setParameter(\"subId\", subAccountId);\n\t\t\t\n\t\t\tsubList = query.getResultList();\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tsession.close();\n\t\t\t\n\t\t\treturn subList;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\n\t\t\treturn subList;\n\t\t}\n\t\t\n\t\t\n\t\n\t}", "public List<Map<String, Object>> getSubscriptionsDueForBilling();", "public void listSubscribers()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tId\\n\";\n\n\t\tList<Customer> customers = this.company.getSubs();\n\n\t\tfor(int i=0; i<customers.length(); i++)\n\t\t{\n\t\t\tstr += customers.get(i).getName() + \"\\t\" + customers.get(i).getSurname() + \"\\t\" + customers.get(i).getMail() + \"\\t\" + customers.get(i).getPassword() + \"\\t\" + customers.get(i).getId() + \"\\n\";\n\n\t\t}\n\t\t\n\t\tSystem.out.println(str);\n\n\n\t}", "ResourceCollection<SubscriptionDailyUsageRecord> get();", "public static Set<String> getAllChannels( Context cx) {\n\t\tSet<String> setOfAllSubscriptions = PushService.getSubscriptions( cx );\n\t\treturn setOfAllSubscriptions;\n\t}", "public CachetSubscriberList getSubscribers() {\n throw new RuntimeException(\"Method not implemented.\");\n }", "@Transactional\n\tpublic List<Channel> listAllChannel() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<Channel> criteriaQuery = builder.createQuery(Channel.class);\n\t\tRoot<Channel> root = criteriaQuery.from(Channel.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<Channel> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "Observable<List<T>> getAll();", "int getSubscriptionCount();", "public interface SubscriptionsDao {\n List<SubscriptionDto> getSubscribers(int userId, int currentUser);\n\n List<SubscriptionDto> getSubscriptions(int userId, int currentUser);\n\n void removeSubscription(int userId, int checkistId);\n\n void addSubscription(int usersId, int checkistId);\n\n int getSubscriptionsCount(int usersId);\n\n int getSubscribersCount(int usersId);\n\n boolean isSubscriptionExists(int userId, int checklistId);\n}", "private List<String> getSubscribersForThisProduct(Event event) {\n List<Entity> entities = esClient.queryTable(ProfileResource.TABLE).type(\"profile\").limit(20).execute();\n Set<String> phoneNums = new HashSet<String>();\n System.out.println(\"Found \" + entities.size()+\" subscribers\");\n for (Entity e: entities) {\n phoneNums.add( (String) e.get(\"phone_num\") );\n }\n return new ArrayList<String>(phoneNums);\n }", "public String getSubs(List<Channel> subs)\n {\n subs.clear();\n return accessData.getSubSequential(subs);\n }", "@Secured(\"ROLE_ADMIN\")\n\t@RequestMapping(method = RequestMethod.GET)\n\tpublic Iterable<SubjectEntity> getAllSubjects() {\n\treturn subjectRepository.findAll();\n\t}", "public List<Clients> getallClients();", "public void setSubscriptions(List<User> subscriptions) {\n this.subscriptions = subscriptions;\n }", "public ObservableList<String> queryAllCountries() {\n ObservableList<String> countries = FXCollections.observableArrayList();\n try (PreparedStatement stmt = this.conn.prepareStatement(\"SELECT DISTINCT country from country GROUP BY country\")) {\n\n ResultSet result = stmt.executeQuery();\n\n while (result.next()) {\n countries.add(result.getString(\"country\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n return countries;\n }", "public List<Notifications> getAll(){\n\t\tList<Notifications> list = null;\n\t\ttry{\n\t\t\tMappingManager mappingManager= new MappingManager(CassandraCluster.getKeyspaceSession(Constants.CASSANDRA_KEYSPACE, Constants.CASSANDRA_PORT, Constants.CASSANDRA_HOSTS));\n\t\t\tNotificationsAccessor notificationsAccessor = mappingManager.createAccessor(NotificationsAccessor.class);\n\t\t\tResult<Notifications> result = notificationsAccessor.getAll();\n\t\t\tif(result != null)\n\t\t\t\tlist = result.all();\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception Occured in getAll() of NotificationsDao Class\", e);\n\t\t}\n\t\treturn list;\n\t}", "public List<T> showAllClients();", "Collection<Account> getAll();", "Subscriptions() {\n // Will get filled in with set methods\n }", "@Query(value = \"select subscribers from User u where u.id =:userId\")\n List<User> findSubscribers(@Param(\"userId\") long userId);", "public void setServerSubscriptions(List<ServerService> subscriptions);", "@Transactional(readOnly = true)\n public List<SubRedditData> getAll() {\n return subRedditRepository.findAll()\n .stream()\n .map(subRedditMapperInterface::mapSubRedditToData)\n .collect(Collectors.toList());\n }", "@RequestMapping(value = \"/shopressources\", method = RequestMethod.GET)\n List<ShopRessource> getAllShopRessources();", "public com.sforce.soap.enterprise.QueryResult getFeedSubscriptionsForEntity() {\r\n return feedSubscriptionsForEntity;\r\n }", "@Override\n\tpublic List<Subject> getAllSubjects() throws SQLException {\n\t\treturn null;\n\t}", "public ArrayList<MedEntry> allPrescriptions() {\n\n ArrayList<MedEntry> prescriptions = new ArrayList<MedEntry>();\n String query = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n MedEntry pres = null;\n\n if (cursor.moveToFirst()) {\n do {\n pres = new MedEntry(cursor.getString(1),cursor.getInt(2), cursor.getInt(3), cursor.getInt(4));\n prescriptions.add(pres);\n } while (cursor.moveToNext());\n }\n\n return prescriptions;\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "List<T> obtenerAll();", "public java.util.List<LdPublisher> delegateGetListAllTx() {\r\n return getMyDao().getListAll();\r\n }", "List<InvoiceDTO> fetchAll();", "public DefaultListModel getSubscribers()\r\n\t{\r\n\t\treturn subscription;\r\n\t}", "public void listSubscribedTopics() {\r\n for (Topic topic : subscriberTopics){\r\n System.out.print(topic);\r\n }\r\n }", "List<Session> getAllSessions();", "List<StockList> fetchAll();", "Observable<List<CountryEntity>> fetchAllCountries();", "Collection<Service> getAllPublishedService();", "public Collection<Transaction> getAllTransactions();", "Set<Client> getAllClients();", "@Override\n\tpublic List<Client> getAll() {\n\t\treturn dao.getAll(Client.class);\n\t}", "List<User> getAllClients();", "public List<Publisher> findAllPublishers() {\n\t\tList<Publisher> result = new ArrayList<Publisher>();\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(find_all_publishers);\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\tprep_stmt.clearParameters();\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tResultSet rs = prep_stmt.executeQuery();\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\twhile ( rs.next() ) {\n\t\t\t\tPublisher publisher = new Publisher();\n\t\t\t\tpublisher.setId(rs.getInt(publisher_id));\n\t\t\t\tpublisher.setName(rs.getString(publisher_name));\n\t\t\t\t// books.. lazy fetch\n\t\t\t\tresult.add(publisher);\n\t\t\t}\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\trs.close();\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tprep_stmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().error(\"failed to retrieve publishers\",e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}", "public static ObservableList<User> selectAll() {\n DBConnection.startConnection();\n ObservableList<User> userList = FXCollections.observableArrayList();\n\n try (PreparedStatement ps = DBConnection.getConnection().prepareStatement(SELECT_ALL)) {\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(\"User_ID\");\n\n User user = selectById(id);\n userList.add(user);\n }\n\n } catch (SQLException err) {\n err.printStackTrace();\n }\n\n return userList;\n }", "public List<Sub> getSubs(){\n\t\t\n\t\treturn null;\n\t}", "private static List<PySubscriptionExpression> fillSubscriptions(PyFunction function) {\n List<PySubscriptionExpression> subscriptions = new ArrayList<>();\n PyStatementList statementList = function.getStatementList();\n Stack<PsiElement> stack = new Stack<>();\n PyParameter keywordContainer = getKeywordContainer(function);\n if (keywordContainer != null) {\n String keywordContainerName = keywordContainer.getName();\n for (PyStatement st : statementList.getStatements()) {\n stack.push(st);\n while (!stack.isEmpty()) {\n PsiElement e = stack.pop();\n if (e instanceof PySubscriptionExpression) {\n if (((PySubscriptionExpression)e).getOperand().getText().equals(keywordContainerName)) {\n subscriptions.add((PySubscriptionExpression)e);\n }\n }\n else {\n for (PsiElement psiElement : e.getChildren()) {\n stack.push(psiElement);\n }\n }\n }\n }\n }\n return subscriptions;\n }", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "Collection<Order> getAll();", "@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}", "public SubscriptionList getSubscriptionList(SubscriptionTarget subscriptionTarget) throws RepositoryException {\n\t\tString baseNamespace = subscriptionTarget.getBaseNamespace();\n\t\tString libraryName = subscriptionTarget.getLibraryName();\n\t\tString version = subscriptionTarget.getVersion();\n\t\tSubscriptionList subscriptions;\n\t\t\n\t\tif (baseNamespace != null) {\n\t\t\tif (libraryName != null) {\n\t\t\t\tif (version != null) {\n\t\t\t\t\tsubscriptions = getSingleVersionSubscriptions( baseNamespace, libraryName, version );\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tsubscriptions = getAllVersionsSubscriptions( baseNamespace, libraryName );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsubscriptions = getNamespaceSubscriptions( baseNamespace );\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tthrow new RepositoryException(\"Insufficient information provided for subscription list lookup.\");\n\t\t}\n\t\treturn subscriptions;\n\t}", "@Transactional(readOnly = true)\n public List<Currency> findAll() {\n log.debug(\"Request to get all Currencies\");\n return currencyRepository.findAll();\n }", "List<UmsIntegrationConsumeSetting> selectAll();", "@GET\n public List<JsonGenre> getAll() {\n \tList<Genre> genres = genreDao.getGenres();\n \tLOGGER.info(\"find \"+genres.size()+\" genres in the database\");\n \tArrayList<JsonGenre> ls = new ArrayList<JsonGenre>();\n \tfor (Genre s:genres) {\n \t\tls.add(new JsonGenre(s.getId(), s.getName()));\n \t}\n \treturn ls;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }", "public ArrayList<Service> selectAll(){\n return Database.servico;\n }", "@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "@Override\n\tpublic List<NewsVO> getAll() {\n\t\tList<NewsVO> list = new ArrayList<NewsVO>();\n\t\tNewsVO newsVO = null;\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// empVO 也稱為 Domain objects\n\t\t\t\tnewsVO = new NewsVO();\n\t\t\t\tnewsVO.setNews_id(rs.getString(\"news_id\"));\n\t\t\t\tnewsVO.setNews_content(rs.getString(\"news_content\"));\n\t\t\t\tnewsVO.setNews_date(rs.getTimestamp(\"news_date\"));\n\t\t\t\tlist.add(newsVO); // Store the row in the list\n\t\t\t}\n\n\t\t\t// Handle any driver errors\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\t// Handle any SQL errors\n\t\t} catch (SQLException se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \"\n\t\t\t\t\t+ se.getMessage());\n\t\t\t// Clean up JDBC resources\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public static Collection<String> getSubscriberIdentifiers(final Context context, final int spid)\r\n throws HomeException\r\n {\r\n final Collection<String> subscriberIdentifiers = new ArrayList<String>();\r\n\r\n final XDB xdb = (XDB) context.get(XDB.class);\r\n\r\n final XStatement sql = new XStatement()\r\n {\r\n\r\n private static final long serialVersionUID = 1L;\r\n\r\n\r\n public String createStatement(final Context ctx)\r\n {\r\n return \" select ID from Subscriber where SPID = ? \";\r\n }\r\n\r\n\r\n public void set(final Context ctx, final XPreparedStatement ps) throws SQLException\r\n {\r\n ps.setInt(spid);\r\n }\r\n };\r\n\r\n xdb.forEach(context, new Visitor()\r\n {\r\n\r\n private static final long serialVersionUID = 1L;\r\n\r\n\r\n public void visit(final Context ctx, final Object obj) throws AgentException, AbortVisitException\r\n {\r\n try\r\n {\r\n subscriberIdentifiers.add(((XResultSet) obj).getString(1));\r\n }\r\n catch (final SQLException e)\r\n {\r\n throw new AgentException(e);\r\n }\r\n }\r\n }, sql);\r\n\r\n return subscriberIdentifiers;\r\n }", "@Transactional(readOnly = true)\n public Observable<List<E>> findAll() {\n return Observable.create(inSource -> {\n try {\n final List<E> theEntitiesList = mRepository.findAll();\n inSource.onNext(theEntitiesList);\n inSource.onComplete();\n } catch (final Exception theException) {\n inSource.onError(theException);\n }\n });\n }", "public ArrayList<Reponce> getAllReponces() {\n\t\tArrayList<Reponce> listReponces = new ArrayList<Reponce>();\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\t// start a transaction\n\t\t//Transaction transaction = session.beginTransaction();\n\t\tQuery en = session.createQuery(\"FROM Reponce\", Reponce.class);\n\t\tlistReponces = (ArrayList<Reponce>) en.getResultList();\n\t\treturn listReponces;\n\t}", "private void getSubscription(RoutingContext routingContext) {\n LOGGER.debug(\"Info: getSubscription method started\");\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String domain = request.getParam(JSON_DOMAIN);\n String usersha = request.getParam(JSON_USERSHA);\n String alias = request.getParam(JSON_ALIAS);\n String subsId = domain + \"/\" + usersha + \"/\" + alias;\n JsonObject requestJson = new JsonObject();\n String instanceID = request.getHeader(HEADER_HOST);\n requestJson.put(SUBSCRIPTION_ID, subsId);\n requestJson.put(JSON_INSTANCEID, instanceID);\n String subHeader = request.getHeader(HEADER_OPTIONS);\n String subscrtiptionType =\n subHeader != null && subHeader.contains(SubsType.STREAMING.getMessage())\n ? SubsType.STREAMING.getMessage()\n : SubsType.CALLBACK.getMessage();\n requestJson.put(SUB_TYPE, subscrtiptionType);\n JsonObject authInfo = (JsonObject) routingContext.data().get(\"authInfo\");\n\n if (requestJson != null && requestJson.containsKey(SUB_TYPE)) {\n JsonObject jsonObj = requestJson.copy();\n jsonObj.put(JSON_CONSUMER, authInfo.getString(JSON_CONSUMER));\n Future<JsonObject> subsReq = subsService.getSubscription(jsonObj, databroker, database);\n subsReq.onComplete(subHandler -> {\n if (subHandler.succeeded()) {\n LOGGER.info(\"Success: Getting subscription\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n subHandler.result().toString());\n } else {\n LOGGER.error(\"Fail: Bad request\");\n processBackendResponse(response, subHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_SUB_TYPE_NOT_FOUND);\n }\n }", "@Transactional(readOnly = true)\n Collection<DataRistorante> getAll();", "@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }", "@Override\r\n\tpublic List<Trainee> getAll() {\n\t\treturn dao.getAll();\r\n\t}" ]
[ "0.8256677", "0.8090886", "0.7905246", "0.78278786", "0.7645244", "0.72318596", "0.71901053", "0.7171087", "0.7170856", "0.70638597", "0.7051532", "0.68051195", "0.67977065", "0.67591673", "0.6746375", "0.6716011", "0.6649933", "0.6504598", "0.63217676", "0.6204959", "0.62002206", "0.6186644", "0.61844873", "0.6154012", "0.61082745", "0.61039644", "0.6101555", "0.60772645", "0.6061555", "0.60520875", "0.60276747", "0.6010453", "0.6007066", "0.5993697", "0.59788173", "0.59787065", "0.59689575", "0.59594613", "0.59380627", "0.5911232", "0.5888746", "0.5874361", "0.5863939", "0.5841144", "0.58384734", "0.58209175", "0.5820715", "0.58139753", "0.581266", "0.5799777", "0.5791702", "0.5791081", "0.5780385", "0.57778347", "0.57596654", "0.5758554", "0.572546", "0.57164663", "0.57088315", "0.57085603", "0.570135", "0.5700335", "0.56968284", "0.56949824", "0.5682951", "0.5659705", "0.5658317", "0.5649444", "0.56452703", "0.56321794", "0.56253976", "0.56231964", "0.56186265", "0.5617805", "0.5613158", "0.5607428", "0.56046396", "0.56046396", "0.56046396", "0.56046396", "0.56046396", "0.55921876", "0.5588412", "0.55883604", "0.5584442", "0.557498", "0.55734724", "0.55644363", "0.5564154", "0.55545324", "0.5550307", "0.55498147", "0.55411434", "0.5539787", "0.5531895", "0.55309457", "0.5525835", "0.5522738", "0.55146503", "0.5512298" ]
0.6550453
17
Function to get all subscriptions from the DB
public static List<CounterDetailVO> getCounterDetails() { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria envCriteria = session.createCriteria(EnvCounterEntity.class); envCriteria.addOrder(Order.desc("environmentId")); envCriteria.addOrder(Order.asc("counterId")); @SuppressWarnings("unchecked") List<EnvCounterEntity> envCounterEntities = envCriteria.list(); ArrayList<CounterDetailVO> returnList = new ArrayList<CounterDetailVO>(); for(EnvCounterEntity entity : envCounterEntities) { CounterDetailVO cVO = new CounterDetailVO(); if(entity.getEnvironment() != null){ cVO.setEnvironmentId(entity.getEnvironmentId()); } cVO.setEnvironmentCounterId(entity.getEnvCounterId()); cVO.setCounterId(entity.getCounterId()); cVO.setCounterMetricTypeId(entity.getMetricTypeId()); cVO.setParameter1(entity.getParameter1()); cVO.setParameter2(entity.getParameter2()); cVO.setCounterMetricTypeClassName(entity.getCountMetricType().getCounterMetricTypeClassName()); cVO.setPlatform(entity.getPlatform()); returnList.add(cVO); } txn.commit(); return returnList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<Subscription> getSubscriptions();", "List<Subscription> findAll();", "List<Subscription> findAllActiveSubscriptions();", "private void readSubscriptions() {\n DatabaseReference reference = FirebaseDatabase.getInstance(\"https://projectsub-9f668-default-rtdb.europe-west1.firebasedatabase.app\")\n .getReference(\"users/\"+user.getUid()+\"/subscriptions\");\n\n reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull @NotNull DataSnapshot dataSnapshot) {\n mSubscriptions.clear();\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n Subscription subscription = snapshot.getValue(Subscription.class);\n\n savedSubs.add(subscription);\n mSubscriptions.add(subscription);\n }\n\n adapter.notifyDataSetChanged();\n\n }\n\n @Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n // TODO\n }\n });\n }", "List<ClientTopicCouple> listAllSubscriptions();", "List<Subscription> findActiveSubscriptions(User user);", "@GetMapping(\"/subscriptions\")\n @Timed\n public ResponseEntity<List<Subscription>> getAllSubscriptions(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Subscriptions\");\n Page<Subscription> page = subscriptionService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/subscriptions\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "protected SubscriptionsStore getSubscriptions() {\n return subscriptions;\n }", "Collection<Service> getAllSubscribeService();", "public ArrayList getSubscriptions(){\n\t return subscriptions;\n\t}", "public List<User> getSubscriptions() {\n return subscriptions;\n }", "public static void subscriptions() {\n\t\ttry {\n\t\t\tList<Subscription> subscriptions = PlatformClient\n\t\t\t\t\t.subscriptions(getUser());\n\t\t\trender(subscriptions);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get subscriptions : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "public List<Subscription> subscriptions() {\n return this.subscriptions;\n }", "public List<String> subscriptions() {\n return this.subscriptions;\n }", "public final ISubscription<T> [] getSubscriptions() {\n\t\t ISubscription<T>[] array = (SubscriptionDelegate[]) Array.newInstance(SubscriptionDelegate.class, 0); \n\t\t return activeSubscriptions.toArray(array);\n\t}", "@Query(value = \"select subscriptions from User u where u.id =:userId\")\n List<User> findUserSubscriptions(@Param(\"userId\") long userId);", "public List<Subscription> findAllClientSubscriptions(int clientId) throws ServiceException {\n try (ConnectionWrapper connectionManager = new ConnectionWrapper()) {\n SubscriptionDAO subscriptionDAO = new SubscriptionDAO(connectionManager.getConnection());\n\n return subscriptionDAO.selectClientSubscriptions(clientId);\n } catch (DAOException exception) {\n throw new ServiceException(\"Exception during attempt to find client's subscription operation.\", exception);\n }\n }", "public static List<SubscriptionVO> getAllSubscriptions(Set<Integer> compIdSet) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_ALERT_SUB_WITH_COMP);\n\t\tquery.setParameterList(\"componentIdList\", compIdSet);\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<AlertSubscriptionEntity> resultList = query.list();\n\t\ttxn.commit();\n\t\t\n\t\tArrayList<SubscriptionVO> returnList = new ArrayList<SubscriptionVO>();\n\t\tfor(AlertSubscriptionEntity ase : resultList){\n\t\t\tSubscriptionVO sVO = new SubscriptionVO();\n\t\t\tif(ase.getComponentId() != null){\n\t\t\t\tsVO.setComponentId(ase.getComponentId());\n\t\t\t}\n\t\t\tsVO.setEnvironmentId(ase.getEnvironment().getEnvironmentId());\n\t\t\tsVO.setSubscriptionValue(ase.getSubscriptionVal());\n\t\t\tsVO.setSubscriptionType(ase.getSubscriptionType());\n\t\t\tif(ase.getGlobalComponentTypeId() != null){\n\t\t\t\tsVO.setGlobalComponentTypeId(ase.getGlobalComponentTypeId());\n\t\t\t}\n\t\t\treturnList.add(sVO);\n\t\t}\n return returnList;\n\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces();", "public List<Prescription> getPrescriptions(){\n return prescriptionRepository.findAll();\n }", "public List<Subscription> selectClientSubscriptions(int clientId)\n throws DAOException {\n try (PreparedStatement preparedStatement\n = prepareStatementForQuery(SELECT_CLIENT_ORDERS_QUERY,\n clientId)) {\n ResultSet resultSet = preparedStatement.executeQuery();\n List<Subscription> orders = new ArrayList<>();\n\n while (resultSet.next()) {\n Subscription order = buildEntity(resultSet);\n\n orders.add(order);\n }\n return orders;\n } catch (SQLException exception) {\n throw new DAOException(exception.getMessage(), exception);\n }\n }", "public void populateSubscriptions()\n {\n JSONObject dataJSON = new JSONObject();\n\n httpRequestHandler.sendHTTPRequest(Request.Method.GET,\"/subscription/allCategories\", dataJSON, new HTTPRequestHandler.VolleyCallback() {\n\n @Override\n public void onSuccess(JSONObject jSONObject) throws JSONException {\n JSONArray subscriptionArray = jSONObject.getJSONArray(\"categories\");\n\n subscriptions = new HashMap<>();\n\n for(int i = 0 ; i < subscriptionArray.length() ; i++)\n {\n JSONObject singleEntry = (JSONObject) subscriptionArray.get(i);\n subscriptions.put(singleEntry.getString(\"Category_Name\"), false);\n }\n\n String[] mySubscriptions = userDetails.getSubscribedCategories();\n\n for(int j = 0 ; j < mySubscriptions.length ; j++)\n {\n subscriptions.put(mySubscriptions[j], true);\n }\n\n Log.d(\"Subscribe\", \"My subscriptions \"+subscriptions.toString());\n }\n });\n }", "public final ISubscription<T> [] getSubscriptions(final InstrumentSpecification spec, final TimeFrame timeFrame) {\n\t\tList<ISubscription<T>> subscriptions = new ArrayList<ISubscription<T>>();\n\t\t// iterate over all subscriptions and search for matching subscriptions ...\n\t\tfor(ISubscription<T> subscription : activeSubscriptions){\n\t\t\tif(subscription.getInstrumentSpecification().equals(spec) && subscription.getTimeFrame().equals(timeFrame)){\n\t\t\t\t// ... and add them to the list of returned subscriptions. \n\t\t\t\tsubscriptions.add(subscription); \n\t\t\t}\n\t\t}\n\t\t// have to take way across Delegate. \n\t\tISubscription<T>[] array = (SubscriptionDelegate[]) Array.newInstance(SubscriptionDelegate.class, 0);\n\t\treturn subscriptions.toArray(array); \n\t}", "private SubscriptionList getAllVersionsSubscriptions(String baseNamespace, String libraryName) throws RepositoryException {\n \tString cacheKey = baseNamespace + \"~\" + libraryName;\n \tSubscriptionResource sr = allVersionsCache.get( cacheKey );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNamespace, libraryName, null );\n\t\t\t\tallVersionsCache.put( cacheKey, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "@Override\r\n\tpublic List<Subjects> getListAll() {\n\t\treturn subectsDao.getListAll();\r\n\t}", "public Set<Subscriber> getSubscribersOfAPI(APIIdentifier identifier) throws APIManagementException {\n\n Set<Subscriber> subscriberSet = null;\n try {\n subscriberSet = apiMgtDAO.getSubscribersOfAPI(identifier);\n } catch (APIManagementException e) {\n handleException(\"Failed to get subscribers for API : \" + identifier.getApiName(), e);\n }\n return subscriberSet;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listSubscriptionForAllNamespaces(\n @QueryMap ListSubscriptionForAllNamespaces queryParameters);", "@Override\n @Transactional(readOnly = true)\n public List<ConferenceDTO> findAll() {\n log.debug(\"Request to get all Conferences\");\n return conferenceRepository.findAll().stream()\n .map(conferenceMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "private SubscriptionList getNamespaceSubscriptions(String baseNS) throws RepositoryException {\n \tSubscriptionResource sr = namespaceCache.get( baseNS );\n \t\n \tif (sr == null) {\n \t\ttry {\n\t\t\t\tsr = new SubscriptionResource( fileUtils, baseNS, null, null );\n\t\t\t\tnamespaceCache.put( baseNS, sr );\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RepositoryException(\"Error loading subscription list content.\", e);\n\t\t\t}\n \t}\n \treturn sr.getResource();\n }", "public List<User> getSubscribers() {\n return subscribers;\n }", "public List<SubscribedAPI> getSubscriptionsOfAPI(String apiName, String apiVersion, String provider)\n throws APIManagementException {\n return apiMgtDAO.getSubscriptionsOfAPI(apiName, apiVersion, provider);\n }", "public List<CustomerPurchase> getAll() throws SQLException;", "@Override\n\tpublic List<Subscribe> getSubList(int subAccountId) {\n\t\t\n\t\t\n\t\t\n\t\tList<Subscribe> subList= null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tSession session = sessionFactory.openSession();\n\t\t\tTypedQuery<Subscribe> query = session.createQuery(\"select s from Subscribe s where s.subscriber.kullaniciid= :subId\");\n\t\t\t\n\t\t\tquery.setParameter(\"subId\", subAccountId);\n\t\t\t\n\t\t\tsubList = query.getResultList();\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tsession.close();\n\t\t\t\n\t\t\treturn subList;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\n\t\t\treturn subList;\n\t\t}\n\t\t\n\t\t\n\t\n\t}", "public List<Map<String, Object>> getSubscriptionsDueForBilling();", "public void listSubscribers()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tId\\n\";\n\n\t\tList<Customer> customers = this.company.getSubs();\n\n\t\tfor(int i=0; i<customers.length(); i++)\n\t\t{\n\t\t\tstr += customers.get(i).getName() + \"\\t\" + customers.get(i).getSurname() + \"\\t\" + customers.get(i).getMail() + \"\\t\" + customers.get(i).getPassword() + \"\\t\" + customers.get(i).getId() + \"\\n\";\n\n\t\t}\n\t\t\n\t\tSystem.out.println(str);\n\n\n\t}", "public static Set<String> getAllChannels( Context cx) {\n\t\tSet<String> setOfAllSubscriptions = PushService.getSubscriptions( cx );\n\t\treturn setOfAllSubscriptions;\n\t}", "ResourceCollection<SubscriptionDailyUsageRecord> get();", "public CachetSubscriberList getSubscribers() {\n throw new RuntimeException(\"Method not implemented.\");\n }", "@Transactional\n\tpublic List<Channel> listAllChannel() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<Channel> criteriaQuery = builder.createQuery(Channel.class);\n\t\tRoot<Channel> root = criteriaQuery.from(Channel.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<Channel> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "Observable<List<T>> getAll();", "int getSubscriptionCount();", "public interface SubscriptionsDao {\n List<SubscriptionDto> getSubscribers(int userId, int currentUser);\n\n List<SubscriptionDto> getSubscriptions(int userId, int currentUser);\n\n void removeSubscription(int userId, int checkistId);\n\n void addSubscription(int usersId, int checkistId);\n\n int getSubscriptionsCount(int usersId);\n\n int getSubscribersCount(int usersId);\n\n boolean isSubscriptionExists(int userId, int checklistId);\n}", "private List<String> getSubscribersForThisProduct(Event event) {\n List<Entity> entities = esClient.queryTable(ProfileResource.TABLE).type(\"profile\").limit(20).execute();\n Set<String> phoneNums = new HashSet<String>();\n System.out.println(\"Found \" + entities.size()+\" subscribers\");\n for (Entity e: entities) {\n phoneNums.add( (String) e.get(\"phone_num\") );\n }\n return new ArrayList<String>(phoneNums);\n }", "public String getSubs(List<Channel> subs)\n {\n subs.clear();\n return accessData.getSubSequential(subs);\n }", "@Secured(\"ROLE_ADMIN\")\n\t@RequestMapping(method = RequestMethod.GET)\n\tpublic Iterable<SubjectEntity> getAllSubjects() {\n\treturn subjectRepository.findAll();\n\t}", "public List<Clients> getallClients();", "public void setSubscriptions(List<User> subscriptions) {\n this.subscriptions = subscriptions;\n }", "public ObservableList<String> queryAllCountries() {\n ObservableList<String> countries = FXCollections.observableArrayList();\n try (PreparedStatement stmt = this.conn.prepareStatement(\"SELECT DISTINCT country from country GROUP BY country\")) {\n\n ResultSet result = stmt.executeQuery();\n\n while (result.next()) {\n countries.add(result.getString(\"country\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n return countries;\n }", "public List<T> showAllClients();", "public List<Notifications> getAll(){\n\t\tList<Notifications> list = null;\n\t\ttry{\n\t\t\tMappingManager mappingManager= new MappingManager(CassandraCluster.getKeyspaceSession(Constants.CASSANDRA_KEYSPACE, Constants.CASSANDRA_PORT, Constants.CASSANDRA_HOSTS));\n\t\t\tNotificationsAccessor notificationsAccessor = mappingManager.createAccessor(NotificationsAccessor.class);\n\t\t\tResult<Notifications> result = notificationsAccessor.getAll();\n\t\t\tif(result != null)\n\t\t\t\tlist = result.all();\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception Occured in getAll() of NotificationsDao Class\", e);\n\t\t}\n\t\treturn list;\n\t}", "Collection<Account> getAll();", "Subscriptions() {\n // Will get filled in with set methods\n }", "@Query(value = \"select subscribers from User u where u.id =:userId\")\n List<User> findSubscribers(@Param(\"userId\") long userId);", "public void setServerSubscriptions(List<ServerService> subscriptions);", "@Transactional(readOnly = true)\n public List<SubRedditData> getAll() {\n return subRedditRepository.findAll()\n .stream()\n .map(subRedditMapperInterface::mapSubRedditToData)\n .collect(Collectors.toList());\n }", "public com.sforce.soap.enterprise.QueryResult getFeedSubscriptionsForEntity() {\r\n return feedSubscriptionsForEntity;\r\n }", "@RequestMapping(value = \"/shopressources\", method = RequestMethod.GET)\n List<ShopRessource> getAllShopRessources();", "@Override\n\tpublic List<Subject> getAllSubjects() throws SQLException {\n\t\treturn null;\n\t}", "public ArrayList<MedEntry> allPrescriptions() {\n\n ArrayList<MedEntry> prescriptions = new ArrayList<MedEntry>();\n String query = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n MedEntry pres = null;\n\n if (cursor.moveToFirst()) {\n do {\n pres = new MedEntry(cursor.getString(1),cursor.getInt(2), cursor.getInt(3), cursor.getInt(4));\n prescriptions.add(pres);\n } while (cursor.moveToNext());\n }\n\n return prescriptions;\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "List<T> obtenerAll();", "public java.util.List<LdPublisher> delegateGetListAllTx() {\r\n return getMyDao().getListAll();\r\n }", "List<InvoiceDTO> fetchAll();", "public DefaultListModel getSubscribers()\r\n\t{\r\n\t\treturn subscription;\r\n\t}", "public void listSubscribedTopics() {\r\n for (Topic topic : subscriberTopics){\r\n System.out.print(topic);\r\n }\r\n }", "List<Session> getAllSessions();", "List<StockList> fetchAll();", "Observable<List<CountryEntity>> fetchAllCountries();", "Collection<Service> getAllPublishedService();", "public Collection<Transaction> getAllTransactions();", "Set<Client> getAllClients();", "@Override\n\tpublic List<Client> getAll() {\n\t\treturn dao.getAll(Client.class);\n\t}", "List<User> getAllClients();", "public static ObservableList<User> selectAll() {\n DBConnection.startConnection();\n ObservableList<User> userList = FXCollections.observableArrayList();\n\n try (PreparedStatement ps = DBConnection.getConnection().prepareStatement(SELECT_ALL)) {\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(\"User_ID\");\n\n User user = selectById(id);\n userList.add(user);\n }\n\n } catch (SQLException err) {\n err.printStackTrace();\n }\n\n return userList;\n }", "public List<Publisher> findAllPublishers() {\n\t\tList<Publisher> result = new ArrayList<Publisher>();\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(find_all_publishers);\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\tprep_stmt.clearParameters();\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tResultSet rs = prep_stmt.executeQuery();\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\twhile ( rs.next() ) {\n\t\t\t\tPublisher publisher = new Publisher();\n\t\t\t\tpublisher.setId(rs.getInt(publisher_id));\n\t\t\t\tpublisher.setName(rs.getString(publisher_name));\n\t\t\t\t// books.. lazy fetch\n\t\t\t\tresult.add(publisher);\n\t\t\t}\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\trs.close();\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tprep_stmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().error(\"failed to retrieve publishers\",e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}", "public List<Sub> getSubs(){\n\t\t\n\t\treturn null;\n\t}", "private static List<PySubscriptionExpression> fillSubscriptions(PyFunction function) {\n List<PySubscriptionExpression> subscriptions = new ArrayList<>();\n PyStatementList statementList = function.getStatementList();\n Stack<PsiElement> stack = new Stack<>();\n PyParameter keywordContainer = getKeywordContainer(function);\n if (keywordContainer != null) {\n String keywordContainerName = keywordContainer.getName();\n for (PyStatement st : statementList.getStatements()) {\n stack.push(st);\n while (!stack.isEmpty()) {\n PsiElement e = stack.pop();\n if (e instanceof PySubscriptionExpression) {\n if (((PySubscriptionExpression)e).getOperand().getText().equals(keywordContainerName)) {\n subscriptions.add((PySubscriptionExpression)e);\n }\n }\n else {\n for (PsiElement psiElement : e.getChildren()) {\n stack.push(psiElement);\n }\n }\n }\n }\n }\n return subscriptions;\n }", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "Collection<Order> getAll();", "public SubscriptionList getSubscriptionList(SubscriptionTarget subscriptionTarget) throws RepositoryException {\n\t\tString baseNamespace = subscriptionTarget.getBaseNamespace();\n\t\tString libraryName = subscriptionTarget.getLibraryName();\n\t\tString version = subscriptionTarget.getVersion();\n\t\tSubscriptionList subscriptions;\n\t\t\n\t\tif (baseNamespace != null) {\n\t\t\tif (libraryName != null) {\n\t\t\t\tif (version != null) {\n\t\t\t\t\tsubscriptions = getSingleVersionSubscriptions( baseNamespace, libraryName, version );\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tsubscriptions = getAllVersionsSubscriptions( baseNamespace, libraryName );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsubscriptions = getNamespaceSubscriptions( baseNamespace );\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tthrow new RepositoryException(\"Insufficient information provided for subscription list lookup.\");\n\t\t}\n\t\treturn subscriptions;\n\t}", "@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}", "@Transactional(readOnly = true)\n public List<Currency> findAll() {\n log.debug(\"Request to get all Currencies\");\n return currencyRepository.findAll();\n }", "List<UmsIntegrationConsumeSetting> selectAll();", "@GET\n public List<JsonGenre> getAll() {\n \tList<Genre> genres = genreDao.getGenres();\n \tLOGGER.info(\"find \"+genres.size()+\" genres in the database\");\n \tArrayList<JsonGenre> ls = new ArrayList<JsonGenre>();\n \tfor (Genre s:genres) {\n \t\tls.add(new JsonGenre(s.getId(), s.getName()));\n \t}\n \treturn ls;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/subscriptions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<SubscriptionList, Subscription> listNamespacedSubscription(\n @Path(\"namespace\") String namespace);", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }", "public ArrayList<Service> selectAll(){\n return Database.servico;\n }", "@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "@Override\n\tpublic List<NewsVO> getAll() {\n\t\tList<NewsVO> list = new ArrayList<NewsVO>();\n\t\tNewsVO newsVO = null;\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// empVO 也稱為 Domain objects\n\t\t\t\tnewsVO = new NewsVO();\n\t\t\t\tnewsVO.setNews_id(rs.getString(\"news_id\"));\n\t\t\t\tnewsVO.setNews_content(rs.getString(\"news_content\"));\n\t\t\t\tnewsVO.setNews_date(rs.getTimestamp(\"news_date\"));\n\t\t\t\tlist.add(newsVO); // Store the row in the list\n\t\t\t}\n\n\t\t\t// Handle any driver errors\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\t// Handle any SQL errors\n\t\t} catch (SQLException se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \"\n\t\t\t\t\t+ se.getMessage());\n\t\t\t// Clean up JDBC resources\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public static Collection<String> getSubscriberIdentifiers(final Context context, final int spid)\r\n throws HomeException\r\n {\r\n final Collection<String> subscriberIdentifiers = new ArrayList<String>();\r\n\r\n final XDB xdb = (XDB) context.get(XDB.class);\r\n\r\n final XStatement sql = new XStatement()\r\n {\r\n\r\n private static final long serialVersionUID = 1L;\r\n\r\n\r\n public String createStatement(final Context ctx)\r\n {\r\n return \" select ID from Subscriber where SPID = ? \";\r\n }\r\n\r\n\r\n public void set(final Context ctx, final XPreparedStatement ps) throws SQLException\r\n {\r\n ps.setInt(spid);\r\n }\r\n };\r\n\r\n xdb.forEach(context, new Visitor()\r\n {\r\n\r\n private static final long serialVersionUID = 1L;\r\n\r\n\r\n public void visit(final Context ctx, final Object obj) throws AgentException, AbortVisitException\r\n {\r\n try\r\n {\r\n subscriberIdentifiers.add(((XResultSet) obj).getString(1));\r\n }\r\n catch (final SQLException e)\r\n {\r\n throw new AgentException(e);\r\n }\r\n }\r\n }, sql);\r\n\r\n return subscriberIdentifiers;\r\n }", "@Transactional(readOnly = true)\n public Observable<List<E>> findAll() {\n return Observable.create(inSource -> {\n try {\n final List<E> theEntitiesList = mRepository.findAll();\n inSource.onNext(theEntitiesList);\n inSource.onComplete();\n } catch (final Exception theException) {\n inSource.onError(theException);\n }\n });\n }", "public ArrayList<Reponce> getAllReponces() {\n\t\tArrayList<Reponce> listReponces = new ArrayList<Reponce>();\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\t// start a transaction\n\t\t//Transaction transaction = session.beginTransaction();\n\t\tQuery en = session.createQuery(\"FROM Reponce\", Reponce.class);\n\t\tlistReponces = (ArrayList<Reponce>) en.getResultList();\n\t\treturn listReponces;\n\t}", "private void getSubscription(RoutingContext routingContext) {\n LOGGER.debug(\"Info: getSubscription method started\");\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String domain = request.getParam(JSON_DOMAIN);\n String usersha = request.getParam(JSON_USERSHA);\n String alias = request.getParam(JSON_ALIAS);\n String subsId = domain + \"/\" + usersha + \"/\" + alias;\n JsonObject requestJson = new JsonObject();\n String instanceID = request.getHeader(HEADER_HOST);\n requestJson.put(SUBSCRIPTION_ID, subsId);\n requestJson.put(JSON_INSTANCEID, instanceID);\n String subHeader = request.getHeader(HEADER_OPTIONS);\n String subscrtiptionType =\n subHeader != null && subHeader.contains(SubsType.STREAMING.getMessage())\n ? SubsType.STREAMING.getMessage()\n : SubsType.CALLBACK.getMessage();\n requestJson.put(SUB_TYPE, subscrtiptionType);\n JsonObject authInfo = (JsonObject) routingContext.data().get(\"authInfo\");\n\n if (requestJson != null && requestJson.containsKey(SUB_TYPE)) {\n JsonObject jsonObj = requestJson.copy();\n jsonObj.put(JSON_CONSUMER, authInfo.getString(JSON_CONSUMER));\n Future<JsonObject> subsReq = subsService.getSubscription(jsonObj, databroker, database);\n subsReq.onComplete(subHandler -> {\n if (subHandler.succeeded()) {\n LOGGER.info(\"Success: Getting subscription\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n subHandler.result().toString());\n } else {\n LOGGER.error(\"Fail: Bad request\");\n processBackendResponse(response, subHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_SUB_TYPE_NOT_FOUND);\n }\n }", "@Transactional(readOnly = true)\n Collection<DataRistorante> getAll();", "@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }", "@Override\r\n\tpublic List<Trainee> getAll() {\n\t\treturn dao.getAll();\r\n\t}" ]
[ "0.8257364", "0.8091449", "0.79060525", "0.78281015", "0.7645198", "0.7232529", "0.7190307", "0.717173", "0.7169948", "0.70641935", "0.7052577", "0.6805728", "0.6798693", "0.676004", "0.6747689", "0.6715452", "0.6650111", "0.6550288", "0.6504296", "0.6322544", "0.6204967", "0.6200761", "0.61870825", "0.618449", "0.61531603", "0.61071306", "0.61033994", "0.6101151", "0.6077082", "0.6061359", "0.60516584", "0.60270065", "0.6009175", "0.6006603", "0.5992837", "0.5979695", "0.59785235", "0.59678555", "0.59604293", "0.593754", "0.59125775", "0.58883023", "0.58737177", "0.5863217", "0.5840347", "0.5838897", "0.5822279", "0.5821036", "0.58134615", "0.5813362", "0.5800197", "0.5792393", "0.5789608", "0.5780561", "0.5778047", "0.5761267", "0.57586163", "0.5724073", "0.5717635", "0.5708757", "0.5708687", "0.5701228", "0.5699448", "0.56968355", "0.5694768", "0.56832504", "0.5659342", "0.5658081", "0.56484187", "0.5645063", "0.56326056", "0.56254196", "0.5623572", "0.5617691", "0.5616799", "0.5612266", "0.56076366", "0.5604763", "0.5604763", "0.5604763", "0.5604763", "0.5604763", "0.559144", "0.5589141", "0.55882674", "0.5584967", "0.5574182", "0.5573185", "0.5564394", "0.55643684", "0.55545235", "0.55513644", "0.5550581", "0.5540295", "0.5538836", "0.5532268", "0.5531122", "0.5524852", "0.55221766", "0.5514417", "0.5512092" ]
0.0
-1
Insert value into COUNTER_METRIC table.
public static void addCounterMertic(final int environmentCounterId, final float counterMerticValue, Timestamp currDate) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); CounterMetricEntity counterMetric = new CounterMetricEntity(); EnvCounterEntity envCounterEntity = new EnvCounterEntity(); envCounterEntity.setEnvCounterId(environmentCounterId); counterMetric.setEnvCounter(envCounterEntity); counterMetric.setMetricVal(counterMerticValue); counterMetric.setMetricDate(currDate); session.save(counterMetric); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void counter(MetricCounter<Integer> metric, int value);", "void insert(Metric metric) throws MetricException;", "public void counter(MetricCounter<Long> metric, long value);", "@Insert\n long insert(Measurement measurement);", "public static void addCounterMetricHistory(final int environmentCounterId, final float counterMerticValue) {\t\n\t\tTimestamp currDate = new java.sql.Timestamp(Calendar.getInstance().getTimeInMillis());\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCounterMetricHistoryEntity counterMetricHistory = new CounterMetricHistoryEntity();\n\t\tEnvCounterEntity envCounterEntity = new EnvCounterEntity();\n\t\tenvCounterEntity.setEnvCounterId(environmentCounterId);\n\t\tcounterMetricHistory.setEnvCounter(envCounterEntity);\n\t\tcounterMetricHistory.setMetricVal(counterMerticValue);\n\t\tcounterMetricHistory.setMetricDate(currDate);\n\t\tsession.save(counterMetricHistory);\n\t\ttxn.commit();\n\t}", "public int insertSensorData(DataValue dataVal) throws Exception;", "public void gauge(MetricGauge<Integer> metric, int value);", "public synchronized void insert(int device, int type, int value) {\n\t}", "private void writeIncViaBatchWritable(Cube cube, String measureName, long ts,\n long value, String... dims) throws Exception {\n cube.write(null, getFact(measureName, ts, value, MeasureType.COUNTER, dims));\n }", "int insert(VarRatio record);", "protected void setValue(final Metric<?> metric, final InformationLoss value) {\n values.put(metric, value);\n }", "@Override\n public final void onPut(final K key, final V value) {\n if (!freqPutMap.containsKey(key)) {\n freqPutMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqPutMap.put(key, freqPutMap.get(key) + 1);\n }", "int insert(UserCount record);", "public org.apache.spark.sql.catalyst.util.QuantileSummaries insert (double x) { throw new RuntimeException(); }", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "public void value(long value) {\n client.histogram(name, value, tags);\n }", "int insert(TemperatureMeasureHitchEvent record);", "public void gauge(MetricGauge<Long> metric, long value);", "io.dstore.values.IntegerValue getCounter();", "public synchronized void addCounter(int nodeId, int submissionId,\n\t\t\tString nameCounter, long value) {\n\n\t\tif (statsEnabled) {\n\t\t\tMap<Integer, Map<String, Long>> submissionsCounters = counters\n\t\t\t\t\t.get(nodeId);\n\t\t\tif (submissionsCounters == null) {\n\t\t\t\tsubmissionsCounters = new HashMap<Integer, Map<String, Long>>();\n\t\t\t\tcounters.put(nodeId, submissionsCounters);\n\t\t\t}\n\n\t\t\tMap<String, Long> c = submissionsCounters.get(submissionId);\n\t\t\tif (c == null) {\n\t\t\t\tc = new TreeMap<String, Long>();\n\t\t\t\tsubmissionsCounters.put(submissionId, c);\n\t\t\t}\n\n\t\t\tlong oValue = 0;\n\t\t\tif (c.containsKey(nameCounter)) {\n\t\t\t\toValue = c.get(nameCounter);\n\t\t\t}\n\t\t\toValue += value;\n\t\t\tc.put(nameCounter, oValue);\n\t\t}\n\t}", "int insert(XPsDigest95thPercentileByAvgUs record);", "public void gauge(MetricGauge<Double> metric, double value);", "@Override\n public void measurementPatient(int value, int timestamp) {\n }", "public static boolean insert(String value1,String value2,int counter) throws StorageException,InterruptedException{\n if(counter > 5){\n Thread.sleep(10000);\n }\n try {\n DummyDBJava.INSTANCE.put(value1, value2);\n }catch(StorageException ex){\n counter = counter+1;\n insert(value1 ,value2,counter);\n }\n return true;\n }", "void emit() {\n counter.increment(METRIC_VALUE);\n }", "void insert(HrHBscCpuQos record);", "public void put(String key, int value) {\n\n // Hold the tmpNode node\n FreqNode tmpNode;\n\n //calculate the index by hashcode mod table length \n int index = Math.abs(key.hashCode()) % (frequencyTable.length);\n\n //if location is empty place new node \n if (frequencyTable[index] == null) {\n frequencyTable[index] = new FreqNode(key, value);\n\n numNodes++; //incremement the nodes (per demo recommendation with Professor) \n } else {\n //set temp node\n tmpNode = frequencyTable[index];\n\n //for each node \n while (true) {\n //check for duplicate value and increment \n if (key.equals(tmpNode.getKey())) {\n //increment\n tmpNode.setValue(value + tmpNode.getValue());\n return; //success \n }//end if \n else if (tmpNode.getNext() == null) {\n //set the new node at the next free\n tmpNode.setNext(new FreqNode(key, value));\n //increase nodes \n numNodes++;\n\n //check if nodes are greater than table proportions\n if (numNodes > (frequencyTable.length * sizePerc)) {\n extendTable(); //increase size \n }\n return; //success\n } else {\n //continue traversal of table \n tmpNode = tmpNode.getNext();\n }//end else\n }//end while \n }//end else \n }", "private void insertFrequency(RowWrapper row, Integer alleleColIdx, Long populationId) throws SQLException {\n if (alleleColIdx == null || !colIdxAlleleIdMap.containsKey(alleleColIdx)) {\n throw new RuntimeException(\"Allele column index invalid: \" + alleleColIdx);\n }\n \n Long alleleId = colIdxAlleleIdMap.get(alleleColIdx);\n if (alleleId == null) {\n throw new RuntimeException(\"No allele ID found for \" + alleleColIdx);\n }\n \n String label = row.getNullableText(alleleColIdx);\n Double value = row.getNullableDouble(alleleColIdx);\n \n this.insertStatement.setLong(1, alleleId);\n this.insertStatement.setLong(2, populationId);\n if (value != null) {\n // some older frequency files use the 0-100 percentage range instead of 0-1 decimal range, convert if found\n if (value > 1) {\n value = value / 100;\n }\n this.insertStatement.setDouble(3, value);\n } else {\n this.insertStatement.setNull(3, Types.DOUBLE);\n }\n if (label != null) {\n this.insertStatement.setString(4, label);\n } else {\n this.insertStatement.setNull(4, Types.VARCHAR);\n }\n int result = this.insertStatement.executeUpdate();\n if (result == 0) {\n throw new RuntimeException(\"Insert resulted in no rows\");\n }\n this.insertStatement.clearParameters();\n }", "public void add(Object key, Object value){\n\t\tint bucketLoc = key.hashCode() % _numBuckets;\r\n\t\tif(_locate(key) == null){\r\n\t\t\tNode newNode = new Node(key,value,_buckets[bucketLoc]);\r\n\t\t\t_buckets[bucketLoc] = newNode;\r\n\t\t\t_count++;\r\n\t\t\t_loadFactor = (double) _count / (double) _numBuckets;\r\n\t\t\tif(_loadFactor > _maxLoadFactor){\r\n\t\t\t\t_increaseTableSize();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t_buckets[bucketLoc]._value = value;\r\n\t\t}\r\n\t}", "@Override\n public void incrementCounter(String name, long val) {\n this.getRegistry().meter(name).mark(val);\n }", "@Test\n public void testCpuMetric() {\n MetricValue mv = new MetricValue.Builder().load(30).add();\n\n CPU_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n CPU_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "public void addCounter(ModelCounter c) {\r\n\t\tcounters.add(c);\r\n\t}", "Builder addInteractionStatistic(InteractionCounter value);", "int insert(BpmInstanciaHistorica record);", "public void insertValue(String tablename, Value value, String idkey, String idvalue) throws SQLException {\n mysql.update(\"INSERT INTO `\" + tablename + \"` ('\"+ value.getKey() +\"') VALUES ('\" + value.getValue() + \"')\");\n }", "int insert(UvStatDay record);", "public void value(double value) {\n client.histogram(name, value, tags);\n }", "public void addValue(int v) {\n ++totalCount;\n int i = calBucketIndex(v);\n ++buckets[i];\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n temp = (dataSnapshot.getValue(ValueCounter.class));\n temp.increment();\n mRef.setValue(temp);\n }", "public static void insert(int xact, int key, int value) throws Exception {\n\t System.out.println(\"T(\"+(xact+1)+\"):I(\"+(key)+\",\"+value+\")\");\n\t if (mData.containsKey(key)) {\n\t\t System.out.println(\"T(\"+(xact+1)+\"):ROLLBACK\");\n\t\t throw new Exception(\"KEY ALREADY EXISTS IN T(\"+(xact+1)+\"):I(\"+key+\")\");\n\t }\n\t Version v = new Version(xact, xact, value);\n\t LinkedList<Version> m = new LinkedList<Version>();\n\t m.add(v);\n\t mData.put(key, m);\n\n }", "<W extends V> void addMeasurement(DataCache<K, W> cache, K key, W value);", "private void addMetrics(List<MetricDatum> list,\n MetricValues metricValues,\n StandardUnit unit) {\n List<MachineMetric> machineMetrics = metricValues.getMetrics();\n List<Long> values = metricValues.getValues();\n for (int i=0; i < machineMetrics.size(); i++) {\n MachineMetric metric = machineMetrics.get(i);\n long val = values.get(i).longValue();\n // skip zero values in some cases\n if (val != 0 || metric.includeZeroValue()) {\n MetricDatum datum = new MetricDatum()\n .withMetricName(metric.getMetricName())\n .withDimensions(\n new Dimension()\n .withName(metric.getDimensionName())\n .withValue(metric.name()))\n .withUnit(unit)\n .withValue((double) val)\n ;\n list.add(datum);\n }\n }\n }", "private void insert(ByteBuffer rowKey,\n Clustering<?> clustering,\n Cell<?> cell,\n LivenessInfo info,\n WriteContext ctx)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n cell));\n Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info);\n PartitionUpdate upd = partitionUpdate(valueKey, row);\n indexCfs.getWriteHandler().write(upd, ctx, false);\n logger.debug(\"Inserted entry into index for value {}\", valueKey);\n }", "@Override\n public void insertAdTotalLinkData(int i) throws DatabaseException {\n Map<String, Object> map = new HashMap<String, Object>();\n StringBuffer table = new StringBuffer();\n table.append(CalendarFormat.getYM(i));\n map.put(\"table\", table.toString());\n map.put(\"statDate\", CalendarFormat.getYmd(i));\n getSqlMapClientTemplate().insert(\"statSqlMap.insertAdTotalLinkData\", map);\n }", "public int put(int key, String value) {\n int retval = 0;\n\n String sql = \"INSERT INTO data_map(data_key, data_val) VALUES(?, ?)\";\n\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n pstmt.setString(2, value);\n retval = pstmt.executeUpdate();\n }\n catch (SQLException e) {\n retval = -1;\n }\n\n return retval;\n }", "void upsert(@NotNull final ByteBuffer key, @NotNull final ByteBuffer value) {\n final ClusterValue prev = storage.put(key, ClusterValue.of(value));\n if (prev == null) {\n tableSize = tableSize + key.remaining() + value.remaining();\n } else if (prev.isTombstone()) {\n tableSize = tableSize + value.remaining();\n } else {\n tableSize = tableSize + value.remaining() - prev.getData().remaining();\n }\n }", "@Override\r\n\tpublic void updateCounter(CounterModel cm) {\n\t\thomedao.updateCounter(cm);\r\n\t}", "public void insert(T t) { \n int bucket = hash(t);\n Table.get(bucket).addLast(t);\n numElements++;\n }", "void insert(County record);", "private void incrementGcCounter() {\n if (null == PSAgentContext.get().getMetrics()) {\n return; // nothing to do.\n }\n long elapsedGc = getElapsedGc();\n long totalGc = 0;\n String gc_time = PSAgentContext.get().getMetrics().get(AngelCounter.GC_TIME_MILLIS);\n if (gc_time != null) {\n totalGc = elapsedGc + Long.parseLong(gc_time);\n } else {\n totalGc = elapsedGc;\n }\n PSAgentContext.get().getMetrics().put(AngelCounter.GC_TIME_MILLIS, Long.toString(totalGc));\n }", "public static void addSaveCounter1(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter1 = prefs.getInt(saveCounter1, 0);\n SaveCounter1 = SaveCounter1 + SaveInc;\n prefs.edit().putInt(saveCounter1, SaveCounter1).commit();\n\n }", "public synchronized void addGauge(T key, String name) {\n if(gauges.containsKey(key)) {\n return;\n }\n RequestExecutionTimeGauge gauge = new RequestExecutionTimeGaugeImpl(name, this.name);\n gauges.put(key,gauge);\n }", "public ShardedCounter createOrUpdateShardedCounter(ShardedCounter shardedCounter);", "public void put(double value) {\n int k = (int) ((value - minValue) / binDiff + 1);\n if (k < 0) k = 0;\n if (k >= bins.length) k = bins.length - 1;\n bins[k]++;\n }", "int insert(BasCounties record);", "@Override\r\n public void increment(String metricId, int incrementValue) {\r\n route(metricId, metricAggregator -> metricAggregator.increment(resolve(metricId), incrementValue));\r\n }", "private void insertIntegerValue(String field, int value) {\n mapFieldsIntegers.put(field,value);\n }", "public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n String[] temp = new String[10];\n temp = value.toString().split(\",\");\n if ((temp[2].equals(\"TMAX\") || temp[2].equals(\"TMIN\") && !temp[3].equals(\"\"))){\n HashMap<String,Double[]> h= new HashMap<String, Double[]>();\n Double[] d = new Double[2];\n d[0] = Double.parseDouble(temp[3]);\n d[1] = 1.0;\n if (results.containsKey(temp[0])){\n if (results.get(temp[0]).containsKey(temp[2])){\n results.get(temp[0]).get(temp[2])[0] += Double.parseDouble(temp[3]);\n results.get(temp[0]).get(temp[2])[1] += 1.0;\n }\n else{\n results.get(temp[0]).put(temp[2],d);\n }\n }\n else{\n h.put(temp[2],d);\n results.put(temp[0], h);\n }\n }\n }", "@Override\n\tpublic long insert(ContentValues cv) {\n\t\treturn 0;\n\t}", "@Override\n public void accLongitudinal(int value, int timestamp) {\n }", "public int insert(int value)\n {\n amount = amount + value;\n return amount;\n }", "public Counter(Counter count) {\r\n value = count.value;\r\n }", "public void delta(MetricDelta<Integer> metric, int value);", "public UniqueDataPoint(double value) {\r\n\t\tsuper(value);\r\n\t\tthis.uniqueId = uniqueIdCount++;\r\n\t}", "public void insert(VRpDyTrxTotal record) {\r\n getSqlMapClientTemplate().insert(\"V_RP_DY_TRX_TOTAL.ibatorgenerated_insert\", record);\r\n }", "public void addMetrics(String value) {\n value.getClass();\n ensureMetricsIsMutable();\n this.metrics_.add(value);\n }", "public void addStatistici(User user, double procent, int caroserie){\n ContentValues values= new ContentValues();\n values.put(COLUMN_STATISTICI_USER, user.getId());\n values.put(COLUMN_STATISTICI_PROCENT, procent);\n values.put(COLUMN_STATISTICI_CAROSERIE, caroserie);\n\n db.insert(TABLE_STATISTICI, null, values);\n }", "public void write(long time, int value) {\n timeEncoder.encode(time, timeOut);\n valueEncoder.encode(value, valueOut);\n statistics.update(time, value);\n }", "public void run() {\n String query = \"INSERT INTO CustomData (Server, Plugin, ColumnID, DataPoint, Updated) VALUES\";\n int currentSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // Iterate through each column\n for (Map.Entry<Column, Integer> entry : customData.entrySet()) {\n Column column = entry.getKey();\n int value = entry.getValue();\n\n // append the query\n query += \" (\" + server.getId() + \", \" + plugin.getId() + \", \" + column.getId() + \", \" + value + \", \" + currentSeconds + \"),\";\n }\n\n // Remove the last comma\n query = query.substring(0, query.length() - 1);\n\n // add the duplicate key entry\n query += \" ON DUPLICATE KEY UPDATE DataPoint = VALUES(DataPoint) , Updated = VALUES(Updated)\";\n\n // queue the query\n new RawQuery(mcstats, query).save();\n }", "public void put(int key, int value) {\n if (capacity == 0) {\n return;\n } else if (nodeMap.containsKey(key)) {\n // if key exists in nodemap\n Node node = nodeMap.get(key);\n node.val = value;\n DoubleLinkedList list = countMap.get(node.count);\n list.remove(node);\n if (min == node.count && countMap.get(min).size() == 0) {\n min++;\n }\n node.count++;\n DoubleLinkedList list2 = countMap.getOrDefault(node.count, null);\n if (list2 == null) {\n list2 = new DoubleLinkedList();\n countMap.put(node.count, list2);\n }\n list2.add(node);\n \n } else if (currentCount < capacity) {\n // if current count < capacity\n min = 1;\n DoubleLinkedList list = countMap.getOrDefault(min, null);\n if (list == null) {\n list = new DoubleLinkedList();\n countMap.put(min, list);\n }\n Node node = new Node(key, value);\n nodeMap.put(key, node);\n list.add(node);\n currentCount++;\n } else {\n // if current count == capacity\n DoubleLinkedList list = countMap.get(min);\n Node node = list.removeFromFront();\n nodeMap.remove(node.key);\n min = 1;\n DoubleLinkedList list2 = countMap.get(min);\n Node node2 = new Node(key, value);\n nodeMap.put(key, node2);\n list2.add(node2);\n }\n // System.out.println(\"put; (\" + key + \",\" + value + \"); \" + \"countMap: \" + countMap + \"\\n\");\n // System.out.println(\"nodemap: \" + nodeMap);\n }", "int insert(FundsPackageRatio record);", "public void addCount(String key, long count) {\n\n Point point = new Point();\n point.setStart(startTime);\n point.setEnd(endTime);\n point.setDoubleValue((double) count / 60.d);\n\n TimeseriesDescriptor descriptor = keyToDescriptor(key);\n\n TimeseriesPoint timeseriesPoint = new TimeseriesPoint();\n timeseriesPoint.setTimeseriesDesc(descriptor);\n timeseriesPoint.setPoint(point);\n\n countMetrics.add(descriptor.getMetric());\n metricLabels.putAll(descriptor.getMetric(), descriptor.getLabels().keySet());\n\n points.add(timeseriesPoint);\n }", "public void increaseCounter(UltraSearchSessions.Session session,\n HugeType type, long increment) {\n\n\n JSONObject result = session.get(TABLE, type.name());\n if(null == result){\n putCounter(session, type, increment);\n return;\n }\n\n\n JSONObject obj = new JSONObject();\n\n JSONObject fields = new JSONObject();\n JSONObject id = new JSONObject();\n id.put(\"increment\", increment);\n fields.put(\"ID\", id);\n\n obj.put(\"fields\", fields);\n session.putDoc(TABLE, type.name(), obj.toString());\n\n\n }", "public static void addSaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter6 = prefs.getInt(saveCounter6, 0);\n SaveCounter6 = SaveCounter6 + SaveInc;\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }", "public static void addSaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter3 = prefs.getInt(saveCounter3, 0);\n SaveCounter3 = SaveCounter3 + SaveInc;\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "public void inc(String namespace, String key, Number value) {\n \t\tthis.init();\n \t\tthis._inc(this.getKey(namespace, key), value);\n \t}", "@Override\n public void addNew(int latency) {\n count.getAndIncrement();\n }", "public static void addSaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter5 = prefs.getInt(saveCounter5, 0);\n SaveCounter5 = SaveCounter5 + SaveInc;\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }", "public void insertSiteStats (SiteStatisticsVO data) throws DataServiceException;", "public void insertToBucket()\n {\n int value = 0;\n value = valueCheck(value);\n \n //inserts value in the array to the buckets\n if(value == 0)\n {\n zero.add(a[k]);\n a[k] = 0;\n }\n if(value == 1)\n {\n one.add(a[k]);\n a[k] = 0;\n }\n if(value == 2)\n {\n two.add(a[k]);\n a[k] = 0;\n }\n if(value == 3)\n {\n three.add(a[k]);\n a[k] = 0;\n }\n if(value == 4)\n {\n four.add(a[k]);\n a[k] = 0;\n }\n if(value == 5)\n {\n five.add(a[k]);\n a[k] = 0;\n }\n if(value == 6)\n {\n six.add(a[k]);\n a[k] = 0;\n }\n if(value == 7)\n {\n seven.add(a[k]);\n a[k] = 0;\n }\n if(value == 8)\n {\n eight.add(a[k]);\n a[k] = 0;\n }\n if(value == 9)\n {\n nine.add(a[k]);\n a[k] = 0;\n }\n \n k++;\n }", "public void insert(VRpDyIpbbCpuMem record) {\r\n getSqlMapClientTemplate().insert(\"V_RP_DY_IPBB_CPU_MEM.ibatorgenerated_insert\", record);\r\n }", "int insertSelective(BpmInstanciaHistorica record);", "public void gauge(MetricGauge<Float> metric, float value);", "void put(String key, double value) throws StorageException, ValidationException, KeyValueStoreException;", "public void insertStatistic(Object[] newParamArray) {\n\t\tString sql=\"insert statistics values(null,?,?,?,?,?)\";\n\t\tupdate(sql, newParamArray);\n\t}", "Integer insert(ChronicCheck record);", "public static void addSaveCounter2(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter2 = prefs.getInt(saveCounter2, 0);\n SaveCounter2 = SaveCounter2 + SaveInc;\n prefs.edit().putInt(saveCounter2, SaveCounter2).commit();\n\n }", "private CounterDistribution getCounterValue(NameContext step) {\n Counter<Long, CounterDistribution> counter = getCounter(step);\n assertThat(\n \"per-element-processing-time counter should not be null for step: \" + step,\n counter,\n notNullValue());\n return counter.getAggregate();\n }", "@Override\n\t\tpublic void write(K key, V value) throws IOException, InterruptedException {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t//System.out.println(key.toString()+\":\"+value.toString());\n\t\t\tConfiguration conf = HBaseConfiguration.create();\n\t\t\t//conf.set(\"hbase.zookeeper.quorum\", \"10.105.245.143,10.105.245.144,10.105.245.147\");\n\t\t\tString mess[] = key.toString().split(\":\");\n\t\t\tString time = mess[0];\n\t\t\tString nation = mess[1];\n\t\t\tString nationid = PeopleCountByNation.asmap.get(nation);\n\t\t\tconf.set(\"hbase.zookeeper.quorum\", \"localhost\");\n\t\t\tint sum = Integer.parseInt(value.toString());\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tHTable table = new HTable(conf,\"nation\".getBytes());\n\t\t\tPut put = new Put(Bytes.toBytes(time+nationid));\n\t\t\tput.add(Bytes.toBytes(\"n\"),Bytes.toBytes(\"n\"),Bytes.toBytes(sum));\n\t\t\ttable.put(put);\n\t\t /* String record = value.toString();\n\t\t String mess [] = record.split(\"----\");\n\t\t String recordmess [] = mess[0].split(\"////\");\n\t\t HTable table = new HTable(conf,\"sort\".getBytes());\n\t\t //System.out.println(key.toString());\n\t\t Put put = new Put(Bytes.toBytes(key.toString()));\n\t\t put.add(Bytes.toBytes(\"title\"),Bytes.toBytes(recordmess[0]),Bytes.toBytes(mess[1]));\n\t\t table.put(put);*/\n\t\t \n\t\t //将数据存储在 hbase 中,这次存储的是word与title的集合\n\t\t \n\t\t \n\t\t \n\t\t}", "public void putValue(double value) {\n\t\tdata[size] = value;\n\t\tsize++;\n\t\tsize %= limit;\n\t}", "public void push(final String metricPath, final double metricValue, final long metricTimeStamp) throws IOException {\n writer.write(\n WHITESPACE.matcher(noSpace(metricPath)).replaceAll(SPACE_REPLACEMENT) + SPACE\n + String.format(Locale.US, VALUE_FORMAT, metricValue) + SPACE\n + metricTimeStamp\n + LN);\n }", "@Override\n\tpublic int insert(RcuSettime record) {\n\t\treturn rcuSettimeMapper.insert(record);\n\t}", "int insert(ac_teacher_instrument record);", "public <T> void write(MDSKey id, T value) {\n try {\n table.put(new Put(id.getKey()).add(COLUMN, serialize(value)));\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }", "@Override\n\tpublic void\n\tscalarAdd( double value )\n\t{\n\t\tdata[0] += value;\n\t\tdata[1] += value;\n\t\tdata[2] += value;\n\t}", "@Override\n\t\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\tiCounterCallback.counter(values[0]);\n\t\t\t}", "@Test\n public void fsckMetricsDuplicateForward() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(2, errors);\n }", "private void increaseDBValue(String target, int value){\n database.getReference(gameCodeRef).child(target).setValue(value+1);\n }", "public void insert(String tableName, String header, int value)\r\n {\r\n try \r\n {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO \"+tableName+\"(\"+header+\")VALUES(\"+value+\")\");\r\n } \r\n catch (NumberFormatException | SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n \r\n }\r\n }", "default void increment(String tagKey, String tagValue, Double amount, String name, String description) {\n increment(new String[]{tagKey, tagValue}, amount, name, description);\n }" ]
[ "0.66115427", "0.66001683", "0.6276994", "0.5947607", "0.59334016", "0.58382523", "0.5829243", "0.55992436", "0.5576977", "0.557017", "0.5523173", "0.54627144", "0.54155815", "0.53977233", "0.5362445", "0.53512377", "0.5341843", "0.533632", "0.5319588", "0.52889806", "0.5287084", "0.52776784", "0.5268449", "0.5263785", "0.5241464", "0.52313846", "0.52264583", "0.52137536", "0.5176479", "0.51716286", "0.51663756", "0.516268", "0.5146787", "0.51458275", "0.51431173", "0.5142349", "0.51349163", "0.51287806", "0.51094127", "0.5103805", "0.5096549", "0.5092503", "0.5079943", "0.507279", "0.50520986", "0.50504297", "0.5039389", "0.5038491", "0.5031939", "0.5029032", "0.5026027", "0.50256777", "0.5025242", "0.50189376", "0.5013884", "0.4994776", "0.49894542", "0.49737114", "0.49732897", "0.49697772", "0.49560714", "0.495356", "0.49191266", "0.49143437", "0.49139455", "0.49079332", "0.49040583", "0.49039024", "0.48939356", "0.48807687", "0.48792818", "0.48775423", "0.48720744", "0.4867141", "0.4863865", "0.48617476", "0.48601267", "0.48542756", "0.48527372", "0.4850924", "0.48479113", "0.484784", "0.48478368", "0.48411575", "0.48404187", "0.4839442", "0.48393813", "0.48354682", "0.48257905", "0.48257196", "0.48173928", "0.48119026", "0.48035073", "0.479797", "0.47913024", "0.47901082", "0.47862285", "0.47852516", "0.4782422", "0.47803277" ]
0.6141922
3
Code Changes to store Counter Metric History Insert value into COUNTER_METRIC_HISTORY table.
public static void addCounterMetricHistory(final int environmentCounterId, final float counterMerticValue) { Timestamp currDate = new java.sql.Timestamp(Calendar.getInstance().getTimeInMillis()); Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); CounterMetricHistoryEntity counterMetricHistory = new CounterMetricHistoryEntity(); EnvCounterEntity envCounterEntity = new EnvCounterEntity(); envCounterEntity.setEnvCounterId(environmentCounterId); counterMetricHistory.setEnvCounter(envCounterEntity); counterMetricHistory.setMetricVal(counterMerticValue); counterMetricHistory.setMetricDate(currDate); session.save(counterMetricHistory); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void addCounterMertic(final int environmentCounterId, final float counterMerticValue, Timestamp currDate) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCounterMetricEntity counterMetric = new CounterMetricEntity();\n\t\tEnvCounterEntity envCounterEntity = new EnvCounterEntity();\n\t\tenvCounterEntity.setEnvCounterId(environmentCounterId);\n\t\tcounterMetric.setEnvCounter(envCounterEntity);\n\t\tcounterMetric.setMetricVal(counterMerticValue);\n\t\tcounterMetric.setMetricDate(currDate);\n\t\tsession.save(counterMetric);\n\t\ttxn.commit();\n\t}", "void saveActivityHistForAddEntity(Record inputRecord);", "void insert(Metric metric) throws MetricException;", "public void counter(MetricCounter<Integer> metric, int value);", "int insert(BpmInstanciaHistorica record);", "void storeMetric(ModuleMetric metric) {\n\t\tlog.debug(\"Storing metric '{}' of '{}'\", metric.getName(), metric.getAction().getModule().primaryKey());\n\t\tfinal ModuleAction action = metric.getAction();\n\t\tactionStorage.persist(action);\n\n\t\tfinal String modulePK = action.getModule().primaryKey();\n\t\tfinal String metricName = metric.getName();\n\t\tfinal Instant metricMeasured = metric.getMeasured();\n\t\tfinal String metricHost = action.getHostName();\n\t\tfinal String metricActionId = action.getId();\n\t\tfinal String metricData = metric.valuesAsString();\n\t\tmetricStorage.storeMetric(metricName, modulePK, metricMeasured, metricHost, metricActionId, metricData);\n\t\tlog.debug(\"Stored '{}'\", metric);\n\t}", "int insert(TemperatureMeasureHitchEvent record);", "public void counter(MetricCounter<Long> metric, long value);", "public void addCounter(ModelCounter c) {\r\n\t\tcounters.add(c);\r\n\t}", "protected void setValue(final Metric<?> metric, final InformationLoss value) {\n values.put(metric, value);\n }", "private void insertState(State state) {\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n state.print();\n cupboard().withDatabase(db).put(state);\n IDToday++;\n aCache.put(Const.Cache_Lastime_Timepoint, state.getTime_point());\n }", "@Override\r\n\tpublic void updateCounter(CounterModel cm) {\n\t\thomedao.updateCounter(cm);\r\n\t}", "public static void addSaveCounter1(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter1 = prefs.getInt(saveCounter1, 0);\n SaveCounter1 = SaveCounter1 + SaveInc;\n prefs.edit().putInt(saveCounter1, SaveCounter1).commit();\n\n }", "public static void addSaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter5 = prefs.getInt(saveCounter5, 0);\n SaveCounter5 = SaveCounter5 + SaveInc;\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }", "public static void addSaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter3 = prefs.getInt(saveCounter3, 0);\n SaveCounter3 = SaveCounter3 + SaveInc;\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "int insertSelective(BpmInstanciaHistorica record);", "public void PushEventStatisticsFromDB() {\n\t\tmyDBUtil.open();\n\t\tCursor mCursor = myDBUtil.queryMarkIsZero();\n\t\tmCursor.moveToFirst();\n\t\tdo {\n\t\t\tfinal EventStatisticsData eventStatisticsData = new EventStatisticsData();\n\t\t\tString[] colums = new String[]{\n\t\t\t\t\t\"behavior\", \"appId\", \"appSrc\", \"packageName\", \"client\", \"listenArea\",\n\t\t\t\t\t\"listenContextId\", \"listenContextSrc\", \"clientVersion\", \"referenceId\",\n\t\t\t\t\t\"appName\", \"appVersion\"};\n\t\t\tint index;\n\t\t\tString value;\n\t\t\tfor (int i = 0; i < colums.length; i++) {\n\t\t\t\tindex = mCursor.getColumnIndex(colums[i]);\n\t\t\t\tvalue = mCursor.getString(index);\n\t\t\t\teventStatisticsData.SetParamFromApp(i, value);\n\t\t\t}\n\t\t\tindex = mCursor.getColumnIndex(\"_id\");\n\t\t\tfinal int id = mCursor.getInt(index);\n\t\t\tGetIPFromServer(new GetIpCallback() {\n\t\t\t\t@Override\n\t\t\t\tpublic void solve(String result) {\n\t\t\t\t\tif (result != null && eventStatisticsData != null) {\n\t\t\t\t\t\tpushStatisticsEvent(eventStatisticsData, false, id);\n\t\t\t\t\t\tLog.d(TAG, \"im here don't insert to db,just update\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t} while (mCursor.moveToNext());\n\t\tmCursor.close();\n\t\tmyDBUtil.close();\n\t}", "@Insert\n long insert(Measurement measurement);", "public static void addSaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter6 = prefs.getInt(saveCounter6, 0);\n SaveCounter6 = SaveCounter6 + SaveInc;\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }", "int insert(Miss_control_log record);", "protected void storeCurrentValues() {\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n temp = (dataSnapshot.getValue(ValueCounter.class));\n temp.increment();\n mRef.setValue(temp);\n }", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "public static void addSaveCounter2(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter2 = prefs.getInt(saveCounter2, 0);\n SaveCounter2 = SaveCounter2 + SaveInc;\n prefs.edit().putInt(saveCounter2, SaveCounter2).commit();\n\n }", "public void insertHistory(RecordDTO recordDTO);", "public void addMetric(M wm){\r\n\t\tmetrics.add(wm);\r\n\t}", "public static void insert(MedicalHistory iMedicalHistory, Context iContext) throws MapperException\n {\n try\n {\n \n ArrayList<String> values = new ArrayList<String>(20);\n values.add(iMedicalHistory.getID().toString());\n values.add(String.valueOf(iMedicalHistory.getDate().getTime()));\n values.add(String.valueOf(iMedicalHistory.getDescription()));\n values.add(String.valueOf(iMedicalHistory.getLocation()));\n\n MedicalHistoryTDG.insert(values, iContext);\n } \n catch (PersistenceException e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation because the persistence \"\n + \"layer returned the following error: \"\n + e.getMessage());\n } \n catch (Exception e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation for the following \"\n + \"unforeseen reason: \"\n + e.getMessage());\n }\n }", "public static void addSaveCounter4(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter4 = prefs.getInt(saveCounter4, 0);\n SaveCounter4 = SaveCounter4 + SaveInc;\n prefs.edit().putInt(saveCounter4, SaveCounter4).commit();\n\n }", "private void incrementGcCounter() {\n if (null == PSAgentContext.get().getMetrics()) {\n return; // nothing to do.\n }\n long elapsedGc = getElapsedGc();\n long totalGc = 0;\n String gc_time = PSAgentContext.get().getMetrics().get(AngelCounter.GC_TIME_MILLIS);\n if (gc_time != null) {\n totalGc = elapsedGc + Long.parseLong(gc_time);\n } else {\n totalGc = elapsedGc;\n }\n PSAgentContext.get().getMetrics().put(AngelCounter.GC_TIME_MILLIS, Long.toString(totalGc));\n }", "int insert(UserCourseHistory record);", "Builder addInteractionStatistic(InteractionCounter value);", "@Override\n public ClientStatisticsRecord newRecord(\n String clientKey,\n String type,\n Object value) throws WrongFormatException {\n ClientStatisticsRecord record = factory.createRecord(type, value);\n record.setClientKey(clientKey);\n record = recordRepository.save(record);\n eventPublisher.publishEvent(new RecordUpdateEvent(record)); //Notify other components\n return record;\n }", "io.dstore.values.IntegerValue getCounter();", "public void addMedicalHistory(MedicalHistory medicalHistory){}", "public HistoryData(int sp, int inc) {\n\t\tspeed = sp;\n\t\tincline = inc;\n\t\tduration = 0.0;\n\t}", "int insert(WizardValuationHistoryEntity record);", "public static void SaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }", "int insert(BasicInfoAnodeBurningLossRate record);", "public int insertSensorData(DataValue dataVal) throws Exception;", "public void record() {\n stats.record();\n }", "void insert(HrHBscCpuQos record);", "int insert(EvaluationRecent record);", "<W extends V> void addMeasurement(DataCache<K, W> cache, K key, W value);", "int insert(HotspotLog record);", "Builder addInteractionStatistic(InteractionCounter.Builder value);", "public static void SaveCounter1(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter1, SaveCounter1).commit();\n\n }", "public ShardedCounter createOrUpdateShardedCounter(ShardedCounter shardedCounter);", "@Override\n void record(StatsContext tags, MeasureMap measurementValues) {\n statsManager.record((StatsContextImpl) tags, measurementValues);\n }", "@Override\n\t\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\tiCounterCallback.counter(values[0]);\n\t\t\t}", "@Override\n public void insertAdTotalLinkData(int i) throws DatabaseException {\n Map<String, Object> map = new HashMap<String, Object>();\n StringBuffer table = new StringBuffer();\n table.append(CalendarFormat.getYM(i));\n map.put(\"table\", table.toString());\n map.put(\"statDate\", CalendarFormat.getYmd(i));\n getSqlMapClientTemplate().insert(\"statSqlMap.insertAdTotalLinkData\", map);\n }", "private void addMetrics(List<MetricDatum> list,\n MetricValues metricValues,\n StandardUnit unit) {\n List<MachineMetric> machineMetrics = metricValues.getMetrics();\n List<Long> values = metricValues.getValues();\n for (int i=0; i < machineMetrics.size(); i++) {\n MachineMetric metric = machineMetrics.get(i);\n long val = values.get(i).longValue();\n // skip zero values in some cases\n if (val != 0 || metric.includeZeroValue()) {\n MetricDatum datum = new MetricDatum()\n .withMetricName(metric.getMetricName())\n .withDimensions(\n new Dimension()\n .withName(metric.getDimensionName())\n .withValue(metric.name()))\n .withUnit(unit)\n .withValue((double) val)\n ;\n list.add(datum);\n }\n }\n }", "@Override\r\n public void onSensorChanged(SensorEvent event) {\r\n /*final DocumentReference dr = nFirestore.collection(\"User\").document(mAuth.getCurrentUser().getUid());*/\r\n if (running){\r\n steps = findViewById(R.id.steps);\r\n final Map<String,Object> userMap = new HashMap<>();\r\n Fitness.getHistoryClient(this, GoogleSignIn.getLastSignedInAccount(this))\r\n .readDailyTotal(DataType.TYPE_STEP_COUNT_DELTA)\r\n .addOnSuccessListener(\r\n new OnSuccessListener<DataSet>() {\r\n @Override\r\n public void onSuccess(DataSet dataSet) {\r\n long total =\r\n dataSet.isEmpty()\r\n ? 0\r\n : dataSet.getDataPoints().get(0).getValue(Field.FIELD_STEPS).asInt();\r\n getGroup();\r\n u.setSteps(String.valueOf(total));\r\n u.setTop(\"10\");\r\n u.setUid(mAuth.getCurrentUser().getUid());\r\n getTopPos();\r\n\r\n //u.setGroup(\"group\");\r\n /*userMap.get(\"group\") = getGroup().get(\"group\");*/\r\n //userMap.put(\"group\",getGroup().get(\"group\"));\r\n //userMap.put(\"steps\",String.valueOf(total));\r\n /*batch.update(dr,\"steps\",String.valueOf(total));*/\r\n //calculateTop();\r\n //top = calculateTop();\r\n //userMap.put(\"top\",String.valueOf(top));\r\n nFirestore.collection(\"user\").document(mAuth.getCurrentUser().getUid()).set(u);\r\n //nFirestore.collection(\"User\").document(mAuth.getCurrentUser().getUid()).set(getGroup().get(\"group\"));\r\n steps.setText(String.valueOf(total));\r\n\r\n }\r\n })\r\n .addOnFailureListener(\r\n new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Log.w(TAGFit, \"There was a problem getting the step count.\", e);\r\n }\r\n });\r\n }\r\n }", "@Override\n public void measurementPatient(int value, int timestamp) {\n }", "int insert(VarRatio record);", "public void gauge(MetricGauge<Integer> metric, int value);", "void setStatisticsHistorySize(int historySize);", "public void storeMetric(long n, String type)\n {\n switch (type) {\n case \"encoded\":\n encodedMetrics[++rTop] = n;\n break;\n case \"decoded\":\n decodedMetrics[++iTop] = n;\n break;\n default:\n break;\n }\n }", "public static void SaveCounter2(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter2, SaveCounter2).commit();\n\n }", "private void writeIncViaBatchWritable(Cube cube, String measureName, long ts,\n long value, String... dims) throws Exception {\n cube.write(null, getFact(measureName, ts, value, MeasureType.COUNTER, dims));\n }", "protected void saveHistoryData() throws RemoteHomeManagerException {\n int expected = (isCurrentState()) ? 1 : 0;\n if (isEnabledScheduler()) {\n Boolean action = getLightSchedule().getCurrentSchedule();\n expected = action?1:0;\n }\n HistoryData history = new HistoryData();\n history.setDeviceId(getDeviceId());\n history.setDataName(\"ONOFF\");\n history.setDataValue(((isCurrentState())?1:0)+\"|\"+expected);\n history.setDataTimestamp();\n m.getPersistance().addHistoryData(history);\n RemoteHomeManager.log.debug(\"Saved history data: \"+history.toString());\n }", "int insertSelective(TemperatureMeasureHitchEvent record);", "public static void SaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "public static void recordMetricEvent(String arg0) {\n seTimeStamps();\n String serviceName = MDC.get(MDC_SERVICE_NAME);\n metricsLogger.info(MessageCodes.RULE_METRICS_INFO, serviceName, arg0);\n }", "public static void SaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }", "private void saveOrupdateExceptionRecordCounts(Session session, GapData gapData) {\n\t\tchar currentLevel = gapData.getWaring();\r\n\r\n\t\tif (currentLevel != 'N') {\r\n\r\n\t\t\t// 添加一条新的记录,同时把设备标记改成当前级别\r\n\t\t\tExceptionTimesBean execeptionTimesBean = new ExceptionTimesBean();\r\n\t\t\texeceptionTimesBean.setBegTime(gapData.getCreateTime());\r\n\t\t\texeceptionTimesBean.setEndTime(gapData.getCreateTime());\r\n\t\t\texeceptionTimesBean.setDeviceId(gapData.getGap().getId());\r\n\t\t\tif (gapData.getNext()) {\r\n\t\t\t\texeceptionTimesBean.setTrain('N');\r\n\t\t\t} else {\r\n\t\t\t\texeceptionTimesBean.setTrain('Y');\r\n\t\t\t}\r\n\t\t\texeceptionTimesBean.setExceptionCounts(1);\r\n\t\t\texeceptionTimesBean.setDeviceName(gapData.getGap().getName());\r\n\t\t\texeceptionTimesBean.setLevel(currentLevel);\r\n\t\t\texeceptionTimesBean.setGongquId(gapData.getGap().getGongqu().getId());\r\n\t\t\texeceptionTimesBean.setType(\"GAP\");\r\n\t\t\t// gapData.getGap().setDataLevel(currentLevel);\r\n\t\t\tsession.save(execeptionTimesBean);\r\n\t\t\t// session.saveOrUpdate(gapData.getGap());\r\n\r\n\t\t\t/*\r\n\t\t\t * 取消连续报警记录统计 if(gapLevel=='N'||gapLevel!=currentLevel){\r\n\t\t\t * //添加一条新的记录,同时把设备标记改成当前级别 ExceptionTimesBean execeptionTimesBean =\r\n\t\t\t * new ExceptionTimesBean();\r\n\t\t\t * execeptionTimesBean.setBegTime(gapData.getCreateTime());\r\n\t\t\t * execeptionTimesBean.setEndTime(gapData.getCreateTime());\r\n\t\t\t * execeptionTimesBean.setDeviceId(gapData.getGap().getId());\r\n\t\t\t * if(gapData.getNext()){ execeptionTimesBean.setTrain('N'); }else{\r\n\t\t\t * execeptionTimesBean.setTrain('Y'); }\r\n\t\t\t * execeptionTimesBean.setExceptionCounts(1);\r\n\t\t\t * execeptionTimesBean.setDeviceName(gapData.getGap().getName());\r\n\t\t\t * execeptionTimesBean.setLevel(currentLevel);\r\n\t\t\t * execeptionTimesBean.setGongquId\r\n\t\t\t * (gapData.getGap().getGongqu().getId());\r\n\t\t\t * execeptionTimesBean.setType(\"GAP\");\r\n\t\t\t * gapData.getGap().setDataLevel(currentLevel);\r\n\t\t\t * session.save(execeptionTimesBean);\r\n\t\t\t * session.saveOrUpdate(gapData.getGap()); } else{\r\n\t\t\t * //更新原有的记录,同时把设备标记改成当前级别\r\n\t\t\t * \r\n\t\t\t * String sql =\r\n\t\t\t * \"from ExceptionTimesBean as etb where etb.type=:type and etb.level=:level and etb.deviceId=:deviceId and etb.train=:train order by etb.begTime DESC\"\r\n\t\t\t * ; Query query = session.createQuery(sql);\r\n\t\t\t * query.setParameter(\"type\", \"GAP\");\r\n\t\t\t * query.setParameter(\"level\",currentLevel); char train = 'N';\r\n\t\t\t * if(!gapData.getNext()){ train = 'Y'; }\r\n\t\t\t * query.setParameter(\"train\",train);\r\n\t\t\t * query.setParameter(\"deviceId\",gapData.getGap().getId());\r\n\t\t\t * query.setFirstResult(0); query.setMaxResults(1);\r\n\t\t\t * List<ExceptionTimesBean> etbs = query.list();\r\n\t\t\t * if(etbs!=null&&etbs.size()>0){ ExceptionTimesBean etb =\r\n\t\t\t * etbs.get(0); etb.setExceptionCounts(etb.getExceptionCounts()+1);\r\n\t\t\t * etb.setEndTime(gapData.getCreateTime()); }else{\r\n\t\t\t * ExceptionTimesBean execeptionTimesBean = new\r\n\t\t\t * ExceptionTimesBean();\r\n\t\t\t * execeptionTimesBean.setBegTime(gapData.getCreateTime());\r\n\t\t\t * execeptionTimesBean.setEndTime(gapData.getCreateTime());\r\n\t\t\t * execeptionTimesBean.setDeviceId(gapData.getGap().getId());\r\n\t\t\t * execeptionTimesBean.setExceptionCounts(1);\r\n\t\t\t * execeptionTimesBean.setLevel(currentLevel);\r\n\t\t\t * if(gapData.getNext()){ execeptionTimesBean.setTrain('N'); }else{\r\n\t\t\t * execeptionTimesBean.setTrain('Y'); }\r\n\t\t\t * execeptionTimesBean.setGongquId\r\n\t\t\t * (gapData.getGap().getGongqu().getId());\r\n\t\t\t * execeptionTimesBean.setDeviceName(gapData.getGap().getName());\r\n\t\t\t * execeptionTimesBean.setType(\"GAP\");\r\n\t\t\t * gapData.getGap().setDataLevel(currentLevel);\r\n\t\t\t * session.save(execeptionTimesBean);\r\n\t\t\t * session.saveOrUpdate(gapData.getGap()); } }\r\n\t\t\t */\r\n\r\n\t\t}/*\r\n\t\t * else{ gapData.getGap().setDataLevel('N');\r\n\t\t * session.saveOrUpdate(gapData.getGap()); }\r\n\t\t */\r\n\r\n\t}", "int insert(UvStatDay record);", "int insert(UserCount record);", "private void metricRegistered (ServiceReference srefMetric) {\n // Retrieve the service ID\n Long serviceId =\n (Long) srefMetric.getProperty(Constants.SERVICE_ID);\n logInfo(\"A metric service was registered with ID \" + serviceId);\n \n // Dispose from the list of available metric any old metric, that\n // uses the same ID. Should not be required, as long as metric\n // services got properly unregistered.\n if (registeredMetrics.containsKey(serviceId)) {\n registeredMetrics.remove(serviceId);\n }\n \n // Retrieve information about this metric and add this metric to the\n // list of registered/available metrics\n MetricInfo metricInfo = getMetricInfo(srefMetric);\n registeredMetrics.put(serviceId, metricInfo);\n \n // Search for an applicable configuration set and apply it\n Iterator<String> configSets =\n metricConfigurations.keySet().iterator();\n while (configSets.hasNext()) {\n // Match is performed against the metric's class name(s)\n String className = configSets.next();\n // TODO: It could happen that a service get registered with more\n // than one class. In this case a situation can arise where\n // two or more matching configuration sets exists.\n if (metricInfo.usesClassName(className)) {\n // Apply the current configuration set to this metric\n logInfo(\n \"A configuration set was found for metric with\"\n + \" object class name \" + className\n + \" and service ID \" + serviceId);\n MetricConfig configSet =\n metricConfigurations.get(className);\n \n // Execute the necessary post-registration actions\n if (configSet != null) {\n // Checks if this metric has to be automatically\n // installed upon registration\n if ((configSet.containsKey(MetricConfig.KEY_AUTOINSTALL)\n && (configSet.getString(MetricConfig.KEY_AUTOINSTALL)\n .equalsIgnoreCase(\"true\")))) {\n if (installMetric(serviceId)) {\n logInfo (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" was successfully executed.\");\n }\n else {\n logError (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" failed.\");\n }\n }\n }\n }\n }\n }", "@Override\n\tpublic int insert(TfLoss record) {\n\t\tif(record.getLossId()==null || record.getLossId().equals(\"\")){\n\t\t\trecord.setLossId(UUID.randomUUID().toString());\n\t\t}\n\t\treturn tfLossMapper.insert(record);\n\t}", "private void start(){\n\t\tMetricData metric = new MetricData();\n\t\tmetric.getName();\n\t\tmetric.getValue();\n\t\tmetric.setValue(2);\n\t}", "protected void saveIndirectTotalValues(){\n\n }", "@Override\n public void handleEvent(HistoryEvent historyEvent) {\n if (historyEvent instanceof HistoricVariableUpdateEventEntity) {\n // emulate the history event processing and persisting\n countCustomHistoryEventHandler++;\n }\n }", "public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }", "void addRecord(HistoryRecord record) throws IOException;", "private void addMetrics(Map<MetricName, KafkaMetric> kafkaMetrics) {\n Set<MetricName> metricKeys = kafkaMetrics.keySet();\n for (MetricName key : metricKeys) {\n KafkaMetric metric = kafkaMetrics.get(key);\n String metricName = getMetricName(metric.metricName());\n if (metrics.getNames().contains(metricName)) {\n metrics.remove(metricName);\n }\n metrics.register(metricName, new Gauge<Double>() {\n @Override\n public Double getValue() {\n return metric.value();\n }\n });\n }\n }", "Integer insert(ChronicCheck record);", "protected void onAdd()\n {\n scheduleExpiry();\n\n // update units\n int cNewUnits = calculateUnits(m_oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid exception\n return;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n }\n\n // issue add notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_INSERTED, getKey(), null, getValue()));\n }\n }", "private void saveAccelerometerData(float acc_x, float acc_y, float acc_z, long timestamp){\n //Log.v(TAG, \"saveAccelerometerData:: acc_x: \"+acc_x+\" acc_y: \"+acc_y+\" acc_z: \"+acc_z);\n //SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(System.currentTimeMillis()));\n SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(timestamp));\n listAccelData.add(sensorData);\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ScoreAnalysis addNewScoreAnalysis();", "@Override\n public void accLongitudinal(int value, int timestamp) {\n }", "public static void saveIncInt(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveInc, SaveInc).commit();\n\n }", "public void logNewAccount(int op_id, int account_id, int current_balance){\n try {\n PreparedStatement stmt = rawDataSource.getConnection().prepareStatement(\n \"insert into OPERATIONS (OP_ID, OP_TYPE, FROM_ACCOUNT_ID, FROM_CURRENT_BALANCE, TIMESTAMP) \" +\n \"values (?,?,?,?,?)\");\n stmt.setInt(1, op_id);\n stmt.setInt(2, OP_TYPES.valueOf(\"CREATE\").ordinal()+1);\n stmt.setInt(3, account_id);\n stmt.setInt(4, current_balance);\n stmt.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static void SaveCounter4(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter4, SaveCounter4).commit();\n\n }", "MetricModel createMetricModel();", "@Override\n public void updateHistory() {\n List<Integer> allItemIds = determineItemIds();\n if (allItemIds == null || allItemIds.size() == 0) {\n Log.i(TAG, \"No Item Ids exists to create history data sets.\");\n return;\n }\n\n long processTs = System.currentTimeMillis();\n long startLastMonth;\n long endLastMonth;\n // determine the last month depending from the process timestamp. In the first iteration\n // the process timestamp is the current timestamp. With the second iteration,\n startLastMonth = DateHelper.startOfLastMonth(processTs);\n endLastMonth = DateHelper.endOfLastMonth(processTs);\n // iterate through all known IDs. This is required because we want to create a history entry\n // for each item\n for (int itemId : allItemIds) {\n updatePriceHistory(itemId, startLastMonth, endLastMonth);\n }\n }", "void emit() {\n counter.increment(METRIC_VALUE);\n }", "public DjDeploymentStateHistRecord() {\n super(DjDeploymentStateHist.DJ_DEPLOYMENT_STATE_HIST);\n }", "private void saveResults() {\n Date date = new Date();\n String dateString = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.US).format(date);\n\n String[] consumptionAndUnit = mAverageConsumption.split(\" \");\n String consumption = consumptionAndUnit[0];\n\n ContentValues values = new ContentValues();\n values.put(PreviousResultsTable.COL_DATE, dateString);\n values.put(PreviousResultsTable.COL_RESULT, consumption);\n values.put(PreviousResultsTable.COL_UNIT, mUnit);\n values.put(PreviousResultsTable.COL_ROW, \"0\");\n\n ContentResolver resolver = getContentResolver();\n resolver.insert(PreviousResultsTable.CONTENT_URI, values);\n\n makeToast(mAverageConsumption + \" \" + getResourceString(R.string.inf_saved));\n }", "int insert(Kmffb record);", "int insert(ParseTableLog record);", "int insert(AccuseInfo record);", "int insert(BasCounties record);", "int insert(EventsWaitsSummaryByInstance record);", "@Override\n public void report() {\n\n try {\n File mFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/metrics.txt\");\n File eFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/latency_throughput.txt\");\n if (!mFile.exists()) {\n mFile.createNewFile();\n }\n if (!eFile.exists()) {\n eFile.createNewFile();\n }\n\n FileOutputStream mFileOut = new FileOutputStream(mFile, true);\n FileOutputStream eFileOut = new FileOutputStream(eFile, true);\n\n StringBuilder builder = new StringBuilder((int) (this.previousSize * 1.1D));\n StringBuilder eBuilder = new StringBuilder((int) (this.previousSize * 1.1D));\n\n// Instant now = Instant.now();\n LocalDateTime now = LocalDateTime.now();\n\n builder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n eBuilder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n\n builder.append(lineSeparator).append(\"---------- Counters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- records counter ----------\").append(lineSeparator);\n for (Map.Entry metric : counters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n if (( (String)metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Gauges ----------\").append(lineSeparator);\n for (Map.Entry metric : gauges.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Gauge) metric.getKey()).getValue()).append(lineSeparator);\n }\n\n builder.append(lineSeparator).append(\"---------- Meters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- throughput ----------\").append(lineSeparator);\n for (Map.Entry metric : meters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n if (((String) metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Histograms ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- lantency ----------\").append(lineSeparator);\n for (Map.Entry metric : histograms.entrySet()) {\n HistogramStatistics stats = ((Histogram) metric.getKey()).getStatistics();\n builder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n eBuilder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n }\n\n mFileOut.write(builder.toString().getBytes());\n eFileOut.write(eBuilder.toString().getBytes());\n mFileOut.flush();\n eFileOut.flush();\n mFileOut.close();\n eFileOut.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public Counter(Counter count) {\r\n value = count.value;\r\n }", "public DjDeploymentStateHistRecord(Long histId, Long deploymentId, Integer oldStateId, Integer newStateId, String description, String comments, String ops, String updatedBy, Timestamp updated) {\n super(DjDeploymentStateHist.DJ_DEPLOYMENT_STATE_HIST);\n\n set(0, histId);\n set(1, deploymentId);\n set(2, oldStateId);\n set(3, newStateId);\n set(4, description);\n set(5, comments);\n set(6, ops);\n set(7, updatedBy);\n set(8, updated);\n }", "public void addHistoryPatientRecords(int visit_id, int patient_id, String usersellectedDate, String daysSel, String fowSel, String monthSel, String prescriptionImgPath, String clinical_note, String added_on_date, String visit_date, String doc_id, String doc_mem_id, String flag, String addedTime, String patientInfoType, String added_by, String action,\n String weight, String pulse, String bphigh, String bplow, String temparature, String symptoms, String dignosis, String strHeight, String bmi, String referedBy, String referedto, String rec_source, String strSpo2, String strRespirationRate, String obesity) {\n\n SQLiteDatabase db = this.getWritableDatabase();\n\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_VISIT_ID, visit_id);\n values.put(KEY_PATIENT_ID, patient_id);\n values.put(ACTUAL_FOLLOW_UP_DATE, usersellectedDate);\n\n values.put(DAYS, daysSel);\n values.put(WEEKS, fowSel);\n\n values.put(MONTHS, monthSel);\n values.put(PRESCRIPTION, prescriptionImgPath);\n values.put(CLINICAL_NOTES, clinical_note);\n values.put(ADDED_ON, added_on_date);\n values.put(VISIT_DATE, visit_date);\n values.put(DOCTOR_ID, doc_id);\n values.put(DOCTOR_MEMBERSHIP_ID, doc_mem_id);\n values.put(SYCHRONIZED, flag);\n values.put(ADDED_TIME, addedTime);\n values.put(PATIENT_INFO_TYPE_FORM, patientInfoType);\n values.put(ACTION, action);\n values.put(ADDED_BY, added_by);\n values.put(WEIGHT, weight);\n values.put(PULSE, pulse);\n values.put(BP, bphigh);\n values.put(BP_LOW, bplow);\n values.put(TEMP, temparature);\n\n values.put(SYMPTOMS, symptoms);\n values.put(DIGNOSIS, dignosis);\n\n values.put(HEIGHT, strHeight);\n values.put(BMI, bmi);\n values.put(REFERED_BY, referedBy);\n values.put(REFERED_TO, referedto);\n values.put(RECORD_SOURCE, rec_source);\n values.put(SPO2, strSpo2);\n values.put(RESPIRATION, strRespirationRate);\n values.put(OBESITY, obesity);\n\n db.insert(TABLE_PATIENT_HISTORY, null, values);\n\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (db != null) {\n db.close();\n }\n }\n }", "public float[] getCountHistory() {\n return countMonitor.getHistory();\n }", "private void saveInitialTotalScore() {\n\t\thelper.insertTotalScoreData(TotalScoretableName, totalScoreID, \"0\");\n\t}", "private void logCurrentSensorEntriesBatch() {\n\t\tentriesRecorded++;\n\n\t\tint targetBatchSize = Constants.MS_FREQUENCY_FOR_CAMERA_CAPTURE / Constants.MS_INS_SAMPLING_FREQUENCY;\n\n\t\tArrayList<SensorEntry> toProcess = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(0, targetBatchSize));\n\t\tthis.sensorEntryBatch = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(targetBatchSize,\n\t\t\t\ttargetBatchSize));\n\n\t\tthis.writeBatchToFile(toProcess);\n\t}" ]
[ "0.6462762", "0.6252454", "0.61406875", "0.59603214", "0.58326375", "0.5642441", "0.5638362", "0.5621538", "0.55219764", "0.55141413", "0.5416211", "0.54060066", "0.539897", "0.5386703", "0.5372271", "0.53504086", "0.53352654", "0.53249264", "0.5293341", "0.52756596", "0.5266353", "0.5260371", "0.5254896", "0.5237244", "0.52371794", "0.51985604", "0.51946414", "0.51892674", "0.5174322", "0.51677066", "0.5149103", "0.5138924", "0.5111799", "0.5109865", "0.51037705", "0.5091491", "0.50831765", "0.50787437", "0.5077192", "0.5069523", "0.5069504", "0.5065192", "0.50611436", "0.50524384", "0.5030639", "0.5030293", "0.50106096", "0.5007397", "0.5003166", "0.5001983", "0.49977008", "0.49955553", "0.49916607", "0.4987011", "0.49795976", "0.49753967", "0.4968814", "0.4957539", "0.4953909", "0.49538386", "0.49538013", "0.49455264", "0.4940231", "0.49375302", "0.49323723", "0.4927099", "0.4918877", "0.49168345", "0.49098206", "0.48939276", "0.48841023", "0.48771632", "0.48752764", "0.48721448", "0.48714408", "0.48674437", "0.4865554", "0.4860831", "0.48537064", "0.48487172", "0.4845751", "0.48326483", "0.48283303", "0.48265004", "0.48230237", "0.48211825", "0.48207912", "0.4814989", "0.4812511", "0.48052812", "0.47979936", "0.47963873", "0.47962615", "0.4792928", "0.47894296", "0.47875088", "0.47818914", "0.47815517", "0.478016", "0.47771922" ]
0.7261087
0
Get the metric_val for the latest metric_date for the given envCountId.
public static float getTotalTransaction(final int envCountId) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_GET_COUNTER_T_TRANSACTION); query.setInteger("envCountId",envCountId); Float metricVal = (Float)query.uniqueResult(); txn.commit(); return metricVal == null ? 0f : metricVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Object getMetricValue(ObjectName metricObjectName)\n {\n Object metricValue;\n try\n {\n try\n {\n metricValue = getMBeanAttribute(metricObjectName, \"Value\");\n }\n catch (AttributeNotFoundException ignored)\n {\n metricValue = getMBeanAttribute(metricObjectName, \"Count\");\n }\n }\n catch (Exception e)\n {\n throw new RuntimeException(e);\n }\n return metricValue;\n }", "protected Object getMetricValue(ObjectName metricObjectName)\n {\n Object metricValue;\n try\n {\n try\n {\n metricValue = getMBeanAttribute(metricObjectName, \"Value\");\n }\n catch (AttributeNotFoundException ignored)\n {\n metricValue = getMBeanAttribute(metricObjectName, \"Count\");\n }\n }\n catch (Exception e)\n {\n throw new RuntimeException(e);\n }\n return metricValue;\n }", "private Map<String, Double> getValuesForMetricGranularityAndDate(final String metricId,\n final String groupBy, final Date collectDate) {\n final List<MetricTrendValue> values =\n this.trendValueDao.getValuesForGranularityAndDate(metricId, groupBy, collectDate);\n final Map<String, Double> result = new HashMap<String, Double>();\n for (final MetricTrendValue trendValue : values) {\n result.put(trendValue.getGroupByValue(), trendValue.getValue());\n }\n return result;\n }", "public ModelMetric getMetric(String metricId){\n for(ModelMetric metricIter : metrics){\n if (metricIter.getId().equals(metricId)){\n return metricIter;\n }\n }\n return null;\n }", "public ByteBuffer getMetricValueDigest(MetricValueIdentifier id)\n\t{\n\t\tByteBuffer digest = null;\n\t\ttry {\n\t\t\tMetricContext<ByteBuffer> context = new MetricContext<ByteBuffer>(id);\n\t\t\taddTask(\"GET-METRIC-VALUE-DIGEST\", context);\n\t\t\tdigest = context.getReplyQueue().take().getResult();\n\t\t} catch (InterruptedException ex) {\n\t\t\tlogger.warn(\"Interrupted while awaiting reply from database reader thread.\");\n\t\t}\n\t\treturn digest;\n\t}", "public Date getLatestDate() {\r\n\t\tCriteriaBuilder cb = em.getCriteriaBuilder();\r\n\t\tCriteriaQuery<TestLinkMetricMeasurement> query = cb.createQuery(TestLinkMetricMeasurement.class);\r\n\t\tRoot<TestLinkMetricMeasurement> root = query.from(TestLinkMetricMeasurement.class);\r\n\t\tquery.select(root);\r\n\t\tquery.orderBy(cb.desc(root.get(TestLinkMetricMeasurement_.timeStamp)));\r\n\t\tDate latest;\r\n\t\ttry {\r\n\t\t\tTestLinkMetricMeasurement m = em.createQuery(query).setMaxResults(1).getSingleResult();\r\n\t\t\tlatest = m.getTimeStamp();\t\t\t\r\n\t\t} catch (NoResultException nre) {\r\n\t\t\tlatest = null;\r\n\t\t}\r\n\t\treturn latest;\r\n\t}", "public static Map<String, Integer> getCurrentApiDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(ApiStatusEntity.class, \"apiSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.statusDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ApiStatusEntity> apiEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(ApiStatusEntity apiStsEntity : apiEntityList){\n\t\t\tif(apiStsEntity.getComponent() != null){\n\t\t\t\tmapApiSts.put(apiStsEntity.getComponent().getComponentName(), apiStsEntity.getTotalApi());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "public DataValue getLastDataByDeviceIdSortedByTimestamp(String deviceId) throws Exception;", "public static Map<String, Integer> getK8sCurrentApiDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(K8sApiStatusEntity.class, \"apiSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.statusDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"apiSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<K8sApiStatusEntity> apiEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(K8sApiStatusEntity apiStsEntity : apiEntityList){\n\t\t\tif(apiStsEntity.getComponent() != null){\n\t\t\t\tmapApiSts.put(apiStsEntity.getComponent().getComponentName(), apiStsEntity.getTotalApi());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "public DataValue getGreatestDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "Object getMaximumValue(Object elementID) throws Exception;", "public InformationLoss getValue(final Metric<?> metric) {\n return values.get(metric);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByCompanyId_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence()\n .findByCompanyId_Last(companyId, orderByComparator);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByC_G_Last(\n long companyId, long groupId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence()\n .findByC_G_Last(companyId, groupId, orderByComparator);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByCompanyId_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchByCompanyId_Last(companyId, orderByComparator);\n }", "public double getValue(long id) {\n return getValue(\"\" + id);\n }", "com.google.api.servicecontrol.v1.MetricValue getMetricValues(int index);", "double getValue(int id);", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_C_Last(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence()\n .findByUuid_C_Last(uuid, companyId, orderByComparator);\n }", "public int getValue(int edgeId)\n {\n return _storage.getEdgeValue(edgeId, BordersGraphStorage.Property.TYPE);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByC_G_Last(\n long companyId, long groupId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchByC_G_Last(companyId, groupId, orderByComparator);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchBysensorId_Last(\n long sensorId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchBysensorId_Last(sensorId, orderByComparator);\n }", "public static synchronized Metric getMetricByThread() {\n long tid = Thread.currentThread().getId();\n Metric m = metrics.get(tid);\n if(m == null) {\n m = new Metric(tid);\n metrics.put(tid, m);\n }\n return m;\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByUuid_C_Last(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchByUuid_C_Last(uuid, companyId, orderByComparator);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findBysensorId_Last(\n long sensorId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findBysensorId_Last(sensorId, orderByComparator);\n }", "public DataValue getLastDataByDeviceIdAndSensorTypeSortedByTimestamp(SensorValue sensorVal) throws Exception;", "public Object getReturnValue(String caseId) {\n return casesMap.get(caseId);\n }", "public static Map<String, Integer> getCurrentContainerDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(ContainerStatsEntity.class, \"contSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.statsDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ContainerStatsEntity> contEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(ContainerStatsEntity contStsEntity : contEntityList){\n\t\t\tif(contStsEntity.getComponent() != null && contStsEntity.getComponent().getParentComponent() != null){\n\t\t\t\tString fullAppName = contStsEntity.getComponent().getParentComponent().getComponentName() + \"/\" + contStsEntity.getComponent().getComponentName();\n\t\t\t\tmapApiSts.put(fullAppName, contStsEntity.getTotalContainer());\n\t\t }else if(contStsEntity.getComponent() != null){\n\t\t \tmapApiSts.put(contStsEntity.getComponent().getComponentName(), contStsEntity.getTotalContainer());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByGroupId_Last(\n long groupId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);\n }", "public Date calculateHighestVisibleTickValue(DateTickUnit unit) { return previousStandardDate(getMaximumDate(), unit); }", "private Double calculateMetricValue(final String groupByValue) {\n Double numerator = this.numeratorValues.get(groupByValue);\n if (numerator == null) {\n numerator = this.zeroDouble;\n }\n Double denominator = this.denominatorValues.get(groupByValue);\n if (denominator == null || denominator.equals(this.zeroDouble)) {\n denominator = this.hugeDouble;\n }\n return numerator / denominator;\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByGroupId_Last(\n long groupId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findByGroupId_Last(groupId, orderByComparator);\n }", "protected synchronized Date getDateValue(String tag) {\n Date date = new Date(0L);\n if (actualProperties != null) {\n long dateTime = Long.decode(actualProperties.getProperty(tag, \"0\"));\n date.setTime(dateTime);\n }\n return date;\n }", "com.google.dataflow.v1beta3.MetricUpdate getMetrics(int index);", "public long getValue(int index) {\n return value_.getLong(index);\n }", "private void getLastValueSensor(int id) {\n if (RESPONSES != null) {\n try {\n JSONObject jsonObject = new JSONObject(RESPONSES);\n JSONArray jsonArray = jsonObject.getJSONArray(\"data\");\n for (int i = 0; i <= jsonArray.length() + 1; i++) {\n JSONObject jsonObject1 = new JSONObject(jsonArray.getString(i));\n setId(jsonObject1.getInt(\"id\"));\n //Log.d(TAG, \"ID on the iteration \" + i + \" = \" + getId());\n if (getId() == id) {\n setValue(jsonObject1.getString(\"logvalue\"));\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n setValue(\":)\");\n }\n }", "public long getValue(int index) {\n return value_.getLong(index);\n }", "public String getAccountValue(String elementId) {\n String sqlQuery = \"\", elementValue = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n try {\n sqlQuery = \" SELECT C_ELEMENTVALUE.VALUE as value FROM C_ELEMENTVALUE WHERE C_ELEMENTVALUE_ID = ? AND C_ELEMENTVALUE.ISACTIVE = 'Y'\";\n st = conn.prepareStatement(sqlQuery);\n st.setString(1, elementId);\n rs = st.executeQuery();\n if (rs.next()) {\n elementValue = rs.getString(\"value\");\n\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return elementValue;\n }", "public double getValue(String id) {\n for (SimilarResult result : results) {\n if (result.getStringId().equals(id)) {\n return result.getValue();\n }\n }\n return 0;\n }", "long toTimelineValue(Date date);", "@Override\n @SuppressWarnings(\"unchecked\")\n public long getUpperBound() {\n AuditReader auditService = Framework.getService(AuditReader.class);\n String auditQuery = \"from LogEntry log order by log.id desc\";\n log.debug(\"Querying audit log for greatest id: {}\", auditQuery);\n\n List<LogEntry> entries = (List<LogEntry>) auditService.nativeQuery(auditQuery, 1, 1);\n if (entries.isEmpty()) {\n log.debug(\"Found no audit log entries, returning -1\");\n return -1;\n }\n return entries.get(0).getId();\n }", "@Override\n\tpublic Number computeMetricValue(Map<String, Number> values) {\n\t\treturn values.values().toArray(new Number[1])[0];\n\t}", "@Override\n public Optional<JSONObject> loadLatest(final String keyId) {\n return loadLatestTimer.record(() -> {\n try {\n // Have to use query api to use limit and reverse sort order\n ItemCollection<QueryOutcome> itemCollection = table.query(new QuerySpec()\n .withHashKey(PARTITION_KEY, keyId)\n .withProjectionExpression(ATTRIBUTE_KEY_RECORD)\n .withScanIndexForward(false) // sorts descending\n .withMaxResultSize(1) // limit 1\n .withConsistentRead(true)); // always use strong consistency\n\n Iterator<Item> iterator = itemCollection.iterator();\n if (iterator.hasNext()) {\n Item item = iterator.next();\n return Optional.of(new JSONObject(item.getMap(ATTRIBUTE_KEY_RECORD)));\n }\n }\n catch (SdkBaseException se) {\n logger.error(\"Metastore error\", se);\n }\n\n return Optional.empty();\n });\n }", "public Double getMax(int barID) {\r\n\t\t// If the index is valid;\r\n\t\tif (barID >= 0 && barID < barCount) {\r\n\t\t\t// Return the maximum. Corrected for double precision loss.\r\n\t\t\treturn roundPrecision(maxValue[barID], STATUS_PRECISION);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public double getValue(int i, int j) {\n \n Configuration conf=this.get(i);\n return conf.getValue(j);\n}", "private void calculateMaxValue(int seriesCount, int catCount) {\r\n double v = 0;\r\n Number nV = null;\r\n\r\n for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) {\r\n for (int catIndex = 0; catIndex < catCount; catIndex++) {\r\n nV = getPlotValue(seriesIndex, catIndex);\r\n if (nV != null) {\r\n v = nV.doubleValue();\r\n if (v > getMaxValue()) {\r\n setMaxValue(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "long getMetricCostsOrDefault(\n String key,\n long defaultValue);", "@Override\n public Number getValue() {\n return tcpStatWrapper.query().get(entry.getKey());\n }", "public GameMessage getLatestBid(String gameId) {\r\n Deque<GameMessage> msgs = (Deque)msgMapping.get(gameId);\r\n if (msgs != null) {\r\n return msgs.getLast();\r\n }\r\n return null;\r\n }", "public void Last_Day_Inventory_cost(){\n \n \n \n String query = \"SELECT In_Date,Total_Cost FROM Inventory where In_Date='\"+date+\"' \";\n \n \n try {\n Connection con= DBconnect.connectdb();\n Statement stmt=con.createStatement();\n ResultSet rs;\n \n rs=stmt.executeQuery(query);\n \n if(rs.next()){\n \n \n \n Inventory_total_Cost=rs.getFloat(2);\n jLabel_last_day_inventory_cost.setText(\"\"+Inventory_total_Cost);\n \n }\n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(Sales_Performance_Chart.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private CounterDistribution getCounterValue(NameContext step) {\n Counter<Long, CounterDistribution> counter = getCounter(step);\n assertThat(\n \"per-element-processing-time counter should not be null for step: \" + step,\n counter,\n notNullValue());\n return counter.getAggregate();\n }", "public static Map<String, Integer> getK8sCurrContainerDetails(int envId, String platform) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria contCriteria = session.createCriteria(K8sPodsContainersEntity.class, \"contSts\");\n\t\tcontCriteria.add(Restrictions.eq(\"contSts.statusDate\", todayDate ));\n\t\tcontCriteria.add(Restrictions.eq(\"contSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<K8sPodsContainersEntity> contEntityList = contCriteria.list();\n\t\tMap<String, Integer> mapContSts = new HashMap<String, Integer>();\n\t\tfor(K8sPodsContainersEntity contStsEntity : contEntityList){\n\t\t\tif(contStsEntity.getComponent() != null && contStsEntity.getComponent().getParentComponent() != null){\n\t\t\t\tString fullAppName = contStsEntity.getComponent().getParentComponent().getComponentName() + \"/\" + contStsEntity.getComponent().getComponentName();\n\t\t\t\tmapContSts.put(fullAppName, contStsEntity.getTotalContainers());\n\t\t }else if(contStsEntity.getComponent() != null){\n\t\t \tmapContSts.put(contStsEntity.getComponent().getComponentName(), contStsEntity.getTotalContainers());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapContSts;\n\t}", "public static void addCounterMetricHistory(final int environmentCounterId, final float counterMerticValue) {\t\n\t\tTimestamp currDate = new java.sql.Timestamp(Calendar.getInstance().getTimeInMillis());\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCounterMetricHistoryEntity counterMetricHistory = new CounterMetricHistoryEntity();\n\t\tEnvCounterEntity envCounterEntity = new EnvCounterEntity();\n\t\tenvCounterEntity.setEnvCounterId(environmentCounterId);\n\t\tcounterMetricHistory.setEnvCounter(envCounterEntity);\n\t\tcounterMetricHistory.setMetricVal(counterMerticValue);\n\t\tcounterMetricHistory.setMetricDate(currDate);\n\t\tsession.save(counterMetricHistory);\n\t\ttxn.commit();\n\t}", "public String metricResourceId() {\n return this.metricResourceId;\n }", "public static vn.com.ecopharma.hrm.rc.model.EvaluationCriteriaKeyValue fetchByEvaluationCriteria_Last(\n\t\tlong evaluationCriteriaId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByEvaluationCriteria_Last(evaluationCriteriaId,\n\t\t\torderByComparator);\n\t}", "public Object getValue() {\n synchronized (mutex) {\n return statisticsAccumulator.getValue();\n }\n }", "com.google.ads.googleads.v13.services.ForecastMetrics getForecast();", "public JavaRDD<MetricDto> readMetrics() {\n Date windowStartTime = DateUtil.getWindowStartTime();\n Date windowEndTime = DateUtil.getWindowEndTime();\n return CassandraJavaUtil.javaFunctions(sparkContext)\n .cassandraTable(\"hw2\", \"metric\", CassandraJavaUtil.mapRowTo(MetricDto.class))\n //Select only log message time and priority\n .select(\"id\", \"time\", \"value\")\n .where(\"time >= ? and time <= ?\", windowStartTime, windowEndTime);\n }", "public double maxValue(DateTime dt1, DateTime dt2) throws Exception {\r\n Candle[] cd = collectCandlesByIndex(find_index(dt1), find_index(dt2));\r\n double max;\r\n if (cd.length > 1) {\r\n max = cd[0].getHigh();\r\n for (Candle c : cd) {\r\n if (c.getHigh() > max){\r\n max = c.getHigh();\r\n }\r\n }\r\n return max;\r\n } else if (cd.length == 1) {\r\n return cd[0].getHigh();\r\n } else {\r\n return 0;\r\n }\r\n }", "long getHdfsMetricsOrDefault(java.lang.String key, long defaultValue);", "public void calculateRevisionMetricValuesFromVersionedItemMetricValues(SoftwareProject project, List<Metric> metrics) {\r\n //it is not possible to calculate metricvalues from project metrics, because they are already in that granularity\r\n List<Metric> nonProjectMetrics = new ArrayList<Metric>(metrics.size());\r\n for (Metric metric : metrics) {\r\n if (metric.getExtratcsFrom() == Metric.EXTRACTS_FROM_PROJECT) {\r\n continue;\r\n }\r\n nonProjectMetrics.add(metric);\r\n }\r\n if (nonProjectMetrics.isEmpty()) {\r\n System.out.println(\"There are no metrics to calculate.\");\r\n return;\r\n }\r\n\r\n //A map to store the last value of each item\r\n Map<Metric, Map<Item, Double>> mapNewestItemMeasurement = new HashMap<Metric, Map<Item, Double>>();\r\n for (Metric metric : nonProjectMetrics) {\r\n mapNewestItemMeasurement.put(metric, new HashMap<Item, Double>());\r\n }\r\n\r\n System.out.println(\"Get revisions...\");\r\n Set<Revision> revisions = revisionService.getByProject(project);\r\n int count = 1;\r\n int total = revisions.size();\r\n for (Revision revision : revisions) {\r\n System.out.println(\"\\n\" + count++ + \"/\" + total + \" Revision = \" + revision);\r\n\r\n for (Metric metric : nonProjectMetrics) {\r\n// Output.println(\" \" + metric);\r\n\r\n //get the list of items modified in this revision\r\n List<VersionedItemMetricValue> vimvs = versionedItemMetricValueService.getByRevisionAndMetric(revision, metric);\r\n\r\n// Output.println(\" Updating the measured items:\" + vimvs.size());\r\n //for each of them, update the map with the last measured value\r\n for (VersionedItemMetricValue vimv : vimvs) {\r\n// Output.println(\" >>> vimv = \" + vimv);\r\n if (vimv.getVersionedItem().getType() == VersionedItem.TYPE_DELETED) {\r\n mapNewestItemMeasurement.get(vimv.getMetric()).remove(vimv.getVersionedItem().getItem());\r\n } else {\r\n mapNewestItemMeasurement.get(vimv.getMetric()).put(vimv.getVersionedItem().getItem(), vimv.getDoubleValue());\r\n }\r\n }\r\n// Output.println(\" Calculating the value of revision\");\r\n //after update the map, it contains the last value of each item.\r\n\r\n // ================ início do novo método para o metric manager que deve contabilizar para MetricValue os VIMVs\r\n Double sum = 0d;\r\n int numberOfConsederedArtifacts = 0;\r\n StringBuilder strSoma = new StringBuilder();\r\n for (Double oneValue : mapNewestItemMeasurement.get(metric).values()) {\r\n// soma.append(\" + \").append(oneValue);\r\n if (!oneValue.isNaN()) {\r\n sum += oneValue;\r\n numberOfConsederedArtifacts++;\r\n }\r\n }\r\n if (metric.getAcronym().equals(MetricEnumeration.ACC.getAcronym())\r\n || metric.getAcronym().equals(MetricEnumeration.CAM.getAcronym())\r\n || metric.getAcronym().equals(MetricEnumeration.DAM.getAcronym())\r\n || metric.getAcronym().equals(MetricEnumeration.RMA.getAcronym())) {\r\n sum /= numberOfConsederedArtifacts;\r\n }\r\n MetricValue mv = new MetricValue(revision, metric, sum);\r\n // ================ fim do novo método\r\n\r\n strSoma.append(\" |\").append(mapNewestItemMeasurement.get(metric).values().size()).append(\"|\").append(\" = \").append(mv);\r\n Output.println(\" \" + strSoma.toString());\r\n\r\n metricValueService.save(mv);\r\n }\r\n }\r\n }", "public static vn.com.ecopharma.hrm.rc.model.EvaluationCriteriaKeyValue fetchByPrimaryKey(\n\t\tlong evaluationCriteriaKeyValueId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().fetchByPrimaryKey(evaluationCriteriaKeyValueId);\n\t}", "io.dstore.values.TimestampValue getFromDay();", "public GeobatchRunInfo getLastRunInfo(String... compositeId) {\n return getLastRunInfoCache(generateDecription(compositeId));\n }", "public static Object retrieveMetrics() throws ParseException {\n\t\t// the cloudwatch client to use\n\t\tAmazonCloudWatch cloudWatch = null;\n\t\t// the request to send to cloudwatch\n\t\tGetMetricStatisticsRequest request;\n\t\t// the metric stats result.\n\t\tGetMetricStatisticsResult result;\n\n\t\t// create credentials using the BasicAWSCredentials class\n\t\t/*\n\t\t * BasicAWSCredentials credentials = new\n\t\t * BasicAWSCredentials(connectionData.get(\"accessKey\"),\n\t\t * connectionData.get(\"secretAccessKey\"));\n\t\t */\n\t\t// create a cloudwatch client\n\t\ttry {\n\t\t\tcloudWatch = AmazonCloudWatchClientBuilder.standard().withCredentials(new ProfileCredentialsProvider())\n\t\t\t\t\t.withRegion(\"us-west-2\").build();\n\t\t} catch (AmazonServiceException amazonServiceException) {\n\t\t\t// if an error response is returned by AmazonIdentityManagement\n\t\t\t// indicating either a\n\t\t\t// problem with the data in the request, or a server side issue.\n\t\t\tSystem.err.println(new Object() {\n\t\t\t}.getClass().getName() + \" Exception: \" + amazonServiceException.getMessage());\n\t\t\treturn amazonServiceException;\n\t\t} catch (AmazonClientException amazonClientException) {\n\t\t\t// If any internal errors are encountered inside the client while\n\t\t\t// attempting to make\n\t\t\t// the request or handle the response. For example if a network\n\t\t\t// connection is not\n\t\t\t// available.\n\t\t\tSystem.err.println(new Object() {\n\t\t\t}.getClass().getName() + \" Exception: \" + amazonClientException.getMessage());\n\t\t\treturn amazonClientException;\n\t\t}\n\t\t\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\n\n/*\t\tString string = \"2017-03-17 06:25\";\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\tformat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\t\tDate date = format.parse(string);\n\t\tSimpleDateFormat dateParser = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\tDate dateTime = dateParser.parse(format.format(date));\n*/\n\t\t// prepare request\n\t\trequest = new GetMetricStatisticsRequest();\n\t\t// request.setStartTime(new Date(System.currentTimeMillis() -\n\t\t// (60000*50)));\n\t\tint nMinutes = 500;\n\t\trequest.setStartTime(new Date(System.currentTimeMillis() - (60000 * nMinutes)));\n\t\trequest.setEndTime(new Date());\n\t\tSystem.out.println(request.getStartTime() + \":\" + request.getEndTime());\n\t\trequest.setPeriod(60);\n\t\trequest.setNamespace(\"AWS/DynamoDB\");\n\t\t// request.setMetricName(\"SuccessfulRequestLatency\");\n\t\trequest.setMetricName(\"ReturnedItemCount\");\n\n\t\tDimension dimension = new Dimension();\n\t\tdimension.setName(\"TableName\");\n\t\tdimension.setValue(\"Movies\");\n\t\t\n\t\tDimension dimension2 = new Dimension();\n\t\tdimension2.setName(\"Operation\");\n\t\tdimension2.setValue(\"Scan\");\n\n\t\trequest.setStatistics(Arrays.asList(\"Average\", \"Sum\", \"Minimum\", \"Maximum\"));\n\t\trequest.setDimensions(Arrays.asList(dimension, dimension2));\n\n\t\t// get the monitoring result!\n\t\ttry {\n\t\t\tresult = cloudWatch.getMetricStatistics(request);\n\t\t} catch (AmazonServiceException amazonServiceException) {\n\t\t\t// if an error response is returned by AmazonIdentityManagement\n\t\t\t// indicating either a\n\t\t\t// problem with the data in the request, or a server side issue.\n\t\t\tSystem.err.println(new Object() {\n\t\t\t}.getClass().getName() + \" Exception: \" + amazonServiceException.getMessage());\n\t\t\treturn amazonServiceException;\n\t\t} catch (AmazonClientException amazonClientException) {\n\t\t\t// If any internal errors are encountered inside the client while\n\t\t\t// attempting to make\n\t\t\t// the request or handle the response. For example if a network\n\t\t\t// connection is not\n\t\t\t// available.\n\t\t\tSystem.err.println(new Object() {\n\t\t\t}.getClass().getName() + \" Exception: \" + amazonClientException.getMessage());\n\t\t\treturn amazonClientException;\n\t\t}\n\n\t\tSystem.out.println(\"result: \" + result);\n\t\t// get the data and print it out.\n\t\tList<Datapoint> data = result.getDatapoints();\n\t\tfor (Datapoint datum : data) {\n\t\t\tSystem.out.println(\" Datum: \" + datum.getAverage());\n\t\t}\n\n\t\t// return the sorted data\n\t\treturn data;\n\t}", "public final Date dateValue() {\n if (calValue != null)\n return calValue.getTime();\n else\n return null;\n }", "public void getMostRecentUsage(HouseChartPanel cp){\n // secure, not transmitted in the open\n cp.submitMostRecent(this, energy);\n }", "com.google.api.servicecontrol.v1.MetricValueOrBuilder getMetricValuesOrBuilder(int index);", "long getMetricCostsOrThrow(\n String key);", "public double getVariableValue(){\n\t\tObject valueKey = getEntries().keySet().stream().findFirst().orElseGet(()->{return 0d;});\n\t\tif (valueKey instanceof Double){\n\t\t\treturn (Double) valueKey;\n\t\t}\n\t\ttry {\n\t\t\tdouble value = Double.parseDouble(valueKey+\"\");\n\t\t\treturn value;\n\t\t}\n\t\tcatch (NumberFormatException ex){\n\t\t\treturn 0d;\n\t\t}\n\t}", "public String getVal(String key) {\n Optional<KeyValList> kv = findKeyVal(key);\n\n if (kv.isPresent()) {\n return kv.get().getCfgVal();\n }\n\n return null;\n }", "public String getMetric() {\n return this.metric;\n }", "public static IntValueSelector max_value_selector() {\n return new IntDomainMax();\n }", "public double get(int propId)\n {\n \n double retVal = get_0(nativeObj, propId);\n \n return retVal;\n }", "public Long timeMostRecentWallPost (PublicKey key) {\n Logger.write(\"VERBOSE\", \"DB\", \"timeMostRecentWallPost(...)\");\n try {\n ResultSet mostRecent = query(DBStrings.mostRecentWallPost.replace(\"__KEY__\", Crypto.encodeKey(key)));\n if (mostRecent.next())\n return Long.parseLong(mostRecent.getString(\"maxtime\"));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n }\n return 0L;\n }", "public static double getMaxTemperatureForDay(String weatherJsonStr, int dayIndex) throws JSONException{\n JSONObject weatherObj = new JSONObject(weatherJsonStr); //Turn the jsonstring into a jsonObject\n JSONArray days = weatherObj.getJSONArray(\"list\"); //Then we look for the 'list' array\n JSONObject dayInfo = days.getJSONObject(dayIndex); //within that, we find the day we care about\n JSONObject temperatureInfo = dayInfo.getJSONObject(\"temp\"); // then we look for the temp node\n return temperatureInfo.getDouble(\"max\"); //then we find the max temp\n }", "private double getMax() {\n return Collections.max(values.values());\n }", "public native FacetValue getFacetValue(String facetId, String facetValueId) /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n var ret = self.getFacetValue(facetId, facetValueId);\r\n if(ret == null || ret === undefined) return null;\r\n var retVal = @com.smartgwt.client.core.RefDataClass::getRef(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n if(retVal == null) {\r\n retVal = @com.smartgwt.client.widgets.cube.FacetValue::new(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n }\r\n return retVal;\r\n }-*/;", "@VisibleForTesting\n public static Severity getHighestSeverity(Collection<Incident> incidents) {\n Severity max = Severity.OK;\n for (Incident incident : incidents) {\n if (max.compareTo(incident.severity) < 0) {\n max = incident.severity;\n }\n }\n return max;\n }", "public String metricName() {\n return this.metricName;\n }", "public V getValue(K key);", "public V getValue(K key);", "@Override\n\tpublic Integer findMaxCount() {\n\t\tString maxCountSql = \"select count(noticeid) from notice where status=1\";\n\t\treturn (Integer) this.jdbcTemplate.queryForObject(maxCountSql, Integer.class);\n\t}", "boolean populateValue(Metric metric) throws MetricException;", "long getHdfsMetricsOrThrow(java.lang.String key);", "@SuppressWarnings(\"PMD.UnusedFormalParameter\")\n Double getInstanceCPUSinceLastRun(String instanceId, long lastUpdated);", "private Date computeLastDate(String terminalId) {\n\t\tSyncHistory last = historyDao.loadLastOk(terminalId);\n\t\tif (last != null) {\n\t\t\treturn last.getTime();\n\t\t}\n\t\treturn null;\n\t}", "public String getLastScalarAttrValue(String completeAttributeName) throws DevFailed {\n\n String result = null;\n if (newestValueCommand != null) {\n // res should contains the timestamp and the read part of the attribute separated by ;\n // eg 1363947098786; -10.176605465035054\n String res = newestValueCommand.execute(String.class, completeAttributeName);\n if(res != null){\n String[] attrWithTimeStamp = res.split(VALUE_SEP);\n if (attrWithTimeStamp != null && attrWithTimeStamp.length == 2) {\n result = attrWithTimeStamp[1].trim();\n }\n }\n }\n if(result == null || result.isEmpty()){\n DevFailedUtils.throwDevFailed(\"No result found executing \" + hdbExtractorName + \"/\" + NEWEST_CMD + \" for \" + completeAttributeName);\n }\n\n return result;\n }", "private DataValue getValueForKey(String key) {\n DataValue value = valueMap.get(key);\n if (value == null) {\n return DataValue.NO_VALUE;\n } else {\n return value;\n }\n }", "io.dstore.values.TimestampValue getDay();", "public String getLatestDateOnActions(String rpiId) throws SQLException, IOException;", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_Last(\n java.lang.String uuid,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findByUuid_Last(uuid, orderByComparator);\n }", "@Nullable\n public byte[] getValue(MDSKey id) {\n Row row = table.get(id.getKey());\n return row.isEmpty() ? null : row.get(COLUMN);\n }", "public static vn.com.ecopharma.hrm.rc.model.EvaluationCriteriaKeyValue findByEvaluationCriteria_Last(\n\t\tlong evaluationCriteriaId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tvn.com.ecopharma.hrm.rc.NoSuchEvaluationCriteriaKeyValueException {\n\t\treturn getPersistence()\n\t\t\t\t .findByEvaluationCriteria_Last(evaluationCriteriaId,\n\t\t\torderByComparator);\n\t}", "Double getLastHourIntanceNetworkOut(String instanceId, long lastUpdated);", "public double getMaxValue(double defaultMax, Date start, Date end)\n\t{\n\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\tfor(TimedVariable tv : vars)\n\t\t{\n\t\t\tDate t = tv.getTime();\n\t\t\tif (start != null && start.compareTo(t) > 0)\n\t\t\t\tcontinue;\n\t\t\tif (end != null && end.compareTo(t) < 0)\n\t\t\t\tcontinue;\n\t\t\tint fl = tv.getFlags();\n\t\t\tif ((fl & IFlags.IS_MISSING) == 0)\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tdouble d = tv.getDoubleValue();\n\t\t\t\t\tif (d > max)\n\t\t\t\t\t\tmax = d;\n\t\t\t\t}\n\t\t\t\tcatch(NoConversionException ex) {}\n\t\t\t}\n\t\t}\n\t\treturn max == Double.NEGATIVE_INFINITY ? defaultMax : max;\n\t}", "public Double getAvgFirstAttScoreBySummaryID(Long summaryID, String env);", "public CofinFin eval(Map<String, CofinFin> env) throws Exception{\n\t\treturn theVal;\r\n\t}", "public Optional<MetricData> metricData(long applicationId, long hostId, List<String> queryParams)\n {\n return HTTP.GET(String.format(\"/v2/applications/%d/hosts/%d/metrics/data.json\", applicationId, hostId), null, queryParams, METRIC_DATA);\n }", "private Map<String, Double> findMaxMetricValues(List<Map<String, String>> dataLines, int start, int end) {\n assert (start < end);\n Map<String, Double> maxValuesMap = new HashMap<>();\n // Search through dataLines starting from the 'start' index\n for (int index = start; index < end; index++) {\n // Get the data at the 'index' line\n Map<String, String> data = dataLines.get(index);\n // Look at the metrics (which would be considered the columns in the CSV file)\n for (String metricKey : data.keySet()) {\n String dataValueString = data.get(metricKey);\n // Skip over 'no data' and non-numeric values\n if (dataValueString.equals(NO_DATA) || !dataValueString.matches(DOUBLE_DATA_PATTERN)) {\n continue;\n }\n // Get the values from dataLine and from what has been previously found (if it exists)\n Double currentMaxValue = maxValuesMap.get(metricKey);\n Double dataValue = Double.valueOf(dataValueString);\n if (currentMaxValue == null) {\n // Cache miss: add it\n maxValuesMap.put(metricKey, dataValue);\n } else {\n // Cache hit: check if the current data value is greater than the current max value\n if (dataValue > currentMaxValue) {\n maxValuesMap.put(metricKey, dataValue);\n }\n }\n }\n }\n return maxValuesMap;\n }" ]
[ "0.4787825", "0.4787825", "0.4773575", "0.47265553", "0.4642364", "0.45219764", "0.4353998", "0.4276454", "0.4268351", "0.42356348", "0.41993907", "0.41848215", "0.41499847", "0.40845415", "0.4076342", "0.40670523", "0.40437755", "0.40296397", "0.40192738", "0.39831692", "0.39828026", "0.3970689", "0.39584613", "0.39571315", "0.39541894", "0.39322042", "0.3931638", "0.39119896", "0.3903884", "0.39009783", "0.3898037", "0.3895045", "0.38758808", "0.3853821", "0.38469544", "0.38319886", "0.38309494", "0.38308436", "0.3813419", "0.38071546", "0.3798339", "0.377723", "0.37751615", "0.3771213", "0.37678984", "0.3765287", "0.37600678", "0.3758572", "0.3755607", "0.37543678", "0.37502006", "0.3737236", "0.37354442", "0.3726945", "0.37267143", "0.37227562", "0.3708293", "0.37029052", "0.37028134", "0.37001282", "0.36994433", "0.36946088", "0.36796722", "0.36770695", "0.36761722", "0.3674102", "0.36617392", "0.36584935", "0.36504754", "0.36424917", "0.3638811", "0.36367536", "0.3631075", "0.36262327", "0.36254138", "0.36224344", "0.3618323", "0.36154637", "0.36090115", "0.36087883", "0.36074853", "0.36074853", "0.36023507", "0.3601927", "0.35865963", "0.3577265", "0.3559735", "0.35590285", "0.3555406", "0.3550809", "0.3545912", "0.35446855", "0.35445893", "0.35413748", "0.35395768", "0.35319105", "0.35296386", "0.3525785", "0.35240367", "0.35201466" ]
0.3988413
19
Function to execute a delete statement..
public static void executeDelete(String query) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); session.createSQLQuery(query).executeUpdate(); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "@Override\n\tpublic String deleteStatement() throws Exception {\n\t\treturn null;\n\t}", "@Override\n public String deleteStatement() throws Exception {\n return null;\n }", "@Override\n\tprotected String deleteStatement() {\n\t\treturn null;\n\t}", "public abstract boolean delete(long arg, Connection conn) throws DeleteException;", "int delete(String tableName, String selectionCriteria, String[] selectionArgs);", "public void delete()\n {\n call(\"Delete\");\n }", "protected abstract void doDelete();", "public void delete(String so_cd);", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void doDelete(T objectToDelete) throws SQLException;", "private void delete() {\n\n\t}", "int delete(T data) throws SQLException, DaoException;", "int deleteById(ID id) throws SQLException, DaoException;", "public void delete() {\n\n\t}", "void deleteCommand(String commandID);", "public abstract void delete();", "public abstract void delete();", "@Override\n\tpublic long execute() {\n\t\treturn database.createCommand()\n\t\t\t\t.appendRaw(\"DELETE FROM \")\n\t\t\t\t.appendName(aspect.schemaName)\n\t\t\t\t.appendWhere(this.filter)\n\t\t\t\t.executeNonQuery();\n\t}", "public CustomSql getCustomSqlDelete();", "public void delete(){\r\n\r\n }", "public int delete( Conge conge ) ;", "@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t}", "public int delete( Integer idConge ) ;", "public void delete() {\n\n }", "int delete(Long id) throws SQLException, DAOException;", "int deleteByExample(BnesBrowsingHisExample example) throws SQLException;", "public void delete(String arg0) {\n\t\t\n\t}", "int deleteByExample(Assist_tableExample example);", "private Delete() {}", "private Delete() {}", "@Override\n\tpublic boolean delete(String sql) {\n\t\treturn false;\n\t}", "public void delete(IQuery query) throws SQLException;", "void delete ( int id ) throws DAOException;", "@Override\n\tpublic void delete(String arg0) {\n\t\t\n\t}", "@Override\n\tprotected void doDelete(DomainObject o, PreparedStatement s)\n\t\t\tthrows SQLException {\n\n\t}", "public static void delete() throws SQLException{\n\t \n\t\n\t\t String sid = new String();\n\t\t try{\n \t\tSystem.out.println(\"Please enter the sid(Starting with 'B')\\n\"); \n\t\t \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in )); \n\t\t\tsid = br.readLine();\n //Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\nConnection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\nCallableStatement cs = conn.prepareCall (\"begin StudRegSys.delete_student(:1); end;\");\n\t \t \n\t \t\tcs.setString(1,sid);\n\t \t\tcs.executeQuery();\n\t \t\tSystem.out.println(\"Student Successfully deleted from student table!\");\n\t\t\tSystem.out.println(\"\\n\\n\");\n\t\t \n\t\t }\n\tcatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\n }", "@Override\n\tpublic void doDelete(String product) throws SQLException {\n\t\t\n\t}", "public void delete(String arg0) {\n\n\t}", "boolean delete();", "int deleteByExample(OrderPreferentialExample example) throws SQLException;", "int deleteByExample(TransactionExample example);", "public void delete(Object obj) throws SQLException {\n\r\n\t}", "public void parseDelete(StatementTree sTree) {\r\n\r\n\t}", "int deleteByExample(CodeBuildProcedureExample example);", "public void Delete(){\n String whereClause2 = PostDatabase.ID + \" = ?\";\n // Specify arguments in placeholder order.\n String[] whereArgs2 = { \"6\" };\n // Issue SQL statement.\n sqlDB.delete(PostDatabase.TABLE_POSTS, whereClause2, whereArgs2);\n\n }", "void delete(int id) throws Exception;", "@Override\n public void run() {\n\n String filename = \"PurgeTable\";\n\n PreparedStatement stmt1 = null;\n try {\n stmt1 = conn.prepareStatement(\"delete from \" + filename);\n stmt1.executeUpdate();\n System.out.println(\"Deletion successful\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public abstract void delete() throws ArchEException;", "public boolean delete(Transaction transaction) throws Exception;", "int deleteByExample(MedicalOrdersExecutePlanExample example);", "public int delete(int ano, QueryRunner queryRunner, Connection connection)\n\t\t\tthrows SQLException {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic boolean deleteSQL(String sql, Connection con) {\n\t\treturn false;\r\n\t}", "public void deleteFoodBill(Bill deleteFood) {\nString sql =\"DELETE FROM bills WHERE Id_food = ?\";\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tpreparedStatement.setInt(1, deleteFood.getId());\n\t\tpreparedStatement.execute();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n}", "public boolean delete();", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "protected abstract void prepareStatementForDelete(PreparedStatement deleteStatement, E entity) throws DAOException;", "public int delete(String code) throws DataAccessException;", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\n\tpublic void delete(Connection c, Integer id) throws SQLException {\n\n\t}", "@Override\n\tpublic void delete(String key) throws SQLException {\n\t\t\n\t}", "int deleteByExample(TblBTSSysFunctionDOExample example);", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "private void executeDelete(Object key, String query) {\r\n\t\tlogger.entering(CLASSNAME, \"executeDelete\", new Object[] {key, query});\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement statement = null;\r\n\t\ttry {\r\n\t\t\tconn = getConnection();\r\n\t\t\tstatement = conn.prepareStatement(query);\r\n\t\t\tstatement.setObject(1, key);\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new PersistenceException(e);\r\n\t\t} finally {\r\n\r\n\t\t\tcleanupConnection(conn, null, statement);\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"executeDelete\");\r\n\t}", "public boolean delete(long arg) throws DeleteException {\n Connection conn = null;\n try {\n conn = getConnection();\n return delete(arg, conn);\n } catch (DeleteException deleteE) {\n throw new DeleteException(deleteE.getMessage());\n } catch (Exception e) {\n throw new DeleteException(e.getMessage());\n } finally {\n JDBCUtil.release(conn,null,null,null);\n }\n }", "@Override\n\tpublic void delete(Integer id) throws SQLException {\n\t\t\n\t}", "public void onDelete(Statement delete, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "@Override\r\n\tpublic void delete(SimpleJdbcTemplate template) throws Exception {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "int delete(String clientId);", "public static String getDeleteStatement() {\n return DELETE_STATEMENT;\n }", "int deleteByPrimaryKey(String licFlow);", "private String deleteStatement() {\n\t\tString time = EsperUtil.timeUnitToEsperTime(departureWaitTime, timeUnit);\n\t\treturn \"on pattern [every tag1=\"+ windowName+ \" ->\"\n\t\t\t\t+ \"(timer:interval(\"+ time+ \")and not \"+ windowName\n\t\t\t\t+ \"(tag.ID=tag1.tag.ID, readerID=tag1.readerID, antennaID=tag1.antennaID))]\"\n\t\t\t\t+ \"delete from \"+ windowName + \" where \"\n\t\t\t\t+ \"tag.ID = tag1.tag.ID AND readerID=tag1.readerID AND antennaID=tag1.antennaID\";\n\t}", "int deleteByExample(GfanCodeBannerExample example) throws SQLException;", "int delete(long id);", "void delete(){\r\n\t\t\r\n\t}", "public static int delete(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from periode where id=?\"); \n ps.setInt(1,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }", "public void delete(int id) throws DAOException;", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "@Override\n\tpublic void delete(String query) {\n\t\t\n\t}", "public static void main(String[] args) throws SQLException {\n\t\tint emp_id = 4;\r\n\t\tConnection connection = DB.getConnection();\r\n\t\tString delete_emp = \"Delete from employees where emp_id=?\";\r\n\t\tPreparedStatement statement = connection.prepareStatement(delete_emp);\r\n\t\tstatement.setInt(1, emp_id);\r\n\t\tstatement.executeUpdate();\r\n\t}", "public int DelCompany(Long cid, String compname, Long shareamt, Long getnoShare) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from company where comp_id=\"+cid+\"\");\r\n\treturn i;\r\n}", "void delete(int id);", "void delete(int id);", "void row_delete(int id){\n\t\t//Delete tuple by executing SQL command\n\t\tStatement stm=null;\n\t\tString sql=\"delete from \"+tableName+\" where id=\"+id;\n\t\ttry{\n\t \t stm=con.createStatement(); \n\t \t System.out.println(\"sql: \"+sql); \n\t \t stm.executeUpdate(sql);\n\t \t \n\t \t //Append SQL command and time stamp on log file\n\t \t outfile.write(\"TIMESTAMP: \"+getTimestamp());\n\t\t\t outfile.newLine();\n\t\t\t outfile.write(sql);\n\t\t\t outfile.newLine();\n\t\t\t outfile.newLine();\n\t\t \n\t\t //Catch SQL exception\t \t \n\t }catch (SQLException e ) {\n\t \t e.printStackTrace();\n\t //Catch I/O exception\n\t } catch(IOException ioe){ \n\t \t ioe.printStackTrace();\n\t }finally {\n\t \t try{\n\t if (stm != null) stm.close(); \n\t }\n\t \t catch (SQLException e ) {\n\t \t\t e.printStackTrace();\n\t\t }\n\t }\t\n\t\t \n\t }", "int deleteByExample(NjProductTaticsRelationExample example);", "int deleteByExample(PmKeyDbObjExample example);", "public int Delbroker(Long broker_id, String firstname, String lastname,\r\n\t\tString address, String gender, String eMail, Long phone,\r\n\t\tString experience) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from broker where broker_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "public abstract void deleteByID( int id);", "int deleteByExample(ClOrderInfoExample example);", "int deleteByExample(SysIdExample example);", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "public String getDeleteByIdSql() {\r\n\t\treturn \"delete from SHXXB where XH=?\";\r\n\t}", "@Override\n\tpublic void delete(String code) {\n\n\t}", "@Override\n\tpublic void delete(Integer arg0) {\n\t\t\n\t}" ]
[ "0.77254355", "0.7513195", "0.74040157", "0.7354886", "0.73497677", "0.7325436", "0.7181444", "0.71431744", "0.70973146", "0.7089056", "0.7060903", "0.7060903", "0.7060903", "0.7060903", "0.7060903", "0.7060903", "0.703032", "0.7013776", "0.69629765", "0.6962338", "0.69495", "0.6926682", "0.6918365", "0.6918365", "0.69170284", "0.6894378", "0.68942904", "0.6886938", "0.686864", "0.686277", "0.6861554", "0.6860656", "0.6856967", "0.6853443", "0.6852707", "0.68488264", "0.68488264", "0.68423575", "0.68305504", "0.6824921", "0.6802871", "0.6799931", "0.678919", "0.678416", "0.67737603", "0.67668617", "0.6765547", "0.67611986", "0.6754272", "0.67473596", "0.6747197", "0.6720174", "0.67199546", "0.66824794", "0.6664448", "0.6663621", "0.6660626", "0.66605127", "0.66558784", "0.6654086", "0.66441065", "0.66432947", "0.66334885", "0.6633255", "0.6623691", "0.6623691", "0.6617802", "0.66114396", "0.66113126", "0.6607336", "0.6593643", "0.65787804", "0.65757865", "0.6563903", "0.65589774", "0.6552942", "0.6546327", "0.65391415", "0.65366673", "0.6535182", "0.6533798", "0.6529504", "0.6529114", "0.6528912", "0.65264815", "0.65247494", "0.65207744", "0.65187734", "0.6514994", "0.6514994", "0.65134686", "0.6512108", "0.65090966", "0.6506987", "0.65046644", "0.64982796", "0.64962155", "0.64948183", "0.6493272", "0.64925516", "0.6491271" ]
0.0
-1
Function to find the % of UPTIME counter value
public static float getCCPUpTime(final int envId, final String [] parentComponentNames) { final java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis()); Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_GET_COUNTER_CCP_UPTIME); query.setInteger("envId", envId); query.setDate("stsDate", todayDate); query.setParameterList("compNames", parentComponentNames); @SuppressWarnings("unchecked") List<Object[]> resultList = query.list(); txn.commit(); if(resultList.size() == 0){ return 0.0f; } float sumOfUpTime = 0.0f; for(Object[] resultObj : resultList){ sumOfUpTime += (Float)resultObj[1]; } return sumOfUpTime/resultList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getUpSeconds() {\n return (int)((_uptime % 60000) / 1000);\n }", "int getPercentageHeated();", "int getHPPerSecond();", "public double getUtilization(Myhost myhost)\n {\n return ((double)(myhost.getTotalCpu()-myhost.getAvaliableCpu()) / myhost.getTotalCpu());\n }", "int getMPPerSecond();", "public int getPercentageComplete() {\n\t\tlong rawPercentage = (100*(System.currentTimeMillis() - startingTime))/(duration);\n\t\treturn rawPercentage >= 100 ? 100 : (int) rawPercentage;\n\t}", "private long getPTSUs() {\n long result = System.nanoTime() / 1000L;\n if (result < prevOutputPTSUs)\n result = (prevOutputPTSUs - result) + result;\n return result;\n }", "private float getCpuUsage() {\n\t\tString processName = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString processId = processName.split(\"@\")[0];\n\n\t\tlong utimeBefore, utimeAfter, totalBefore, totalAfter;\n\t\tfloat usage = 0;\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tString line = br.readLine();\n\t\t\tutimeBefore = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalBefore = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalBefore += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tThread.sleep(1000);\n\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tline = br.readLine();\n\t\t\tutimeAfter = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalAfter = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalAfter += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tusage = 100f * (utimeAfter - utimeBefore) / (totalAfter - totalBefore);\n\t\t} catch (Exception e) {}\n\t\treturn usage;\n\t}", "public int getUpHours() {\n return (int)((_uptime % 86400000) / 3600000);\n }", "public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}", "public void utilization() {\r\n\t\tfloat fAktuell = this.aktuelleLast;\r\n\t\tfloat fMax = this.raumsonde.getMaxNutzlast();\r\n\t\tfloat prozent = fAktuell / fMax * 100;\r\n\r\n\t\tSystem.out.println(\" \" + fAktuell + \"/\" + fMax + \" (\" + prozent + \"%)\");\r\n\t}", "private int calTimeScore(SlidingBoardManager slidingBoardManager) {\n double time = slidingBoardManager.getTime();\n\n return (int) Math.round((100 - time / 15));\n\n }", "int getPulsePercentage();", "public float getGoodPercentage(){\n float result;\n try {\n result = ((float)(goodFrameCount)) / (goodFrameCount + badFrameCount)*100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n } catch(ArithmeticException ex){\n result = 100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n }\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n if(Float.isNaN(result)){\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n result=100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n }\n return result;\n }", "public long getTimeTaken();", "public int getUpMinutes() {\n return (int)((_uptime % 3600000) / 60000);\n }", "public int getTotalTime();", "public int getProgress() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return -1;\n \n int num = (int)((System.currentTimeMillis()-startTime)*100/d);\n if(num>=100) num=99;\n return num;\n }", "public static double doCPU_usage() {\n double totalProgramRunTime = endProgramTime - startProgramTime;\n return (processingTimeTotal / totalProgramRunTime) * 100;\n }", "int getRemainderPercent();", "public static double doAvgWaitTime() {\n if (count >= 1) {\n return waitTimeTotal / count;\n } else {\n return -1;\n }\n }", "@DISPID(70)\r\n\t// = 0x46. The runtime will prefer the VTID if present\r\n\t@VTID(68)\r\n\tint averageCPUTime_Seconds();", "public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}", "public long getUptime() {\n\t\treturn System.currentTimeMillis()-uptime;\n\t}", "public synchronized int getUPS() {\n return ups;\n }", "public double getCpuUsage() {\n \t\tif (cpuUsage > 100) {\n \t\t\treturn 100;\n \t\t}\n \t\treturn cpuUsage;\n \t}", "int getBatteryPercentage();", "public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}", "public double getPercentRem(long used){\n long left = freeSpace - used;\n return ((double)left / (double)totalSpace) * 100d;\n }", "public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}", "public double measurePowerUsage(String packageNameString, HashMap<String, Long> appCpuTimeBefor, long r_time) {\n HashMap<String, Long> appCpuTimeAfter = new HashMap<String, Long>();\n appCpuTimeAfter = getAppCpuTime(packageNameString);\n\n double totalPower = 0;\n double targetAppTimeAfter = appCpuTimeAfter.get(\"targetAppTime\");\n double targetAppTimeBefor = appCpuTimeBefor.get(\"targetAppTime\");\n Log.i(\"TAG\", \"appCpuTimeAfter \" + targetAppTimeAfter);\n Log.i(\"TAG\", \"appCpuTimeBefor \" + targetAppTimeBefor);\n\n double totalTimeAfter = appCpuTimeAfter.get(\"totalTime\");\n double totalTimeBefor = appCpuTimeBefor.get(\"totalTime\");\n Log.i(\"TAG\", \"totalTimeAfter \" + totalTimeAfter);\n Log.i(\"TAG\", \"totalTimeBefor \" + totalTimeBefor);\n\n Log.i(\"AAAAAAAAA\", \"targetAppTimeAfter-targetAppTimeBefor\"+String.valueOf(targetAppTimeAfter-targetAppTimeBefor));\n Log.i(\"AAAAAAAAA\", \"totalTimeAfter-totalTimeBefor\"+String.valueOf(totalTimeAfter-totalTimeBefor));\n //double ratio = (targetAppTimeAfter - targetAppTimeBefor + r_time) / (totalTimeAfter - totalTimeBefor + r_time);\n //double ratio = (targetAppTimeAfter - targetAppTimeBefor ) / (totalTimeAfter - totalTimeBefor );\n //double ratio = (targetAppTimeAfter - targetAppTimeBefor + r_time/10) / (totalTimeAfter - totalTimeBefor + r_time/10);\n double ratio= (r_time/10)/(totalTimeAfter - totalTimeBefor);\n\n Log.i(\"TAG\", \"ratio\" + ratio);\n\n return ratio; //second to hour\n }", "public double getSecs( );", "public Long get_cachepercentpethits() throws Exception {\n\t\treturn this.cachepercentpethits;\n\t}", "public abstract double getPercentDead();", "public Double getProgressPercent();", "private void calcUpTime(Long created_at) {\n\tupTimeHour = (((System.currentTimeMillis() - created_at) / (1000 * 60 * 60)) % 24) - 1;\n\tupTimeMinute = ((System.currentTimeMillis() - created_at) / (1000 * 60)) % 60;\n }", "public abstract long getUptime();", "protected static double getFPGATime() {\n return (System.currentTimeMillis() - startTime) / 1000.0;\n }", "public double calculateHpPercent();", "public float getCpuUsage() {\n try {\n mReader = new BufferedReader(new FileReader(mCpuUsageFilePath));\n mSa = mReader.readLine().split(\"[ ]+\", 9);\n\n mWork = Long.parseLong(mSa[1]) + Long.parseLong(mSa[2]) + Long.parseLong(mSa[3]);\n mTotal = mWork + Long.parseLong(mSa[4]) + Long.parseLong(mSa[5]) + Long.parseLong(mSa[6]) + Long.parseLong(mSa[7]);\n\n if (mTotalBefore != 0) {\n mTotalT = mTotal - mTotalBefore;\n mWorkT = mWork - mWorkBefore;\n mCpuTotal = restrictPercentage(mWorkT * 100 / (float) mTotalT);\n //Log.d(TAG, \"CPU Usage: \" + restrictPercentage(mWorkT * 100 / (float) mTotalT) + \"%\");\n }\n mTotalBefore = mTotal;\n mWorkBefore = mWork;\n\n mReader.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return mCpuTotal;\n }", "public abstract float getSecondsPerUpdate();", "public double getAverageUsage() {\n \tif(lastData.size() > 0) {\n\t \tdouble total = 0.0;\n\t \t\n\t \tfor(double data : lastData) {\n\t \t\ttotal += data;\n\t \t}\n\t \t\n \t\tSystem.out.println(\"Current average load (last minute): \" + total / lastData.size());\n\t \t\n\t \treturn total / lastData.size();\n \t} else {\n \t\t// Calculate CPU usage\n \t\tdouble per = 0;\n\t\t\ttry {\n\t\t\t\tper = sigar.getCpuPerc().getCombined();\n\t\t\t} catch (SigarException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t\t\n \t\treturn per;\n \t}\n }", "public static double doAvgTurnAroundTime() {\n if (count >= 1) {\n return turnaroundTimeTotal / count;\n } else {\n return -1;\n }\n }", "public int getSessionAverageAliveTime();", "public double measurePowerUsage(String packageNameString, HashMap<String, Long> appCpuTimeBefor, long r_time) {\n //targetAppTime: CPU Running time of app, totalTime: Total CPU Running time\n HashMap<String, Long> appCpuTimeAfter = new HashMap<String, Long>();\n appCpuTimeAfter = getAppCpuTime(packageNameString);\n\n double targetAppTimeAfter = appCpuTimeAfter.get(\"targetAppTime\");\n double targetAppTimeBefor = appCpuTimeBefor.get(\"targetAppTime\");\n Log.i(TAG, \"appCpuTimeAfter \" + targetAppTimeAfter);\n Log.i(TAG, \"appCpuTimeBefor \" + targetAppTimeBefor);\n\n double totalTimeAfter = appCpuTimeAfter.get(\"totalTime\");\n double totalTimeBefor = appCpuTimeBefor.get(\"totalTime\");\n Log.i(TAG, \"totalTimeAfter \" + totalTimeAfter);\n Log.i(TAG, \"totalTimeBefor \" + totalTimeBefor);\n\n double ratio = (targetAppTimeAfter - targetAppTimeBefor + r_time ) / (totalTimeAfter - totalTimeBefor + r_time);\n Log.i(TAG, \"ratio \" + ratio);\n double[] currentSteps = getCurrentSteps();\n\n Log.i(TAG, \"currentSteps.length \" + currentSteps.length);\n\n\n return ratio; //second to hour\n }", "private double calculatePercentTime(Date startDate, Date endDate) {\r\n log.debug(\"calculatePercentTime.START\");\r\n Date currentDate = new Date();\r\n double percentTime = ((double) currentDate.getTime() - (double) startDate.getTime())\r\n / ((double) endDate.getTime() - (double) startDate.getTime()) * 100;\r\n\r\n return Math.round(percentTime * 100.0) / 100.0;\r\n }", "public int getUptime() {\n return (int) _uptime;\n }", "double greenPercentage();", "private static float calculateStepRate(int stepCount) {\n\n return (float) stepCount / (float) secsPerMinute;\n\n }", "@Override\n public String getSavingsPercentage() {\n\n final String savingsPercent = getElement(getDriver(), By.className(SAVINGS_PERCENTAGE),\n TINY_TIMEOUT).getText();\n setLogString(\"Savings Percentage:\" + savingsPercent + \"%\", true, CustomLogLevel.HIGH);\n return savingsPercent + \"%\";\n }", "public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }", "public float getRemainingPercentage() {\n float percentage = (float) getRemainingTime() / this.duration;\n if (Float.isNaN(percentage)) {\n percentage = 1;\n }\n return Math.min(Math.max(0, percentage), 1);\n }", "public int getUpDays() {\n return (int)(_uptime / 86400000);\n }", "static UINT32 update_cycle_counting(void)\n\t{\n\t\tUINT32 count = (activecpu_gettotalcycles64() - mips3.count_zero_time) / 2;\n\t\tUINT32 compare = mips3.cpr[0][COP0_Compare];\n\t\tUINT32 cyclesleft = compare - count;\n\t\tdouble newtime;\n\t\n\t//printf(\"Update: count=%08X compare=%08X delta=%08X SR=%08X time=%f\\n\", count, compare, cyclesleft, (UINT32)SR, TIME_IN_CYCLES(((UINT64)cyclesleft * 2), cpu_getactivecpu()));\n\t\n\t\t/* modify the timer to go off */\n\t\tnewtime = TIME_IN_CYCLES(((UINT64)cyclesleft * 2), cpu_getactivecpu());\n\t\tif (SR & 0x8000)\n\t\t\ttimer_adjust(mips3.compare_int_timer, newtime, cpu_getactivecpu(), 0);\n\t\telse\n\t\t\ttimer_adjust(mips3.compare_int_timer, TIME_NEVER, cpu_getactivecpu(), 0);\n\t\treturn count;\n\t}", "public int hashesPerSecond() {\n int hashCount = 0;\n String simpleString = \"00000000\";\n long endTime = System.currentTimeMillis() + 1000;\n while (System.currentTimeMillis() < endTime) {\n MessageDigest md = null;\n try {\n md = MessageDigest.getInstance(\"SHA-256\");\n } catch (NoSuchAlgorithmException e) {\n System.out.println(\"message : \" + e);\n }\n byte[] messageDigest = md.digest(simpleString.getBytes());\n String hashedSimpleString = DatatypeConverter.printHexBinary(messageDigest);\n hashCount++;\n }\n return hashCount;\n }", "public long getOccupiedSeconds(){\n \t\treturn occupiedSeconds;\n \t}", "float getPercentHealth();", "private float getPercentage(int count, int total) {\n return ((float) count / total) * 100;\n }", "int getHeartRate();", "public double averageWaitTime() {\n\t\tif (numCompleted < 1) {\n\t\t\treturn 0.0;\n\t\t} else {\n\t\treturn (double)totalWaitTime / (double)numCompleted;\n\t\t}\n\t}", "public static double doThroughPut() {\n double totalProgramRunTime = endProgramTime - startProgramTime;\n return (count / totalProgramRunTime) * 100000.0;\n\n }", "public static long getAverageHitTime() {\r\n if (_count == 0)\r\n return 0L;\r\n return _time / _count;\r\n }", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "public int getTotalOftimePlayed() {\n return secToMin(statistics.get(TypeOfGames.SIMGAME).getTotalOfTime()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getTotalOfTime()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getTotalOfTime());\n }", "public long getElapsedTimeMili() {\n return running ? ((System.currentTimeMillis() - startTime)/100) % 1000 : 0;\n }", "public float getProgressPct() {\n return (float) currentCompactedKVs / getTotalCompactingKVs();\n }", "Optional<Duration> totalCpuTime();", "public float getUpDownTimer() {\n return upDownTimer;\n }", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime;\n if (difference < 75) {\n retVal = 75 - difference;\n }\n return (retVal);\n }", "private int[] getAveragePace(){\n timeElapsed = SystemClock.elapsedRealtime() - timer.getBase();\n int seconds = (int)timeElapsed / 1000;\n\n double totalKilometer = totalDistanceMeters / 1000;\n double secondPerKilometer = seconds / totalKilometer;\n int minute = (int)(Math.floor(secondPerKilometer/60));\n int second = (int)secondPerKilometer % 60;\n\n return new int[] {minute,second};\n }", "public long getUptime() {\n return uptime;\n }", "private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }", "boolean hasHPPerSecond();", "public static double centiMetresPerSecondToMetrePerSecond(double num) { return (num/100); }", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "public float getEffectiveClockFrequency() {\n return (float) getCpu().getTime() * NANOSECS_IN_MSEC / getUptime();\n }", "String calculateAttendancePercentage(int attended, int missing)\n {\n int total = attended + missing;\n\n float percent = ((float)attended / (float)total) * 100;\n\n DecimalFormat df = new DecimalFormat(\"#.#\");\n\n // return as a string\n String returnVal = \"Total Attendance: \\n\" + df.format(percent) + \"%\";\n\n return returnVal;\n }", "@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(53)\r\n\tint actualCPUTime_Seconds();", "long getTotalDoExamTime();", "public String percentComplete() {\r\n\tdouble percent = ((double) bytesRead / (double) bytesLength);\r\n\tpercent *= 100;\r\n\treturn fmt.format(percent);\r\n }", "private int getTimeLeftForMute(User u) {\n if (!isMuted(u)) return 0;\n return bot.getCreditsFile().getInt(\"Mutes.\" + u + \".Mute\");\n }", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "long getSpinCount();", "public double p(double t) {\r\n\r\n double Util = Umin + (1 - f(t)) * (Umax - Umin) ;\r\n // too soon to receive such low utility\r\n if(negotiationSession.getTime() < 0.7 && Util < 0.75){\r\n Util = 0.75 ;\r\n }\r\n return Util;\r\n }", "public static int getProgressPercentage(long currentDuration, long totalDuration){\r\n Double percentage = (double) 0;\r\n \r\n long currentSeconds = (int) (currentDuration / 1000);\r\n long totalSeconds = (int) (totalDuration / 1000);\r\n \r\n // calculating percentage\r\n percentage =(((double)currentSeconds)/totalSeconds)*100;\r\n \r\n // return percentage\r\n return percentage.intValue();\r\n }", "@GET\n @Produces(MediaType.TEXT_PLAIN)\n public String calculateUptime() {\n return this.calculateUptime(99.95);\n }", "private int getNanoseconds(TemporalAccessor partialValue) {\n int nanoSecs = 0;\r\n try {\r\n nanoSecs = partialValue.get(ChronoField.NANO_OF_SECOND);\r\n } catch (DateTimeException e) {\r\n // these errors may be common do not print them\r\n }\r\n return nanoSecs;\r\n }", "public int monitorProgress() {\n int result = 0;\n if(iBypassCache) {\n try {\n result = this.iMaximum - available();\n } catch(IOException ioe) {\n throw new RuntimeException(\"Failure when monitoring real-time read progress!\");\n }\n } else {\n result = this.iMaximum - this.iRemainder;\n }\n return result;\n }", "java.lang.String getPercentage();", "public String averageTimeDriven()\n\t{\n\t\t\t\tString averageTime = this.totalTime()/saveData.size();\n\t\t\t\treturn averageTime;\n\t}", "public void doSyncUptime() {\n long timestamp = System.nanoTime();\n uptime += timestamp - lastUptimeSyncTimestamp;\n lastUptimeSyncTimestamp = timestamp;\n lastCpuTimeSyncTimestamp = cpu.getTime();\n long uptimeCpuTimeDifference = getCpuTimeNanos() - uptime;\n uptimeCpuTimeDifference = (uptimeCpuTimeDifference > 0) ? uptimeCpuTimeDifference : 1L;\n long uptimeCpuTimeDifferenceMillis = uptimeCpuTimeDifference / NANOSECS_IN_MSEC;\n int uptimeCpuTimeDifferenceNanos = (int) (uptimeCpuTimeDifference % NANOSECS_IN_MSEC);\n try {\n this.wait(uptimeCpuTimeDifferenceMillis, uptimeCpuTimeDifferenceNanos);\n } catch (InterruptedException e) {\n }\n }", "int getTtiSeconds();", "public double getSwitchSuccessRate() {\n if (total_switched == 0)\n return 0;\n return (double) won_switched / total_switched * 100;\n }", "public static float toSeconds(int tick)\n\t{\n\t\treturn (float) tick / ReferenceConfig.TARGET_UPS;\n\t}", "public float loadsPerGame() {\n if (totalGames() == 0) return 0;\n float res = (float) loads / (float) (totalGames());\n return Math.round(res * 10) / 10f;\n }", "public double CPUServiceTime()\r\n\t{\r\n\t\treturn Math.random()* (30.0 - 10.0) + 10.0;\r\n\t}", "public int getOverallProgressPercent() {\n return overallProgressPercent;\n }", "public double getPer_week(){\n\t\tdouble amount=this.num_of_commits/52;\n\t\treturn amount;\t\t\n\t}", "public synchronized static int getScanTime(){\n return prefs.getInt(SCAN_TIME, 5);\n }", "public String calcPushPercentage() {\n\t\tdouble totalPushes = 0;\n\t\t\n\t\tfor(HandStats h : handStats) {\n\t\t\tif(h.getHandOutcome().equals(\"PUSH!!\")) {\n\t\t\t\ttotalPushes += 1;\n\t\t\t}\n\t\t}\n\t\t\t \n\t\treturn (decimalFormat.format((totalPushes / handStats.size()) * 100) + \"%\");\t\n\t}" ]
[ "0.6782158", "0.65815187", "0.64952457", "0.64615566", "0.637873", "0.63411534", "0.6330729", "0.6274358", "0.6205979", "0.6189542", "0.6183914", "0.609809", "0.60898596", "0.6070111", "0.6044989", "0.6034394", "0.60282093", "0.6019848", "0.59991914", "0.59882694", "0.5975013", "0.5923215", "0.5854235", "0.5825065", "0.5813901", "0.5797335", "0.5783896", "0.576704", "0.57664174", "0.57569987", "0.5743466", "0.57382214", "0.57279", "0.57179767", "0.5712248", "0.57051826", "0.5699357", "0.569575", "0.568542", "0.568098", "0.5679652", "0.5666953", "0.56632835", "0.5659662", "0.5654826", "0.5650496", "0.56461", "0.56404006", "0.5630751", "0.56284153", "0.56259704", "0.56178236", "0.5615027", "0.5601937", "0.5599676", "0.55974877", "0.5593425", "0.5591156", "0.55848867", "0.5584401", "0.55814266", "0.5578717", "0.5577323", "0.5566924", "0.556536", "0.5565054", "0.55634737", "0.55596095", "0.5558453", "0.5557842", "0.5555052", "0.5552792", "0.55392563", "0.5536016", "0.55292624", "0.55242777", "0.5523989", "0.5514772", "0.5499484", "0.5485756", "0.54839635", "0.54781336", "0.5475178", "0.5472339", "0.54714483", "0.54701596", "0.54684657", "0.54665107", "0.5466123", "0.54580426", "0.54489666", "0.5446267", "0.5442516", "0.54345113", "0.5434142", "0.5433346", "0.5420937", "0.5419729", "0.5419097", "0.54190457" ]
0.55951023
56
Get the Number of Services Running
public static int getNumberOfServices(CounterDetailVO counterDetails) { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Query query = session.createQuery(HQLConstants.DB_QUERY_GET_NUMBER_OF_SERVICES); query.setInteger("envId", counterDetails.getEnvironmentId()); query.setString("platform", counterDetails.getPlatform()); Long count = (Long)query.uniqueResult(); txn.commit(); return count.intValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getServicesCount();", "int getServicesCount();", "public int getServicesCount() {\n return services_.size();\n }", "public int getServicesCount() {\n return services_.size();\n }", "public final int getServiceCount() {\r\n return this.m_service_count;\r\n }", "public int getServicesCount() {\n if (servicesBuilder_ == null) {\n return services_.size();\n } else {\n return servicesBuilder_.getCount();\n }\n }", "public int getServicesCount() {\n if (servicesBuilder_ == null) {\n return services_.size();\n } else {\n return servicesBuilder_.getCount();\n }\n }", "public int getRunningDevicesCount();", "public int getNumberOfIncludedServices(){\n \n return listOfIncludedServices.size();\n }", "private int getRunningNum() {\n\t\treturn am.getRunningAppProcesses().size();\r\n\t}", "int countInstances();", "Long getRunningCount();", "int getSystemCount();", "int getServiceAccountsCount();", "@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "long getRequestsCount();", "int getRequestsCount();", "int getRequestsCount();", "long getTotalServerSocketsCount();", "public int getActiveRunwaysCount();", "int getInstanceCount();", "public String getNumberOfInstances() {\n return numberOfInstances;\n }", "public int getNumberOfInstances() {\n\t\treturn numberOfInstances;\n\t}", "int getServerSocketCount();", "int getStatusCount();", "public int getRunningCount() {\r\n return root.getRunningCount();\r\n }", "public long getProcessCount() {\n return getProcesses().count();\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "int getProcessorCount();", "public static int getNumStarted() {\n return numStarted;\n }", "public String getAllRunningServices() {\n return \"\";\n }", "public int getTotalCount(ConProcess conProcess) throws AppException;", "public int getAvailableCount();", "int getConnectionsCount();", "public Integer serverCount() {\n return this.serverCount;\n }", "int getEnvCount();", "int getServiceNum();", "public static int numberOfStops() {\n return getAllStops().size();\n }", "public boolean isServiceRunning();", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "public int getSpineInstanceCount() {\n if (spineInstanceList == null) {\n return 0;\n }\n return spineInstanceList.size();\n }", "long countJobs();", "int getExecutorActiveCount();", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public int getNumOfServers() {\n return numOfServers;\n }", "int getTotalCreatedConnections();", "Integer getConnectorCount();", "public static int startAllServices() throws Throwable {\n\t\tint numServicesStarted = 0;\n\t\t\n\t\tlog.info(\"!!! Attempting to start API Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start API Service !!!\"); \n\t\tif (startApiService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Inventory Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Inventory Service !!!\");\n\t\tif (startInventoryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Insurance Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Insurance Service !!!\");\n\t\tif (startInsuranceService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Enquiry Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Enquiry Service !!!\");\n\t\tif (startEnquiryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t Runtime.getRuntime().addShutdownHook(new Thread() \n\t\t\t { \n\t\t\t public void run() \n\t\t\t { \n\t\t\t \ttry {\n\t\t\t \t\tlog.info(\"!!! Services Shutdown Hook is running !!!\");\n\t\t\t \t\t//System.out.println(\"!!! Services Shutdown Hook is running !!!\"); \n\t\t\t\t int servicesStopped = ServiceFactory.stopAllServices();\n\t\t\t\t log.info(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\");\n\t\t\t\t //System.out.println(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\"); \n\t\t\t \t} catch (Throwable ex) {\n\t\t\t \t\tex.printStackTrace();\n\t\t\t \t}\n\t\t\t } \n\t\t\t }); \n\t\t\t \n\t\t} catch (Throwable ex) {\n\t\t\tlog.error(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage(), ex);\n\t\t\t//System.out.println(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage());\n\t\t\t//ex.printStackTrace();\n\t\t}\n\n\t\treturn numServicesStarted;\n\t}", "static final long getTotalStartedCount()\n {\n synchronized (threadStartLock)\n {\n return totalStartedCnt;\n }\n }", "public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }", "int getSessionCount();", "long getListenerCount();", "public int countActive() {\n int result = 0;\n \n synchronized (m_reservableListMutex) {\n final Iterator iterator = m_reservables.iterator();\n \n while (iterator.hasNext()) {\n final Reservable reservable = (Reservable)iterator.next();\n \n if (!reservable.isClosed() && !reservable.isSentinel()) {\n ++result;\n }\n }\n }\n \n return result;\n }", "public int getStatusCount() {\n return status_.size();\n }", "int getTruckstatusCount();", "public int getTotalServiceTime() {\n return totalServiceTime;\n }", "public int getCallsNb();", "int getApplicationsCount();", "@ApiModelProperty(value = \"The number of running components in the NiFi.\")\r\n public Integer getRunningCount() {\r\n return runningCount;\r\n }", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "public int getActiveCount() {\n return activeCount;\n }", "int numberOfWorkingWorkers();", "public int getRunCount() {\n return runCount;\n }", "public int getNumTasks() {\n return tasks.size();\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "public abstract int getNumSessions();", "public java.lang.Integer getJobsRunning() {\n return jobsRunning;\n }", "@Override\n\tpublic int getWeathersCount() {\n\t\treturn _weatherLocalService.getWeathersCount();\n\t}", "public int getNumActive();", "public int getStatusCount() {\n return status_.size();\n }", "int getReqCount();", "int getTransitFlightsCount();", "public int getPortCount() throws SdpParseException {\n\t\treturn getNports();\n\t}", "int numberOfWorkers();", "public int getLedCount()\n {\n int result = -1;\n\n // Verify service is connected\n assertService();\n \n try {\n result = mLedService.getLedCount();\n } catch (RemoteException e) {\n Log.e(TAG, \"getLedCount failed\");\n }\n \n return result;\n }", "public int getActiveSessions();", "public int getNumAlive() {\n return numAlive;\n }", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "int getServiceAccountIdTokensCount();", "public static int registeredSize() {\n\t\tInteger count = new Integer(0);\n\t\tObject object = cache.get(FQN_COUNT, LOGGED_COUNT);\n\t\tif (object != null) {\n\t\t\tcount = (Integer) object;\n\t\t}\n\n\t\treturn (count == null ? 0 : count.intValue());\n\t}", "public static int getThreadCount() {\r\n\t\treturn THREAD_MX_BEAN.getThreadCount();\r\n\t}", "long getExecutorTaskCount();", "public static int count() {\n return segmentList.size();\n }", "int getNodeStatusListCount();", "public int connectionCount()\n {\n return _connectionCount;\n }", "int getConnectionCount();", "public static int getNumberCreated() {\n return numberOfPools;\n }", "public int getThreadCount() {\n\t\treturn this.threadCalls.size();\n\t}", "public int get_count();", "public CountReservation countS(){\n\t\t\treturn repositoryR.getStatus();\n\t\t}" ]
[ "0.8164767", "0.8164767", "0.7876962", "0.7876962", "0.77367085", "0.7691482", "0.7691482", "0.73009276", "0.7032953", "0.6952744", "0.68785787", "0.6839518", "0.68260986", "0.68220425", "0.67919254", "0.67524", "0.67524", "0.67524", "0.67309684", "0.66542786", "0.66492224", "0.66492224", "0.6646337", "0.66454476", "0.6625503", "0.6613589", "0.66033936", "0.6589982", "0.65894026", "0.6589272", "0.65741783", "0.6565913", "0.6565913", "0.6462183", "0.6453467", "0.64399093", "0.64233357", "0.6423292", "0.64128244", "0.6401525", "0.63884526", "0.63876075", "0.6379868", "0.6326185", "0.6318509", "0.6305209", "0.63033545", "0.6280409", "0.6272867", "0.6271932", "0.6271932", "0.6271932", "0.6256998", "0.6249645", "0.6204469", "0.6195366", "0.61857843", "0.61760485", "0.6169241", "0.61662555", "0.6154955", "0.6154886", "0.61545545", "0.61517334", "0.6148436", "0.6140509", "0.6140485", "0.6133052", "0.6122364", "0.61202157", "0.61187935", "0.611344", "0.6112359", "0.6108909", "0.61002415", "0.60967815", "0.6096072", "0.60893095", "0.6071446", "0.6053277", "0.6050872", "0.6043904", "0.603486", "0.60291564", "0.6028805", "0.6021569", "0.6021569", "0.6021569", "0.6017248", "0.6005", "0.6000407", "0.5997609", "0.59957117", "0.5991708", "0.59850234", "0.5983464", "0.59825164", "0.59748876", "0.5963933", "0.59598666" ]
0.6775367
15
Get the Marathon Json for each environment for all Environment
public static Map<Integer, Blob> getMarathonJson() { Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria envCrit = session.createCriteria(EnvironmentEntity.class, "env"); envCrit.add(Restrictions.isNotNull("env.marathonURL")); @SuppressWarnings("unchecked") List<EnvironmentEntity> envList = (List<EnvironmentEntity>)envCrit.list(); Map<Integer, Blob> mapEnvJson = new HashMap<Integer,Blob>(); for(EnvironmentEntity ee: envList){ if(ee.getMarathonURL() == null || ee.getMarathonURL().trim().length() == 0){ continue; } mapEnvJson.put(ee.getEnvironmentId(), ee.getMarathonJson()); } txn.commit(); return mapEnvJson; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void getMarathonJson(EnvironmentVO environmentVO) throws Exception {\n\t\tlogger.debug(\"Running Marathon Backup for environment: \" + environmentVO.getEnvironmentName());\n\t\tString marathonJson = null;\n\t\tString eastMarathonJson = null;\n\t\tif(environmentVO.getMarathonUrl() != null && !environmentVO.getMarathonUrl().equals(\"\")){\n\t\t\tmarathonJson = RestCommunicationHandler.getResponse(environmentVO.getMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t \n\t\tif(marathonJson == null || marathonJson.equals(\"failed\") || marathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setMarathonJson(marathonJson);\n\t\t}\n\t\t//Get EAST marathon JSON\n\t\tif(environmentVO.getEastMarathonUrl() != null && !environmentVO.getEastMarathonUrl().equals(\"\")){\n\t\t\teastMarathonJson = RestCommunicationHandler.getResponse(environmentVO.getEastMarathonUrl(), true,\"Basic \", environmentVO.getMarathonCred());\n\t\t}\n\t\t\n\t\tif(eastMarathonJson == null || eastMarathonJson.equals(\"failed\") || eastMarathonJson.equals(\"\")){\n\t\t\tenvironmentVO.setEastMarathonJson(null);\n\t\t} else {\n\t\t\tenvironmentVO.setEastMarathonJson(eastMarathonJson);\n\t\t}\n\t}", "public static List<EnvironmentVO> getAllEnvironments() throws SQLException {\n\t\tArrayList<EnvironmentVO> environmentVOs = new ArrayList<EnvironmentVO>();\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCriteria = session.createCriteria(EnvironmentEntity.class);\n\t\tenvCriteria.add(Restrictions.eq(\"envLock\", 0));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvironmentEntity> environmentEntities = envCriteria.list();\n\t\tfor(EnvironmentEntity entity : environmentEntities) {\n\t\t\tEnvironmentVO enVo = new EnvironmentVO();\n\t\t\tenVo.setEnvironmentId(entity.getEnvironmentId());\n\t\t\tenVo.setEnvironmentName(entity.getEnvironmentName());\n\t\t\tenVo.setMarathonUrl(entity.getMarathonURL());\n\t\t\tenVo.setMarathonCred(entity.getMarathonCred());\n\t\t\tif(entity.getMarathonJson()!=null){\n\t\t\t\tbyte[] data = entity.getMarathonJson().getBytes(1, (int) entity.getMarathonJson().length());\n\t\t\t\tenVo.setMarathonJson(new String(data));\n\t\t\t}\n\t\t\tenVo.setEastMarathonUrl(entity.getEastMarathonURL());\n\t\t\tif(entity.getEastMarathonJson()!=null){\n\t\t\t\tbyte[] data = entity.getEastMarathonJson().getBytes(1, (int) entity.getEastMarathonJson().length());\n\t\t\t\tenVo.setEastMarathonJson(new String(data));\n\t\t\t}\n\t\t\tenVo.setK8sUrl(entity.getK8sUrl());\n\t\t\tenVo.setK8sCred(entity.getK8sCred());\n\t\t\tenVo.setK8sTpsQuery(entity.getK8sTpsQuery());\n\t\t\tenVo.setK8sLatencyQuery(entity.getK8sLatencyQuery());\n\t\t\tenVo.setMesosTpsQuery(entity.getMesosTpsQuery());\n\t\t\tenVo.setMesosLatencyQuery(entity.getMesosLatencyQuery());\n\t\t\tenvironmentVOs.add(enVo);\n\t\t}\n\t\ttxn.commit();\n\t\treturn environmentVOs;\n\t}", "private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }", "public static void updateEnvironmentDetails(\n\t\t\tList<EnvironmentVO> environmentVOs) {\n\t\tfor (EnvironmentVO eVO : environmentVOs) {\n\t\t\tif (eVO.getMarathonJson() != null && JSONUtil.isJSONValid(eVO.getMarathonJson())) {\n\t\t\t\tupdateWestMarathonJson(eVO);\n\t\t\t}\n\t\t\tif (eVO.getEastMarathonJson() != null && JSONUtil.isJSONValid(eVO.getEastMarathonJson())) {\n\t\t\t\tupdateEastMarathonJson(eVO);\n\t\t\t}\n\t\t}\n\t}", "public Map<String, String> getEnvironment();", "@Deprecated\n \tpublic JSONObject getPipelineJson() {\n \t\tJSONObject ret = new JSONObject();\n \t\tret.put(\"name\", new JSONString(workspace.getPipeline().getName()));\n \t\tret.put(\"description\",new JSONString( workspace.getPipeline().getDescription()));\n \t\tJSONArray appsArray = new JSONArray();\n \t\tVector<PipeComponent> steps = workspace.getPipeline().getSteps();\n \t\tint i=0;\n \t\tfor (PipeComponent step : steps) {\n \t\t\tApp app = ((PipeApp) step).getApp();\n \t\t\tJSONObject jsonApp = new JSONObject();\n \t\t\tjsonApp.put(\"id\", new JSONString(app.getID()));\n \t\t\tjsonApp.put(\"name\", new JSONString(app.getName()));\n \t\t\tjsonApp.put(\"description\", new JSONString(app.getDescription()));\n \t\t\tjsonApp.put(\"step\", new JSONNumber(step.getPosition()));\n \t\t\tHashMap<PipeComponent, ArrayList<Input>> mappings = new HashMap<PipeComponent, ArrayList<Input>>();\n \t\t\tfor (Input input : step.getInputs()) {\n \t\t\t\tif (input.getMapped() != null) {\n \t\t\t\t\tPipeComponent parent = input.getMapped().getParent();\n \t\t\t\t\tArrayList<Input> maps = mappings.get(parent);\n \t\t\t\t\tif (maps == null)\n \t\t\t\t\t\tmaps = new ArrayList<Input>();\n \t\t\t\t\tmaps.add(input);\n \t\t\t\t\tmappings.put(parent, maps);\n \t\t\t\t}\n \t\t\t}\n \t\t\tJSONArray jsonMappings = new JSONArray();\n \t\t\tjsonApp.put(\"mappings\", jsonMappings);\n \t\t\tjsonApp.put(\"inputs\", app.getInputJson());\n \t\t\tjsonApp.put(\"outputs\", app.getOutputJson());\n \t\t\tIterator<PipeComponent> it = mappings.keySet().iterator();\n \t\t\tint mappingsI =0;\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tPipeComponent mappedTo = it.next();\n \t\t\t\tApp mappedApp = ((PipeApp) mappedTo).getApp();\n \t\t\t\tJSONObject jsonMap = new JSONObject();\n \t\t\t\tjsonMap.put(\"step\", new JSONNumber(mappedTo.getPosition()));\n \t\t\t\tjsonMap.put(\"id\", new JSONString(mappedApp.getID()));\n \t\t\t\tArrayList<Input> inputs = mappings.get(mappedTo);\n \t\t\t\tJSONObject mapO = new JSONObject();\n \t\t\t\tfor (Input input : inputs) {\n \t\t\t\t\tmapO.put(input.getID(), new JSONString(input.getMapped().getID() ));\n \t\t\t\t}\n \t\t\t\tjsonMap.put(\"map\", mapO);\n \t\t\t\tjsonMappings.set(mappingsI++, jsonMap);\n \t\t\t}\n \t\t\tappsArray.set(i++,jsonApp);\n \t\t}\n \t\tret.put(\"apps\", appsArray);\n \t\treturn ret;\n \t}", "public static void updateWestMarathonJson(final EnvironmentVO environmentVO) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_MARATHON_JSON);\n\t\tquery.setBinary(\"marathonJson\", environmentVO.getMarathonJson().getBytes());\n\t\tquery.setTimestamp(\"lastUpdateTime\", new java.sql.Timestamp(new Date().getTime()));\n\t\tquery.setLong(\"environmentId\", environmentVO.getEnvironmentId());\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "public HashMap<String, JSONObject> getListPrograms();", "public int[][] getEnvironment() {\n return this.environment;\n }", "private List<Map<String, Object>> writeProducers() {\n // Create json array for producers\n List<Map<String, Object>> jsonProducers = new ArrayList<>();\n Database database = Database.getInstance();\n\n // Convert each distributor object to json object\n for (Producer producer : database.getProducersMap().values()) {\n Map<String, Object> jsonProducer = new LinkedHashMap<>();\n\n jsonProducer.put(Constants.ID, producer.getId());\n jsonProducer.put(Constants.MAXDISTRIBUTORS, producer.getMaxDistributors());\n jsonProducer.put(Constants.PRICEKW, producer.getPriceKW());\n jsonProducer.put(Constants.ENERGYTYPE, producer.getEnergyType().getLabel());\n jsonProducer.put(Constants.ENERGYPERDISTRIBUTOR, producer.getEnergyPerDistributor());\n\n // Convert producer's monthly stats to json objects\n List<Map<String, Object>> jsonMonthlyStats = writeStats(producer);\n\n jsonProducer.put(Constants.MONTHLYSTATS, jsonMonthlyStats);\n\n jsonProducers.add(jsonProducer);\n }\n return jsonProducers;\n }", "private JSONArray teamToJson() {\r\n JSONArray jsonArray = new JSONArray();\r\n\r\n for (Hero h: team) {\r\n jsonArray.put(h.toJson());\r\n }\r\n\r\n return jsonArray;\r\n }", "public static void updateEastMarathonJson(final EnvironmentVO environmentVO) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_UPDATE_EAST_MARATHON_JSON);\n\t\tquery.setBinary(\"marathonJson\", environmentVO.getEastMarathonJson().getBytes());\n\t\tquery.setTimestamp(\"lastUpdateTime\", new java.sql.Timestamp(new Date().getTime()));\n\t\tquery.setLong(\"environmentId\", environmentVO.getEnvironmentId());\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@JsonProperty(\"environmentName\")\n public String getEnvironmentName() {\n return environmentName;\n }", "@Override\n\t@GET\n\t@Path(\"/airports\")\n @Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getAirports() {\n\t\t\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.addAll(mapAirportData.keySet());\n\t\tlog.debug(\"Resource requested to print all the known airports.\");\n\t\t log.debug(\"Success :\" + Response.Status.OK);\n\t\t return Response.status(Response.Status.OK).entity(list).build();\n\t}", "@Path(\"building_get\")\n @GET\n @Produces(CommonWsUtils.MEDIA_TYPE_JSON)\n public String getJson() {\n JSONObject jsonObjectReturn = new JSONObject();\n\n try {\n BuildingDao buildingDaoImpl = new BuildingDaoImpl();\n \n List<Building> buildings = buildingDaoImpl.getAll();\n\n jsonObjectReturn = JsonObjectUtils.setSuccessWithDataList(jsonObjectReturn, buildings);\n }\n catch(Exception e) {\n e.printStackTrace();\n \n jsonObjectReturn = JsonObjectUtils.setServiceError(jsonObjectReturn);\n }\n \n return jsonObjectReturn.toString();\n }", "@Override\n\tpublic JsonElement serialize(Map<Integer,Location> src, Type typeOfSrc, JsonSerializationContext context) {\n\t\tJsonObject locations = new JsonObject();\n\t\t//locations.add(property, value);\n\t\tJsonArray locationArray = new JsonArray();\n\t\tfor (Entry<Integer,Location> e: src.entrySet()) {\n\t\t\tJsonObject location = new JsonObject();\n\t\t\t\n\t\t\tlocation.addProperty(\"uniqueId\", e.getValue().getUniqueId());\n\t\t\tlocation.addProperty(\"locationId\", e.getValue().getLocationId());\n\t\t\tlocation.addProperty(\"locationName\", e.getValue().getLocationName());\n\t\t\tlocation.addProperty(\"description\", e.getValue().getDescription());\n\t\t\tlocation.addProperty(\"latitude\", e.getValue().getLatitude());\n\t\t\tlocation.addProperty(\"longitude\", e.getValue().getLongitude());\n\t\t\tlocation.addProperty(\"altitude\", e.getValue().getAltitude());\n\t\t\tlocation.addProperty(\"area\", e.getValue().getArea());\n\t\t\t\n\t\t\tJsonArray jsonArray = new JsonArray();\n\t\t\tfor (Modifier a : e.getValue().getEnvironmentModifiers()) {\n\t\t\t\tJsonObject listElement = new JsonObject();\n\t\t\t\tString modClassName = a.getClass().getName();\n\t\t\t\t//\t\t\tSystem.out.println(className + \":\" + a.toString());\n\t\t\t\tlistElement.addProperty(CLASSNAME, modClassName);\n\t\t\t\tJsonElement elem = context.serialize(a);\n\t\t\t\tlistElement.add(INSTANCE, elem);\n\t\t\t\tjsonArray.add(listElement);\n\t\t\t}\n\t\t\tlocation.add(\"environmentModifiers\", jsonArray);\n\t\t\tlocationArray.add(location);\n\t\t\t//JsonElement elem = context.serialize(e.getValue().getLocations(), typeOfSrc);\n\t\t\t//retValue.add(\"locations\", elem);\n\t\t\t//.getLocationName());\n\t\t\t//\n\t\t\t//retValueArray.add(retValue);\n\t\t}\n\t\tlocations.add(\"locations\", locationArray);\n//\t\tfor (int j = retValueArray.size() - 1 ; j>1; j--) {\n//\t\t\tretValueArray.get(j-1).add(\"location\", retValueArray.get(j).getAsJsonObject());\n//\t\t\tSystem.out.format(\"added %d to %d\\n\", j, j-1 );\n//\t\t}\n\t\t//return retValueArray.get(1).getAsJsonObject();\n\t\t\n\t\treturn locations;\n\t}", "public static Map<String,Planet> getPlanetsByName() { return planetsByName; }", "public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }", "public OrganisationResponse getOrganisationStructure() throws JSONException {\n\t\tJSONObject json = new JSONObject();\n\t\tList<Employee> employeeList = orgMapper.getEmployees();\n\t\tList<Structure> structure = orgMapper.getStructure();\n\t\tif(employeeList!=null && structure!=null) {\n\t\t\tfor(Structure struct : structure) {\n\t\t\t\tJSONArray array = new JSONArray();\n\t\t\t\tfor(Employee emp : employeeList) {\n\t\t\t\t\t\n\t\t\t\t\tJSONObject data = new JSONObject();\n\t\t\t\t\tif(!emp.getEmployeeDepartment().equalsIgnoreCase(struct.getDepartment())) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdata.put(\"empID\", emp.getEmployeeID());\n\t\t\t\t\tdata.put(\"empName\", emp.getEmployeeName());\n\t\t\t\t\tdata.put(\"Role\", emp.getRole());\n\t\t\t\t\tarray.put(data);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(array!=null || array.length()!=0) {\n\t\t\t\t\tjson.put(struct.getDepartment(),array);\n\t\t\t\t}\n\t\t\t}\n\t\t\torgResponse.setStatus(json.toString());\n\t\t\treturn orgResponse;\n\t\t}\n\t\torgResponse.setStatus(\"Error in getting the required data from DB\");\n\t\treturn orgResponse;\n\t}", "@GET\n @Path(\"location/Arovince\")\n @Produces(\"application/json\")\n public String getJson() throws IOException {\n FileWriter file = new FileWriter(\"/home/component/NetBeansProjects/ArovinceAndSchool/web/api/Arovince.json\");\n JSONObject jsonArray = null;\n\n try {\n URL url = new URL(\"https://opend.data.go.th/get-ckan/datastore_search?resource_id=df922923-e009-4dee-92fc-d963a86ce4b8\"); \n HttpURLConnection httpURLConnection = (HttpURLConnection)url.openConnection();\n httpURLConnection.setRequestMethod(\"GET\");\n httpURLConnection.setRequestProperty(\"api-key\", \"XOe9aVTolOhCbyTU103IqAKTNNNPX8b5\");\n String line = \"\";\n InputStreamReader inputStreamReader = new InputStreamReader(httpURLConnection.getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n StringBuilder response = new StringBuilder();\n\n try {\n while((line = bufferedReader.readLine()) != null) {\n file.write(line);\n response.append(line);\n }\n } catch (IOException var10) {\n }\n\n file.close();\n bufferedReader.close();\n jsonArray = new JSONObject(response.toString());\n return jsonArray.toString(4);\n } catch (Exception var11) {\n return \"\" + var11;\n }\n }", "public abstract Map<String, String> getEnvironment(NIOWorker nw);", "private void getAllContainers() {\n AID ams = getAMS();\n QueryPlatformLocationsAction queryPlatformLocationsAction = new QueryPlatformLocationsAction();\n sendRequest(new Action(ams, queryPlatformLocationsAction));\n MessageTemplate mt = MessageTemplate.and(\n MessageTemplate.MatchSender(getAMS()),\n MessageTemplate.MatchPerformative(ACLMessage.INFORM));\n ACLMessage resp = blockingReceive(mt);\n ContentElement ce = null;\n try {\n ce = getContentManager().extractContent(resp);\n } catch (Codec.CodecException e) {\n e.printStackTrace();\n } catch (OntologyException e) {\n e.printStackTrace();\n }\n Result result = (Result) ce;\n jade.util.leap.Iterator it = result.getItems().iterator();\n while (it.hasNext()) {\n Location loc = (Location) it.next();\n containersOnPlatform.put(loc.getName(), loc);\n }\n }", "public Map<String, String> getEnv(IProject project) throws CoreException;", "public void getStateJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"states.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"states\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n State stateData = new State();\n\n stateData.setStateId(Integer.parseInt(cit.getString(\"id\")));\n stateData.setStateName(cit.getString(\"name\"));\n stateData.setCountryId(Integer.parseInt(cit.getString(\"country_id\")));\n stateObject.add(stateData);\n }\n }", "private List<Map<String, Object>> writeDistributors() {\n // Create json array for distributors\n List<Map<String, Object>> jsonDistributors = new ArrayList<>();\n Database database = Database.getInstance();\n\n // Convert each distributor object to json object\n for (Distributor distributor : database.getDistributorsMap().values()) {\n Map<String, Object> jsonDistributor = new LinkedHashMap<>();\n\n jsonDistributor.put(Constants.ID, distributor.getId());\n jsonDistributor.put(Constants.ENERGYNEEDEDKW, distributor.getEnergyNeededKW());\n jsonDistributor.put(Constants.CONTRACTCOST, distributor.getCurrentContractRate());\n jsonDistributor.put(Constants.BUDGET, distributor.getBudget());\n jsonDistributor.put(Constants.PRODUCERSTRATEGY, distributor.getProducerStrategy()\n .getStrategyType().getLabel());\n jsonDistributor.put(Constants.ISBANKRUPT, distributor.isBankrupt());\n\n // Convert distributor's contract objects to json objects\n List<Map<String, Object>> jsonContracts = writeContracts(distributor);\n\n jsonDistributor.put(Constants.CONTRACTS, jsonContracts);\n\n jsonDistributors.add(jsonDistributor);\n }\n return jsonDistributors;\n }", "public void getStateJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"states.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n \n \n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"states\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n State stateData = new State();\n \n stateData.setStateId(Integer.parseInt(cit.getString(\"id\")));\n stateData.setStateName(cit.getString(\"name\"));\n stateData.setCountryId(Integer.parseInt(cit.getString(\"country_id\")));\n stateObject.add(stateData);\n }\n }", "public static void doMarathonBackUp() throws Exception {\n\t\tlogger.info(\"************** STARTED MarathonBackUp **************\");\n\t\tList<EnvironmentVO> environmentVOs = DBQueryUtil.getAllEnvironments();\n\t\tfor(EnvironmentVO eVo : environmentVOs){\n\t\t\tgetMarathonJson(eVo);\n\t\t\tlogger.info(\"Got Marathon JSON for \" + eVo.getEnvironmentName() + \" Time : \" + new Date());\n\t\t\tlogger.info(\"JSON \" + eVo.getMarathonJson());\n\t\t}\n\t\tDBQueryUtil.updateEnvironmentDetails(environmentVOs);\n\t\tMarathonConfigProcessor.updateApiList(environmentVOs);\n\t\tlogger.info(\"************** COMPLETED MarathonBackUp **************\");\n\t}", "public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }", "void deployApp(String marathonJson);", "@Override\n public RepositoryWrapper getRepositories(Environment environment) {\n final Jdbi jdbi = new JdbiFactory().build(environment, this.database, \"sql\");\n\n // Create\n final PlantInRepository plantInRepository = jdbi.onDemand(PlantInRepository.class);\n final PlantOutRepository plantOutRepository = jdbi.onDemand(PlantOutRepository.class);\n final DetailInRepository detailInRepository = jdbi.onDemand(DetailInRepository.class);\n final DetailOutRepository detailOutRepository = jdbi.onDemand(DetailOutRepository.class);\n\n // Register\n environment.jersey().register(plantInRepository);\n environment.jersey().register(plantOutRepository);\n environment.jersey().register(detailInRepository);\n environment.jersey().register(detailOutRepository);\n\n return new RepositoryWrapper(plantInRepository, plantOutRepository, detailInRepository, detailOutRepository);\n }", "@Override\n\tpublic JsonArray getMojoDeployedUsecases() throws InsightsCustomException {\n JsonArray responseArray = new JsonArray();\n try {\n \tList<AutoMLConfig> results = autoMLConfigDAL.getActiveUsecaseList();\n if (!results.isEmpty()) {\n \tfor(AutoMLConfig eachMLConfig: results){\n \t\tJsonObject eachObject = new JsonObject();\n \t\teachObject.addProperty(USECASE_NAME,eachMLConfig.getUseCaseName());\n \t\teachObject.addProperty(\"predictionColumn\", eachMLConfig.getPredictionColumn());\n \t\tresponseArray.add(eachObject);\n \t}\n } else {\n \tthrow new InsightsCustomException(\"No Mojo_deployed Usecase found.\");\n }\n return responseArray;\n } catch (Exception e) {\n throw new InsightsCustomException(e.getMessage());\n }\n\t}", "public void getCityJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"cities.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n \n \n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"cities\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n City cityData = new City();\n \n cityData.setCityId(Integer.parseInt(cit.getString(\"id\")));\n cityData.setCityName(cit.getString(\"name\"));\n cityData.setStateId(Integer.parseInt(cit.getString(\"state_id\")));\n cityObject.add(cityData);\n }\n }", "public void getCityJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"cities.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"cities\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n City cityData = new City();\n\n cityData.setCityId(Integer.parseInt(cit.getString(\"id\")));\n cityData.setCityName(cit.getString(\"name\"));\n cityData.setStateId(Integer.parseInt(cit.getString(\"state_id\")));\n cityObject.add(cityData);\n }\n }", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "public JsonObject getWorkspace(String wrksName) throws CartagoException {\n\n var workspace = Json.createObjectBuilder()\n .add(\"workspace\", wrksName);\n\n var artifacts = Json.createArrayBuilder();\n for (ArtifactId aid : resolveWorkspace(wrksName).getArtifactIdList()) {\n artifacts.add( aid.getName() );\n }\n workspace.add(\"artifacts\", artifacts);\n\n return workspace.build();\n }", "public org.iplant.pipeline.client.json.autobeans.Pipeline getPipeline() {\n org.iplant.pipeline.client.json.autobeans.Pipeline ret = factory.pipeline().as();\n ret.setName(workspace.getPipeline().getName());\n ret.setDescription(workspace.getPipeline().getDescription());\n \n List<PipelineApp> apps = new ArrayList<PipelineApp>();\n Vector<PipeComponent> steps = workspace.getPipeline().getSteps();\n for (PipeComponent step : steps) {\n App app = ((PipeApp)step).getApp();\n \n PipelineApp jsonApp = factory.app().as();\n jsonApp.setId(app.getID());\n jsonApp.setName(app.getName());\n jsonApp.setDescription(app.getDescription());\n jsonApp.setStep(step.getPosition());\n \n HashMap<PipeComponent, ArrayList<Input>> mappings = new HashMap<PipeComponent, ArrayList<Input>>();\n for (Input input : step.getInputs()) {\n if (input.getMapped() != null) {\n PipeComponent parent = input.getMapped().getParent();\n ArrayList<Input> maps = mappings.get(parent);\n if (maps == null)\n maps = new ArrayList<Input>();\n maps.add(input);\n mappings.put(parent, maps);\n }\n }\n \n List<PipelineAppMapping> jsonMappings = new ArrayList<PipelineAppMapping>();\n jsonApp.setMappings(jsonMappings);\n \n for (PipeComponent mappedTo : mappings.keySet()) {\n App mappedApp = ((PipeApp)mappedTo).getApp();\n PipelineAppMapping jsonMap = factory.appMapping().as();\n jsonMap.setStep(mappedTo.getPosition());\n jsonMap.setId(mappedApp.getID());\n ArrayList<Input> inputs = mappings.get(mappedTo);\n Map<String, String> map = new HashMap<String, String>();\n for (Input input : inputs) {\n map.put(input.getID(), input.getMapped().getID());\n }\n jsonMap.setMap(map);\n jsonMappings.add(jsonMap);\n }\n \n jsonApp.setInputs(app.getAppDataInputs());\n jsonApp.setOutputs(app.getAppDataOutputs());\n \n apps.add(jsonApp);\n }\n \n ret.setApps(apps);\n \n return ret;\n }", "public Environment environment()\n {\n return theEnv;\n }", "@PostConstruct\n\tprivate void init() {\n\t\ttry {\n\t\t\tif (environment.getProperty(\"marathon.uri\") != null)\n\t\t\t\tmarathonUrl = environment.getProperty(\"marathon.uri\");\n\t\t\tif (environment.getProperty(\"quay.url\") != null)\n\t\t\t\tquayHost = environment.getProperty(\"quay.url\");\n\t\t\t{\n\t\t\t\tint slashslash = quayHost.indexOf(\"//\") + 2;\n\t\t\t\tquayHost = quayHost.substring(slashslash, quayHost.indexOf('/', slashslash));\n\t\t\t\t/*\n\t\t\t\t * URL aURL = new URL(\"quayhost\"); quayhost = aURL.getHost();\n\t\t\t\t */\n\t\t\t}\n\t\t\tif (environment.getProperty(\"chronos.uri.prefix\") != null) {\n\t\t\t\tchronosUrlPrefix = environment.getProperty(\"chronos.uri.prefix\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"docker.uri.prefix\") != null) {\n\t\t\t\tdockerUri = environment.getProperty(\"docker.uri.prefix\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"websocket.retsapi.server.url\") != null) {\n\t\t\t\twebsocketServerUrl = environment.getProperty(\"websocket.retsapi.server.url\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"tomcat.url\") != null) {\n\t\t\t\ttomcatUri = environment.getProperty(\"tomcat.url\");\n\t\t\t\t// String myString = tomcatUri;\n\t\t\t\t// tomcatUri = myString.replace(\"http://\",\"\").replace(\"http://\n\t\t\t\t// www.\",\"\").replace(\"www.\",\"\");\n\t\t\t\t// int slashslash = tomcatUri.indexOf(\"//\") + 2;\n\t\t\t\t// tomcatUri = tomcatUri.substring(slashslash,\n\t\t\t\t// tomcatUri.indexOf('/', slashslash));\n\t\t\t\t// System.out.println(a);\n\t\t\t}\n\t\t\tif (environment.getProperty(\"nvidia.host\") != null) {\n\t\t\t\tnvidiaHost = environment.getProperty(\"nvidia.host\");\n\t\t\t}\n\t\t\tif (environment.getProperty(\"mesos.slave.prefix\") != null) {\n\t\t\t\tmesosSlvaePrefix = environment.getProperty(\"mesos.slave.prefix\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error while reading properties for Marathon\", e);\n\n\t\t}\n\t}", "public List<Animal> getTopThreeEndangeredAnimals(String envName);", "@Override\n @GET\n @Path(\"/servers\")\n @Produces(\"application/json\")\n public Response getServers() throws Exception {\n log.trace(\"getServers() started.\");\n JSONArray json = new JSONArray();\n for (Server server : cluster.getServerList()) {\n JSONObject o = new JSONObject();\n String uri = String.format(\"%s/servers/%d\", rootUri, server.getServerId());\n String serverUri = String.format(\"/providers/%d/servers/%d\", provider.getProviderId(), server.getServerId());\n o.put(\"uri\", uri);\n o.put(\"baseUri\", serverUri);\n json.put(o);\n }\n\n log.trace(\"getServers() finished successfully.\");\n return Response.ok(json.toString()).build();\n }", "public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}", "public String getEnvironment() {\n return environment;\n }", "public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}", "@GET\n @Produces(\"application/json\")\n public String getJson() {\n\n JSONObject rezultat = new JSONObject();\n\n List<Korisnici> korisnici = korisniciFacade.findAll();\n\n \n\n try {\n for (Korisnici k : korisnici) {\n if (k.getIdkorisnik() == Long.parseLong(id)) {\n\n SoapListaAdresa soapOdgovor = listaDodanihAdresaBesplatno(k.getKorisnickoime(), k.getLozinka());\n\n List<Adresa> adrese = soapOdgovor.getAdrese();\n \n JSONArray jsonPolje = new JSONArray();\n int brojac = 0;\n for (Adresa a : adrese) {\n JSONObject jsonAdresa = new JSONObject();\n jsonAdresa.put(\"idadresa\", a.getIdadresa());\n jsonAdresa.put(\"adresa\", a.getAdresa());\n jsonAdresa.put(\"lat\", a.getGeoloc().getLatitude());\n jsonAdresa.put(\"long\", a.getGeoloc().getLongitude());\n jsonPolje.put(brojac,jsonAdresa);\n brojac++;\n }\n rezultat.put(\"adrese\", jsonPolje);\n } \n }\n return rezultat.toString();\n } catch (JSONException ex) {\n Logger.getLogger(MeteoRESTResource.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "private JSONArray foodsToJson() {\n JSONArray jsonArray = new JSONArray();\n\n for (Food f : units) {\n jsonArray.put(f.toJson());\n }\n\n return jsonArray;\n }", "public static Map<String, Integer> getCurrentContainerDetails(int envId) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria apiCriteria = session.createCriteria(ContainerStatsEntity.class, \"contSts\");\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.statsDate\", todayDate ));\n\t\tapiCriteria.add(Restrictions.eq(\"contSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ContainerStatsEntity> contEntityList = apiCriteria.list();\n\t\tMap<String, Integer> mapApiSts = new HashMap<String, Integer>();\n\t\tfor(ContainerStatsEntity contStsEntity : contEntityList){\n\t\t\tif(contStsEntity.getComponent() != null && contStsEntity.getComponent().getParentComponent() != null){\n\t\t\t\tString fullAppName = contStsEntity.getComponent().getParentComponent().getComponentName() + \"/\" + contStsEntity.getComponent().getComponentName();\n\t\t\t\tmapApiSts.put(fullAppName, contStsEntity.getTotalContainer());\n\t\t }else if(contStsEntity.getComponent() != null){\n\t\t \tmapApiSts.put(contStsEntity.getComponent().getComponentName(), contStsEntity.getTotalContainer());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapApiSts;\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n GsonBuilder gBuilder = new GsonBuilder();\n Gson jObject = gBuilder.create();\n\n try {\n return jObject.toJson(dao.getAll());\n } catch (Exception e) {\n Resposta lResposta = new Resposta();\n\n lResposta.setMensagem(e.getMessage());\n lResposta.setSucesso(false);\n\n return jObject.toJson(lResposta);\n }\n }", "public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }", "public List<AppServiceEnvironmentInner> hostingEnvironments() {\n return this.hostingEnvironments;\n }", "public Map<String, String> getEnv()\n {\n return env;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic JSONObject[] selectAllJSON(String clase){\n \tJSONObject[] json=null;\n \ttry{\n\t \tList<JSONable> lista= selectAll(clase);\n\t \tInteger size= lista.size();\n\t\t\tjson=new JSONObject[size];\n\t\t\tInteger index=0;\n\t\t\tfor(JSONable j: lista){\n\t\t\t\t//System.out.println(j.toString());\n\t\t\t\tjson[index]= j.toJSON();\n\t\t\t\tindex++;\n\t\t\t}\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t\treturn null;\n \t}\n\t\treturn json;\t\t\n }", "protected String getLights() {\n final JSONArray lights = new JSONArray();\n for (final Map.Entry<ProviderName, Provider<?, ?>> entry : providers.entrySet()) {\n try {\n for (final Light light : entry.getValue().getLights()) {\n lights.put(light.getJson());\n }\n } catch (final Exception e) {\n final String message = String.format(\"Failed to fetch information for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n return lights.toString();\n }", "public HashMap<String, JSONObject> getListProgramsAt(Long timestamp);", "public static Map<String, Integer> getK8sCurrContainerDetails(int envId, String platform) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria contCriteria = session.createCriteria(K8sPodsContainersEntity.class, \"contSts\");\n\t\tcontCriteria.add(Restrictions.eq(\"contSts.statusDate\", todayDate ));\n\t\tcontCriteria.add(Restrictions.eq(\"contSts.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<K8sPodsContainersEntity> contEntityList = contCriteria.list();\n\t\tMap<String, Integer> mapContSts = new HashMap<String, Integer>();\n\t\tfor(K8sPodsContainersEntity contStsEntity : contEntityList){\n\t\t\tif(contStsEntity.getComponent() != null && contStsEntity.getComponent().getParentComponent() != null){\n\t\t\t\tString fullAppName = contStsEntity.getComponent().getParentComponent().getComponentName() + \"/\" + contStsEntity.getComponent().getComponentName();\n\t\t\t\tmapContSts.put(fullAppName, contStsEntity.getTotalContainers());\n\t\t }else if(contStsEntity.getComponent() != null){\n\t\t \tmapContSts.put(contStsEntity.getComponent().getComponentName(), contStsEntity.getTotalContainers());\n\t\t }\n\t }\n\t\ttxn.commit();\n\t\treturn mapContSts;\n\t}", "public String environmentId() {\n return environmentId;\n }", "public Iterable<Map<String,String>> get() {\n\t\tList<Map<String,String>> mapList = new ArrayList<Map<String,String>>();\n\t\tJsonParser parser = new JsonParser(); \n\t\tJsonObject json ;\n\t\tfor(String jsonString:jsonArr) {\n\t\t\tMap<String,String> sourceMap = new HashMap<String,String>();\n\t\t\tjson = (JsonObject) parser.parse(jsonString);\n\t\t\tsourceMap.put(\"SENSORID\", json.get(\"taxi_identifier\").toString());\n\t\t\tsourceMap.put(\"trip_time_in_secs\", json.get(\"trip_time_in_secs\").toString());\n\t\t\tsourceMap.put(\"trip_distance\", json.get(\"trip_distance\").toString());\n\t\t\tsourceMap.put(\"fare_amount\", json.get(\"fare_amount\").toString());\n\t\t\tsourceMap.put(\"tip_amount\", json.get(\"tip_amount\").toString());\n\t\t\tsourceMap.put(\"surcharge\", json.get(\"surcharge\").toString());\n\t\t\tmapList.add(sourceMap);\n\t\t}\n\t\t\n\t\t\n\t\treturn mapList;\n\t}", "public void getJSONDomains() throws IOException, ParseException {\n // loop array\n JSON jsonCon = new JSON();\n JSONObject jsonObject = jsonCon.getJSONObject(\"/data/data.json\");\n JSONArray domains = (JSONArray) jsonObject.get(\"ipaddress\");\n Connection conn = new Connection();\n\n Iterator<String> iterator = domains.iterator();\n while (iterator.hasNext()) {\n String ip = iterator.next();\n output.writeln(ip + \" --> \" + conn.getDomain(ip));\n }\n }", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}", "private StringBuilder getJSONHelper()\n\t{\n\t\tStringBuilder json = new StringBuilder();\n\t\tint n = 0;\n\t\tfor(String key : values.keySet())\n\t\t\tappendValue(json, key, n++);\n\t\treturn json;\n\t}", "@GetMapping(\"/limitacion-ambientes\")\n @Timed\n public List<LimitacionAmbienteDTO> getAllLimitacionAmbientes() {\n log.debug(\"REST request to get all LimitacionAmbientes\");\n return limitacionAmbienteService.findAll();\n }", "@GET\n @Produces(\"application/json\")\n public List<OsData> listAllOs() {\n return osBO.getAllOs();\n }", "@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<Jogo> getJogos() {\n\t\treturn jogoRepository.findAll();\n\t}", "java.util.List<java.lang.String>\n getEnvList();", "public JSONObject getAllDoctors() throws SQLException {\n // Initialize Connection\n Connection con = ConnectionManager.getConnection();\n // Holds results from query\n Statement stmt = null;\n // String representation of the schedule\n JSONObject data = new JSONObject();\n JSONArray data_array = new JSONArray();\n // Holds results from query\n ResultSet rs = null;\n // Query assembly (mySQL format)\n String query = \"SELECT c.id, c.name, d.is_surgeon, p.name AS dep_name \"\n + \"FROM doctor d \"\n + \"INNER JOIN credential c ON d.cred_id = c.id \"\n + \"INNER JOIN department p ON d.dep_id = p.id;\";\n try {\n // Attempt the query\n stmt = con.createStatement();\n rs = stmt.executeQuery(query);\n // While doctors remain, add them to the object\n while (rs.next()) {\n JSONObject jo = new JSONObject();\n jo.put(\"id\", rs.getInt(\"id\"));\n jo.put(\"name\", rs.getString(\"name\"));\n jo.put(\"is_surgeon\", rs.getBoolean(\"is_surgeon\"));\n jo.put(\"department\", rs.getString(\"dep_name\"));\n data_array.put(jo);\n }\n // Place all of the data into the JSON object\n data.put(\"schedule\", data_array);\n stmt.close();\n } catch (SQLException e) {\n data = null;\n System.out.println(e);\n }\n return data;\n }", "@Override\n @GET\n @Produces(\"application/json\")\n public Response getCluster() throws JSONException {\n if (log.isTraceEnabled()) {\n log.trace(String.format(\"getCluster(ID=%d) started.\", cluster.getClusterId()));\n }\n\n JSONObject json = cluster.toJSON();\n\n json.put(\"uri\", rootUri);\n json.put(\"servers\", rootUri + \"/servers\");\n json.put(\"vms\", rootUri + \"/vms\");\n\n return Response.ok(json.toString()).build();\n }", "@Override\n @GET\n @Path(\"/vms\")\n @Produces(\"application/json\")\n public Response getVMs() throws Exception {\n log.trace(\"getVMs() started.\");\n JSONArray json = new JSONArray();\n for (Vm vm : cluster.getVmList()) {\n JSONObject o = new JSONObject();\n String uri = String.format(\"%s/vms/%d\", rootUri, vm.getVmId());\n String vmUri = String.format(\"/providers/%d/vms/%d\", provider.getProviderId(), vm.getVmId());\n o.put(\"uri\", uri);\n o.put(\"baseUri\", vmUri);\n json.put(o);\n }\n\n log.trace(\"getVMs() finished successfully.\");\n return Response.ok(json.toString()).build();\n }", "@Override\n public MarathonDeployedAppList get(Application application, Component component, Environment environment) {\n return null;\n }", "void updateApp(String marathonJson);", "private void getAllBuildings(JSONArray myjsonArray) {\r\n try {\r\n for(int j=0; j<myjsonArray.length(); j++) {\r\n JSONObject o = myjsonArray.getJSONObject(j);\r\n Build b = new Build(o.getString(\"description\"),Double.parseDouble(o.getString(\"latitude\")),\r\n Double.parseDouble( o.getString(\"longitude\")), o.getString(\"name\"));\r\n allBuildings_.add(b);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static Map<String, Object> getAllKnownProperties(Environment env) {\n\t Map<String, Object> rtn = new HashMap<>();\n\t if (env instanceof ConfigurableEnvironment) {\n\t for (PropertySource<?> propertySource : ((ConfigurableEnvironment) env).getPropertySources()) {\n\t if (propertySource instanceof EnumerablePropertySource) {\n\t for (String key : ((EnumerablePropertySource) propertySource).getPropertyNames()) {\n\t rtn.put(key, propertySource.getProperty(key));\n\t }\n\t }\n\t }\n\t }\n\t return rtn;\n\t}", "public static ArrayList<Course> loadAllJsonFlies(){\n List<String> jsonFileNames = Data.getJsonFilesAsList();\n ArrayList<Course> coursesOfAllSemesters = new ArrayList<>();\n for (String jsonFileName:jsonFileNames){\n ArrayList<Course> coursesOfSemester = loadJsonByFileName(jsonFileName);\n coursesOfAllSemesters.addAll(coursesOfSemester);\n }\n return coursesOfAllSemesters;\n }", "String getEnvironment();", "@Override\n public List<EnvironmentVariable> findAll() throws Exception {\n return null;\n }", "Collection<GameEnvironment> getPendingGames();", "@RequestMapping(value = \"/semesters\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Semester> getAll() {\n log.debug(\"REST request to get all Semesters\");\n return semesterRepository.findAll();\n }", "Environment getEnvironment() {\n return recordingEnv;\n }", "protected JsonJavaObject getVcapServices() {\n\t\tJsonJavaObject vcapJson = null;\n\t\tJsonJavaFactory factory = JsonJavaFactory.instanceEx;\n\t\tString sysEnv = BluemixContextManager.getInstance().getVCAP_SERVICES();\n\n\t\ttry {\n\t\t\tvcapJson = (JsonJavaObject) JsonParser.fromJson(factory, sysEnv);\n\n\t\t} catch (JsonException e) {\n\t\t\tPlatform.getInstance().log(e);\n\t\t\tLogging.logError(e);\n\t\t}\n\t\treturn vcapJson;\n\t}", "@JsonProperty(\"global\")\n\t@DsonOutput(Output.API)\n\tMap<String, Object> getJsonGlobal() {\n\t\treturn mapOf(\n\t\t\t\"stored\", SystemMetaData.getInstance().get(\"ledger.network.stored\", 0),\n\t\t\t\"processing\", SystemMetaData.getInstance().get(\"ledger.network.processing\", 0),\n\t\t\t\"storing\", SystemMetaData.getInstance().get(\"ledger.network.storing\", 0)\n\t\t);\n\t}", "public static void exportToConsole(Context context) {\n try (final DbAdapter dbAdapter = new DbAdapter(context)) {\n dbAdapter.open();\n\n final List<Platform> platforms = dbAdapter.getPlatforms();\n JSONObject jsonObject;\n for (Platform platform : platforms) {\n jsonObject = new JSONObject();\n jsonObject.put(\"id\", platform.getId());\n jsonObject.put(\"name\", platform.getName());\n\n Log.d(\"FGL_DUMP_PLATFORM\", jsonObject.toString());\n }\n\n final List<Game> games = dbAdapter.getGames();\n for (Game game : games) {\n jsonObject = new JSONObject();\n jsonObject.put(\"id\", game.getId());\n jsonObject.put(\"name\", game.getName());\n jsonObject.put(\"finishedDate\", game.getFinishedDate() == null ? \"null\" : game.getFinishedDate().getTime());\n jsonObject.put(\"platform_id\", game.getPlatform().getId());\n\n Log.d(\"FGL_DUMP_GAME\", jsonObject.toString());\n }\n\n } catch (JSONException e) {\n throw new RuntimeException(e);\n }\n }", "public void jsonParseMeth(JSONArray am3) {\n for (int i = 0; i <= am3.size() - 1; i++) {\n JSONObject obj1 = (JSONObject) am3.get(i);\n System.out.println(((JSONObject) am3.get(i)).toJSONString());\n System.out.println((String) obj1.get(\"ibx\"));\n System.out.println((String) obj1.get(\"switchName\"));\n System.out.println((String) obj1.get(\"cspName\"));\n System.out.println(obj1.get(\"vlanCount\"));\n System.out.println(obj1.get(\"usedBandwidth\"));\n System.out.println((String) obj1.get(\"portName\"));\n System.out.println((String) obj1.get(\"portPriority\"));\n System.out.println(obj1.get(\"percentageAvailableBandwidth\"));\n System.out.println(obj1.get(\"totalBandwidth\"));\n System.out.println(obj1.get(\"availableBandwidth\"));\n JSONArray physical = (JSONArray) obj1.get(\"physicalPortNames\");\n for (Object phy : physical) {\n System.out.println(phy.toString());\n }\n }\n\n }", "private List<Map<String, Object>> writeStats(final Producer producer) {\n // Create json array for monthly stats\n List<Map<String, Object>> jsonMonthlyStats = new ArrayList<>();\n\n // Convert each of the producer's monthly stats to json objects\n for (int i = 1; i < producer.getMonthlyStats().size(); i++) {\n Map<String, Object> stat = new LinkedHashMap<>();\n ArrayList<Integer> ids = new ArrayList<>();\n\n for (Distributor distributor : producer.getMonthlyStats().get(i)) {\n ids.add(distributor.getId());\n }\n\n Collections.sort(ids);\n\n stat.put(Constants.MONTH, i);\n stat.put(Constants.DISTRIBUTORSID, ids);\n\n jsonMonthlyStats.add(stat);\n }\n return jsonMonthlyStats;\n }", "@RequestMapping(value = \"/themes\", method = RequestMethod.GET)\n\tpublic ResponseEntity<GameThemeListWrapper> getAllThemes() {\n\t\tfinal GameThemeListWrapper gameThemes = new GameThemeListWrapper(themeService.findAllThemesActivated()); \n\t\treturn new ResponseEntity<>(gameThemes, HttpStatus.OK);\n\t}", "Properties getEnvironment();", "Properties getEnvironment();", "@Override\n public JsonObject getUsecases() throws InsightsCustomException {\n JsonObject response = new JsonObject();\n JsonArray responseArray = new JsonArray();\n try {\n List<AutoMLConfig> results = autoMLConfigDAL.fetchUsecases();\n if (!results.isEmpty()) {\n \tresults.forEach(eachMLConfig->{\n \t\tJsonObject eachObject = new JsonObject();\n\t\t\t\t\teachObject.addProperty(\"workflowId\", eachMLConfig.getWorkflowConfig().getWorkflowId());\n \t\teachObject.addProperty(USECASE_NAME,eachMLConfig.getUseCaseName());\n \t\teachObject.addProperty(\"predictionColumn\", eachMLConfig.getPredictionColumn());\n \t\teachObject.addProperty(\"splitRatio\",eachMLConfig.getTrainingPerc()+\"/\"+(100-eachMLConfig.getTrainingPerc()));\n \t\teachObject.addProperty(\"modelName\", eachMLConfig.getMojoDeployed());\n \t\teachObject.addProperty(\"createdAt\", eachMLConfig.getCreatedDate());\n \t\teachObject.addProperty(\"updatedAt\", eachMLConfig.getUpdatedDate());\n \t\teachObject.addProperty(\"status\", eachMLConfig.getStatus());\n \t\teachObject.addProperty(\"isActive\", eachMLConfig.getIsActive());\n \t\teachObject.addProperty(\"predictionType\", eachMLConfig.getPredictionType());\n \t\tresponseArray.add(eachObject);\n \t});\n response.add(\"usecases\", responseArray);\n } else {\n response.addProperty(\"nodata\",404);\n }\n return response;\n } catch (Exception e) {\n throw new InsightsCustomException(e.getMessage());\n }\n }", "public interface Marathon extends ClusterProcess {\n\n /**\n * If Marathon configuration requires, installs the applications\n */\n void installMarathonApps();\n\n /**\n * Deploys a Marathon app by JSON string\n *\n * @param marathonJson JSON string\n */\n void deployApp(String marathonJson);\n\n /**\n * Updates a Marathon app by JSON string\n *\n * @param marathonJson JSON string\n */\n void updateApp(String marathonJson);\n\n /**\n * Kill all apps that are currently running.\n */\n void killAllApps();\n\n void setZooKeeper(ZooKeeper zookeeper);\n\n /**\n * Delete the given app\n *\n * @param app to be deleted\n */\n Result deleteApp(String app);\n\n /**\n * Deploy a Marathon application group.\n *\n * @param groupJson JSON string with Marathon application group definition\n */\n void deployGroup(String groupJson);\n\n /**\n * Deploy a Marathon application group.\n *\n * @param group group name\n */\n Result deleteGroup(String group);\n}", "protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }", "@Override\r\n\tpublic JSONArray getAPPList(HttpServletRequest request,HttpServletResponse response) {\n\t\tJSONArray japps = new JSONArray();\r\n\t\t\r\n\t\tJSONObject japp1 = new JSONObject();\r\n\t\tjapp1.put(\"id\", \"1001\");\r\n\t\tjapp1.put(\"name\", \"公文管理\");\r\n\t\t\r\n\t\tJSONObject japp2 = new JSONObject();\r\n\t\tjapp2.put(\"id\", \"1002\");\r\n\t\tjapp2.put(\"name\", \"三项工作\");\r\n\t\t\r\n\t\tJSONObject japp3 = new JSONObject();\r\n\t\tjapp3.put(\"id\", \"1003\");\r\n\t\tjapp3.put(\"name\", \"综合事务\");\r\n\t\t\r\n\t\tjapps.add(japp1);\r\n\t\tjapps.add(japp2);\r\n\t\tjapps.add(japp3);\r\n\t\t\r\n\t\treturn japps;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(value = \"/consulta\")\n\tpublic JSONArray insertState() {\n\t\t \n\t\tJSONObject jsonObject=new JSONObject();\n\t\tJSONArray array=new JSONArray();\n\t\t\t\tList<Bucket> lista= nameService.listaNodos();\n\t\t\t\t\n\t\t\t\tfor (Bucket bucket : lista) {\n\t\t\t\t\tjsonObject.put(\"Nombre\", bucket.name());\n\t\t\t\t\tjsonObject.put(\"Fecha creación\", bucket.creationDate());\n\t\t\t System.out.println(bucket.creationDate() + \", \" + bucket.name());\n\t\t\t array.add(jsonObject);\n\t\t\t \n\t\t\t\t} \n\t \n\t\treturn array;\n\n\t}", "public JSONObject toJsonObject()\n\t{\n\t\tJSONObject jsonObject = new JSONObject();\n\t\ttry {\n\t\t\tjsonObject.put(\"status\", status);\n\t\t\tif(catrgories != null && catrgories.length > 0){\n\t\t\t\tJSONArray catrgoriesJsonArray = new JSONArray();\n\t\t\t\tfor(ModelCatrgory catrgoriesElement : catrgories){\n\t\t\t\t\tcatrgoriesJsonArray.put(catrgoriesElement.toJsonObject());\n\t\t\t\t}\n\t\t\t\tjsonObject.put(\"catrgories\", catrgoriesJsonArray);\n\t\t\t}\n\t\t\t\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn jsonObject;\n\t}", "interface PlatformAPI {\n /**\n * Get all platforms.\n *\n * @return the platforms\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllRootItems\")\n List<JsonDevice> all();\n\n /**\n * Get all platform types.\n *\n * @return the platform types\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();\n }", "public Map<String, Planet> getPlanets(){\n\t\treturn galaxy;\n\t}", "@Get(\"json\")\n public Representation toJSON() {\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = null;\n\n \tString msg = \"no metadata matching query found\";\n\n \ttry {\n \t\tmetadata = getMetadata(status, access,\n \t\t\t\tgetRequestQueryValues());\n \t} catch(ResourceException r){\n \t\tmetadata = new ArrayList<Map<String, String>>();\n \tif(r.getCause() != null){\n \t\tmsg = \"ERROR: \" + r.getCause().getMessage();\n \t}\n \t}\n\n\t\tString iTotalDisplayRecords = \"0\";\n\t\tString iTotalRecords = \"0\";\n\t\tif (metadata.size() > 0) {\n\t\t\tMap<String, String> recordCounts = (Map<String, String>) metadata\n\t\t\t\t\t.remove(0);\n\t\t\tiTotalDisplayRecords = recordCounts.get(\"iTotalDisplayRecords\");\n\t\t\tiTotalRecords = recordCounts.get(\"iTotalRecords\");\n\t\t}\n\n\t\tMap<String, Object> json = buildJsonHeader(iTotalRecords,\n\t\t\t\tiTotalDisplayRecords, msg);\n\t\tList<ArrayList<String>> jsonResults = buildJsonResults(metadata);\n\n\t\tjson.put(\"aaData\", jsonResults);\n\n\t\t// Returns the XML representation of this document.\n\t\treturn new StringRepresentation(JSONValue.toJSONString(json),\n\t\t\t\tMediaType.APPLICATION_JSON);\n }", "public String ajaj() {\n try {\n monthlyExpends = MonthlyExpenditureCache.getCache();\n monthlyExpendsJson = new JSONArray();\n for (MonthlyExpenditure monthlyExpend : monthlyExpends) {\n JSONObject monthlyExpendJson = new JSONObject();\n JSONArray cateExpendsJson = new JSONArray();\n JSONArray statExpendsJson = new JSONArray();\n monthlyExpendJson.put(\"total\", monthlyExpend.total());\n monthlyExpendJson.put(\n \"date\",\n CalendarUtils.toString(CalendarUtils.YM,\n monthlyExpend.getDate()));\n monthlyExpendJson.put(\"expenditures\", cateExpendsJson);\n monthlyExpendJson.put(\"statisticalExpenditures\",\n statExpendsJson);\n monthlyExpendsJson.add(monthlyExpendJson);\n // expenditures - category : list[expend]\n for (String cateName : monthlyExpend.getExpenditures().keySet()) {\n JSONArray expendsJson = new JSONArray();\n for (Expenditure expend : monthlyExpend.getExpenditures()\n .get(cateName)) {\n JSONObject expendJson = new JSONObject();\n expendJson.put(\"category\", expend.getCategory()\n .getName());\n expendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, expend.getDate()));\n expendJson.put(\"name\", expend.getName());\n expendJson.put(\"howMuch\", expend.getHowMuch());\n expendsJson.add(expendJson);\n }\n cateExpendsJson.add(expendsJson);\n }\n // statisticalExpenditures - category : statistical expend\n for (String cateName : monthlyExpend\n .getStatisticalExpenditures().keySet()) {\n Expenditure statExpend = monthlyExpend\n .getStatisticalExpenditures().get(cateName);\n JSONObject statExpendJson = new JSONObject();\n statExpendJson.put(\"category\", statExpend.getCategory()\n .getName());\n statExpendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, statExpend.getDate()));\n statExpendJson.put(\"howMuch\", statExpend.getHowMuch());\n statExpendJson.put(\"average\", statExpend.getAverage());\n statExpendsJson.add(statExpendJson);\n }\n }\n } catch (Exception e) {\n PrintUtils.error(this.getClass(), e);\n return ERROR;\n }\n return SUCCESS;\n }", "@GET\n @Path(\"/getAll\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJson() {\n \n \ttry \n \t{\n \t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", \"*\").entity(servDoctores.getDoctores().toString()).build();\n \t} catch (Exception e) {\n\n \t\te.printStackTrace();\n \t\treturn Response.status(Response.Status.NO_CONTENT).build();\n \t}\n }", "public EnvironmentType getEnvTypes() {\n return envTypes;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getEnvironmentName() != null)\n sb.append(\"EnvironmentName: \").append(getEnvironmentName()).append(\",\");\n if (getMaxResults() != null)\n sb.append(\"MaxResults: \").append(getMaxResults()).append(\",\");\n if (getNextToken() != null)\n sb.append(\"NextToken: \").append(getNextToken()).append(\",\");\n if (getRequestedBy() != null)\n sb.append(\"RequestedBy: \").append(getRequestedBy()).append(\",\");\n if (getStatuses() != null)\n sb.append(\"Statuses: \").append(getStatuses());\n sb.append(\"}\");\n return sb.toString();\n }", "public static int getEnvironmentsCount() {\n\t\treturn getService().getEnvironmentsCount();\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();" ]
[ "0.6742313", "0.62628347", "0.6072011", "0.5451008", "0.5306518", "0.53060514", "0.51898116", "0.51204705", "0.5098419", "0.509464", "0.5045355", "0.5040964", "0.5031953", "0.49995467", "0.49993694", "0.49890402", "0.49518344", "0.4946093", "0.49379972", "0.49234304", "0.48978123", "0.48876354", "0.48863778", "0.4883658", "0.4876738", "0.48734182", "0.48669228", "0.48456806", "0.48441753", "0.48340723", "0.48308867", "0.48120493", "0.48099524", "0.47974122", "0.47572917", "0.47569075", "0.47534677", "0.47396356", "0.47371545", "0.4731337", "0.4718947", "0.47171557", "0.47154975", "0.47038916", "0.46953157", "0.46696898", "0.46464524", "0.4641608", "0.46357903", "0.46112317", "0.46112034", "0.46095958", "0.46080932", "0.46067446", "0.46058798", "0.46005282", "0.45977235", "0.45953155", "0.4560338", "0.45568973", "0.45534074", "0.4545942", "0.45438424", "0.45346808", "0.45335484", "0.45329475", "0.45282176", "0.4517886", "0.45171615", "0.45159775", "0.4508889", "0.4508101", "0.4504918", "0.45032662", "0.4490918", "0.44893384", "0.44819686", "0.44805712", "0.4471153", "0.446568", "0.44655713", "0.4465319", "0.4462491", "0.44623807", "0.44623807", "0.4461866", "0.44582936", "0.44514117", "0.4451055", "0.44478765", "0.44415674", "0.44375747", "0.4433955", "0.442988", "0.44295174", "0.4419418", "0.4414904", "0.44100797", "0.44021192", "0.44013447" ]
0.7779385
0
Load the data to the container_status table
public static void loadContainerStatus(final int envId, int compId, final int instanceNum) { final java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());; // final int compId = getComponentId(compName, parentCompName); // if(compId == 0){ // logger.info("Component Name = " + compName + "; Parent Component Name = " + parentCompName + "; is not available in the DB"); // return 0; // } int prevNumInstance = getPreiousNumInstance(compId, todayDate, envId); final int deltaVal = prevNumInstance == 0 ? 0 : instanceNum - prevNumInstance; Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); ContainerStatsEntity contStat = new ContainerStatsEntity(); EnvironmentEntity environment = new EnvironmentEntity(); environment.setEnvironmentId(envId); contStat.setEnvironment(environment); contStat.setStatsDate(todayDate); ComponentEntity component = new ComponentEntity(); component.setComponentId(compId); contStat.setComponent(component); contStat.setTotalContainer(instanceNum); contStat.setDeltaValue(deltaVal); session.save(contStat); txn.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadStatus (){\n\t}", "public void loadContainer() throws SQLException\n\t{\n\n\t\ttry \n\t\t{\n\t\t\tsuper.connect();\n\t\t\tsuper.configuationObjects.clear();\n\n\t\t\tResultSet rs1 = super.pst.executeQuery(sqlSelect1);\n\t\t\twhile (rs1.next())\n\t\t\t{\n\t\t\t\tInteger id \t\t\t= rs1.getInt(\"id\");\n\t\t String descr \t\t\t= rs1.getString(\"descr\");\n\t\t Integer deviceTypeId = rs1.getInt(\"device_type_id\");\n\t\t String ipAddress \t\t= rs1.getString(\"ip_address\");\n\t\t String macAddress \t\t= rs1.getString(\"mac_address\");\n\t\t String serial\t \t\t= rs1.getString(\"serial\");\n\t\t Timestamp timestamp \t= rs1.getTimestamp(\"create_date\");\n\t\t \t\t \n\t\t DeviceType deviceType = (DeviceType) this.getReferencedObject(\"DeviceType\", deviceTypeId);\n\t\t \n\t\t MonitoringDevice object = new MonitoringDevice(id);\n\t\t object.setDescr(descr);\n\t\t object.setIp_address(ipAddress);\n\t\t object.setMac_addres(macAddress);\n\t\t object.setSerial(serial);\n\t\t object.setType(deviceType);\n\t\t object.setCreate_date(timestamp.toLocalDateTime());\n\t\t \n\t\t super.configuationObjects.put(id, object);\n\t\t \n\t\t if (macAddress != null){\n\t\t\t if (!macAddress.isEmpty())\n\t\t\t \tindexByMac.put(macAddress,id);\n\t\t }\n\t\t \n\t\t if (ipAddress != null){\n\t\t\t if (!ipAddress.isEmpty())\n\t\t\t \tindexByIpAddress.put(ipAddress, id);\n\t\t }\n\t\t \n\t\t if (serial != null){\n\t\t\t if (!serial.isEmpty())\n\t\t\t \tindexBySerial.put(serial,id);\n\t\t }\n\t\t\t}\n\t\t\t\n\t\t\trs1.close();\n\t\t\t\n\t\t\tResultSet rs2 = super.pst.executeQuery(sqlSelect2);\n\t\t\twhile (rs2.next())\n\t\t\t{\t\t \n\n\t\t\t\tInteger id \t\t\t= rs2.getInt(\"id\"); \n\t\t String transformation\t= rs2.getString(\"transformation_text\");\n\t\t Integer deviceId \t= rs2.getInt(\"device_id\");\n\t\t Integer signalTypeId\t= rs2.getInt(\"signal_type_id\");\n\t\t String portLabel\t\t= rs2.getString(\"port_label\");\n\t\t Integer refreshTimeMs = rs2.getInt(\"refresh_time_ms\");\n\t\t Integer measuredEntityId = rs2.getInt(\"measured_entity_id\");\n\t\t \t\t \n\t\t MonitoringDevice device= (MonitoringDevice) this.getObject(deviceId);\n\t\t Signal signal = (Signal) this.getReferencedObject(\"Signal\", signalTypeId);\n\t\t \n\t\t InputOutputPort port = new InputOutputPort(id);\n\t\t port.setSignalType(signal);\n\t\t port.setTransformationText(transformation);\n\t\t port.setPortLabel(portLabel);\n\t\t port.setMeasuringEntity(measuredEntityId);\n\t\t port.setRefreshTimeMs(refreshTimeMs);\n\t\t \n\t\t device.putInputOutputPort(port);\n\t\t\t}\n\t\t\t\n\t\t\trs2.close();\n\t\t\t\n\t\t\tsuper.disconnect();\n\t\t\t\n\t\t} catch (ClassNotFoundException e){\n \tString error = \"Could not find the driver class - Error\" + e.getMessage(); \n \tlogger.error(error);\n \te.printStackTrace();\n \tthrow new SQLException(error);\n } catch (SQLException e) {\n \tString error = \"Container:\" + this.getClass().getName() + \"Error connecting to the database - error:\" + e.getMessage();\n \tlogger.error(error);\n \te.printStackTrace(); \t\n \tthrow new SQLException(error);\n }\n\t\t\n\t}", "public void loadingTable() {\n this.setRowCount(1, true);\r\n this.setVisibleRangeAndClearData(this.getVisibleRange(), true);\r\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public static void loadK8sApiStatus(final int envId, String compName, int numOfApi) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\t\n\t\tfinal int compId = getComponentIdFromCompName(compName);\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; is not available in the DB\");\n\t\t\treturn;\n\t\t}\n\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tK8sApiStatusEntity apiStatus = new K8sApiStatusEntity();\n\t\tEnvironmentEntity environment = new EnvironmentEntity();\n\t\tenvironment.setEnvironmentId(envId);\n\t\tapiStatus.setEnvironment(environment);\n\t\tapiStatus.setStatusDate(todayDate);\n\t\tComponentEntity component = new ComponentEntity();\n\t\tcomponent.setComponentId(compId);\n\t\tapiStatus.setComponent(component);\n\t\tapiStatus.setTotalApi(numOfApi);\n\t\tsession.save(apiStatus);\n\t\ttxn.commit();\n\t}", "@SuppressWarnings(\"unchecked\")\n private void preOperation(\n Map<String, Object> req, String userId, Map<String, Integer> contentStateHolder)\n throws ParseException {\n\n SimpleDateFormat simpleDateFormat = ProjectUtil.getDateFormatter();\n simpleDateFormat.setLenient(false);\n\n Util.DbInfo dbInfo = Util.dbInfoMap.get(JsonKey.LEARNER_CONTENT_DB);\n req.put(JsonKey.ID, generatePrimaryKey(req, userId));\n contentStateHolder.put(\n (String) req.get(JsonKey.ID), ((BigInteger) req.get(JsonKey.STATUS)).intValue());\n Response response =\n cassandraOperation.getRecordById(\n dbInfo.getKeySpace(), dbInfo.getTableName(), (String) req.get(JsonKey.ID));\n\n List<Map<String, Object>> resultList =\n (List<Map<String, Object>>) response.getResult().get(JsonKey.RESPONSE);\n\n if (!(resultList.isEmpty())) {\n Map<String, Object> result = resultList.get(0);\n int currentStatus = (int) result.get(JsonKey.STATUS);\n int requestedStatus = ((BigInteger) req.get(JsonKey.STATUS)).intValue();\n\n Integer currentProgressStatus = 0;\n if (isNotNull(result.get(JsonKey.CONTENT_PROGRESS))) {\n currentProgressStatus = (Integer) result.get(JsonKey.CONTENT_PROGRESS);\n }\n if (isNotNull(req.get(JsonKey.CONTENT_PROGRESS))) {\n Integer requestedProgressStatus =\n ((BigInteger) req.get(JsonKey.CONTENT_PROGRESS)).intValue();\n if (requestedProgressStatus > currentProgressStatus) {\n req.put(JsonKey.CONTENT_PROGRESS, requestedProgressStatus);\n } else {\n req.put(JsonKey.CONTENT_PROGRESS, currentProgressStatus);\n }\n } else {\n req.put(JsonKey.CONTENT_PROGRESS, currentProgressStatus);\n }\n\n Date accessTime = parseDate(result.get(JsonKey.LAST_ACCESS_TIME), simpleDateFormat);\n Date requestAccessTime = parseDate(req.get(JsonKey.LAST_ACCESS_TIME), simpleDateFormat);\n\n Date completedDate = parseDate(result.get(JsonKey.LAST_COMPLETED_TIME), simpleDateFormat);\n Date requestCompletedTime = parseDate(req.get(JsonKey.LAST_COMPLETED_TIME), simpleDateFormat);\n\n int completedCount;\n if (!(isNullCheck(result.get(JsonKey.COMPLETED_COUNT)))) {\n completedCount = (int) result.get(JsonKey.COMPLETED_COUNT);\n } else {\n completedCount = 0;\n }\n int viewCount;\n if (!(isNullCheck(result.get(JsonKey.VIEW_COUNT)))) {\n viewCount = (int) result.get(JsonKey.VIEW_COUNT);\n } else {\n viewCount = 0;\n }\n\n if (requestedStatus >= currentStatus) {\n req.put(JsonKey.STATUS, requestedStatus);\n if (requestedStatus == 2) {\n req.put(JsonKey.COMPLETED_COUNT, completedCount + 1);\n req.put(JsonKey.LAST_COMPLETED_TIME, compareTime(completedDate, requestCompletedTime));\n } else {\n req.put(JsonKey.COMPLETED_COUNT, completedCount);\n }\n req.put(JsonKey.VIEW_COUNT, viewCount + 1);\n req.put(JsonKey.LAST_ACCESS_TIME, compareTime(accessTime, requestAccessTime));\n req.put(JsonKey.LAST_UPDATED_TIME, ProjectUtil.getFormattedDate());\n\n } else {\n req.put(JsonKey.STATUS, currentStatus);\n req.put(JsonKey.VIEW_COUNT, viewCount + 1);\n req.put(JsonKey.LAST_ACCESS_TIME, compareTime(accessTime, requestAccessTime));\n req.put(JsonKey.LAST_UPDATED_TIME, ProjectUtil.getFormattedDate());\n req.put(JsonKey.COMPLETED_COUNT, completedCount);\n }\n\n } else {\n // IT IS NEW CONTENT SIMPLY ADD IT\n Date requestCompletedTime = parseDate(req.get(JsonKey.LAST_COMPLETED_TIME), simpleDateFormat);\n if (null != req.get(JsonKey.STATUS)) {\n int requestedStatus = ((BigInteger) req.get(JsonKey.STATUS)).intValue();\n req.put(JsonKey.STATUS, requestedStatus);\n if (requestedStatus == 2) {\n req.put(JsonKey.COMPLETED_COUNT, 1);\n req.put(JsonKey.LAST_COMPLETED_TIME, compareTime(null, requestCompletedTime));\n req.put(JsonKey.COMPLETED_COUNT, 1);\n } else {\n req.put(JsonKey.COMPLETED_COUNT, 0);\n }\n\n } else {\n req.put(JsonKey.STATUS, ProjectUtil.ProgressStatus.NOT_STARTED.getValue());\n req.put(JsonKey.COMPLETED_COUNT, 0);\n }\n\n int progressStatus = 0;\n if (isNotNull(req.get(JsonKey.CONTENT_PROGRESS))) {\n progressStatus = ((BigInteger) req.get(JsonKey.CONTENT_PROGRESS)).intValue();\n }\n req.put(JsonKey.CONTENT_PROGRESS, progressStatus);\n\n req.put(JsonKey.VIEW_COUNT, 1);\n Date requestAccessTime = parseDate(req.get(JsonKey.LAST_ACCESS_TIME), simpleDateFormat);\n\n req.put(JsonKey.LAST_UPDATED_TIME, ProjectUtil.getFormattedDate());\n\n if (requestAccessTime != null) {\n req.put(JsonKey.LAST_ACCESS_TIME, (String) req.get(JsonKey.LAST_ACCESS_TIME));\n } else {\n req.put(JsonKey.LAST_ACCESS_TIME, ProjectUtil.getFormattedDate());\n }\n }\n }", "@Override\n public void load(String filename, DatasourceSchema datasourceSchema)\n throws BigQueryLoaderException {\n GcsFileToBqTableLoader gcsFileToBqTableLoader = new GcsFileToBqTableLoader(\n bigQueryRepository, filename, datasourceSchema);\n gcsFileToBqTableLoader.load();\n\n // 2- crée la table si elle n'existe pas\n if (bigQueryRepository.tableExists(datasourceSchema.getTableId())) {\n LOGGER.info(\"Table \" + datasourceSchema.getFullTableName() + \" already exists\");\n } else {\n try {\n bigQueryRepository\n .runDDLQuery(\"CREATE TABLE \" + datasourceSchema.getFullTableName() + \" AS \"\n + \"SELECT *, CURRENT_DATETIME() AS load_date_time FROM \" + datasourceSchema\n .getFullTableTmpName() + \" LIMIT 0\");\n } catch (Exception e) {\n throw new BigQueryLoaderException(\n \"Cannot create table \" + datasourceSchema.getFullTableTmpName(), e);\n }\n }\n\n // 3- déverse tout la table cible avec le champ load date time\n try {\n bigQueryRepository.runDDLQuery(\"INSERT INTO `\" + datasourceSchema.getFullTableName() + \"` \"\n + \"SELECT *, CURRENT_DATETIME() AS load_date_time FROM `\" + datasourceSchema\n .getFullTableTmpName() + \"`\");\n } catch (Exception e) {\n throw new BigQueryLoaderException(\n \"Cannot insert from \" + datasourceSchema.getFullTableTmpName()\n + \" into destination table \" + datasourceSchema.getFullTableName(), e);\n }\n\n // 4- drop la table temporaire\n bigQueryRepository.dropTable(datasourceSchema.getTmpTableId());\n }", "public void loadStatus() {\r\n\r\n\t\ttry {\r\n\t\t\tRemoteOffice objRemoteOffice = Application.UNITY_CLIENT_APPLICATION.getreRemoteOffice();\r\n\t\t\tif (objRemoteOffice != null) {\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"Going to load the status of the components from broadworks.\");\r\n\r\n\t\t\t\tboolean isActive = objRemoteOffice.isActive();\r\n\t\t\t\tString phnumber = objRemoteOffice.getPhoneNumber();\r\n\t\t\t\tobjRemoteOfficeEnableJCheckBox.setSelected(isActive);\r\n\t\t\t\tobjRemoteOfficeJTextField.setText(phnumber);\r\n\r\n\t\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(true);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(false);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status not loaded successfully\");\r\n\t\t}\r\n\t}", "private void loadRecords() {\r\n\t\tpanContent.updateContent();\r\n\t}", "private void createStressTestStatusTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column nodeId = new Column(\"NODE_ID\");\n nodeId.setMappedType(\"VARCHAR\");\n nodeId.setPrimaryKey(true);\n nodeId.setRequired(true);\n nodeId.setSize(\"50\");\n Column status = new Column(\"STATUS\");\n status.setMappedType(\"VARCHAR\");\n status.setSize(\"10\");\n status.setRequired(true);\n status.setDefaultValue(\"NEW\");\n Column startTime = new Column(\"START_TIME\");\n startTime.setMappedType(\"TIMESTAMP\");\n Column endTime = new Column(\"END_TIME\");\n endTime.setMappedType(\"TIMESTAMP\");\n\n Table table = new Table(STRESS_TEST_STATUS, runId, nodeId, status, startTime, endTime);\n\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "void onContainerStatusReceived(ContainerId containerId,\n ContainerStatus containerStatus);", "void onGetContainerStatusError(ContainerId containerId, Throwable t);", "public void initLoadTable(){\n movies.clear();\n try {\n Connection conn = ConnectionFactory.getConnection();\n try (Statement stmt = conn.createStatement()) {\n String str=\"select title,director,prodYear,lent,lentCount,original,storageType,movieLength,mainCast,img from movies \";\n ResultSet rs= stmt.executeQuery(str);\n while(rs.next()){\n String title=rs.getString(\"title\");\n String director=rs.getString(\"director\");\n int prodYear=rs.getInt(\"prodYear\");\n boolean lent=rs.getBoolean(\"lent\"); \n int lentCount=rs.getInt(\"lentCount\");\n boolean original=rs.getBoolean(\"original\");\n String storageType=rs.getString(\"storageType\");\n int movieLength=rs.getInt(\"movieLength\");\n String mainCast=rs.getString(\"mainCast\");\n Blob blob = rs.getBlob(\"img\");\n InputStream inputStream = blob.getBinaryStream();\n OutputStream outputStream = new FileOutputStream(\"resources/\"+title+director+\".jpg\");\n int bytesRead = -1;\n byte[] buffer = new byte[1];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n inputStream.close();\n outputStream.close();\n System.out.println(\"File saved\"); \n File image = new File(\"resources/\"+title+director+\".jpg\");\n \n movies.add(new Movie(title,director,prodYear,lent,lentCount,original,storageType,movieLength,mainCast,image));\n }\n rs.close();\n stmt.close(); \n }\n conn.close();\n } catch (Exception ex) {\n System.err.println(ex.toString());\n } \n \n fireTableDataChanged();\n }", "private void populateStatus() {\n\t\t\n\t\tstatusList.add(new Status(MainActivity.profileUrls[1], \"Mohamed\", \"14 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[4], \"Ahmed Adel\", \"10 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[0], \"Manar\", \"Yesterday, 5:08 PM\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[5], \"Ramadan\", \"Today, 10:30 AM\"));\n\t\t\n\t}", "void setDataStatus(String dataStatus);", "public static void loadK8sObjectPods(int environmentId, String objName, ArrayList<Integer> podContList) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tK8sObjectPodsEntity contStat = new K8sObjectPodsEntity();\n\t\tEnvironmentEntity environment = new EnvironmentEntity();\n\t\tenvironment.setEnvironmentId(environmentId);\n\t\tcontStat.setEnvironment(environment);\n\t\tcontStat.setStatusDate(todayDate);\n\t\tcontStat.setObjectName(objName);\n\t\tcontStat.setPods(podContList.get(0));\n\t\tcontStat.setContainers(podContList.get(1));\n\t\t//contStat.setDeltaValue(deltaVal);\n\t\tsession.save(contStat);\n\t\ttxn.commit();\n\t}", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "@GET\n \t@Path(\"/getAllConceptStatus\")\n \t@Produces({MediaType.APPLICATION_JSON})\n \tpublic ExtJsonFormLoadData<List<GenericStatusView>> getAllConceptStatus() throws BusinessException {\n \t\tList<GenericStatusView> listOfStatus = new ArrayList<GenericStatusView>();\n \t\t\n \t\ttry {\n \t\t\tResourceBundle res = ResourceBundle.getBundle(\"labels\", new EncodedControl(\"UTF-8\"));\n \t\t\tString availableStatusIds[] = res.getString(\"concept-status\").split(\",\");\n \t\t\t\n \t\t\tif (\"\".equals(availableStatusIds[0])) {\n \t\t\t\t//Ids of status for concepts are not set correctly\n \t\t\t\tthrow new BusinessException(\"Error with property file - check values of identifier concept status\", \"check-values-of-concept-status\");\n \t\t\t}\n \t\t\t\n \t for (String id : availableStatusIds) {\n \t \tGenericStatusView conceptStatusView = new GenericStatusView();\n\t \tconceptStatusView.setStatus(Integer.valueOf(id));\n \t \t\n \t \tString label = res.getString(\"concept-status[\"+ id +\"]\");\n \t \tif (label.isEmpty()) {\n \t \t\t//Labels of status are not set correctly\n \t \t\tthrow new BusinessException(\"Error with property file - check values of identifier concept status\", \"check-values-of-concept-status\");\n \t\t\t\t} else {\n \t\t\t\t\tconceptStatusView.setStatusLabel(label);\n \t\t\t\t}\n \t \tlistOfStatus.add(conceptStatusView);\n \t\t\t}\n \t\t} catch (MissingResourceException e) {\n \t\t\tthrow new BusinessException(\"Error with property file - check values of concept status\", \"check-values-of-concept-status\", e);\n \t\t}\n \t\tExtJsonFormLoadData<List<GenericStatusView>> result = new ExtJsonFormLoadData<List<GenericStatusView>>(listOfStatus);\n result.setTotal((long) listOfStatus.size());\n \t\treturn result;\n \t}", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "private void monitorHBase() {\n if (hadoopRetrieveService == null) {\n return;\n }\n // logger.info(\"Checking Hbase health status ...\");\n List<PVTypeInfo> pvInfos = new ArrayList<>(aaRetrieveService.getAllPVInfo());\n if (pvInfos.isEmpty()) {\n // logger.info(\"No archving PV.\");\n return;\n }\n // Use the first PV for the checking\n String pv = pvInfos.get(0).getPvName();\n Calendar end = Calendar.getInstance();\n end.setTime(new Date());\n end.add(Calendar.YEAR, -10);\n Calendar start = Calendar.getInstance();\n start.setTime(end.getTime());\n start.add(Calendar.MINUTE, -30);\n try {\n hadoopRetrieveService.getData(pv, new Timestamp(start.getTime().getTime()),\n new Timestamp(end.getTime().getTime()), PostProcessing.FIRSTSAMPLE, 60, false, 1.0);\n } catch (IOException e) {\n logger.warn(\"HBase is down.\");\n hadoopRetrieveService = null;\n scheduledService.scheduleAtFixedRate(() -> reInitializeHBase(), 1000,\n SiteConfigUtil.getHbaseCheckingInterval(), TimeUnit.MILLISECONDS);\n }\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public void setrowStatus(Integer value){\n\t}", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "private void loadData(){\n Dh.refresh();\n }", "public abstract void onContainerStatusReceived(ContainerId containerId,\n ContainerStatus containerStatus);", "private void fillStatusList() {\n StatusList = new ArrayList<>();\n StatusList.add(new StatusItem(\"Single\"));\n StatusList.add(new StatusItem(\"Married\"));\n }", "private void updateMetrics(ContainerStatus status) {\n if (status != null) {\n switch (status.getExitStatus()) {\n case SUCCESS:\n componentMetrics.containersSucceeded.incr();\n scheduler.getServiceMetrics().containersSucceeded.incr();\n return;\n case PREEMPTED:\n componentMetrics.containersPreempted.incr();\n scheduler.getServiceMetrics().containersPreempted.incr();\n break;\n case DISKS_FAILED:\n componentMetrics.containersDiskFailure.incr();\n scheduler.getServiceMetrics().containersDiskFailure.incr();\n break;\n default:\n break;\n }\n }\n\n // containersFailed include preempted, disks_failed etc.\n componentMetrics.containersFailed.incr();\n scheduler.getServiceMetrics().containersFailed.incr();\n\n if (status != null && Apps.shouldCountTowardsNodeBlacklisting(\n status.getExitStatus())) {\n String host = scheduler.getLiveInstances().get(status.getContainerId())\n .getNodeId().getHost();\n failureTracker.incNodeFailure(host);\n currentContainerFailure.getAndIncrement();\n }\n }", "public abstract void onGetContainerStatusError(\n ContainerId containerId, Throwable t);", "protected void reloadAndReformatTableData()\n {\n logTable.loadAndFormatData();\n }", "public void setStatus(byte[] status) {\r\n this.status = status;\r\n }", "public void starttestDBStatus(\r\n org.tempuri.HISWebServiceStub.TestDBStatus testDBStatus54,\r\n final org.tempuri.HISWebServiceCallbackHandler callback)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[27].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/TestDBStatus\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n //Style is Doc.\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n testDBStatus54,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"testDBStatus\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"TestDBStatus\"));\r\n\r\n // adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // create message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message context to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\r\n public void onMessage(\r\n org.apache.axis2.context.MessageContext resultContext) {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(resultEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.TestDBStatusResponse.class);\r\n callback.receiveResulttestDBStatus((org.tempuri.HISWebServiceStub.TestDBStatusResponse) object);\r\n } catch (org.apache.axis2.AxisFault e) {\r\n callback.receiveErrortestDBStatus(e);\r\n }\r\n }\r\n\r\n public void onError(java.lang.Exception error) {\r\n if (error instanceof org.apache.axis2.AxisFault) {\r\n org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"TestDBStatus\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(),\r\n \"TestDBStatus\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(),\r\n \"TestDBStatus\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex,\r\n new java.lang.Object[] { messageObject });\r\n\r\n callback.receiveErrortestDBStatus(new java.rmi.RemoteException(\r\n ex.getMessage(), ex));\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErrortestDBStatus(f);\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErrortestDBStatus(f);\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErrortestDBStatus(f);\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErrortestDBStatus(f);\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErrortestDBStatus(f);\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErrortestDBStatus(f);\r\n } catch (org.apache.axis2.AxisFault e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n callback.receiveErrortestDBStatus(f);\r\n }\r\n } else {\r\n callback.receiveErrortestDBStatus(f);\r\n }\r\n } else {\r\n callback.receiveErrortestDBStatus(f);\r\n }\r\n } else {\r\n callback.receiveErrortestDBStatus(error);\r\n }\r\n }\r\n\r\n public void onFault(\r\n org.apache.axis2.context.MessageContext faultContext) {\r\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\r\n onError(fault);\r\n }\r\n\r\n public void onComplete() {\r\n try {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n } catch (org.apache.axis2.AxisFault axisFault) {\r\n callback.receiveErrortestDBStatus(axisFault);\r\n }\r\n }\r\n });\r\n\r\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\r\n\r\n if ((_operations[27].getMessageReceiver() == null) &&\r\n _operationClient.getOptions().isUseSeparateListener()) {\r\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\r\n _operations[27].setMessageReceiver(_callbackReceiver);\r\n }\r\n\r\n //execute the operation client\r\n _operationClient.execute(false);\r\n }", "public void setStatus(BatchStatus value) {\n this.status = value;\n }", "public static List getStatusList() \n {\n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"select status from Alumni_data group by status\").list();\n session.close();\n return li;\n }", "private void setStatus(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n status_ = value;\n }", "private void reDrowStatusCard() {\n \t\tint currentInstance= Storage_access.getCurrentProjectInstanceBDDID() ;\n \t\t\n \t\tdispatcher.execute(new GetActivityStateAction(currentInstance), new AsyncCallback<GetActivityStateActionResult>() {\n \n \t\n \n \t\t\t@Override public void onFailure(Throwable arg0) {\n \t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!!!**** failed to get activities status\");\n \n \t\t\t}\n \n \t\t\t@Override public void onSuccess(GetActivityStateActionResult result) {\n \t\t\t\tfor (int i=0; i< Storage_access.getNumberOfCard(); i++) {\n \t\t\t\t\tString card = Storage_access.getCard(i);\n \t\t\t\t\tActivityState_dto a = result.getActivitiesState().get(\"\"+Storage_access.getBddIdCard(card));\n \t\t\t\t\tif (a == null) \n \t\t\t\t\t\tStorage_access.revoveFromSlot(i);\t\n \t\t\t\t\telse \n \t\t\t\t\t\tStorage_access.setSlotCard(i, a.getDay(), a.getPeriod());\t\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\teventBus.fireEvent( \n \t\t\t\t\t\tnew BoardViewChangedEvent(getView().getCombo_viewChoice1().getSelectedIndex(),\n \t\t\t\t\t\t\t\t\t\t\t\t getView().getCombo_viewChoice2().getSelectedIndex())\n \t\t\t\t\t\t);\n \t\t\t\t//Storage_access.printStorage();\n \t\t\t}\n \n \t\t\t});\n \n \t\t\n \t}", "protected void init_status(String id) {\n\t\tstatus.put(id, 1);\n\t\t\n\t}", "private void loadDescribedTemplateData() {\r\n if (connect == null) {\r\n System.out.println(\"<internal> DescribedTemplateCore.loadDescribedTemplateData() finds no database connection and exits\");\r\n return;\r\n }\r\n\r\n Statement statement = null;\r\n ResultSet resultSet = null;\r\n try {\r\n String strDTNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n\r\n // acquire described template info; note: template to described_template is 1 to many, so from described_template to template is 1:1\r\n resultSet = statement.executeQuery( \"SELECT fk_version_set, fk_template, description_hash, synchronized, hash, enabled, steps \" +\r\n \"FROM described_template \" +\r\n \"JOIN template ON fk_template = pk_template \" +\r\n \"WHERE pk_described_template = \" + strDTNum );\r\n\r\n if ( resultSet.next() ) {\r\n dbDescribedTemplate.fk_version_set = resultSet.getBytes(\"fk_version_set\");\r\n dbDescribedTemplate.fk_template = resultSet.getLong(\"fk_template\");\r\n dbDescribedTemplate.description_hash = resultSet.getBytes(\"description_hash\");\r\n dbDescribedTemplate.dtSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.template_hash = resultSet.getBytes(\"hash\");\r\n dbDescribedTemplate.enabled = resultSet.getBoolean(\"enabled\");\r\n dbDescribedTemplate.steps = resultSet.getString(\"steps\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads data from described template record \" + pk_described_template);\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n } else {\r\n throw new Exception(\"described template data not present\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // acquire matching run info\r\n try {\r\n String strTemplateNum = String.valueOf(dbDescribedTemplate.fk_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_run, artifacts, start_time, ready_time, end_time, passed \" +\r\n \"FROM run \" +\r\n \"WHERE fk_template = \" + strTemplateNum );\r\n while ( resultSet.next() ) {\r\n DBRun dbRun = new DBRun(resultSet.getLong(\"pk_run\"));\r\n dbRun.artifacts = resultSet.getBytes(\"artifacts\");\r\n dbRun.start_time = resultSet.getDate(\"start_time\");\r\n dbRun.ready_time = resultSet.getDate(\"ready_time\");\r\n dbRun.end_time = resultSet.getDate(\"end_time\");\r\n dbRun.passed = resultSet.getBoolean(\"passed\");\r\n dbDescribedTemplate.pkdtToDBRun.put(pk_described_template, dbRun);\r\n System.out.println(\" <internal> TemplateCore.loadTemplateData() loads data from described_template-matched run record \" + dbRun.pk_run);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n \r\n // acquire matching test_instance info; note: described_template to test_instance is 1:1\r\n try {\r\n String strDescribedTemplateNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_test_instance, fk_run, due_date, phase, synchronized \" +\r\n \"FROM test_instance \" +\r\n \"WHERE fk_described_template = \" + strDescribedTemplateNum);\r\n while ( resultSet.next() ) {\r\n DBTestInstance dbTestInstance = new DBTestInstance(resultSet.getLong(\"pk_test_instance\"));\r\n dbTestInstance.fk_run = resultSet.getLong(\"fk_run\"); // null entry returns 0\r\n dbTestInstance.due_date = resultSet.getDate(\"due_date\");\r\n dbTestInstance.phase = resultSet.getInt(\"phase\");\r\n dbTestInstance.iSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.pkdtToDBTestInstance.put(pk_described_template, dbTestInstance);\r\n System.out.println(\" <internal> TemplateCore.loadDescribedTemplateData() loads data from described_template-matched test_instance record \" + dbTestInstance.pk_test_instance);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n\r\n // acquire corresponding multiple lines of data\r\n try {\r\n String strPKDT = String.valueOf(dbDescribedTemplate.pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_dt_line, line, description \" +\r\n \"FROM dt_line \" +\r\n \"WHERE fk_described_template = \" + strPKDT );\r\n while ( resultSet.next() ) {\r\n DBDTLine dtLine = new DBDTLine();\r\n dtLine.pk_dt_line = resultSet.getLong(\"pk_dt_line\"); // null entry returns 0\r\n dtLine.line = resultSet.getInt(\"line\");\r\n dtLine.dtLineDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads line data from dt_line \" + dtLine.pk_dt_line);\r\n\r\n dbDescribedTemplate.pkdtToDTLine.put(dtLine.pk_dt_line, dtLine);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // get corresponding artifact information; not every dtLine has corresponding artifact information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT is_primary, reason, pk_artifact, fk_version, fk_content, synchronized, platform, internal_build, name \" +\r\n \"FROM artifact_to_dt_line \" +\r\n \"JOIN artifact ON fk_artifact = pk_artifact \" +\r\n \"WHERE fk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.is_primary = resultSet.getBoolean(\"is_primary\");\r\n dtLine.reason = resultSet.getString(\"reason\");\r\n dtLine.pk_artifact = resultSet.getLong(\"pk_artifact\");\r\n dtLine.pk_version = resultSet.getLong(\"fk_version\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads artifact data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding version information; not every dtLine has corresponding version information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT version, scheduled_release, actual_release, sort_order \" +\r\n \"FROM version \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.version = resultSet.getString(\"version\");\r\n dtLine.scheduled_release = resultSet.getDate(\"scheduled_release\");\r\n dtLine.actual_release = resultSet.getDate(\"actual_release\");\r\n dtLine.sort_order = resultSet.getInt(\"sort_order\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads version data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding content information; not every dtLine has corresponding content information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKArtifact = String.valueOf(dtLine.pk_artifact);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_content, is_generated \" +\r\n \"FROM content \" +\r\n \"JOIN artifact ON fk_content = pk_content \" +\r\n \"WHERE pk_artifact = \" + strPKArtifact );\r\n if ( resultSet.next() ) {\r\n dtLine.pk_content = resultSet.getBytes(\"pk_content\");\r\n dtLine.is_generated = resultSet.getBoolean(\"is_generated\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads content data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding component information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT name \" +\r\n \"FROM component \" +\r\n \"JOIN version ON fk_component = pk_component \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.componentName = resultSet.getString(\"name\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads component data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n }\r\n\r\n // get corresponding resource information; not every dtLine has corresponding resource information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT hash, name, resource.description \" +\r\n \"FROM dt_line \" +\r\n \"JOIN resource ON fk_resource = pk_resource \" +\r\n \"WHERE pk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.resourceHash = resultSet.getBytes(\"hash\");\r\n dtLine.resourceName = resultSet.getString(\"name\");\r\n dtLine.resourceDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads resource data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n }", "public DacGetStatusResponse() {\n super();\n this.setStatusInfoList(new LazyArrayList<StatusInfo>());\n }", "public static void loadApiStatus(final int envId, String compName, int numOfApi) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\t\n\t\tfinal int compId = getComponentIdFromCompName(compName);\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; is not available in the DB\");\n\t\t\treturn;\n\t\t}\n\n\t\tint prevNumApis = getPreiousNumApis(compId, todayDate, envId);\n\t\tfinal int deltaVal = prevNumApis == 0 ? 0 : numOfApi - prevNumApis;\n\t\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tApiStatusEntity apiStatus = new ApiStatusEntity();\n\t\tEnvironmentEntity environment = new EnvironmentEntity();\n\t\tenvironment.setEnvironmentId(envId);\n\t\tapiStatus.setEnvironment(environment);\n\t\tapiStatus.setStatusDate(todayDate);\n\t\tComponentEntity component = new ComponentEntity();\n\t\tcomponent.setComponentId(compId);\n\t\tapiStatus.setComponent(component);\n\t\tapiStatus.setTotalApi(numOfApi);\n\t\tapiStatus.setDeltaValue(deltaVal);\n\t\tsession.save(apiStatus);\n\t\ttxn.commit();\n\t}", "private synchronized void performOperations() {\r\n\t\ttry {\r\n\t\t\tswitch (operationStatus) {\r\n\t\t\tcase TRUNCATE_DATA:\r\n\t\t\t\tHibernateUtil.rawQuery(\"TRUNCATE csv;\");\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\tcase APPEND_DATA:\r\n\t\t\t\tparseData(false);\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase UPDATE_DATA:\r\n\t\t\t\tparseData(true);\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase ARRANGE_DATA:\r\n\t\t\t\tarrangeData();\r\n\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\tUtil.writeLog(toString());\r\n\t\t\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.INFO, toString());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public ScreenStatus(ComponentContainer container) {\n\t\tsuper(container);\n\t\t// TODO Auto-generated constructor stub\n\t\tform.registerForOnDestroy(this);\n\t\t \n\t\tmainUIThreadActivity = container.$context();\n\t\tLog.i(TAG, \"Before create probe\");\n\t\tgson = new GsonBuilder().registerTypeAdapterFactory(\n\t\t\t\tFunfManager.getProbeFactory(mainUIThreadActivity)).create();\n\t\tJsonObject config = new JsonObject();\n\n\t\tprobe = gson.fromJson(config, ScreenProbe.class);\n\n\t\tinterval = SCHEDULE_INTERVAL;\n\t\tduration = SCHEDULE_DURATION;\n\t\t\t\n\t}", "private void loadStateDatabase() {\n new Thread( new Runnable() {\n public void run() {\n try {\n loadStates();\n } catch ( final IOException e ) {\n throw new RuntimeException( e );\n }\n }\n }).start();\n }", "void setContainerStatusInProgress(RuleContextContainer rccContext)\r\n throws StorageProviderException;", "public CreateStatus(DataMap data)\n {\n super(data, null);\n }", "private void loadMasterData()\r\n\t{\r\n\t\tlistOfMasterStud.clear();\r\n\t\tString qu = \"SELECT * FROM MASTERSTUDENT\";\r\n\t\tResultSet resultM = databaseHandler.execQuery(qu);\r\n\t\ttry {\r\n\t\t\t// retrieve student information form database\r\n\t\t\twhile(resultM.next())\r\n\t\t\t{\r\n\t\t\t\tString studIDM = resultM.getString(\"studentNoM\");\r\n\t\t\t\tString studNameM = resultM.getString(\"nameM\");\r\n\t\t\t\tString studSurnameM = resultM.getString(\"surnameM\");\r\n\t\t\t\tString studSupervisorM = resultM.getString(\"supervisorM\");\r\n\t\t\t\tString studEmailM = resultM.getString(\"emailM\");\r\n\t\t\t\tString studCellphoneM = resultM.getString(\"cellphoneNoM\");\r\n\t\t\t\tString studStationM = resultM.getString(\"stationM\");\r\n\t\t\t\tString studCourseM = resultM.getString(\"courseM\");\r\n\r\n\t\t\t\tlistOfMasterStud.add(new StudentProperty(studIDM, studNameM, studSurnameM,\r\n\t\t\t\t\t\tstudSupervisorM, studEmailM, studCellphoneM, studStationM, studCourseM));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tmasterStudTable.setItems(listOfMasterStud);\r\n\t}", "private void loadData(){\n updateDateTimeText();\n\n mLoadingDialog = DialogUtil.createLoadingDialog(getActivity(), getString(R.string.loading_dialog_in_progress));\n mLoadingDialog.show();\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private void loadDataOnFirst(){\n updateDateTimeText();\n\n mPbLoading.setVisibility(View.VISIBLE);\n mCalendarListView.setVisibility(View.GONE);\n\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private static void statusCommand() {\n String lineFormat = \"%-8s | %-15s | %s\\n\";\n\n List<Job> neededJobs = fetchNeededJobs();\n\n // table header\n if (neededJobs.size() < 2) {\n System.out.printf(lineFormat, \"STATE\", \"START TIME\", \"JOB DIRECTORY\");\n for (int i = 0; i < 78; i++) {\n System.out.print(((9 == i || 27 == i) ? \"+\" : \"-\"));\n }\n System.out.println();\n }\n\n // table rows\n ObjectCounter<JobState> counter = new ObjectCounter<JobState>();\n for (Job job : neededJobs) {\n Date startDate = job.getStartDate();\n JobState state = job.getState();\n counter.add(state);\n String startDateStr = (null == startDate) ? \"N/A\" : new SimpleDateFormat(\"yyyyMMdd HHmmss\").format(startDate);\n System.out.printf(lineFormat, state.toString(), startDateStr, job.getDir());\n }\n\n // table footer\n System.out.println();\n String sumFormat = \"%6d %s\\n\";\n System.out.printf(sumFormat, heritrix.getJobs().size(), \"TOTAL JOBS\");\n for (JobState state : JobState.values()) {\n if (counter.getMap().keySet().contains(state)) {\n System.out.printf(sumFormat, counter.get(state), state.toString());\n }\n }\n }", "private void getStatus() {\n\t\t\n\t}", "public void loadExistingRecords_old(){\n\nString selectAllRecords = \" select URP_ID, \\n\" +\n\" (select DNAME from DEPARTMENTS WHERE DID in ( DEPTID )) as 'Department' ,\\n\" +\n\" (select RSNAME from RESOURCE WHERE RSID in ( RESID )) as 'Resource' , (select RoleName from userRoles WHERE Role_ID in ( ROLE )) AS 'Role' ,\t\\n\" +\n\" CASE WHEN `READ` = 1 THEN 'Yes' ELSE 'No' END AS 'Can Read' ,\tCASE WHEN `EDIT` = 1 THEN 'Yes' ELSE 'No' END AS 'Can Edit' ,\tCASE \\n\" +\n\" WHEN `DISABLE` = 1 THEN 'Yes' ELSE 'No' END AS 'Can Disable' ,\tCASE WHEN `EXPORT` = 1 THEN 'Yes' ELSE 'No' END AS 'Can Export' ,\tCASE \\n\" +\n\" WHEN `CREATENEW` = 1 THEN 'Yes' ELSE 'No' END AS 'Can Create' ,\tCASE WHEN `IMPORT` = 1 THEN 'Yes' ELSE 'No' END AS 'Can Import', CASE WHEN `ACCESS_ON_MOBILE` = 1 THEN 'Yes' ELSE 'No' END AS 'Can Access Mobile' from USERROLEPERM \" ;\n\n ResultSet rs = DB_Operations.executeSingle ( selectAllRecords ) ;\n \n try{\n \n ResultSetMetaData metaData = rs.getMetaData ();\n // names of columns\n Vector<String> columnNames = new Vector<String> ();\n int columnCount = metaData.getColumnCount ();\n for ( int column = 1 ; column <= columnCount ; column ++ ) {\n columnNames.add ( metaData.getColumnName ( column ) );\n }\n\n // data of the table\n Vector<Vector<Object>> data = new Vector<Vector<Object>> ();\n while ( rs.next () ) {\n\n Vector<Object> vector = new Vector<Object> ();\n for ( int columnIndex = 1 ; columnIndex <= columnCount ; columnIndex ++ ) {\n vector.add ( rs.getObject ( columnIndex ) );\n }\n data.add ( vector );\n }\n \n jTable1.setModel( new DefaultTableModel ( data, columnNames ) ) ;\n jTable1.getColumnModel ().getColumn ( 0 ).setMinWidth ( 0 );\n jTable1.getColumnModel ().getColumn ( 0 ).setMaxWidth ( 0 );\n \n \n }catch(SQLException e){\n StaticValues.writer.writeExcel ( UserRolePermissionMaster.class.getSimpleName () , UserRolePermissionMaster.class.getSimpleName () , e.getClass ().toString () , Thread.currentThread ().getStackTrace ()[ 1 ].getLineNumber () + \"\" , e.getMessage () , StaticValues.sdf2.format ( Calendar.getInstance ().getTime () ) ); \n }\n }", "protected abstract void loadData();", "private void loadTestInstanceData() {\r\n if (connect == null) {\r\n System.out.println(\"<internal> TemplateCore.loadTestInstanceData() finds no database connection and exits\");\r\n return;\r\n }\r\n\r\n Statement statement = null;\r\n ResultSet resultSet = null;\r\n// try {\r\n// String strINum = String.valueOf(pk_test_instance);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT fk_described_template, fk_run, due_date, phase, test_instance.synchronized, fk_version_set, fk_template, description_hash, described_template.synchronized, hash, enabled, steps \" +\r\n// \"FROM test_instance \" +\r\n// \"JOIN described_template ON fk_described_template = pk_described_template \" +\r\n// \"JOIN template ON fk_template = pk_test_instance \" +\r\n// \"WHERE pk_test_instance = \" + strINum );\r\n // everything in this query is 1:1 relationship, so resultSet has exactly 1 or 0 entry\r\n\r\n// if ( resultSet.next() ) {\r\n// dbTestInstance.pk_described_template = resultSet.getLong(\"fk_described_template\"); // null entry returns 0\r\n// dbTestInstance.fk_run = resultSet.getLong(\"fk_run\"); // null entry returns 0\r\n// dbTestInstance.due_date = resultSet.getDate(\"due_date\");\r\n// dbTestInstance.phase = resultSet.getInt(\"phase\");\r\n// dbTestInstance.iSynchronized = resultSet.getBoolean(\"test_instance.synchronized\");\r\n//\r\n// dbTestInstance.fk_version_set = resultSet.getBytes(\"fk_version_set\");\r\n// dbTestInstance.fk_template = resultSet.getLong(\"fk_template\"); // null entry returns 0\r\n// dbTestInstance.description_hash = resultSet.getBytes(\"description_hash\");\r\n// dbTestInstance.dtSynchronized = resultSet.getBoolean(\"described_template.synchronized\");\r\n//\r\n// dbTestInstance.template_hash = resultSet.getBytes(\"hash\");\r\n// dbTestInstance.enabled = resultSet.getBoolean(\"enabled\");\r\n// dbTestInstance.steps = resultSet.getString(\"steps\");\r\n//\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads 1:1 data from test_instance \" + dbTestInstance.pk_test_instance + \", pk_described_template \" + dbTestInstance.pk_described_template +\r\n// \", pk_test_instance \" + dbTestInstance.fk_template + (dbTestInstance.fk_run!=0 ? \", TEST RESULT ALREADY STORED\" : \"\"));\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// } else {\r\n// throw new Exception(\"instance data not present\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n//\r\n// // get corresponding multiple lines of data\r\n// try {\r\n// String strPKDT = String.valueOf(dbTestInstance.pk_described_template);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT pk_dt_line, line, description \" +\r\n// \"FROM dt_line \" +\r\n// \"WHERE fk_described_template = \" + strPKDT );\r\n// while ( resultSet.next() ) {\r\n// DBDTLine dtLine = new DBDTLine();\r\n// dtLine.pk_dt_line = resultSet.getLong(\"pk_dt_line\"); // null entry returns 0\r\n// dtLine.line = resultSet.getInt(\"line\");\r\n// dtLine.dtLineDescription = resultSet.getString(\"description\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads line data from dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// dbTestInstance.pkToDTLine.put(dtLine.pk_dt_line, dtLine);\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n//\r\n// // get corresponding artifact information; not every dtLine has corresponding artifact information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT is_primary, reason, pk_artifact, fk_version, fk_content, synchronized, platform, internal_build, name \" +\r\n// \"FROM artifact_to_dt_line \" +\r\n// \"JOIN artifact ON fk_artifact = pk_artifact \" +\r\n// \"WHERE fk_dt_line = \" + strPKDTLine );\r\n// if ( resultSet.next() ) {\r\n// dtLine.is_primary = resultSet.getBoolean(\"is_primary\");\r\n// dtLine.reason = resultSet.getString(\"reason\");\r\n// dtLine.pk_artifact = resultSet.getLong(\"pk_artifact\");\r\n// dtLine.pk_version = resultSet.getLong(\"fk_version\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads artifact data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n//\r\n// // get corresponding version information; not every dtLine has corresponding version information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKVersion = String.valueOf(dtLine.pk_version);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT version, scheduled_release, actual_release, sort_order \" +\r\n// \"FROM version \" +\r\n// \"WHERE pk_version = \" + strPKVersion );\r\n// if ( resultSet.next() ) {\r\n// dtLine.version = resultSet.getString(\"version\");\r\n// dtLine.scheduled_release = resultSet.getDate(\"scheduled_release\");\r\n// dtLine.actual_release = resultSet.getDate(\"actual_release\");\r\n// dtLine.sort_order = resultSet.getInt(\"sort_order\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads version data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n//\r\n// // get corresponding content information; not every dtLine has corresponding content information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKArtifact = String.valueOf(dtLine.pk_artifact);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT pk_content, is_generated \" +\r\n// \"FROM content \" +\r\n// \"JOIN artifact ON fk_content = pk_content \" +\r\n// \"WHERE pk_artifact = \" + strPKArtifact );\r\n// if ( resultSet.next() ) {\r\n// dtLine.pk_content = resultSet.getBytes(\"pk_content\");\r\n// dtLine.is_generated = resultSet.getBoolean(\"is_generated\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads content data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n//\r\n// // get corresponding component information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKVersion = String.valueOf(dtLine.pk_version);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT name \" +\r\n// \"FROM component \" +\r\n// \"JOIN version ON fk_component = pk_component \" +\r\n// \"WHERE pk_version = \" + strPKVersion );\r\n// if ( resultSet.next() ) {\r\n// dtLine.componentName = resultSet.getString(\"name\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads component data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// }\r\n//\r\n// // get corresponding resource information; not every dtLine has corresponding resource information\r\n// for (DBDTLine dtLine: dbTestInstance.pkToDTLine.values()) {\r\n// try {\r\n// String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n// statement = connect.createStatement();\r\n// resultSet = statement.executeQuery( \"SELECT hash, name, resource.description \" +\r\n// \"FROM dt_line \" +\r\n// \"JOIN resource ON fk_resource = pk_resource \" +\r\n// \"WHERE pk_dt_line = \" + strPKDTLine );\r\n// if ( resultSet.next() ) {\r\n// dtLine.resourceHash = resultSet.getBytes(\"hash\");\r\n// dtLine.resourceName = resultSet.getString(\"name\");\r\n// dtLine.resourceDescription = resultSet.getString(\"description\");\r\n// System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads resource data for dt_line \" + dtLine.pk_dt_line);\r\n//\r\n// if (resultSet.next())\r\n// throw new Exception(\"resultSet wrongly has more than one entry\");\r\n// }\r\n// } catch(Exception e) {\r\n// System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for iNum \" + pk_test_instance + \": \"+ e);\r\n// } finally {\r\n// safeClose( resultSet ); resultSet = null;\r\n// safeClose( statement ); statement = null;\r\n// }\r\n// } // end for()\r\n }", "private void loadData()\n\t{\n\t\tVector<String> columnNames = new Vector<String>();\n\t\tcolumnNames.add(\"Item Name\");\n\t\tcolumnNames.add(\"Item ID\");\n\t\tcolumnNames.add(\"Current Stock\");\n\t\tcolumnNames.add(\"Unit Price\");\n\t\tcolumnNames.add(\"Section\");\n\t\t\n\t\tVector<Vector<Object>> data= new Vector<Vector<Object>>();\n\t\t\n\t\tResultSet rs = null;\n\t\ttry \n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query=\"select * from items natural join sections order by sections.s_name\";\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\trs = pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tVector<Object> vector = new Vector<Object>();\n\t\t for (int columnIndex = 1; columnIndex <= 9; columnIndex++)\n\t\t {\n\t\t \t\n\t\t \tvector.add(rs.getObject(1));\n\t\t \tvector.add(rs.getObject(2));\n\t\t vector.add(rs.getObject(3));\n\t\t vector.add(rs.getObject(4));\n\t\t vector.add(rs.getObject(6));\n\t\t \n\t\t }\n\t\t data.add(vector);\n\t\t\t}\n\t\t\t\n\t\t\t tableModel.setDataVector(data, columnNames);\n\t\t\t \n\t\t\t rs.close();\n\t\t\t pst.close();\n\t\t\t con.close();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t\t\n\t\t\n\t}", "public void reloadPackagingContainerTab3(int planId) {\n\n Helper.startSession();\n String query_str = String.format(\n HQLHelper.GET_LOAD_PLAN_EXT_PACKAGING_AND_CONTAINER,\n planId, planId);\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n query.addScalar(\"destination\", StandardBasicTypes.STRING);\n query.addScalar(\"pack_item\", StandardBasicTypes.STRING);\n query.addScalar(\"quantity\", StandardBasicTypes.DOUBLE);\n\n List<Object[]> result = query.list();\n Helper.sess.getTransaction().commit();\n\n System.out.println(\"result lines \" + result.size());\n\n //Reset table content\n total_packages_data = new Vector();\n total_packages_header = new Vector<String>() {\n };\n total_packages_header.add(\"Destination\");\n total_packages_header.add(\"Pack Item\");\n total_packages_header.add(\"Quantity\");\n\n jtable_total_packages.setModel(new DefaultTableModel(total_packages_data, total_packages_header));\n\n //Populate jtable rows\n for (Object[] o : result) {\n Vector<Object> oneRow = new Vector<Object>();\n oneRow.add((String) o[0]);\n oneRow.add((String) o[1]);\n oneRow.add(String.valueOf(String.format(\"%1$,.2f\", Double.valueOf(o[2].toString()))));\n System.out.println(\"one row \" + oneRow.toString());\n total_packages_data.add(oneRow);\n }\n\n System.out.println(\"reloadPackagingContainerTab3 query Total packaging \\n\\n\" + query_str);\n jtable_total_packages.setModel(new DefaultTableModel(total_packages_data, total_packages_header));\n setTotalPackagingTableRowsStyle();\n\n }", "public void mDeptLocationStatuses() {\n System.out.println(\"Inside mDeptLocationStatuses\");\n PersistenceManager pm = PMF.get().getPersistenceManager(); \n mDeptLocationStatuses.clear();\n for (int d=0; d<mDeptLocations.size(); d++) {\n System.out.println(\"mDeptLocation qty: \" + mDeptLocations.size());\n// dLocationStatuses.clear();\n if (mDeptLocations.get(d) != null) {\n for (int l=0; l<mDeptLocations.get(d).size(); l++) {\n List<Status> dLocationStatuses = new ArrayList<Status>();\n List<Long> keys = new ArrayList<Long>();\n keys.addAll(mDeptLocations.get(d).get(l).getstatusKeys());\n Query q = pm.newQuery(Status.class, \":p.contains(id)\");\n dLocationStatuses.addAll((List<Status>) pm.newQuery(q).execute(keys)); \n mDeptLocationStatuses.put(mDeptLocations.get(d).get(l).getid(), dLocationStatuses);\n System.out.println(\"dLocationStatuses in deptLocStat: \" + dLocationStatuses.size());\n }\n }\n }\n System.out.println(\"mDeptLocationStatuses qty: \" + mDeptLocationStatuses.size());\n System.out.println(\"Exit: mDeptLocationStatuses\");\n }", "void fetchStartHousesData();", "protected void loadData()\n {\n }", "@Override\r\n\tpublic void onLoad() {\n\t\tRunnable onLoadCallback = new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tTable table = new Table(createTable(), createOptions());\r\n\t\t\t\tmainPanel.add(table);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Load the visualization api, passing the onLoadCallback to be called\r\n\t\t// when loading is done.\r\n\t\tVisualizationUtils.loadVisualizationApi(onLoadCallback, Table.PACKAGE);\r\n\r\n\t}", "private void fetchDashboardList() {\n /*\n * Ensures a loader is initialized and active. If the loader doesn't already exist, one is\n * created and (if the activity/fragment is currently started) starts the loader. Otherwise\n * the last created loader is re-used.\n */\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<List<VehiclesTotalRunningCosts>> theDashboardDbLoader = loaderManager.getLoader(DASHBOARD_LOADER_ID);\n\n if (theDashboardDbLoader == null) {\n loaderManager.initLoader(DASHBOARD_LOADER_ID, null, this);\n } else {\n loaderManager.restartLoader(DASHBOARD_LOADER_ID, null, this);\n }\n\n\n\n }", "public void loadDaemonStatus(Integer plnID, String boxIpAddress) throws SQLException{\n\t\tConnection dbConnection = null;\n\t\tPreparedStatement preparedStatement=null;\n\t\tService service = null;\n\t\tList<AuWsResult> ausFromCurrentBox = null; \n\t\tList<RepositorySpaceWsResult> repositoryBox = null;\n\t\tList<PeerWsResult> peersBox = null;\n\t\tList<RepositoryWsResult> repo = null;\n\t\tPlatformConfigurationWsResult boxConfiguration = null;\n\t\tInteger boxId=null;\n\t\tMap<String, String> headers = null;\n\n\n\t\ttry {\n\n\t\t\t// Call the service and get results of the queries.\n\n\t\t\t// Get credentials from database for current box\n\t\t\ttry {\t\t\t\t\t\t\t\n\t\t\t\tString getcredentialsQuery = \"SELECT username, password from plnmonitor.lockss_box as box INNER JOIN plnmonitor.lockss_box_info AS info \"\n\t\t\t\t\t\t+ \"ON box.id = info.box WHERE box.ipaddress = ? AND box.pln = ?\"; // WHERE pln=\" + plnID;\n\n\t\t\t\tdbConnection = getDBConnection();\n\n\t\t\t\tpreparedStatement = dbConnection.prepareStatement(getcredentialsQuery, Statement.KEEP_CURRENT_RESULT);\n\n\t\t\t\tpreparedStatement.setString(1, boxIpAddress);\n\t\t\t\tpreparedStatement.setInt(2, plnID);\n\n\t\t\t\tResultSet rs=preparedStatement.executeQuery();\n\n\t\t\t\tif (rs.next()) {\n\t\t\t\t\tusername = rs.getString(\"username\");\n\t\t\t\t\tpassword = rs.getString(\"password\");\n\t\t\t\t} \n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tLOGGER.error(e.getMessage());\n\t\t\t} finally {\n\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\tdbConnection.close();\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tthis.authenticate(username, password); //basic authentication (inline)\n\n\n\t\t\tString boxHostname = boxIpAddress;\n\n\t\t\t//ugly fix for UGent - please ignore this\n\t\t\t//if (boxIpAddress.matches(\"157.193.230.142\")) {\n\t\t\t//\tboxHostname = \"shaw.ugent.be\";\n\t\t\t//}\n\t\t\tString serviceAddress=prefixDSS+boxHostname+postfixDSS; \n\n\t\t\ttry {\n\n\t\t\t\tservice = Service.create(new URL(serviceAddress), new QName(\n\t\t\t\t\t\tTARGET_NAMESPACE, SERVICE_NAME));\n\n\t\t\t}\n\n\t\t\tcatch (WebServiceException e) {\n\t\t\t\tLOGGER.error(e.toString());\n\t\t\t\tLOGGER.error(\"\\u001B[31m Nothing to do connection unavailable... \\u001B[0m\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (service != null) { //if service available, get all data from the LOCKSS box\n\t\t\t\t\tDaemonStatusService dss = service.getPort(DaemonStatusService.class);\n\t\t\t\t\tLOGGER.info(\"\\u001B[32m Getting platform configuration...\\u001B[0m\");\n\t\t\t\t\tboxConfiguration = dss.getPlatformConfiguration();\n\t\t\t\t\tLOGGER.info(\"\\u001B[32m Getting repository spaces status...\\u001B[0m\");\n\t\t\t\t\trepositoryBox = dss.queryRepositorySpaces(\"select *\");\n\t\t\t\t\tLOGGER.info(\"\\u001B[32m Getting AUs status... \\u001B[0m\");\n\t\t\t\t\tausFromCurrentBox = dss.queryAus(QUERY);\n\t\t\t\t\t\n\t\t\t\t\tLOGGER.info(\"\\u001B[32m Getting peers status...\\u001B[0m\");\n\t\t\t\t\tpeersBox = dss.queryPeers(\"select *\");\n\t\t\t\t\tLOGGER.info(\"\\u001B[32m Getting repository status...\\u001B[0m\");\n\t\t\t\t\trepo = dss.queryRepositories(\"select *\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (WebServiceException e) {\n\t\t\t\tLOGGER.error(e.toString());\n\t\t\t}\n\n\t\t\tLOGGER.info(\"\\u001B[32m Updating LOCKSS boxes configurations in the database \\u001B[0m\");\n\t\t\t// if data from plaftorm configuration is available, update the LOCKSS box table accordingly in the database\n\t\t\tif (boxConfiguration!=null){\n\t\t\t\t//update LOCKSS box config in the LOCKSS_box database\n\t\t\t\t//upsert: if box date identified by (ipaddress+pln id) is already in the database, update entry otherwise insert \n\t\t\t\t//upsert is not available in Postgres 9.4\n\t\t\t\ttry {\n\n\t\t\t\t\tString insertTableSQL = \n\t\t\t\t\t\t\t\"WITH upsert AS \" +\n\t\t\t\t\t\t\t\t\t\"(UPDATE plnmonitor.lockss_box \" +\n\t\t\t\t\t\t\t\t\t\"SET uiport = ?, \" +\n\t\t\t\t\t\t\t\t\t\"groups = ?, \" +\n\t\t\t\t\t\t\t\t\t\"v3identity = ?, \" +\n\t\t\t\t\t\t\t\t\t\"uptime = ?, \" +\n\t\t\t\t\t\t\t\t\t\"admin_email = ?, \" +\n\t\t\t\t\t\t\t\t\t\"disks = ?, \" +\n\t\t\t\t\t\t\t\t\t\"\\\"current_time\\\" = ?, \" +\n\t\t\t\t\t\t\t\t\t\"daemon_full_version = ?, \" +\n\t\t\t\t\t\t\t\t\t\"java_version = ?, \" +\n\t\t\t\t\t\t\t\t\t\"platform = ? \" +\n\t\t\t\t\t\t\t\t\t\"WHERE ipaddress=? and pln=? RETURNING *), \" +\n\n\t\t\t\t\t\t\t\"inserted AS (\"+\n\t\t\t\t\t\t\t\"INSERT INTO plnmonitor.lockss_box \" +\n\t\t\t\t\t\t\t\"(ipaddress,uiport,pln,groups,v3identity,uptime,admin_email,disks,\\\"current_time\\\", daemon_full_version, java_version, platform) \"+\n\t\t\t\t\t\t\t\"SELECT ?,?,?,?,?,?,?,?,?,?,?,? WHERE NOT EXISTS \"+\n\t\t\t\t\t\t\t\"(SELECT * FROM upsert) \"+\n\t\t\t\t\t\t\t\"RETURNING *) \"+\n\t\t\t\t\t\t\t\"SELECT * \" +\n\t\t\t\t\t\t\t\"FROM upsert \" +\n\t\t\t\t\t\t\t\"union all \" +\n\t\t\t\t\t\t\t\"SELECT * \" +\n\t\t\t\t\t\t\t\"FROM inserted\";\n\n\t\t\t\t\tdbConnection = getDBConnection();\n\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL, Statement.KEEP_CURRENT_RESULT);\n\t\t\t\t\tpreparedStatement.setString(1, \"8081\");\n\t\t\t\t\tpreparedStatement.setString(2, boxConfiguration.getGroups().get(0).replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(3, boxConfiguration.getV3Identity().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setLong(4, boxConfiguration.getUptime());\n\t\t\t\t\tpreparedStatement.setString(5, boxConfiguration.getAdminEmail().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(6, boxConfiguration.getDisks().get(0).replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setLong(7, boxConfiguration.getCurrentTime());\n\t\t\t\t\tpreparedStatement.setString(8, boxConfiguration.getDaemonVersion().toString().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(9, boxConfiguration.getJavaVersion().toString().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(10, boxConfiguration.getPlatform().toString().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\n\t\t\t\t\tpreparedStatement.setString(11, boxIpAddress);\n\t\t\t\t\tpreparedStatement.setInt(12, plnID);\n\n\t\t\t\t\tpreparedStatement.setString(13, boxIpAddress);\n\t\t\t\t\tpreparedStatement.setString(14, \"8081\");\n\t\t\t\t\tpreparedStatement.setInt(15, plnID);\n\t\t\t\t\tpreparedStatement.setString(16, boxConfiguration.getGroups().get(0).replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(17, boxConfiguration.getV3Identity().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setLong(18, boxConfiguration.getUptime());\n\t\t\t\t\tpreparedStatement.setString(19, boxConfiguration.getAdminEmail().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(20, boxConfiguration.getDisks().get(0).replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setLong(21, boxConfiguration.getCurrentTime());\n\t\t\t\t\tpreparedStatement.setString(22, boxConfiguration.getDaemonVersion().toString().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(23, boxConfiguration.getJavaVersion().toString().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tpreparedStatement.setString(24, boxConfiguration.getPlatform().toString().replaceAll(\"\\\\[|\\\\]\", \"\"));\n\t\t\t\t\tResultSet rs=preparedStatement.executeQuery();\n\t\t\t\t\tif (rs.next()) {\n\t\t\t\t\t\tboxId = rs.getInt(\"id\");\n\t\t\t\t\t}\n\t\t\t\t\tLOGGER.info(\"Entry for pln: \"+ plnID + \" with IP address \"+boxIpAddress + \" ----- \" + boxConfiguration.getIpAddress() + \"V3 identity:\" + boxConfiguration.getV3Identity() + \" is inserted/updated into LOCKSS_BOX table at position \"+ boxId);\n\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLOGGER.error(e.getMessage());\n\n\t\t\t\t} finally {\n\t\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t}\n\t\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\t\tdbConnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\n\n\t\t\t// if repository box data is collected for the current LOCKSS Box identified by box id and repository_space_lockss_id\n\t\t\t// insert the results in the table lockss_box_data_current\n\n\t\t\tLOGGER.info(\"\\u001B[32m Updating LOCKSS boxes respository space in the database... \\u001B[0m\");\n\n\t\t\tif (repositoryBox != null) {\n\t\t\t\tfor (RepositorySpaceWsResult currentBoxResult : repositoryBox) {\n\t\t\t\t\ttry {\t\t\t\t\t\t\t\n\t\t\t\t\t\tString insertTableSQL = \"WITH upsert AS (UPDATE plnmonitor.lockss_box_data_current \" +\n\t\t\t\t\t\t\t\t\"SET used = ?, \" +\n\t\t\t\t\t\t\t\t\"size = ?, \" +\n\t\t\t\t\t\t\t\t\"free = ?, \" +\n\t\t\t\t\t\t\t\t\"percentage = ?, \" +\n\t\t\t\t\t\t\t\t\"active_aus = ?, \" +\n\t\t\t\t\t\t\t\t\"deleted_aus = ?, \" +\n\t\t\t\t\t\t\t\t\"inactive_aus = ?, \" +\n\t\t\t\t\t\t\t\t\"orphaned_aus = ? \" +\n\t\t\t\t\t\t\t\t\"WHERE box=? and repository_space_lockss_id=? RETURNING *)\" +\n\t\t\t\t\t\t\t\t\"INSERT INTO plnmonitor.lockss_box_data_current\" +\n\t\t\t\t\t\t\t\t\"(box,used,size,free,percentage,active_aus, repository_space_lockss_id, deleted_aus, inactive_aus, orphaned_aus) \"+\n\t\t\t\t\t\t\t\t\"SELECT ?,?,?,?,?,?,?,?,?,? WHERE NOT EXISTS \"+\n\t\t\t\t\t\t\t\t\"(SELECT * FROM upsert)\";\n\n\t\t\t\t\t\tdbConnection = getDBConnection();\n\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL);\n\t\t\t\t\t\tpreparedStatement.setLong(1, currentBoxResult.getUsed());\n\t\t\t\t\t\tpreparedStatement.setLong(2, currentBoxResult.getSize());\n\t\t\t\t\t\tpreparedStatement.setLong(3, currentBoxResult.getFree());\n\t\t\t\t\t\tpreparedStatement.setDouble(4, currentBoxResult.getPercentageFull());\n\t\t\t\t\t\tpreparedStatement.setLong(5, currentBoxResult.getActiveCount());\n\t\t\t\t\t\tpreparedStatement.setLong(6, currentBoxResult.getDeletedCount());\n\t\t\t\t\t\tpreparedStatement.setLong(7, currentBoxResult.getInactiveCount());\n\t\t\t\t\t\tpreparedStatement.setLong(8, currentBoxResult.getOrphanedCount());\n\n\t\t\t\t\t\tpreparedStatement.setLong(9, boxId );\n\t\t\t\t\t\tpreparedStatement.setString(10, currentBoxResult.getRepositorySpaceId());\n\n\t\t\t\t\t\tpreparedStatement.setLong(11, boxId );\n\t\t\t\t\t\tpreparedStatement.setLong(12, currentBoxResult.getUsed());\n\t\t\t\t\t\tpreparedStatement.setLong(13, currentBoxResult.getSize());\n\t\t\t\t\t\tpreparedStatement.setLong(14, currentBoxResult.getFree());\n\t\t\t\t\t\tpreparedStatement.setDouble(15, currentBoxResult.getPercentageFull());\n\t\t\t\t\t\tpreparedStatement.setLong(16, currentBoxResult.getActiveCount());\n\t\t\t\t\t\tpreparedStatement.setString(17, currentBoxResult.getRepositorySpaceId());\n\t\t\t\t\t\tpreparedStatement.setLong(18,currentBoxResult.getDeletedCount());\n\t\t\t\t\t\tpreparedStatement.setLong(19,currentBoxResult.getInactiveCount());\n\t\t\t\t\t\tpreparedStatement.setLong(20, currentBoxResult.getOrphanedCount());\n\n\t\t\t\t\t\t//System.out.println(preparedStatement.toString());\n\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\n\t\t\t\t\t\t//LOGGER.info(\"Record is inserted and updated into database table LOCKSS_box_data_current for boxId\" + boxId + \" Repository Id: \" + currentBoxResult.getRepositorySpaceId());\n\n\t\t\t\t\t} catch (SQLException e) {\n\n\t\t\t\t\t\tLOGGER.error(e.getMessage());\n\n\t\t\t\t\t} finally {\n\n\t\t\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\t\t\tdbConnection.close();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\t// if peers box data is collected from the LOCKSS Box, insert the results in the table Peers\n\t\t\t\tLOGGER.info(\"\\u001B[32m Updating peers status in the database... \\u001B[0m\");\n\n\t\t\t\tif (peersBox != null) {\n\n\t\t\t\t\tfor (PeerWsResult currentPeer : peersBox) {\n\n\t\t\t\t\t\ttry {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString insertTableSQL = \"WITH upsert AS (UPDATE plnmonitor.peer \" +\n\t\t\t\t\t\t\t\t\t\"SET box = ?, \" +\n\t\t\t\t\t\t\t\t\t\"last_poll = ?, \" +\n\t\t\t\t\t\t\t\t\t\"polls_called = ?, \" +\n\t\t\t\t\t\t\t\t\t\"last_invitation = ?, \" +\n\t\t\t\t\t\t\t\t\t\"last_vote = ?, \" +\n\t\t\t\t\t\t\t\t\t\"peer_lockss_id = ?, \" +\n\t\t\t\t\t\t\t\t\t\"last_message = ?, \" +\n\t\t\t\t\t\t\t\t\t\"invitation_count = ?, \" +\n\t\t\t\t\t\t\t\t\t\"message_count = ?, \" +\n\t\t\t\t\t\t\t\t\t\"message_type = ?, \" +\n\t\t\t\t\t\t\t\t\t\"polls_rejected = ?, \" +\n\t\t\t\t\t\t\t\t\t\"votes_cast = ? \" + \n\t\t\t\t\t\t\t\t\t\"WHERE box=? and peer_lockss_id=? RETURNING *)\" +\n\t\t\t\t\t\t\t\t\t\"INSERT INTO plnmonitor.peer \" +\n\t\t\t\t\t\t\t\t\t\"(box,last_poll,polls_called,last_invitation,last_vote,peer_lockss_id,last_message, invitation_count, message_count, message_type, polls_rejected, votes_cast) \"+\n\t\t\t\t\t\t\t\t\t\"SELECT \" +\n\t\t\t\t\t\t\t\t\t\"?,?,?,?,? ,?,?,?,?,? ,?,? WHERE NOT EXISTS \"+\n\t\t\t\t\t\t\t\t\t\"(SELECT * FROM upsert)\";\n\n\t\t\t\t\t\t\tdbConnection = getDBConnection();\n\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL);\n\t\t\t\t\t\t\tpreparedStatement.setLong(1, boxId);\n\t\t\t\t\t\t\tpreparedStatement.setLong(2, currentPeer.getLastPoll());\n\t\t\t\t\t\t\tpreparedStatement.setLong(3, currentPeer.getPollsCalled());\n\t\t\t\t\t\t\tpreparedStatement.setLong(4, currentPeer.getLastInvitation());\n\t\t\t\t\t\t\tpreparedStatement.setLong(5, currentPeer.getLastVote());\n\t\t\t\t\t\t\tpreparedStatement.setString(6, currentPeer.getPeerId());\n\t\t\t\t\t\t\tpreparedStatement.setLong(7, currentPeer.getLastMessage());\n\t\t\t\t\t\t\tpreparedStatement.setLong(8, currentPeer.getInvitationCount());\n\t\t\t\t\t\t\tpreparedStatement.setLong(9, currentPeer.getMessageCount());\n\t\t\t\t\t\t\tpreparedStatement.setString(10, currentPeer.getMessageType());\n\t\t\t\t\t\t\tpreparedStatement.setLong(11, currentPeer.getPollsRejected());\n\t\t\t\t\t\t\tpreparedStatement.setLong(12, currentPeer.getVotesCast() );\n\n\t\t\t\t\t\t\tpreparedStatement.setLong(13, boxId );\n\t\t\t\t\t\t\tpreparedStatement.setString(14, currentPeer.getPeerId() );\n\n\t\t\t\t\t\t\tpreparedStatement.setLong(15, boxId);\n\t\t\t\t\t\t\tpreparedStatement.setLong(16, currentPeer.getLastPoll());\n\t\t\t\t\t\t\tpreparedStatement.setLong(17, currentPeer.getPollsCalled());\n\t\t\t\t\t\t\tpreparedStatement.setLong(18, currentPeer.getLastInvitation());\n\t\t\t\t\t\t\tpreparedStatement.setLong(19, currentPeer.getLastVote());\n\t\t\t\t\t\t\tpreparedStatement.setString(20, currentPeer.getPeerId());\n\t\t\t\t\t\t\tpreparedStatement.setLong(21, currentPeer.getLastMessage());\n\t\t\t\t\t\t\tpreparedStatement.setLong(22, currentPeer.getInvitationCount());\n\t\t\t\t\t\t\tpreparedStatement.setLong(23, currentPeer.getMessageCount());\n\t\t\t\t\t\t\tpreparedStatement.setString(24, currentPeer.getMessageType());\n\t\t\t\t\t\t\tpreparedStatement.setLong(25, currentPeer.getPollsRejected());\n\t\t\t\t\t\t\tpreparedStatement.setLong(26, currentPeer.getVotesCast() );\n\t\t\t\t\t\t\t//preparedStatement.setInt(28, currentPeer.getPeerId().hashCode() );\n\n\t\t\t\t\t\t\t//System.out.println(preparedStatement.toString());\n\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\n\t\t\t\t\t\t\t//LOGGER.info(\"Record is inserted into Peers table!\");\n\n\t\t\t\t\t\t} catch (SQLException e) {\n\n\t\t\t\t\t\t\tLOGGER.error(e.getMessage());\n\n\t\t\t\t\t\t} finally {\n\n\t\t\t\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\t\t\t\tdbConnection.close();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// if AUs box data is collected from the LOCKSS Box, insert the results in the table AU_current\n\t\t\t\t\tLOGGER.info(\"\\u001B[32m Updating AU status in the database... \\u001B[0m\");\n\n\t\t\t\t\tif (ausFromCurrentBox != null) {\n\t\t\t\t\t\tfor (AuWsResult currentAU : ausFromCurrentBox) {\n\t\t\t\t\t\t\ttry {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString insertTableSQL = \"WITH upsert AS (UPDATE plnmonitor.au_current \" +\n\t\t\t\t\t\t\t\t\t\t\"SET box = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"name = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"plugin_name = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"tdb_year = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"access_type = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"content_size = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"recent_poll_agreement = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"creation_time = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"au_lockss_id = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"tdb_publisher = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"volume = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"disk_usage = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"last_completed_crawl = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"last_completed_poll = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"last_crawl = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"last_poll = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"crawl_pool = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"crawl_proxy = ? ,\" + \n\t\t\t\t\t\t\t\t\t\t\"crawl_window = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"last_crawl_result = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"last_poll_result = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"publishing_platform = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"repository_path = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"subscription_status = ?, \" +\n\t\t\t\t\t\t\t\t\t\t\"substance_state = ?, \" + \n\t\t\t\t\t\t\t\t\t\t\"available_from_publisher = ? \" + \n\t\t\t\t\t\t\t\t\t\t\"WHERE box=? and au_lockss_id=? RETURNING *)\" +\n\t\t\t\t\t\t\t\t\t\t\"INSERT INTO plnmonitor.au_current \" +\n\t\t\t\t\t\t\t\t\t\t\"(box,name,plugin_name,tdb_year,access_type,content_size,recent_poll_agreement,creation_time,au_lockss_id,tdb_publisher,volume,disk_usage,last_completed_crawl,last_completed_poll,last_crawl,last_poll,crawl_pool,crawl_proxy,crawl_window,last_crawl_result,last_poll_result,publishing_platform,repository_path,subscription_status,substance_state,available_from_publisher)\" + \n\t\t\t\t\t\t\t\t\t\t\"SELECT \" +\n\t\t\t\t\t\t\t\t\t\t\"?,?,?,?,? ,?,?,?,?,? ,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ? WHERE NOT EXISTS \"+\n\t\t\t\t\t\t\t\t\t\t\"(SELECT * FROM upsert)\";\n\n\t\t\t\t\t\t\t\tdbConnection = getDBConnection();\n\t\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(1, boxId);\n\t\t\t\t\t\t\t\tpreparedStatement.setString(2, currentAU.getName());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(3, currentAU.getPluginName());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(4, currentAU.getTdbYear());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(5, currentAU.getAccessType());\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(6, currentAU.getContentSize());\n\t\t\t\t\t\t\t\tpreparedStatement.setDouble(7, (currentAU.getRecentPollAgreement()!=null)?currentAU.getRecentPollAgreement():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(8, currentAU.getCreationTime());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(9, currentAU.getAuId());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(10, currentAU.getTdbPublisher());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(11, currentAU.getVolume());\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(12, (currentAU.getDiskUsage()!=null)?currentAU.getDiskUsage():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(13, (currentAU.getLastCompletedCrawl()!=null)?currentAU.getLastCompletedCrawl():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(14, (currentAU.getLastCompletedPoll()!=null)? currentAU.getLastCompletedPoll():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(15, (currentAU.getLastCrawl()!=null)? currentAU.getLastCrawl():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(16, (currentAU.getLastPoll()!= null)?currentAU.getLastPoll():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setString(17, currentAU.getCrawlPool());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(18, (currentAU.getCrawlProxy()!=null)?currentAU.getCrawlProxy():\"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(19, (currentAU.getCrawlWindow()!=null)?currentAU.getCrawlWindow():\"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(20, currentAU.getLastCrawlResult());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(21, currentAU.getLastPollResult());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(22, currentAU.getPublishingPlatform());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(23, (currentAU.getRepositoryPath()!=null)?currentAU.getRepositoryPath():\"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(24, (currentAU.getSubscriptionStatus()!=null)?currentAU.getSubscriptionStatus(): \"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(25, currentAU.getSubstanceState());\n\t\t\t\t\t\t\t\tpreparedStatement.setBoolean(26, currentAU.getAvailableFromPublisher());\n\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(27, boxId);\n\t\t\t\t\t\t\t\tpreparedStatement.setString(28, currentAU.getAuId());\n\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(29, boxId);\n\t\t\t\t\t\t\t\tpreparedStatement.setString(30, currentAU.getName());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(31, currentAU.getPluginName());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(32, currentAU.getTdbYear());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(33, currentAU.getAccessType());\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(34, currentAU.getContentSize());\n\t\t\t\t\t\t\t\tpreparedStatement.setDouble(35, (currentAU.getRecentPollAgreement()!=null)?currentAU.getRecentPollAgreement():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(36, currentAU.getCreationTime());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(37, currentAU.getAuId());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(38, currentAU.getTdbPublisher());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(39, currentAU.getVolume());\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(40, currentAU.getDiskUsage());\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(41, currentAU.getLastCompletedCrawl());\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(42, (currentAU.getLastCompletedPoll()!=null)? currentAU.getLastCompletedPoll():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(43, currentAU.getLastCrawl());\n\t\t\t\t\t\t\t\tpreparedStatement.setLong(44, (currentAU.getLastPoll()!= null)?currentAU.getLastPoll():0);\n\t\t\t\t\t\t\t\tpreparedStatement.setString(45, currentAU.getCrawlPool());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(46, (currentAU.getCrawlProxy()!=null)?currentAU.getCrawlProxy():\"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(47, (currentAU.getCrawlWindow()!=null)?currentAU.getCrawlWindow():\"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(48, currentAU.getLastCrawlResult());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(49, currentAU.getLastPollResult());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(50, currentAU.getPublishingPlatform());\n\t\t\t\t\t\t\t\tpreparedStatement.setString(51, (currentAU.getRepositoryPath()!=null)?currentAU.getRepositoryPath():\"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(52, (currentAU.getSubscriptionStatus()!=null)?currentAU.getSubscriptionStatus(): \"\");\n\t\t\t\t\t\t\t\tpreparedStatement.setString(53, currentAU.getSubstanceState());\n\t\t\t\t\t\t\t\tpreparedStatement.setBoolean(54, currentAU.getAvailableFromPublisher());\n\n\t\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\t\t\t\t\t\t\t\t//LOGGER.info(preparedStatement.toString());\n\t\t\t\t\t\t\t\t//LOGGER.info(\"Record \"+ currentAU.getName() + \" is inserted into AU_current table.\");\n\n\t\t\t\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t\t\t\t\tLOGGER.error(e.getMessage());\n\n\t\t\t\t\t\t\t} finally {\n\n\t\t\t\t\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\t\t\t\t\tdbConnection.close();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// if AUs box data is collected from the LOCKSS Box, insert the results in the table AU_current\n\t\t\t\t\tLOGGER.info(\"\\u001B[32m Updating AU summary status in the database... \\u001B[0m\");\n\n\t\t\t\t\t\n\t\t\t\t\t// select distinct(tdb_publisher) from au_current; \n\t\t\t\t\t// for each tdb_publisher get total size\n\t\t\t\t\t//WITH distinctAU AS (SELECT name, tdb_publisher, MAX(content_size)as content_size FROM au_current GROUP BY name, tdb_publisher) select SUM(CASE WHEN tdb_publisher = 'Universiteit Gent' THEN content_size/2 END) AS \"Universiteit Gent\" from distinctAU;\n\t\t\t\t\t\n\t\t\t\t\t// upsert (tdb_publisher, size) to table\n\t\t\t\t\ttry {\t\t\t\t\t\t\t\n\n\t\t\t\t\t\tArrayList<String> tdbPublishers = new ArrayList<String>();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tString queryTableSQL = \"SELECT distinct(tdb_publisher) FROM plnmonitor.au_current\"; \n\n\t\t\t\t\t\tdbConnection = getDBConnection();\n\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(queryTableSQL, Statement.KEEP_CURRENT_RESULT);\n\n\t\t\t\t\t\tResultSet rs=preparedStatement.executeQuery();\n\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\ttdbPublishers.add(rs.getString(\"tdb_publisher\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t\tString SQLRequest;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tdbPublishers != null) {\n\t\t\t\t\t\t\tSQLRequest = \"DROP TABLE IF EXISTS content_per_tdb_publisher\"; \n\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(SQLRequest);\n\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSQLRequest = \"CREATE TABLE content_per_tdb_publisher(id serial primary key)\";\n\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(SQLRequest);\n\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\n\t\t\t\t\t\t\t//TODO: Replace ID=1 by PLNid \n\t\t\t\t\t\t\tSQLRequest = \"INSERT INTO content_per_tdb_publisher(id) VALUES (1)\";\n\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(SQLRequest);\n\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (String tdbPublisher : tdbPublishers) {\n\t\t\t\t\t\t\tif (tdbPublisher != null && !tdbPublisher.isEmpty()) {\n\t\t\t\t\t\t\t\tqueryTableSQL = \"WITH distinctAU AS (SELECT name, tdb_publisher, MAX(content_size) as content_size FROM au_current GROUP BY name, tdb_publisher) select SUM(CASE WHEN tdb_publisher = \\'\" + tdbPublisher + \"\\' THEN content_size END) as content_size from distinctAU\";\n\t\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(queryTableSQL, Statement.KEEP_CURRENT_RESULT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLong contentSize=(long) 0;\n\t\t\t\t\t\t\t\tResultSet tdbResults=preparedStatement.executeQuery();\n\t\t\t\t\t\t\t\tif (tdbResults.next()) {\n\t\t\t\t\t\t\t\t\tcontentSize = tdbResults.getLong(\"content_size\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\tString insertTableSQL = \"WITH upsert AS (UPDATE plnmonitor.au_per_publisher \" +\n//\t\t\t\t\t\t\t\t\t\"SET tdb_publisher = ?, \" +\n//\t\t\t\t\t\t\t\t\t\"content_size = ? \" + \n//\t\t\t\t\t\t\t\t\t\"WHERE tdb_publisher=? RETURNING *)\" +\n//\t\t\t\t\t\t\t\t\t\"INSERT INTO plnmonitor.au_per_publisher \" +\n//\t\t\t\t\t\t\t\t\t\"(tdb_publisher,content_size)\" + \n//\t\t\t\t\t\t\t\t\t\"SELECT \" +\n//\t\t\t\t\t\t\t\t\t\"?,? WHERE NOT EXISTS \"+\n//\t\t\t\t\t\t\t\t\t\"(SELECT * FROM upsert)\";\n//\n//\t\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL);\n//\t\t\t\t\t\t\t\tpreparedStatement.setString(1, tdbPublisher);\n//\t\t\t\t\t\t\t\tpreparedStatement.setLong(2, contentSize);\n//\n//\t\t\t\t\t\t\t\tpreparedStatement.setString(3, tdbPublisher);\n//\n//\t\t\t\t\t\t\t\tpreparedStatement.setString(4, tdbPublisher);\n//\t\t\t\t\t\t\t\tpreparedStatement.setLong(5, contentSize);\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\tSystem.out.println(preparedStatement.toString());\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSQLRequest =\"ALTER TABLE content_per_tdb_publisher add column \\\"\" + tdbPublisher + \"\\\" bigint\";\n\t\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(SQLRequest);\n\t\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t//TODO: replace id=1 by PLN ID\n\t\t\t\t\t\t\t\tSQLRequest = \"UPDATE content_per_tdb_publisher set \\\"\" + tdbPublisher + \"\\\"= \" + contentSize + \" where id=1\";\n\t\t\t\t\t\t\t\tpreparedStatement = dbConnection.prepareStatement(SQLRequest);\n\t\t\t\t\t\t\t\tpreparedStatement.executeUpdate();\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\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\tLOGGER.error(e.getMessage());\n\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t}\n\t\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\t\tdbConnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace() ;\n\t\t}\n\n\n\t}", "List<Status> getStatusAlteraveis() throws ServiceException;", "void loadJobDetails() {\n if (!enabled.get()) {\n LOGGER.info(\"Skip loading scheduled jobs\");\n return;\n }\n loadJobsInCurrentChunk()\n .filter(j -> !scheduler.scheduled(j.getId()).isPresent())//not consider already scheduled jobs\n .flatMapRsPublisher(t -> ErrorHandling.skipErrorPublisher(scheduler::schedule, t))\n .forEach(a -> LOGGER.debug(\"Loaded and scheduled job {}\", a))\n .run()\n .whenComplete((v, t) -> Optional.ofNullable(t)\n .map(ex -> {\n LOGGER.error(\"Error Loading scheduled jobs!\", ex);\n return null;\n })\n .orElseGet(() -> {\n LOGGER.info(\"Loading scheduled jobs completed !\");\n return null;\n }));\n }", "private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void containerDataCenterChanged() {\n storage_pool dataCenter = (storage_pool) getContainer().getDataCenter().getSelectedItem();\n Version ver31 = new Version(3, 1);\n\n boolean available = dataCenter != null && (dataCenter.getcompatibility_version().compareTo(ver31) >= 0 || dataCenter.getId().equals(Guid.Empty));\n\n getVersion().setIsAvailable(available);\n getRetransmissions().setIsAvailable(available);\n getTimeout().setIsAvailable(available);\n }", "@Override\n protected void loadData() {\n setUpLoadingViewVisibility(true);\n callImageList = RetrofitGenerator.createService(ApiService.class)\n .getAllPubImage();\n callImageList.enqueue(callbackImageList);\n }", "private void fillInTable() {\r\n // Firstly clean up panel.\r\n myOuterPanel.clear();\r\n LabelModel theLabelModel;\r\n for (LabelUUID theLabelUUID : myCaseItem.getLabels()) {\r\n theLabelModel = myLabelDataSource.getLabel(theLabelUUID.getValue());\r\n // The only reason it could be null is that the label has been\r\n // renamed and the case has not yet been updated.\r\n if (theLabelModel != null && theLabelModel.hasToBeDisplayed()) {\r\n // Check if the label has to be displayed.\r\n // Add the label in the panel.\r\n try {\r\n myOuterPanel.add(myLabelTable.get(theLabelUUID.getValue()));\r\n } catch (Exception theE) {\r\n GWT.log(\"label not found: \" + theLabelUUID.getValue() + \",\" + theLabelUUID.getOwner().getValue(), theE);\r\n }\r\n }\r\n }\r\n }", "private String getStatusTableName(String studyId) {\n return studyId + \"-status\";\n }", "private void loadPersistantWatchLists()\r\n {\r\n\r\n debug(\"loadPersistantWatchLists() called - \");\r\n\r\n expungeAllHistoricFiles();\r\n\r\n final int watchListCount =\r\n ParseData.parseNum(appProps.getProperty(getString(\"WatchListTableModule.application_watchlist_count_key_title\")), 0);\r\n\r\n for (int index = 0; index < watchListCount; index++)\r\n {\r\n // Create a NEW header Vector\r\n Vector headers = new Vector();\r\n headers.removeAllElements();\r\n for (int i = 0; i < StockData.columns.length; i++)\r\n {\r\n headers.addElement(StockData.columns[i]);\r\n }\r\n\r\n // Create a new DATA Vector\r\n Vector data = new Vector();\r\n data.removeAllElements();\r\n // Are we in DEMO mode ior in Live Mode\r\n // Populate the Vectors\r\n if (DEMO_MODE)\r\n {\r\n getDemoData(data);\r\n }\r\n else\r\n {\r\n //getDemoData(data);\r\n getLiveData(data, index);\r\n }\r\n\r\n // Create a new Table Model with our headers and data\r\n StockDataTableModel tableModel = new StockDataTableModel(headers, data);\r\n\r\n // Create a new Table with our Tablemodel\r\n JTable table = new HGTable(tableModel);\r\n\r\n // This method will add a timer ( via the index ) the table and tableModel\r\n // the appropriate vector containers.\r\n addDataToVectorContainers(table, tableModel, index);\r\n // This Method will add the Popup menu to the this table\r\n addPopupMenuToTable(table);\r\n // Create a new ScrollPane and add our table to it\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.getViewport().add(table);\r\n JPanel panel = new JPanel(new BorderLayout());\r\n\r\n // Creae a new Vertical Panel and add our Menu and JScrollPane Table\r\n JPanel lblPanel = createVerticalPanel(true);\r\n\r\n lblPanel.add(createDropDownMenu());\r\n panel.add(lblPanel, BorderLayout.NORTH);\r\n panel.add(scrollPane, BorderLayout.CENTER);\r\n\r\n // Create a default name for that tab and tab name lookup\r\n String tabName = getString(\"WatchListTableModule.edit.watch_list_basic_name\") + index;\r\n // Get the WatchList title via Properties\r\n // Get the Property\r\n tabName = appProps.getProperty(tabName, tabName);\r\n tabPane.addTab(tabName, null, panel, new String(\"Click here to view \" + tabName));\r\n\r\n // Set the selected index to the first in the list\r\n tabPane.setSelectedIndex(0);\r\n // Repaint the tabpane with the current data\r\n tabPane.repaint();\r\n\r\n // Load the Historical Data on the Util Event Thread as \r\n // to get our primary data up and going as fast as possible\r\n // So we can get out of here - This Inner class thread\r\n // invokes class instance method loadHistoricData(index);\r\n // NOTE: Startup Initial delay of 5 seconds, give the application,\r\n // Time to load.\r\n TimerTask historicDataTask = new LoadHistoricListDataTask(index);\r\n Timer timer = new Timer(true);\r\n timer.schedule(historicDataTask, ONE_SECOND ); // ONE_SECOND * 6);\r\n\r\n this.setStatusBar(\"Loading watch list [\" + index + \"] complete.\");\r\n }\r\n\r\n this.MODULE_READY = true;\r\n\r\n this.monitorTask = new WatchListMonitorTask();\r\n Timer timer = new Timer(true); // Non-Deamon\r\n timer.scheduleAtFixedRate(monitorTask, MONITOR_DELAY, MONITOR_DELAY);\r\n\r\n debug(\"loadPersistantWatchLists() complete - \");\r\n\r\n }", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "public void initializeStatusFields(NbaUserVO user, NbaLob lob, RequirementInfo requirementInfo) throws NbaBaseException {\n initializeStatusFields(user, lob, null, requirementInfo); \n}", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "@Override\n protected void loadAndFormatData()\n {\n // Create an object to hold the log data\n final Object[][] tableLogList = new Object[perfLog.getPerfLogData().size()][NUM_COLUMNS];\n int row = 0;\n\n // Create the output format string for the time stamps so that\n // the decimals align with the text centered\n String timeFormat = \"%\"\n + (String.valueOf((int) (plotPrefs.isShowDataGaps(false)\n ? perfLog.getMaximumTimeStamp()\n : perfLog.getAdjustedDataTimeSpan())).length()\n + TIME_PRECISION + 1)\n + TIME_FORMAT.substring(1);\n\n // Collect the log data and format it for the table cells\n for (PerfLog log : perfLog.getPerfLogData())\n {\n // Get the performance ID object associated with the log ID\n PerformanceID pid = perfIDs.getPerfID(log.getPerfID());\n\n tableLogList[row][INDEX] = row;\n tableLogList[row][ID] = perfIDs.convertIDToHexString(log.isEntryEvent()\n ? pid.getPerfID()\n : pid.getPerfID()\n | EXIT_MASK);\n tableLogList[row][NAME] = pid.getPerfIDName(false);\n tableLogList[row][TIME] = String.format(timeFormat, log.getTimeStamp());\n tableLogList[row][ENT_EX] = log.isEntryEvent();\n tableLogList[row][SEQ_ERR] = log.isSequenceError();\n tableLogList[row][OVER] = log.getOverrun() == 0.0\n ? \"\"\n : String.format(TIME_FORMAT,\n log.getOverrun());\n tableLogList[row][NOTES] = log.getNotes();\n\n row++;\n }\n\n // Place the log data into the table model along with the\n // column names, set up the editors and renderers for the table\n // cells, set up the table grid lines, and calculate the\n // minimum width required to display the table information\n int totalWidth = setUpdatableCharacteristics(tableLogList,\n new String[] {\"Index\",\n \"ID\",\n \"Name\",\n \"<html><center>Time Stamp<br>(sec)\",\n \"<html><center>Entry/<br>Exit\",\n \"<html><center>Seq<br>Err\",\n \"<html><center>Overrun<br>(sec)\",\n \"<html><center>Notes\"},\n true,\n true,\n true);\n\n // Fit the dialog to the table and set the minimum size based\n // on the column widths\n setDialogMinimumSize(totalWidth);\n\n // Set the dialog's title so that it includes the log file\n // name(s)\n setTitle(\"Log Data: \"\n + perfLog.getLogFileName(perfMain.getPreference(PERF_LOG_FILE)));\n }", "public void setStatus(Integer status)\n {\n data().put(_STATUS, status);\n }", "public static int loadPodsAndContainers(final int envId,final String compName,final String parentCompName, final int numPods, int numCont ) {\n\t\tfinal java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis());;\n\t\t\n\t\tfinal int compId = getComponentId(compName, parentCompName);\n\t\tif(compId == 0){\n\t\t\tlogger.info(\"Component Name = \" + compName + \"; Parent Component Name = \" + parentCompName + \"; is not available in the DB\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tK8sPodsContainersEntity podStat = new K8sPodsContainersEntity();\n\t\tEnvironmentEntity environment = new EnvironmentEntity();\n\t\tenvironment.setEnvironmentId(envId);\n\t\tpodStat.setEnvironment(environment);\n\t\tpodStat.setStatusDate(todayDate);\n\t\tComponentEntity component = new ComponentEntity();\n\t\tcomponent.setComponentId(compId);\n\t\tpodStat.setComponent(component);\n\t\tpodStat.setTotalPods(numPods);\n\t\tpodStat.setTotalContainers(numCont);\n\t\tsession.save(podStat);\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "public void setStatusTableName(String name)\n\t{\n\t\tm_statusTableName = name;\n\t}", "@Override\n\t\t\tprotected PaginationResponseData load() {\n\t\t\t\treturn null;\n\n\t\t\t}", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "private void loadPreviousStatuses(String userUid) {\n final String token = prefs.getString(getString(R.string.v_token), \"\");\n final String state = prefs.getString(getString(R.string.v_state), \"\");\n final String pin = prefs.getString(getString(R.string.v_pin), \"\");\n final long expiry = prefs.getLong(getString(R.string.v_expiry), 0);\n final int registrationCnt = prefs.getInt(getString(R.string.v_registered), 0);\n\n final String path = userUid + \"/\" + getString(R.string.firebase_path) + state + \"/\" + pin + \"/\" + token;\n\n FirebaseAnalytics.getInstance(this).setUserProperty(\"COVIDDetection\", token);\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n dbRef = database.getReference(path + \"/\" + getString(R.string.firebase_path_registration));\n\n Map<String, Object> registration = new HashMap<>();\n registration.put(\"token\", token);\n registration.put(\"state\", state);\n registration.put(\"pin\", pin);\n registration.put(\"time\", new Date().getTime());\n registration.put(\"expTime\", expiry);\n dbRef.child(Integer.toString(registrationCnt)).setValue(registration);\n\n dbRef = database.getReference(path);\n dbRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n if (snapshot != null) {\n for (DataSnapshot userData : snapshot.getChildren()) {\n if(userData.getKey() == getString(R.string.firebase_path_location)) {\n for (DataSnapshot userLocations : userData.getChildren()) {\n personStatuses.add(Integer.parseInt(userLocations.getKey()), (Map<String, Object>) userLocations.getValue());\n }\n }\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // TODO: Handle gracefully\n }\n });\n\n LocationRequest request = new LocationRequest();\n //Specify how often your app should request the device’s location//\n request.setInterval(remoteConfig.getLong(\"LOCATION_REQUEST_INTERVAL\"));\n request.setFastestInterval(remoteConfig.getLong(\"LOCATION_REQUEST_INTERVAL_FASTEST\"));\n //Get the most accurate location data available//\n request.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n FusedLocationProviderClient client = LocationServices.getFusedLocationProviderClient(this);\n int permission = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n //If the app currently has access to the location permission...//\n if (permission == PackageManager.PERMISSION_GRANTED) {\n //...then request location updates//\n setStatusMessage(R.string.tracking);\n\n // Hold a partial wake lock to keep CPU awake when the we're tracking location.\n PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);\n mWakelock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"myapp:MyWakelockTag\");\n mWakelock.acquire();\n\n client.requestLocationUpdates(request, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n //Get a reference to the database, so your app can perform read and write operations//\n Location location = locationResult.getLastLocation();\n if (location != null) {\n onLocationChanged(location);\n }\n }\n }, null);\n }\n }", "public void updateStatus (DataSource pool,String status) throws SQLException {\r\n this.setStatus(status);\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set status = ? \"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatus. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getStatus());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n conn.close();\r\n conn=null;\r\n }catch(SQLException e){\r\n \r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }", "public void setStatus(Integer status) {\n this.status = status;\n }" ]
[ "0.65027106", "0.55890524", "0.54142815", "0.52304864", "0.52293843", "0.52108806", "0.51891804", "0.517973", "0.5155963", "0.5139667", "0.5133652", "0.50974834", "0.50542754", "0.5025258", "0.5021178", "0.50084746", "0.49834922", "0.49809325", "0.49807382", "0.4978316", "0.49718654", "0.4969687", "0.4907663", "0.49067798", "0.49048334", "0.48892158", "0.48875946", "0.48821348", "0.48798797", "0.48722726", "0.4857495", "0.48382032", "0.4818967", "0.4810594", "0.47724602", "0.4771896", "0.47718233", "0.4765825", "0.4762008", "0.47554022", "0.47392517", "0.47340238", "0.47339293", "0.47331852", "0.47329077", "0.47288355", "0.4724212", "0.471766", "0.47163236", "0.47143134", "0.47127643", "0.47071508", "0.46888295", "0.4688013", "0.46792448", "0.46757415", "0.46732897", "0.46684098", "0.46651495", "0.4655002", "0.46511936", "0.4647624", "0.46469", "0.46432504", "0.4642004", "0.4636118", "0.46354392", "0.46352443", "0.46250156", "0.46241218", "0.46201575", "0.46200392", "0.46190882", "0.46145996", "0.46111462", "0.46097672", "0.4596559", "0.45960888", "0.45836532", "0.45812094", "0.45805323", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858", "0.4579858" ]
0.60809565
1
Get the previous days number of instance for a particular component
private static int getPreiousNumInstance(final int compId, final Date date, final int envId) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.DATE, -1); Session session = HibernateConfig.getSessionFactory().getCurrentSession(); Transaction txn = session.beginTransaction(); Criteria ctrStsCrit = session.createCriteria(ContainerStatsEntity.class, "cs"); ctrStsCrit.add(Restrictions.eq("cs.component.componentId",compId)); ctrStsCrit.add(Restrictions.eq("cs.environment.environmentId",envId)); ctrStsCrit.add(Restrictions.eq("cs.statsDate", new java.sql.Date(cal.getTimeInMillis()) )); ctrStsCrit.setMaxResults(1); ContainerStatsEntity conSts =(ContainerStatsEntity) ctrStsCrit.uniqueResult(); int totalContainer = 0; if(conSts != null){ totalContainer = conSts.getTotalContainer(); } txn.commit(); return totalContainer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumDaysForComponent(Record record);", "private void previousDay() {\r\n tmp.setDay(tmp.getDay() - 1);\r\n int nd = tmp.getDayOfWeek();\r\n nd--;\r\n if (nd == 0) nd = daysInWeek;\r\n tmp.setDayOfWeek(nd);\r\n upDMYcountDMYcount();\r\n }", "public E previousStep() {\r\n\t\tthis.current = this.values[Math.max(this.current.ordinal() - 1, 0)];\r\n\t\treturn this.current;\r\n\t}", "public ExtremeEntry previous() {\n\n\t\tsetLastReturned(getLastReturned().getPrevious());\n//\t\tnextIndex--;\n\t\tcheckForComodification();\n\t\treturn getLastReturned();\n\t}", "public abstract int getPreviousTerminationCount(SniperCrawler.InstanceGroup group, Date after);", "public String getPrevDate() \n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() -1);\n\t\treturn getTodayDate();\n\t}", "public int getPrevMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger()-2);\n\t\t\n\t\treturn (getMonthInteger()-1);\n\n\t}", "public int getNumberOfDaysInPreviousMonth() {\n if (month > 1) {\n return getNumberOfDaysOfAMonth(month - 1, year);\n }\n return getNumberOfDaysOfAMonth(11, year);\n }", "public static String previousworkingdate() {\n\t\tLocalDate lastbusinessday = getLastWorkingDayOfMonth(LocalDate.now());\n\t\tint x = lastbusinessday.getDayOfMonth();\n\t\tString y = String.valueOf(x);\n\t\tif (y.length() == 1)\n\t\t\ty = \"0\" + y;\n\t\treturn String.valueOf(y);\n\n\t}", "private void previousWeek() {\r\n tmp.setDay(tmp.getDay() - daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "public int getPrevious() {\n\t\treturn this.previous;\n\t}", "public Index previous() {\n return Index.valueOf(value - 1);\n }", "Date PrevEvent(Date d);", "public Integer getPreviousValue() {\n return this.previousValue;\n }", "public double getPrevCount()\n {\n\n return this.prevCount;\n }", "private void changePreviousDay(){\n\t\tplanet.getClimate().prevDay();\n\t}", "@Override\n public int getTopComponentPreviousIndex(String tcID) {\n synchronized(LOCK_TC_CONTEXTS) {\n return getContextSubModel().getTopComponentPreviousIndex(tcID);\n }\n }", "@Override\n public E getPrevious() {\n if (isCurrent() && prev != null) { return prev.getData(); }\n else { throw new IllegalStateException(\"There is no previous element.\"); }\n }", "protected abstract D getPrevious(D d);", "public DependencyElement previous() {\n\t\treturn prev;\n\t}", "public Version getPrev(){\n\t\treturn prev;\n\t}", "@Override\r\n\t\tpublic E previous() {\n\t\t\tcaret = caret.prev();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex--;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}", "public int getCycleYearsForComponent(Record record);", "ComponentAgent getPreviousSibling();", "@Override\n\tpublic long getPreviousVersionId() {\n\t\treturn _scienceApp.getPreviousVersionId();\n\t}", "public int previousIndex()\n {\n // TODO: implement this method\n return -1;\n }", "public String getOldNum(){\n return cal.getOldNum();\n }", "public Dice previousDice() {\n if(diceIterator.hasPrevious())\n return diceIterator.previous();\n else\n return null;\n }", "public DSAGraphNode<E> getPrevious()\n {\n return previous;\n }", "public TimedVariable findPrev(Date ref)\n\t{\n\t\tif (vars.isEmpty())\n\t\t\treturn null;\n\t\tTimedVariable dummy = new TimedVariable(0);\n\t\tdummy.setTime(ref);\n\t\tint idx = Collections.binarySearch(vars, dummy, tvComparator);\n\t\tif (idx < 0)\n\t\t\tidx = (-idx) - 1;\n\n\t\t// The 'insertion point' would be the next one, so subtract one.\n\t\t// If now less than zero, there are no vars prev to 'sec'.\n\t\tif (--idx < 0)\n\t\t\treturn null;\n\t\treturn vars.get(idx);\n\t}", "@Override\r\n public int previousIndex() {\r\n if (previous == null) {\r\n return -1;\r\n }\r\n return previousIndex;\r\n }", "public int prevRoll() {\n return prevRoll;\n }", "@Override\n public String getPreviousSelectedTopComponentID() {\n synchronized(LOCK_TOPCOMPONENTS) {\n return topComponentSubModel.getPreviousSelectedTopComponentID();\n }\n }", "public T previous()\n {\n // TODO: implement this method\n return null;\n }", "public IEvent getPreviousEvent();", "public E previous() {\r\n current--;\r\n return elem[current];\r\n }", "public int previousIndex() {\r\n \treturn index - 1; \r\n }", "String getPreviousCloseDate();", "public TimedVariable findPrev(long sec)\n\t{\n\t\treturn findPrev(new Date(sec*1000L));\n\t}", "public static WithAdjuster previous(DayOfWeek dayOfWeek) {\n\n return new RelativeDayOfWeek(3, dayOfWeek);\n }", "public static Previous getPreviousWindow() {\n\t\treturn previousWindow;\n\t}", "@Override\n public E previous() throws NoSuchElementException\n { \n if(hasPrevious() == false)\n {\n throw new NoSuchElementException();\n }\n idx = idx - 1;\n Node theNode = getNth(idx);\n left = left.prev;\n right = left;\n canRemove = false;\n forward = false;\n return theNode.getElement(); \n }", "@Nonnull\n public Optional<ENTITY> previous()\n {\n currentItem = Optional.of(items.get(--index));\n update();\n return currentItem;\n }", "public int[] getPrevious() {\n if (currentRound == -1 || currentHeat == -1 || rounds.size() == 0) {\n return new int[] {-1, -1};\n }\n\n int[] last = new int[2];\n\n // Check if current round was the first heat (if so there was no previous heat)\n if (currentRound == 0 && currentHeat == 0) {\n // This is the first heat - return invalid\n return new int[] {-1, -1};\n }\n // There was a previous heat\n else {\n // Check if this was the first heat of the round\n if (currentHeat == 0) {\n // It was the first heat, so we need to get the last heat of the previous round\n last[0] = currentRound - 1;\n last[1] = rounds.get(currentRound - 1).length() - 1;\n }\n else {\n // There was a previous heat in this round\n last[0] = currentRound;\n last[1] = currentHeat - 1;\n }\n }\n\n return last;\n }", "public ListElement getPrevious()\n\t {\n\t return this.previous;\n\t }", "int getNumberDays();", "public int getLBR_ProtestDays();", "public Date getPreviousWeekStart() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek());\n cal.add(Calendar.DATE, -7);\n Date previousWeekStart = cal.getTime();\n\n return previousWeekStart;\n }", "public T previous() {\n\t\t\tif(hasPrevious()) {\n\t\t\t\tT temp = vector.elementAt(previousPosition);\n\t\t\t\tpreviousPosition++;\n\t\t\t\tnextPosition++;\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "SolutionChange getPreviousChange();", "String getPrevious();", "public Object getPrev() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.prev;\n\t\t} else {\n\t\t\tcurrent = start;\n\t\t}\n\t\treturn current == null ? null : current.item; //Ha nincs még start, akkor null adjon vissza\n\t}", "public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }", "public Date getPreviousWeekEnd() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek());\n cal.add(Calendar.DATE, -1);\n Date previousWeekEnd = cal.getTime();\n\n return previousWeekEnd;\n }", "public static Player getPrevPlayer(){\n\t\tif(players.get(curr).getPnum()==1)\n\t\t\treturn players.get(players.size()-1);\n\t\telse return players.get(curr-1);\n\t}", "public CellCoord previousRow() {\n return new CellCoord(column, row - 1);\n }", "public PieceOrientation previous() {\n PieceOrientation[] PieceOrientations = this.values();\n int current = value;\n int previousIndex = (current + PieceOrientations.length - 1) % PieceOrientations.length;\n return PieceOrientations[previousIndex];\n }", "@Override\n\tpublic int getDaysSinceLastLogin() {\n\t\tDate now = sabre.getTimeNow();\n\t\tlong timeDiff = now.getTime() - lastLogin.getTime();\n\t\tlong diffDays = TimeUnit.DAYS.convert(timeDiff, TimeUnit.MILLISECONDS);\n\t\treturn (int)diffDays;\n\t}", "private int backDays(Calendar startDate, int delta) {\n Calendar newDate = (Calendar) startDate.clone();\n newDate.add(Calendar.DAY_OF_MONTH, -delta);\n return DateUtil.convertCalToInt(newDate);\n }", "Object previous();", "public ListElement<T> getPrev()\n\t{\n\t\treturn prev;\n\t}", "private int previousSong() {\n if (playListAdapter != null) {\n playListAdapter.clickPreviousNext(1);\n }\n serviceBound = false;\n player.stopMedia();\n if (currentSong > 0) {\n currentSong--;\n }\n return currentSong;\n }", "Date NearestPrevEvent(Date d);", "public T prev() {\n cursor = ((Entry<T>) cursor).prev;\n ready = true;\n return cursor.element;\n }", "@Field(0) \n\tpublic Pointer<uvc_processing_unit > prev() {\n\t\treturn this.io.getPointerField(this, 0);\n\t}", "public int getBSCA_PriceChangePrev_ID();", "protected JButton getPrevious()\n {\n return previous;\n }", "public ImageObj prevImage() {\n if (position != 0) {\n position--;\n }\n else {\n position = model.getImageList().size() - 1;\n }\n\n return model.getImageList().get(position);\n }", "@Override\n\t\tpublic int previousIndex() {\n\t\t\treturn 0;\n\t\t}", "private final int internalPrev(int n) {\n if (n == 0 || n == -1 || this.backwardsTrie == null) {\n return n;\n }\n resetState();\n while (n != -1 && n != 0 && breakExceptionAt(n)) {\n n = this.delegate.previous();\n }\n return n;\n }", "private Tab getPrevTab() {\n int pos = mTabControl.getCurrentPosition() - 1;\n if (pos < 0) {\n pos = mTabControl.getTabCount() - 1;\n }\n return mTabControl.getTab(pos);\n }", "public SlideNode getPrev() {\n\t\treturn prev;\n\t}", "public E getPrevious() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index <= 0)\n\t\t\t\tindex = this.size();\n\t\t\treturn this.get(--index);\n\t\t}\n\t\treturn null;\n\t}", "int getPrev(int node_index) {\n\t\treturn m_list_nodes.getField(node_index, 1);\n\t}", "public int getNumberOfOlderOnSpaceActivities(Identity ownerIdentity, Long sinceTime);", "public DoubleNode<T> getPrevious()\n {\n\n return previous;\n }", "public Page getPrevPageObject() {\n return getPageObject(this.currentIndex.viewIndex - 1);\n }", "public long getSystemTotalPrevious() {\n\t\t\treturn mSystemPrevious + mIntrPrevious + mSoftIrqPrevious;\n\t\t}", "long getSince();", "public static String getDisplayDatePrevious(Date val) {\n\t\t\n\t\t\n\n\t\tif (val != null) {\n\t\t\tDate previous = DateUtils.addDays(val, -1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn format.format(previous);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public E previous(){\n\t\t\tE e = tail.element;\n\t\t\tcurrent = current.next;\n\t\t\treturn e;\n\t\t}", "@Override\n public Long getRunningTimeInDays() {\n return null;\n }", "public int getPrevNode() {\n\t\treturn this.previousNode;\n\t}", "public Date getPreviousWeekStartDate(Date date) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(getWeekStartDate(date));\n cal.add(Calendar.WEEK_OF_YEAR, -1);\n return cal.getTime();\n }", "public int getPreviousScene(){\n\t\treturn _previousScene;\n\t}", "public int getOlddeltaT() {\n return olddeltaT;\n }", "public java.lang.Long getId_cita_previa();", "private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}", "public DockableState getPreviousState() {\n\t\treturn previousState;\n\t}", "public int getNumberOfNewerOnSpaceActivities(Identity spaceIdentity, Long sinceTime);", "public int getWeekDay() {\r\n return this.weekday - 1;\r\n }", "public int getCurrentDay() {\n return daysPassed;\n }", "Integer getDaysSpanned();", "public Date getBestBeforeDate(int days) {\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.setTime(productionDate);\r\n\t\tc.add(Calendar.DATE, days); //adds 30 days to productionDate\r\n\t\treturn c.getTime();\r\n\t}", "int getMessageCounterHistoryDayLimit();", "public Color getPrevColor(){\n\t\treturn prevColor;\n\t}", "public State getPreviousState()\r\n\t{\r\n\t\treturn previousState;\r\n\t}", "public int previousIndex() {\r\n throw new UnsupportedOperationException();\r\n }", "public void focusPreviousComponent(Component paramComponent)\n/* */ {\n/* 1365 */ if (paramComponent != null) {\n/* 1366 */ paramComponent.transferFocusBackward();\n/* */ }\n/* */ }", "public Integer getRenewalperiodbeforeexp() {\n return (Integer) getAttributeInternal(RENEWALPERIODBEFOREEXP);\n }" ]
[ "0.6445586", "0.6085337", "0.59580463", "0.59476334", "0.59347105", "0.5875815", "0.58624345", "0.58495456", "0.58230907", "0.56888866", "0.5657277", "0.5652836", "0.5606653", "0.5543012", "0.5529433", "0.55205035", "0.55078256", "0.54750663", "0.54616106", "0.5454317", "0.5451862", "0.5422643", "0.5357982", "0.5349483", "0.5308548", "0.530297", "0.5295394", "0.5281016", "0.52745134", "0.5248588", "0.5242155", "0.5217588", "0.5209968", "0.52007204", "0.519778", "0.5189331", "0.518326", "0.5167125", "0.51241577", "0.5100991", "0.50941396", "0.50854415", "0.5077842", "0.5073409", "0.50707626", "0.5063842", "0.50456196", "0.50454336", "0.5028836", "0.50229555", "0.5016124", "0.5011957", "0.5007274", "0.5005514", "0.5001475", "0.5000956", "0.49946848", "0.49764886", "0.49686143", "0.4964972", "0.49585292", "0.4954344", "0.49521798", "0.49497235", "0.4949084", "0.4936206", "0.49337378", "0.49254158", "0.49243432", "0.4921965", "0.4921512", "0.49167043", "0.4913612", "0.49105227", "0.49052325", "0.4890134", "0.4875055", "0.48740372", "0.4869147", "0.48672497", "0.48628125", "0.48622996", "0.48598504", "0.48582694", "0.48501796", "0.4838622", "0.4830803", "0.4821318", "0.4820253", "0.4815199", "0.4800063", "0.47944808", "0.47893208", "0.47866324", "0.47830734", "0.4777242", "0.47677037", "0.47597417", "0.47269005", "0.4722858" ]
0.5201315
33